• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Prevent Plot unless value changes

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

    Prevent Plot unless value changes

    I currently have a custom harmonic indicator with a custom DataSeries. How do I prevent this custom DataSeries from being plotted unless a new price "D" has been generated?

    My intent is to use this indicator in the market analyzer which scan hundreds of instruments and return the D price of a XABCD pattern.

    #2
    Hello,
    Thank you for the question.

    I would like to know, are you referring to preventing the DataSeries from plotting in a chart or are you asking how to filter rows that the DataSeries does not = X in the Market Analyzer?

    If you are trying to prevent the Market Analyzer from showing rows, you could potentially use the Filter condition in the MA. It depends on the value you are getting out of the indicator, if this is a basic number like a 1 for on and 0 for off this would be very easy, if it is a range you may have to make a few conditions.

    Can you provide some more details on this?

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

    Comment


      #3
      I am not trying to filter and this is a DataSeries for the market analyzer.

      Right now the last price D of the pattern is constantly reprinted (verified with output window). What I am trying to do is only plot/print the value once until a new price pattern is identified.

      For example, if there is no valid pattern, output (plot) -1 so that I could then filter out the instruments which == -1.

      Comment


        #4
        Hello,

        Thank you for the clairification.

        There are two ways to do this, they are both exactly the same except the first you need the indicators original source code.

        Essentially what you will need to do is create a custom plot for the MA specifically.

        This plot would need to be set to -1 at the beginning of every OnBarUpdate so in the MA it will report a -1 if there is no change.

        You would need to declare a variable that will hold the existing value of the indicator.

        In the OnBarUpdate you would need to check if the current indicator value is == to the stored value, if it is not == to the stored value you would set the plot to 1 to create a signal. The next time OnBarUpdate runs it would return the plot to -1.

        This would be one way of doing this, you may need to change the logic around because if this were to run with CalculateOnBarClose = false it would only show the row for a split second. If it was COBC = true, it would show for how long it takes for the next bar to close.

        If you do not have the original source, like i said the process would be the same but you would instead create a new indicator that reads your harmonic indicator value and compares it. You would then load the New indicator into the MA column rather than the harmonic indicator.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by snbence, Today, 11:19 AM
        0 responses
        5 views
        0 likes
        Last Post snbence
        by snbence
         
        Started by marwanco, Today, 10:54 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by daqu40, Today, 11:01 AM
        0 responses
        0 views
        0 likes
        Last Post daqu40
        by daqu40
         
        Started by n8dogg59, Today, 09:55 AM
        2 responses
        5 views
        0 likes
        Last Post n8dogg59  
        Started by ren37, Today, 09:42 AM
        2 responses
        4 views
        0 likes
        Last Post ren37
        by ren37
         
        Working...
        X