Especially, if inside Indicator code, the Initialize() adds a new bar series. The help tends to assume it is #1 (the original underlying chart being #0). But is that ALWAYS true?
What if a chart has two bar series already, before the indicator is added to the chart?
Which is #1 and which is #2?
How can code KNOW, in OnBarUpdate(),which bar series # was just added by the Initialize() ? What if multiple indicators each add a new series -- would not the assigned bar series # depend on the order in which the indicator were added (or called)? In which case, restricting the Indicator code to #1 would NOT work!
I don't suppose the Add() function returns the assigned series #? That would be too clean!
Comment