Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Multi-TimeFrame indicator in a strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multi-TimeFrame indicator in a strategy

    Hi NT,

    I have developed a indicator which takes 5 min granularity of data series to calculate signals.

    My end goal is to take signals from it and develop a strategy on different timeframe.

    When I test it on 5 min chart, It is working as expected. However, When I change the TF from 5 min it isn't giving signals.

    Side Note : I wish to create a package and have a crypt code so passing 5 min data series from the strategy is a no go for me.

    Looking forward to hear from you soon!!

    #2
    Hello dastaan, thanks for writing in.

    Are you getting any errors in the log tab of the Control Center? If not, did you use the Print method in the strategy to see if your trading conditions are actually being hit? e.g.

    if(<condition to trade>)
    {
    Print("Trade Activated");
    EnterLong();
    }

    I look forward to hearing from you.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi Chris,
      I am attaching the indicator script.

      A brief about the script:
      The logic is simple crossover on 5 min timeframe. When I attach it to a chart with timeframe of 5 min it works perfectly, However when I apply the indicator to other timeframe it doesn't work.




      Attached Files

      Comment


        #4
        Hello dastaan, thanks for your reply.

        I ran the indicator on many different time frames and it seems to work fine for me:


        Could you point out a specific scenario where the indicator is not producing the expected output?

        Kind regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Generally, I tested it on higher timeframe. In case we test it on Hourly we won't get any signals.
          Otherwise very few compared to what we are getting on the default TF.

          Comment


            #6
            Hello dastaan, thanks for your reply.

            I am able to get signals on a 60 minute chart with an adequate number of days (20 days in this case):



            Try setting your BarsRequiredToPlot property to a lower number, by default it is set to 20.

            Best regards.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by chbruno, Today, 04:10 PM
            0 responses
            3 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            436 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            6 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            19 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by frslvr, 04-11-2024, 07:26 AM
            9 responses
            127 views
            1 like
            Last Post caryc123  
            Working...
            X