Code covered by the BSD License  

Highlights from
Algorithmic Trading with MATLAB - 2009 update

image thumbnail

Algorithmic Trading with MATLAB - 2009 update

by

 

M-file scripts and Simulink models from webinar on 28 May 2009

ema(x,N)
function m = ema(x,N)
L = length(x);
m = zeros(L,1);
w = 2/(N+1);
m(1) = x(1);
for i=2:L
    m(i) = w*(x(i)-m(i-1)) + m(i-1);
end

Contact us