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 f.saeidi, Today, 12:14 PM
|
4 responses
11 views
0 likes
|
Last Post
by f.saeidi
Today, 01:13 PM
|
||
Started by Russ Moreland, Today, 12:54 PM
|
1 response
6 views
0 likes
|
Last Post Today, 01:01 PM | ||
Started by philmg, Today, 12:55 PM
|
1 response
7 views
0 likes
|
Last Post Today, 01:00 PM | ||
Started by TradeForge, 04-19-2024, 02:09 AM
|
2 responses
32 views
0 likes
|
Last Post
by TradeForge
Today, 12:32 PM
|
||
Started by aprilfool, 12-03-2022, 03:01 PM
|
3 responses
329 views
0 likes
|
Last Post Today, 12:31 PM |
Comment