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 llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
||
Started by strategist007, Yesterday, 07:51 PM
|
0 responses
14 views
0 likes
|
Last Post Yesterday, 07:51 PM |
Comment