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 CarlTrading, 03-31-2026, 09:41 PM
                1 response
                156 views
                1 like
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                90 views
                1 like
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                140 views
                2 likes
                Last Post CaptainJack  
                Started by CarlTrading, 03-30-2026, 11:51 AM
                0 responses
                130 views
                1 like
                Last Post CarlTrading  
                Started by CarlTrading, 03-30-2026, 11:48 AM
                0 responses
                107 views
                0 likes
                Last Post CarlTrading  
                Working...
                X