Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator help to reset

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

    indicator help to reset

    I have an indicator that accumulates data that I wish to reset to zero when I enter a trade without effecting the other indicators on my chart. I was hoping somone could point me in the direction of a snipet of code that would allow me to do this by hitting the space bar. Any suggestions?

    Thanks,

    Safetrading

    #2
    Hello SafeTrading,

    Unfortunately setting an indicator value through a keyboard input is beyond our scope of support.

    You may consider calling the indicators Reset() method in the same block that places the orders.

    Calling the Reset() method is unique and can be very powerful for custom indicator development. DataSeries objects can hold null values which simply means that you do not want to store a value for the current bar. Mathematically, you can correctly assign a value of zero however if the DataSeries was the primary DataSeries of an indicator whose values would be used for plotting, you may NOT want a zero value plotted. Meaning, you want a zero value for proper calculations but not a zero value for chart visualization. The Reset() method allows you to reset the current bar's DataSeries value to a zero for calculation purposes but NinjaScript would ignore this value when it plotted it on a chart.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick response. I am using a discretionary trading method, so I'm using the DOM to enter my trades and therefore need to reset the plotted indicator manually. If anyone else has any thoughts on how I can do this your input would be greatly appreciated.

      Thanks,

      Safetrading


      Originally posted by NinjaTrader_RyanM View Post
      Hello SafeTrading,

      Unfortunately setting an indicator value through a keyboard input is beyond our scope of support.

      You may consider calling the indicators Reset() method in the same block that places the orders.

      Calling the Reset() method is unique and can be very powerful for custom indicator development. DataSeries objects can hold null values which simply means that you do not want to store a value for the current bar. Mathematically, you can correctly assign a value of zero however if the DataSeries was the primary DataSeries of an indicator whose values would be used for plotting, you may NOT want a zero value plotted. Meaning, you want a zero value for proper calculations but not a zero value for chart visualization. The Reset() method allows you to reset the current bar's DataSeries value to a zero for calculation purposes but NinjaScript would ignore this value when it plotted it on a chart.

      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