priceH = new Series<double>(this);
protected override void OnBarUpdate()
{
priceH[0]=High[0];
if((!(Calculate == Calculate.OnBarClose) && CurrentBar==Bars.Count-1) || (Calculate == Calculate.OnBarClose && CurrentBar==Bars.Count-2))
{
for(int i=0;i<Bars.Count;i++)
{
if(i<Bars.Count-1)
ZigZagLine[CurrentBar-i]=priceH.GetValueAt(i);
}
}
}
------------------------
at last bar we get values from priceH array, but it out of sync - return wrong values, should be bar high value
Comment