Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyzer filter or alerts on 0 (not n/a)

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

    Market Analyzer filter or alerts on 0 (not n/a)

    I have an indicator with 2 plots... they work in tandem. In the data box it will show either 0 or n/a for either plot and each plot is the opposite of the other meaning if the first plot is 0 then the second is n/a and if the second is 0 then the first is n/a

    How can I set up the market analyzer to filter or alert when a plot is 0? (but not n/a)

    I'm asking because the columns I set up (I set up one column for each plot), always show 0.. both of them.. even though i know some values must be n/a

    p.s. what is the code equivalent of n/a is it a null value?

    #2
    Hello NinjaCustomer,

    Thank you for your note.

    In your indicactor, what state are you making your AddPlot call, State.Configure or State.SetDefaults?

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      AddPlot calls are in SetDefaults

      Comment


        #4
        Hello NinjaCustomer,

        The recommended way for achieving this in NT8 would be using a custom MA column to access your indicator values / exposed states. Attached is an example which demonstrates this.

        Import the attached .zip and on a Market Analyzer window, add the column AlanMAColumn.

        In the NinjaScript Editor you can find AlanMAColumn under MarketAnalyzerColumns, which you can use as a guide for correctly displaying information to the MA window and which you can then reference for your alerts.

        Please let us know if you need further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          thanks, where can I find the documentation to create my own custom column? that's not specifically about this issue - it just sounds interesting and i'd like to read about it

          Comment


            #6
            Hello NinjaCustomer,

            If your plots are always outputting 0 when you know it should be another value, it’s likely not set up correctly in the Market Analyzer which is why I suggest using the approach I provided.

            Once you have the plots correctly displaying the value in the market analyzer window, you could write click on the MA>Alerts and define an action to go off when that column is displaying a value of 0.

            I rewrote the sample I provide you so that it will display either a 1 or -1 in the MA column depending if the SMA of this bar is greater than its last bar. From here you could then set up an alert. I have provided screen shots of how you'd set up an alert for this.

            The following section of our helpguide goes over setting up a market analyzer column,


            If you are still having trouble, and would like to upload the full code I can take a look, or if you'd prefer to email a copy, send to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.

            I look forward to your reply.
            Attached Files
            Alan P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by algospoke, Yesterday, 06:40 PM
            2 responses
            23 views
            0 likes
            Last Post algospoke  
            Started by ghoul, Today, 06:02 PM
            3 responses
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            45 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            22 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            181 views
            0 likes
            Last Post jeronymite  
            Working...
            X