Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Check instrument type in AddDataSeries
Collapse
X
-
Hello guillembm,
Thanks for your post.
You can access through the BarsArray[n].Instrument.MasterInstrument.InstrumentType where n = the data series. Here is an example you can test with:
Print ("BIP: "+BarsInProgress+" Type: "+BarsArray[BarsInProgress].Instrument.MasterInstrument.InstrumentType);
Example output:
BIP: 0 Type: Future
BIP: 1 Type: Future
BIP: 2 Type: Forex
BIP: 0 Type: Future
BIP: 1 Type: Future
Reference: https://ninjatrader.com/support/help...rumenttype.htm
Paul H.NinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bmartz, 03-12-2024, 06:12 AM
|
4 responses
31 views
0 likes
|
Last Post
by bmartz
Today, 08:02 AM
|
||
Started by Aviram Y, Today, 05:29 AM
|
4 responses
12 views
0 likes
|
Last Post
by Aviram Y
Today, 07:57 AM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
3 responses
28 views
0 likes
|
Last Post Today, 07:41 AM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
1 response
8 views
0 likes
|
Last Post Today, 07:30 AM | ||
Started by cls71, Today, 04:45 AM
|
1 response
7 views
0 likes
|
Last Post Today, 07:25 AM |
Comment