I was referred to a very excellent blog http://etfhq.com/ and wanted to confirm that Welles Wilder’s trick (ease of calculating) smoothing algorithm was indeed equivalent to an exponential moving average but twice the length – 1. This blog by Derry Brown is worth taking a look at.
Here is my TS code for verify the length difference between WellesSmooth and Exp. Smooth:
{Test for equivelance}
if currentBar = 1 then
begin
value1 = average(c,14);
end;
if currentBar > 1 then
begin
value1 = (13*value1+c)/14; //Wells Wilder Smoothing
end;
plot1(value1,"WSMA",red);
plot2(xaverage(c,14),"XMA",blue);
plot3(xaverage(c,27),"2X-1XMA",green);
Discover more from George Pruitt
Subscribe to get the latest posts sent to your email.