When I add a data series is there a definitive way to know the associated BarsInProgress index? I understand all the admonitions against using any sort of variables (vs hard coded values), however because I add these data series in a dynamic way (which works just fine), I can't keep a simple count and add that to a dictionary. If I have to I can add a method to map this all out by iterating through the BarsArray at some point but I suspect I am missing something simple given AddDataSeries does not have a return value.
This all is necessary because I am submitting orders from an external source using SubmitOrderUnmanaged which requires the index of the associated Bars object. I am also going with the assumption that when l add a data series its array index will not change which would in turn allow me to store the index of the added data series as each is added (i.e. BarsArray.Count -1).
Thanks,
Scott
Comment