Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

.Reset() plots close values, not null values

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

    .Reset() plots close values, not null values

    Hello,

    I am working on an indicator that plots the low of the day, if that day’s low is lower than the previous day’s low.

    Specifically, a day’s low is added to a DataSeries if the day makes a lower low. If the day doesn’t make a new low, the DataSeries stores a null value using the .Reset() method.

    The problem I am experiencing is that the .Reset() method doesn’t seem to be setting a null value. When the indicator is added to a chart, the instances where a null value is expected are plotted on the chart as the day’s Close Value. I have checked my code and cannot see a reason why it is plotting the Close.

    The indicator is attached.

    For the sake of clarification, I have also attached and a .gif showing the indicator as it currently plots and also showing how I would like it to plot.

    Is there anyway to achieve the desired indicator plot (as shown in the .gif).

    Many thanks.
    Attached Files

    #2
    Hi ninja.man, please check this link - http://www.ninjatrader-support.com/H...iesObject.html

    The Reset() method will differentiate between 'visualization' and 'plotting', meaning the null value will be stored internally for calculations, but is not used in plotting as this may not be visually appealing.

    Comment


      #3
      Hello Bertrand,

      I looked through that page in the hope of finding a solution before I posted on the forum, and modeled my code specifically on what that page contains--still I am getting a plot at the close of the day, rather than a null value. Perhaps if you have the time you can take a minute to review the code in the indicator I posted. It is very simple and should take just a moment to see where the error is. I myself have triple checked it, but as I am not a programmer, I do not see where I am making the mistake!

      Comment


        #4
        There is no mistake, the difference is just the null value is stored internally and not used for actual plotting of the indicator.

        You may want to check this reference sample for an idea how to connect Plots with the DataSeries object - http://www.ninjatrader-support2.com/...ead.php?t=3227

        Comment

        Latest Posts

        Collapse

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