Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Time Frame Scripts

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

    #16
    I don't appear to be making any progress with this question.

    Does it not make sense?

    if CurrentBars[0] = 24

    what's in

    Closes[1][1]
    Closes[1][2]
    Closes[1][3]
    etc.

    if I have 60 min primary and 1 day secondary
    Last edited by futurenets; 02-19-2015, 11:55 AM.

    Comment


      #17
      Futurenets,

      If we have 24 bars for the primary at being 60 then we have only 1 day for our secondary or 1 bar

      So -
      Closes[1][0] - Good
      Closes[1][1] - Out of Index
      Closes[1][2] - Out of Index

      If we have 48 bars -

      Closes[1][0] - Good
      Closes[1][1] - Good
      Closes[1][2] - Out of Index
      Cal H.NinjaTrader Customer Service

      Comment


        #18
        thank you. one final question:

        if primary is 365 daily bars and secondary if 5 minute bars

        if there aren't enough 5 minute bars in history what will be the max Count and will this apply to both bar objects?

        Comment


          #19
          Hello Futurenets,

          The secondary bar object will adopt the settings of the primary instrument that the script is attached to.

          If you are using 365 days for your primary then the all other data series objects will adopt this as well.
          Cal H.NinjaTrader Customer Service

          Comment


            #20
            ok thanks but what if there aren't enough intraday bars ?

            Comment


              #21
              Futurenets,

              Then you will run into an Out of Index error, same as before.

              If you want the max count for the secondary bars you can get this value by using BarsArray[0].Count

              The 0 can be replaced by any other data series you have added to the script as an index value
              Cal H.NinjaTrader Customer Service

              Comment


                #22
                thank you Cal

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                580 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                335 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                102 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                554 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                552 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X