• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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
        http://www.ninjatrader.com/support/h...nstruments.htm
        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 tonynt, Today, 11:21 AM
            0 responses
            3 views
            0 likes
            Last Post tonynt
            by tonynt
             
            Started by kabott, Today, 10:47 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by bc24fl, Today, 10:00 AM
            3 responses
            10 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by TonyParisi, Today, 07:38 AM
            2 responses
            13 views
            0 likes
            Last Post TonyParisi  
            Started by fx.practic, Today, 10:03 AM
            2 responses
            9 views
            0 likes
            Last Post fx.practic  
            Working...
            X