hello mario
almost there, when I compare his looks good but I have a difference of 20 pips from my original one of the input and output are slightly offset.
I'm not Programmer but just now I saw that there was a difference in this part of the code:
ArrayInitialize(g_ibuf_108, 0);
ArrayInitialize(g_ibuf_112, 0);
if (CalculatedBars > Bars || CalculatedBars == 0) CalculatedBars = Bars;
for (int li_4 = CalculatedBars - 1; li_4 >= 0; li_4--) {
ld_52 = 0;
for (int li_0 = PeriodWATR - 1; li_0 >= 0; li_0--) {
ld_60 = 1.0 * (PeriodWATR - li_0) / PeriodWATR + 1.0;
ld_52 += ld_60 * MathAbs(High[li_0 + li_4] - (Low[li_0 + li_4]));
}
ld_68 = ld_52 / PeriodWATR;
ld_76 = MathMax(ld_68, ld_76);
if (li_4 == CalculatedBars - 1 - PeriodWATR) ld_84 = ld_68;
may be that the problem comes from there?
thank you