Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how to detect what instrument the strategy is on?
Collapse
X
-
how to detect what instrument the strategy is on?
i was wondering how to detect what instrument the strategy is currently on, and have it only work on certain ones. Example: I want my strategy to only run on ES, so if it is on something else it wont run and will display an error message.Tags: None
-
Hello Laces2,
You can see information for the instrument class below:
Unfortunately we don't provide support for restricting the instrument that the strategy is run against. Instrument selection happens in the GUI, before running the core strategy logic. You may be able to check for this in the strategy OnBarUpdate(), but there's no way to prevent selecting other instruments in the GUI.Ryan M.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
95 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
31 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
35 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
72 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment