NexusFi: Find Your Edge


Home Menu

 





NinjaTrader - read instrument list


Discussion in NinjaTrader

Updated
    1. trending_up 4,454 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?
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
52 thanks
NexusFi site changelog and issues/problem reporting
48 thanks
What percentage per day is possible? [Poll]
31 thanks
GFIs1 1 DAX trade per day journal
29 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
The following 2 users say Thank You to dmh24 for this post:
  #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