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 llanqui, Today, 03:53 AM
    0 responses
    4 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Working...
    X