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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      37 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, Yesterday, 02:41 AM
      0 responses
      17 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      25 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      34 views
      0 likes
      Last Post CarlTrading  
      Working...
      X