Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get all instruments programmatically?

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

    How to get all instruments programmatically?

    Hi NT experts,

    Is there a way to programmatically access all instruments in the NinjaTrader database?

    I know of `InstrumentList.All`, but that makes it only possible to access instruments that are in an instrument list. I look for a way to get a list of all instruments (from the Tools -> Instruments window).

    (I searched the forum and helpguide but came up empty.)

    Thanks for any suggestions!


    #2
    Hello J_o_s,

    Instrument.All

    For example to loop through all instruments:

    foreach (Instrument instrument in Instrument.All)
    Print(instrument.FullName);
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Awesome! Thanks for the reply Chelsea.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Touch-Ups, Today, 10:36 AM
      0 responses
      5 views
      0 likes
      Last Post Touch-Ups  
      Started by geddyisodin, 04-25-2024, 05:20 AM
      8 responses
      61 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by jxs_xrj, 01-12-2020, 09:49 AM
      4 responses
      3,289 views
      1 like
      Last Post jgualdronc  
      Started by Option Whisperer, Today, 09:55 AM
      0 responses
      5 views
      0 likes
      Last Post Option Whisperer  
      Started by halgo_boulder, 04-20-2024, 08:44 AM
      2 responses
      24 views
      0 likes
      Last Post halgo_boulder  
      Working...
      X