I'm developing an indicator where I have 2 additional TimeFrames Data series.
For each of these TimeFrames I have 3 secondary DataSeries.
I have problems having them synchronized
What I've done:
In the variable "area" I have defined them:
private Series<double>[] SecondPMC;
In the “State == State.Configure” I’m adding the secondary DataSeries:
if(MultiTFPeriod1 > 0) AddDataSeries(GetBarType(MultiTFType1), MultiTFPeriod1);
if(MultiTFPeriod2 > 0) AddDataSeries(GetBarType(MultiTFType2), MultiTFPeriod2);
In the “State == State.DataLoaded” I’m synchronizing them:
SecondPMC = new Series<double>[6]; // - - defining them as array
if(MultiTFPeriod1 > 0) for(int i= 0; i < 3; i++)
SecondPMC[i] = new Series<double>(BarsArray[1]);
// - -I sync the first 3 DataSeries to the 1st TimeFrame
if(MultiTFPeriod2 > 0) for(int i= 3; i < 6; i++)
SecondPMC[i] = new Series<double>(BarsArray[2]);
// - -I sync the second 3 DataSeries to the 2nd TimeFrame
for(int i= 0; i < 6; i++)
SecondPMC[i] = new Series<double>(this,MaximumBarsLookBack.Infinite);
// - - I dim them to all Bars in every TF
I cannot get them synchronized!
If TF1 = double TF0, I get the results:
SecondPMC[0][0] = correct value
SecondPMC[0][1] = 0
SecondPMC[0][2] = correct value
SecondPMC[0][3] = 0
Am I putting every Step in its correct place?
Thanks!
Comment