NinjaTrader.Cbi.InstrumentList.GetInstruments("Futures");
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
NinjaTrader.Cbi.InstrumentList.GetInstruments()...
Collapse
X
-
Hello,
Thank you for the question.
It appears the method you are using would not be the correct method to get a list, it seems instead you would need to use the underlying collection.
You would either need to loop through the instrument list collection to find the list first, or use linq to find a match in the instrument list. I have provided an example using linq to cut down the size:
Code:InstrumentList myList = NinjaTrader.Cbi.InstrumentList.InstrumentLists.First(list => list.Name == "FOREX"); if (myList == null) return; foreach (Instrument instrument in myList.Instruments) { Print(instrument.FullName); }
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
19 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
21 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment