Prior to NT7 there was no StartUp function where you had access to the BarsArray[]. As a result you would end up doing the synchronization in the first call to OnBarUpdate(). Further the effect was obtained by passing your data-series to another Indicator and using that value to call the constructor for the DataSeries object.
It would be nice to be able to do the following in the StartUp function:
secondarySeries = new DataSeries(BarsArray[1]);
/* Only need to sync DataSeries objects once. We couldn't do this sync in the Initialize() method because we
cannot access the BarsArray property there. */
if (secondarySeries == null)
{
/* Syncs another DataSeries object to the secondary bar object.
We use an arbitrary indicator overloaded with an IDataSeries input to achieve the sync.
The indicator can be any indicator. The DataSeries will be synced to whatever the
BarsArray[] is provided.*/
secondarySeries = new DataSeries(SMA(BarsArray[1], 50));
}

Comment