PureBytes Links
Trading Reference Links
|
> -----Message d'origine-----
> De : mark.keenan@xxxxxxxxxxxxxx [mailto:mark.keenan@xxxxxxxxxxxxxx]
> Envoye : jeudi 7 novembre 2002 12:33
> A : omega-list@xxxxxxxxxx
> Objet : Does anyone know how convert the code for the 'end point moving
> average' (LinearRegValue func) into EXCEL??
>
>
>
>
> The 'end point moving average' is the same, I believe as the linearegvalue
> function in Easylanguage.
>
> Thanks for any help
>
> Mark
>
No, it's not the same.
Here is my EL EMP function with general purpose parameters.
Sincerely,
Pierre Orphelin
www.sirtrade.com
Tradestation 2000i, TradeStation 6 sales and support
Safir-X, neurofuzzy logic trading system builder
To subscribe to our FREE trading system newsletter:
http://www.sirtrade.com/newsletter.htm
Next issue: November 2002
inputs:price(numericseries),len(numericseries),dek(numericseries);
vars:k(0),j(0),qc(0),tc(0),epmm(0);
j=linearregvalue(price,len,dek);
{
original EMP article code
value1=(7*j + 6*j[1]+ 5*j[12]+ 4*j[3]+ 3*j[4]+ 2*j[5]+ 1*j[6]+
0*j[7]-1*j[8]-2*j[9]-3*j[10])/22;
}
{quartercoeff.}
qc=ceiling(len/4);
if barnumber=1 then begin
for k=0 to len-1 begin
tc=tc -qc + k;
end;
end;
{epma}
epmm=0;
for k=0 to len-1 begin
epmm=epmm + (-qc + k)* j[len-1-k];
end;
if tc<>0 then begin
epmm=epmm/tc;
end;
epm=epmm;
|