In the following script the last vaue of myDataSeries is refreshed within the for-loop. I can see by Print commands that this works. But the calculation of the Bollinger band value for the changed myDataSeries is not recalculated; it is always given the value for n=0.
What can I do to get a new calculation of Bollinger?
Thanks
==========================
protected override void OnBarUpdate()
{
if (Historical)
{
myDataSeries.Set(Close[0]);
Print(Close[0]);
return;
}
for (int n=0;n<200;n++)
{
ttt=Close[1]-n*TickSize;
myDataSeries.Set(ttt);
Print(n);
Print(myDataSeries[0]);
Print(Bollinger(myDataSeries,2,25).Lower[0]);
Print(Bollinger(2,25).Lower[0]); // just for comparison
....
}
}

Comment