Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

To use the MAX indicator for Bars Object other than [0], what is needed?

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

    To use the MAX indicator for Bars Object other than [0], what is needed?

    Hello,

    I have a multi-instrument, multi-time frame strategy that I need to look into the secondary bars array to check a condition before entry.

    I need to use a statement like this to add a condition for order entry:


    SMA(High,10)[1][0] > MAX(SMA(High,10)[1][1],30)
    The problem is that even though I have added the 2nd bars array, I cannot access it to use as a condition of entry for my strategy. The line above is designed to say that the SMA of the High for Bars Array 1 this bar must be higher than the Maximum of the SMA of the High for bars array 1, 1 bar ago and for the last 30 bars.

    I get errors that say something about IDataSeries but I don't know how to use this method. I have looked it up but have been unsuccessful at making changes that result in an error free compile.

    Thanks to anyone who can help,

    dendy.

    #2
    You likely want something like:

    Code:
    SMA(Highs[1], 10)[0] > MAX(SMA(Highs[1], 10), 30)[1]
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks Ray!!!

      I believe that's it. I'll work with it for a while and see what happens.

      dendy.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X