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

Market Analyzer breaks indie that references another indie?

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

    Market Analyzer breaks indie that references another indie?

    Howdy.

    So I created a custom script that has plots, that I will use to output to the Market Analyzer to monitor various values.

    For example, this indicator simply outputs the ADR, and the current day's range, and then the percentage of the current days range. To show a visual example, attached is a chart of the indicator I created, where you can see the plots working.

    So the way I built this indicator... is that I REFERENCE, another indicator that already has calculated the ADR.

    And that is where my indicator breaks when I try to run it in the analyzer. The line of code that breaks it is this:
    Code:
    if( IsFirstTickOfBar && Bars.IsFirstBarOfSession ) //ETH Open
    {
        varADR = ADRwStartBarOutput( StartHours, Period ).AdrPerBar[0];
    }
    Here, I am simply capturing the ADR on the first bar of the day, and storing it. This WORKS for simply creating the indicator, as you can see it works when I put it on a chart... but it breaks in the analyzer.

    So I'm wondering, if there is anything special I need to do... for an indicator that outputs PLOTS to be grabbed by the market analyzer, that references another indicator?

    I can manually build the indicator so that it doesn't reference anything, but I'd prefer not to have to do that.

    Thanks!
    Attached Files

    #2
    Hello forrestang,

    You mentioned you set this on the first tick of the bar, because the analyzer is a realtime tool that won't work, you would have to set a constant plot value for the market analyzer to use the value. it will otherwise report the value for only 1 tick, the rest of the ticks will be blank.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello forrestang,

      You mentioned you set this on the first tick of the bar, because the analyzer is a realtime tool that won't work, you would have to set a constant plot value for the market analyzer to use the value. it will otherwise report the value for only 1 tick, the rest of the ticks will be blank.

      I look forward to being of further assistance.
      Howdy.

      I don't think that is the issue? Unless I am misunderstanding what you are saying... As you can see from the image, the plot does get assigned a constant value. That value is only assigned/updated once at the start of the session, stored into the variable "varADR," and then the plot gets its value from that variable via, "MyADR[0] =varADR;" where 'MyADR' is the plot value.

      Comment


        #4
        Hello forrestang,

        Thanks for clarifying. Yes in that case you would likely need to debug the script further to see why it may not be working.

        The code you have shown does not hint at anything specific which may be incorrect.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by inanazsocial, Today, 01:15 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        10 views
        0 likes
        Last Post rocketman7  
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        2 views
        0 likes
        Last Post dustydbayer  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        23 views
        0 likes
        Last Post trilliantrader  
        Started by Davidtowleii, Today, 12:15 AM
        0 responses
        3 views
        0 likes
        Last Post Davidtowleii  
        Working...
        X