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 Max238, Today, 01:28 AM
|
4 responses
33 views
0 likes
|
Last Post
by Max238
Today, 07:49 AM
|
||
Started by r68cervera, Today, 05:29 AM
|
1 response
7 views
0 likes
|
Last Post Today, 07:47 AM | ||
Started by geddyisodin, Today, 05:20 AM
|
1 response
11 views
0 likes
|
Last Post Today, 07:38 AM | ||
Started by timko, Today, 06:45 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 07:30 AM | ||
Started by habeebft, Today, 07:27 AM
|
0 responses
6 views
0 likes
|
Last Post
by habeebft
Today, 07:27 AM
|
Comment