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 pibrew, Today, 06:37 AM
      0 responses
      1 view
      0 likes
      Last Post pibrew
      by pibrew
       
      Started by rbeckmann05, Yesterday, 06:48 PM
      1 response
      14 views
      0 likes
      Last Post bltdavid  
      Started by llanqui, Today, 03:53 AM
      0 responses
      6 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by burtoninlondon, Today, 12:38 AM
      0 responses
      11 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      15 views
      0 likes
      Last Post AaronKoRn  
      Working...
      X