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