Here is the code I used:
double vBlue = (a21+a22+a23+a24+a25+a26) / 6;
Print(null);
Print("CurrentBar: " + CurrentBar);
Print("CP1");
Print(vBlue); // value returned = perfect
// CP1 complete
yBlueRaw.Set(vBlue);
Print("CP2");
Print(yBlueRaw[0]); // value returned = perfect
Print(yBlueRaw[1]); // value returned is "0"
// CP2 complete
yBlue.Set(yBlueRaw[1]);
Print("CP3");
Print(yBlue[0]); // value returned is "0"
// CP3 complete
BlueLine.Set(yBlue[0]);
Print("CP4");
Print(yBlue[0]); // value returned is "0"
// CP4 complete
Here are the results:
CurrentBar: 94
CP1
1170.91341269841
CP2
1170.91341269841
0
CP3
0
CP4
0
Clearly, with this code, data is set to DataSeries: yBlueRaw[0] but not available in yBlueRaw[1]. Where did it go? yBlueRaw.Set occurs only once in the entire code.
The creation of the DataSeries:
#region Variables
private DataSeries yBlueRaw;
private DataSeries yBlue;
protectedoverridevoid Initialize()
yBlueRaw = new DataSeries(this);
yBlue = new DataSeries(this);
The problem is likely clear to you . . . but I don't see anything wrong. What do you see?
Comment