double close1 = Close[1];
double trueRange = Math.Max(Math.Abs(low0 - close1), Math.Max(high0 - low0, Math.Abs(high0 - close1)));
Value[0] = ((((Math.Min(CurrentBar + 1, Period) - 1 ) * Value[1] + trueRange) / Math.Min(CurrentBar + 1, Period))/Close[1])*100;
This does not give the correct value of the ATR. - any thoughts on this?
Regards
Francis
Comment