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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      68 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      151 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X