NexusFi: Find Your Edge


Home Menu

 





NinjaTrader - read instrument list


Discussion in NinjaTrader

Updated
    1. trending_up 4,488 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

NinjaTrader - read instrument list

  #1 (permalink)
 Jaba 
Austin TX
 
Experience: Intermediate
Platform: SaintGobain Crystal Ball
Trading: 6E
Posts: 81 since Oct 2010
Thanks Given: 103
Thanks Received: 134

Hi

Sorry if this has been answered somewhere else, I have been searching for an answer, but no luck.

How can I programatically get a list of instruments in the system? Something like:

Instrument[] fullInstrumentList = NinjaTrader.getInstruments();

Or perhaps somebody knows how to find an instrument based on a name? I will appreciate your help. Thanks
J

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Exit Strategy
NinjaTrader
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
33 thanks
Just another trading journal: PA, Wyckoff & Trends
28 thanks
Bigger Wins or Fewer Losses?
23 thanks
Tao te Trade: way of the WLD
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #3 (permalink)
 dmh24 
Denver, CO
 
Experience: Advanced
Platform: SierraChart
Broker: Optimus, Rithmic
Trading: ES
Posts: 67 since Sep 2011
Thanks Given: 6
Thanks Received: 34


this is beyond unsupported and will probably break something, you've been warned!

 
Code
foreach (Cbi.Instrument instrument in Cbi.Instrument.GetObjects())
    Print(instrument.FullName);

Reply With Quote
Thanked by:
  #4 (permalink)
 Jaba 
Austin TX
 
Experience: Intermediate
Platform: SaintGobain Crystal Ball
Trading: 6E
Posts: 81 since Oct 2010
Thanks Given: 103
Thanks Received: 134

Yep, thanks a lot.

If this is beyond unsupported then I don't know how to classify my Reflection-based parts of the code.

Cheers
J

Started this thread Reply With Quote




Last Updated on April 23, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts