PureBytes Links
Trading Reference Links
|
FWIW my formulation was wrong.
Changing the notation to use y to indicate yesterday's value,
If Cp =Cy,
EMAp =EMAy + a*(Cy - EMAy), where a = 2/(len+1)
The AA formulas are below. -Bob
------
Filter =1;
len = Param("malen",20,1);
alpha = 2/(len+1);
Cp = Cy = Ref(C,-1); CpErr = 100*(C-Cp)/C;
EMA0 = EMA(C,Len); EMAy = Ref(EMA(C,Len),-1);
EMAp = EMAy + alpha*(Cy - EMAy);
EMApErr = 100*(EMA0-EMAp)/EMA0;
AddColumn(C,"C "); AddColumn(Cp,"PredC");
AddColumn(CpErr,"pC%Error");
AddColumn(EMA0,"EMA"); AddColumn(EMAp,"PredEMA");
AddColumn(EMApErr,"pEMA%Error");
// 'Bad <= from the previous post
EMApBad = 2*EMAy - Ref(EMA(C,Len),-2);
EMApBadErr = 100*(EMA0-EMApBad)/EMA0;
AddColumn(EMApBad,"pEMApBad");
AddColumn(EMApBadErr,"pEMA%Error");
-----
-----Original Message-----
From: epintoem [mailto:epintoem@xxxxxxxxx]
Sent: Wednesday, July 28, 2004 11:22 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: estimating tomorrows EMA
Thanks
--- In amibroker@xxxxxxxxxxxxxxx, "Bob Jagow" <bjagow@xxxx> wrote:
> Eugene,
> Given that the best estimate for tomorrow's price is today's price,
> solving
> ema1 =ema0 + a*(P1 - ema0) for P2 = P1 shows that the change in ema
> will be the same as yesterday's change.
> That is, the predicted ema is ema(P,len) + (ema(P,len) -
> ref(ema(P,len),-1)).
>
> Bob
>
>
> -----Original Message-----
> From: Eugene [mailto:eugenecpinto@x...]
> Sent: Wednesday, July 28, 2004 5:58 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] estimating tomorrows EMA
>
>
> Anyone have an idea how to do this....via a function?
>
>
> TIA
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|