If this is not possible in an Indicator, then please describe how to do it in a Strategy. I just want someone to set it up so that the chart runs some code when the instrument has changed.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Running C# code when the instrument has changed
Collapse
X
-
Running C# code when the instrument has changed
How could I run some C# code upon the changing of an instrument on a chart?
If this is not possible in an Indicator, then please describe how to do it in a Strategy. I just want someone to set it up so that the chart runs some code when the instrument has changed.Tags: None
-
Hello NinjaCustomer,
Thanks for your post.
If you have an instrument on the chart and indicators, when you switch instruments on the chart, all of your indicators would run again as if being applied for the first time.
Can you clarify further what you are trying to accomplish when switching instruments?
-
-
-
Hello NinjaCustomer,
Thanks for your reply.
You would need to add the file location in the "References".
in the Ninjascript editor, open any indicator (or strategy) for editing. Right mouse click on the source code and select "References...". In the References window, left click the "add" text which will open a file explorer window, navigate to the file location, select the file "user32.dll" and click the "Open" button. This will add the reference to the reference window, click the "OK" button.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
70 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
152 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
100 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
288 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment