Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wizard & 2 TimeFrames

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

    Wizard & 2 TimeFrames

    Is it possible to access indicators from 2 or more different time frames?

    Thanks

    Alan

    #2
    Hello Alan,

    This is not possible in the strategy wizard. Unfortunately this requires working with code. There is a sample you can work from provided in the platform. Click Tools > Edit NinjaScript > Strategy > SampleMultiTimeFrame.

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the lightning fast response and link!

      Comment


        #4
        Wizard & 2 TimeFrames

        Thanks,RyanM.

        Thanks a lot for giving this information.

        Comment


          #5
          Originally posted by NinjaTrader_RyanM View Post
          Hello Alan,

          This is not possible in the strategy wizard. Unfortunately this requires working with code...
          OK I have managed to make this work fairly satisfactory and have been using BarsArray.

          Could you help explain this please?

          From the example it appears that for the Primary you do not need to state BarsArray[0] as it assumes that by default however the only way I could make the following work is by using it.

          With a second TimeFrame ADDed

          if (MACD(11, 33, 24).Diff[0] > 0
          && Stochastics(3, 7, 1).D[0] < 25)
          {
          DrawDiamond("My diamond" + CurrentBar, false, 0, Low[0] + -10 * TickSize, Color.Lime);
          }

          It compiles OK but actions on both the Primary and added.

          It may be possibly due to starting with Wizard, I dont know.

          Thanks

          Alan

          Comment


            #6
            Yes, that will refer to all series OnBarUpdate() You can enclose that within a specific BarsInProgress, to force within the context of one series.

            if(BarsInProgress == 0)
            {
            if (MACD(11, 33, 24).Diff[0] > 0
            && Stochastics(3, 7, 1).D[0] < 25)
            {
            DrawDiamond("My diamond" + CurrentBar, false, 0, Low[0] + -10 * TickSize, Color.Lime);
            }
            }
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            67 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            36 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            59 views
            1 like
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            62 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            53 views
            0 likes
            Last Post CarlTrading  
            Working...
            X