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
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    41 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    11 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    1 view
    0 likes
    Last Post port119
    by port119
     
    Started by Philippe56140, Today, 02:35 PM
    0 responses
    3 views
    0 likes
    Last Post Philippe56140  
    Started by 00nevest, Today, 02:27 PM
    0 responses
    2 views
    0 likes
    Last Post 00nevest  
    Working...
    X