Hi Wabbitt,
I'd like to return on some indicators for hurst's analisis.
The "Speed" is the difference between the last value of the "centered ma" and the "centered ma" of the prior day. This "Speed" crosses the zero-line on the top and on the bottoms.
Than the "Acceleration" is the difference between the "Speed" and the "Speed" of the prior day. This "Acceleration" make a top on a bottom of the security and a bottom on the top of the security.
Here is the code of the "centered ma" by J.Silva.
{ Centered Moving Average - v3.0 }
{ Uses forward-referencing to center Mov Avg
and project future direction.}
{ Uses hindsight - do not trade! }
{ CCopyright 2005 Jose Silva
For personal use only.
http://www.metastocktools.com }
{ User inputs }
fwPds:=Input("Forward-referencing periods (automatic = -1)",-1,2600,-
1);
proj:=Input("Project last known MA: [1]Direction, [2]Value",1,2,1);
pds:=Input("Mov Avg periods",1,2600,21);
type:=Input("[1]EMA [2]SMA [3]TmSr [4]Tri [5]Var [6]Vol [7]Wght",1,7,
2);
{ Choose MovAvg type:
1 - Exponential MA
2 - Simple MA
3 - Time Series MA
4 - Triangular MA
5 - Variable MA
6 - Volume adjusted MA
7 - Weighted MA }
ma:=
If(type=1,Mov(C,pds,E),
If(type=2,Mov(C,pds,S),
If(type=3,Mov(C,pds,T),
If(type=4,Mov(C,pds,TRI),
If(type=5,Mov(C,pds,VAR),
If(type=6,Mov(C,pds,VOL),
Mov(C,pds,W)))))));
{ Automatic period-centering }
center:=LastValue(If(fwPds<0,Int(pds/2),fwPds));
{ Forward-referenced MovAvg }
fwd:=Ref(ma,center);
{ Last valid MovAvg plot point }
lastVal:=IsUndefined(fwd)
AND Alert(IsUndefined(fwd)=0,2);
{ Extend MovAvg plot into future null zone }
xtend:=LastValue(fwd+PREV-PREV);
{ Restrict invalid initial MovAvg plot }
movAvg:=Ref(Ref(xtend,pds-1),-pds+1);
{ Last MA known direction & future projection }
init:=Cum(IsDefined(movAvg))=1;
direction:=movAvg+
( ValueWhen(1,init OR lastVal,Ref(movAvg,-1))
-ValueWhen(1,init OR lastVal,Ref(movAvg,-2)))
*(BarsSince(init OR lastVal)+1);
{ Plot MovAvg on price chart }
If(proj=1,direction,movAvg)
Have You any idea how to build theese new indicators? I've tried but it is something wrong on the projection, or to change the projection with a mathematical calculation, for example, with a average o the last values or other.
Thanks for the help. If you need other best explanation, ask me.
gg