Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 jpeep, 08-16-2020, 08:31 AM
        17 responses
        502 views
        0 likes
        Last Post notenufftime  
        Started by ETFVoyageur, 05-07-2024, 07:05 PM
        15 responses
        124 views
        0 likes
        Last Post ETFVoyageur  
        Started by esmall, Today, 07:14 PM
        0 responses
        9 views
        0 likes
        Last Post esmall
        by esmall
         
        Started by Option Whisperer, 05-09-2024, 07:58 PM
        6 responses
        26 views
        0 likes
        Last Post Option Whisperer  
        Started by rayyyu12, Today, 05:38 PM
        0 responses
        12 views
        0 likes
        Last Post rayyyu12  
        Working...
        X