Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
What event get's called when changing instruments?
Collapse
X
-
It seems that ChartControl.ChartObjects.InsertComplete is called BEFORE OnTermination() when changing instruments. Is there a way to determine when this is occurring?Originally posted by NinjaTrader_Bertrand View Postfunk101, according to my testing you should see an OnTermination call for the changed to instrument, as a new instance of your script is then run here.
In other words, is there some other event that's called when changing an instrument, so I can know this before InsertComplete is fired?
Thanks!
Daniel
Comment
-
It looks like ChartControl.ChartObjects.ClearComplete is what I'm looking for. It's called right as the instrument change is initiated, does "some work", then it's called again, AND THEN OnTermination() is called, and on down the line.
When it was doing that "work", it is calling InsertComplete for each of the lines I had on my chart, which was messing up my indicator. Now, I just set a flag in a ClearComplete handler, to let my indicator know what is going on.
Thanks!
Daniel
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
164 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
318 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
246 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
350 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment