NexusFi: Find Your Edge


Home Menu

 





NinjaTrader - read instrument list


Discussion in NinjaTrader

Updated
    1. trending_up 4,508 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: NQ
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?
Footprint for strategy Builder
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
51 thanks
Just another trading journal: PA, Wyckoff & Trends
21 thanks
Trading with Intuition
18 thanks
Self sabotage reframed
15 thanks
ApexTraderFunding.com experience and review
8 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: NQ
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