Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to get indicator to restart count daily?
Collapse
X
-
How to get indicator to restart count daily?
I was wondering how do I get the indicator to restart its count based on the data at the start of the new daily session rather than looking backward to the previous day data? Coz when I do intraday trades during the strategy backtesting, I get some false indicator signals in the opening hours.Tags: None
-
Basically it is to restart the count of all the indicators that I use in my strategy when the new session begins.
So I will just have to add if (Bars.SessionBreak) to cover my previous code in strategy and the indicators will start counting afresh during a new session?
Comment
-
It is actually not a counter but some indicator I use in my strategy. I illustrate what I am trying to do in the attached pic.Originally posted by NinjaTrader_Josh View PostYou just want to reset any counter you have back to 0 when you have a session break. You do not want to blanket your whole code with such an if-statement.
Comment
-
tjendra,
In that case there is no clear way to proceed. You would have to reset your indicator states through the indicator code at each new session break. Whether this means setting all your variables back to 0 I could not say. Even then, it looks like some MA indicator so setting back to 0 wouldn't help since you are still processing historical bars. You will need to tweak your indicator logic to compensate for what you want.Josh P.NinjaTrader Customer Service
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
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
338 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment