Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Instrument from string

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

    Instrument from string

    Is it possible to obtain an Instrument from the string that corresponds to the Instrument.Name? For example, specify the string "$EURUSD" to obtain the corresponding EURUSD Instrument.

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    You can use the core Instrument methods to obtain this.

    Code:
    Instrument eurusd = NinjaTrader.Cbi.Instrument.GetInstrument("EURUSD");
    You do not need to use $ to specify a forex instrument any longer, just the master instrument name will do.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,281 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    19 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by Tim-c, Today, 02:10 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    5 views
    0 likes
    Last Post Taddypole  
    Started by chbruno, 04-24-2024, 04:10 PM
    4 responses
    53 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Working...
    X