Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/30/2005(UTC) Posts: 112
|
Referring to Henry's link provided, I use Jose Silva's formula to plot HS Index daily chart (EMA period = 20, choose 4 close & 2 volatility), giving 13.5937 for 18 July.
However, I use my excel file, see attached, which gives 12.017%.
Can anyone me modifying the formula to show my set of figures?
Also, could you add a 5 day moving average in the indicator of HV as well, similar to my excel file?
Gary
Jose's formula
{Volatility-adjusted, dynamic-period EMA v2.0}
{©Copyright 2003 Jose Silva}
{josesilva22@yahoo.com}
pds:=Input("EMA periods",1,2520,21);
x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5",1,5,4);
plot:=Input("plot: EMA=1 volatility=2 dynamic EMA periods=3",1,3,1);
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,C))));
Vt:=Stdev(C,5)/Mov(Stdev(C,5),10,S);
pds:=pds*.75/(Vt+.1);
pds:=If(Cum(1)-13<pds,Cum(1)-13,pds);
pds:=If(pds<1,1,pds);
DyEma:=x*2/(pds+1)+PREV*(1-2/(pds+1));
If(plot=2,Vt*10,If(plot=3,pds,DyEma))
|