Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi time frame problem

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

    Multi time frame problem

    I have some code where I have multiple timeframes. (60 minute and a 5 minute period)
    I have a bool in place that when on the 60 min timeframe some conditions take place. This one goes to true. I want to use this bool in my 5 min period ( which is in the chart. The 60 min bool is triggered in the chart and will show the string "3"). But the bool wil only set the first period of 5 min @ true instead of all the 12 5 min periods. (12*5=60 ).

    How can I get this to fill in all the 12 periods @ true.


    thx

    Bas
    Attached Files

    #2
    Hello basanca,
    Welcome to the forum and I am happy to assist you.

    Are you resetting the boolean value anywhere in your code.


    Can you send a toy NinjaScript code* replicating the behavior to support[AT]ninjatrader[DOT]com

    Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

    I look forward to assisting you further.

    *The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hi Joydeep,

      Yes I'm resetting the bool at the end of the code. I'll try to make the stripped down version.

      thx

      Comment


        #4
        Hello basanca,
        Historical bars are calculated at the end of the bar. Thus the 12 bars 5 minute bars are processed before one 60 minute bar could be processed. If you reset the boolean value (to false) at the end of the first 5 minute bar then the subsequent 5 minute bars wont get updated. Please refer to our help guide here to know more about multi-series concepts
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          I now see what it does, it is indeed the reset of the bool after the 5 min period.
          Will amend..


          thx

          Comment


            #6
            Hello basanca,
            Thanks for your note.

            Please let me know if I can assist you any further.
            JoydeepNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            164 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            317 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            350 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X