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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
587 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
341 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
555 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