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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X