I am new to the NinjaTrader platform and have some questions on multi-instrument strategies.
If I understand correctly, running a strategy on an instrument list will not allow me to really implement a multi-instrument due to the way the strategy analyzer works: it seems the instruments are simulated sequentially and not in parallel, meaning first Initialize and all OnBarUpdate calls are made for one instrument, before moving on and starting the next instrument with Initialize
That seems to leave me only with the option to add all the instruments during Initialize. However, I am not happy with that approach for two reasons:
1) the strategy analyzer will no longer allow me to see the performance of the individual instruments
2) I now have the instruments hard-coded in Initialize while I really should have these set up in a file, most naturally an instrument list. Having this now all happen in the instrument list, makes the concept of the primary instrument questionable - my strategy would probably not require that
I will probably have more questions... It would be really great to have some sample code that does the following:
* work on an instrument list
* execute trades on all instruments
* allocate the available cash across (a subset of) the stocks
Is there any example like that available?
Thanks a lot for your help,
best regards
Felix

Comment