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 sjsj2732, Yesterday, 04:31 AM
      0 responses
      36 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      287 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      288 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      134 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      95 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X