PERRY KAUFMAN’S EFFICIENCY COEFFICIENT

PERRY KAUFMAN'S EFFICIENCY COEFFICIENT

Type : Indicator, Name : Kaufman Efficiency Ratio

input:
Erperiod(10),
Erentry(.25),
Erexit(.03),
maxavg(1.00),
maxchg(1.5),
option(2);

vars:
change(0),
pchange(0),
noise(0),
signal(0),
diff(0),
efratio(0),
ERavg(0),
ERsd(0),
ERsd3a(0),
ERsd3(0);

{CALCULATE EFFICIENCY RATIO}

diff = @AbsValue(close — close[1]);
if currentbar > ERperiod then begin
change = close — close[ERperiod];
pchange = change*100/close[ERperiod];
signal = @AbsValue(change);
noise = @summation(diff,ERperiod);
efratio = 1.00;
if (noise <> 0 ) then efratio = signal/noise;
ERavg = @average(efratio,21);
ERsd = @stddev(efratio,21);
ERsd3a = @average(ERsd,3);
ERsd3 = @average(Eravg — ERsd,3);

{Entry signals}
if efratio > Erentry and pchange > .000 then plot1(efratio,»+»);
if efratio > Erentry and pchange < .000 then plot2(efratio,»-«);
end;

if efratio < ERexit then plot3(efratio,»exitS»);
plot4(noise/10,»exitL»);

Подписаться
Уведомить о
0 комментариев
Межтекстовые Отзывы
Посмотреть все комментарии