Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Check instrument type in AddDataSeries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Check instrument type in AddDataSeries

    I can see in the NT8 help guide how to check the MasterInstrument instrument type. But, what if I want to check the instrument type of one added data series added using AddDataSeries?

    Thanks

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, Yesterday, 09:41 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    31 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    30 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    34 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    19 views
    0 likes
    Last Post CaptainJack  
    Working...
    X