Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Reinitialize indicator on Session Break
Collapse
X
-
Reinitialize indicator on Session Break
Is there a way to reinitialize an indicator to start plotting fresh on a session break? I have a moving average that I'd like to start fresh each day instead of carrying over from the previous day. Any suggestions will be greatly appreciated...Tags: None
-
Hello leafsfan,
Thanks for your post.
Regrettably there is not without doing some custom coding to the moving average either based on a specific time or on a session break. Also, keep in mind that the moving average would require a number bars (period) before it is functionally correct.
If you would like to modify an indicator to do this, I would be glad to assist you with links to learning Ninjascript.
Alternatively if you would like we can provide a list of 3rd party programmers who could do this for you.Paul H.NinjaTrader Customer Service
-
Hello pstrusi,
Thanks for your post.
I'm not sure if you were responding to me or the thread starter but to share my thoughts, yes BarsSinceSession would be one way however the threadstarter might be wanting to not include the evening session so perhaps they might want to start at a specific time. The process would be the same in either case, simply clear out any variables and start the indicator again understanding the limitations of what re-initializing means in the context of what you are trying to measure.Paul H.NinjaTrader Customer Service
Comment
-
Hi Paul, yes, it was a quick question by curiosity, however I think the same, the best way to clear all variables out is through a time module. What I did was a simple script within the OnConnectionStatus methods, cause IB reset servers after every session, so I reset my Algo's variables as well.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Waxavi, Today, 02:00 AM
|
0 responses
2 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
||
Started by elirion, Today, 01:36 AM
|
0 responses
4 views
0 likes
|
Last Post
by elirion
Today, 01:36 AM
|
||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
0 responses
4 views
0 likes
|
Last Post Today, 01:30 AM | ||
Started by samish18, Yesterday, 08:31 AM
|
2 responses
9 views
0 likes
|
Last Post
by elirion
Today, 01:28 AM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
16 responses
391 views
0 likes
|
Last Post
by z.franck
Today, 01:04 AM
|
Comment