Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

referencing OnMarketData indicators with MAX and MIN

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

    referencing OnMarketData indicators with MAX and MIN

    I have several indicators that use OnMarketData that do not plot historically. I want to use them as inputs to MAX and MIN to find the maximum and minimum values of those indicators inside a strategy. However, MAX and MIN are not returning correct values. What should I do?

    #2
    You will need enough real-time data points from OnMarketData() before you will get accurate readings.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      The indicators and strategy are both CalculateOnBarClose = true, but the MAX and MIN are inside IF branches that do not evaluate every bar. Is the indicator which is called from inside MIN and MAX still collecting data when MAX and MIN do not evaluate? Elsewhere in the strategy, I have code that evaluates the indicator with the same parameters every bar.
      Last edited by honvl; 06-09-2009, 03:30 PM.

      Comment


        #4
        Not sure what you mean. MAX and MIN will calculate when it has enough data points.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        672 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X