Additional Bars are added to a script via the AddDataSeries() method in the OnStateChange() method when the State has reached State.Configure. When a Bars object is added to a script, it is also added to the BarsArray array. BarsArray functions like a container in the script that holds all Bars objects added to the script. As a Bars object is added to the script, it's added to BarsArray and given an index number so we can retrieve this Bars object later.
Warning:
|
So if I can't dynamically put in the instrument being traded against, I have to do something like have a huge list of all relevant instruments in their own AddDataSeries() calls and access them via switch statement.
Am I missing something? Is there a better way to do this? Also, this trading style uses multi-leg spreads like strangles and calendars; any support for these in the API?
Comment