Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Series<T>.Reset()

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

    Series<T>.Reset()

    Hello,

    I as looking for info abount the Reset() method. https://ninjatrader.com/support/help...roxcompare.htm

    Is it necessary to have a dummy value in the series to call the method?

    I as looking at Swing indicator and in lines 153/154 is the following code:

    SwingHighPlot[0] = close0;
    SwingHighPlot.Reset();

    A value as set before calling Reset().

    Is there the need to unsure the series as a value before make the calling?

    Regards,
    Vava

    #2
    Hello vavatete,

    Calling Reset() can be used logically however I am not certain about that part of the swing without more investigation of why that's used like that. The help guide sample shows the minimal use:



    Reset invalidates the datapoint and resets to the default value of the type, for example 0. Because that is considered an invalid point the 0 is not used for anything other than making the datapoint contain some value, its not going to be plotted or used otherwise. You don't need to set any value before using Reset. If you set a value after reset it makes the point valid again and will be plotted.

    Reset is generally used in combination with IsValidDataPoint for rendering purposes.

    I look forward to being of further assistance.

    Comment


      #3
      Hello,

      I first looked at the example, there the MyPlot have a valid data point before the reset, then looking around I saw the use in the swing indicator, there the series[0] is set to zero, then to close and only after that Reset() is called.
      If no need to set any value before using Reset(), i'm clarified.
      Thank you.
      Regards,
      Vava

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      599 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      344 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
      558 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      557 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X