| |
|
|
Haeslers ATR
prd1:=input("enter ATR period",1,9999,7); prd2:=(prd1*2)-1;
{max (absolute) of yesterday's close to today'shigh or today's low}
myatr1:=Max(Abs(Ref(C,-1)-H),Abs(Ref(C,-1)-L)); {max of
yesterday's close to today's highor today's low or today's range}
myatr2:=Max(myatr1,H-L); myatr2
|
HHRWI
Max( (Ref(HIGH,-1) - LOW) / ( (Ref(Sum( ATR( 1 ),2),-1) / 2) * Sqrt(
2 ) ), Max( (Ref(HIGH,-2) - LOW) / ( (Ref(Sum( ATR( 1 ),3),-1) /
3) * Sqrt( 3 ) ), Max( (Ref(HIGH,-3) - LOW) / ( (Ref(Sum( ATR( 1
),4),-1) / 4) * Sqrt( 4 ) ), Max( (Ref(HIGH,-4) - LOW) / (
(Ref(Sum( ATR( 1 ),5),-1) / 5) * Sqrt( 5 ) ), Max( (Ref(HIGH,-5)
- LOW) / ( (Ref(Sum( ATR( 1 ),6),-1) / 6) * Sqrt( 6 ) ), Max(
(Ref(HIGH,-6) - LOW) / ( (Ref(Sum( ATR( 1 ),7),-1) / 7) * Sqrt( 7 )
), Max( (Ref(HIGH,-7) - LOW) / ( (Ref(Sum( ATR( 1 ),8),-1) / 8) *
Sqrt( 8 ) ), (Ref(HIGH,-8) - LOW) / ( (Ref(Sum( ATR( 1 ),9),-1) /
9) * Sqrt( 9 ) ) ) ) ) ) ) ) )
|
|
 |
 |
|
Hilbert cycle period
- 1a
value1:=((H+L)/2) - Ref(((H+L)/2),-6); value2:= Ref(value1,-3);
value3:=0.75*(value1-Ref(value1,-6)) +
0.25*(Ref(value1,-2)-Ref(value1,-4)); inphase:= 0.33 * value2 +
(0.67 * PREV); quad:= 0.2 * value3 + ( 0.8 * PREV);
p1:=Atan(Abs(quad+Ref(quad,-1)),Abs(inphase+Ref(inphase,-1)));
phase:=If(inphase<0 AND quad>0, 180-p1, If(inphase<0 AND quad<0,
180+p1, If(inphase>0 AND quad<0, 360-p1,p1)));
dp:=If(Ref(phase,-1)<90 AND phase>270,
360+Ref(phase,-1)-phase,Ref(phase,-1)-phase); dp2:=If(dp < 1, 1,
If(dp > 60, 60, dp)); dp2
|
H cycle count
1a
value:= Fml("Hilbert cycle period - 1a");
If(Sum(value,6)>=360 AND Sum(value,5)<360 ,6,0) +
If(Sum(value,7)>=360 AND Sum(value,6)<360 ,7,0) +
If(Sum(value,8)>=360 AND Sum(value,7)<360 ,8,0) +
If(Sum(value,9)>=360 AND Sum(value,8)<360 ,9,0) +
If(Sum(value,10)>=360 AND Sum(value,9)<360 ,10,0) +
If(Sum(value,11)>=360 AND Sum(value,10)<360 ,11,0) +
If(Sum(value,12)>=360 AND Sum(value,11)<360 ,12,0) +
If(Sum(value,13)>=360 AND Sum(value,12)<360 ,13,0) +
If(Sum(value,14)>=360 AND Sum(value,13)<360 ,14,0) +
If(Sum(value,15)>=360 AND Sum(value,14)<360 ,15,0)
|
H cycle count 2a
value:= Fml("Hilbert cycle period - 1a");
If(Sum(value,16)>=360 AND Sum(value,15)<360 ,16,0) +
If(Sum(value,17)>=360 AND Sum(value,16)<360 ,17,0) +
If(Sum(value,18)>=360 AND Sum(value,17)<360 ,18,0) +
If(Sum(value,19)>=360 AND Sum(value,18)<360 ,19,0) +
If(Sum(value,20)>=360 AND Sum(value,19)<360 ,20,0) +
If(Sum(value,21)>=360 AND Sum(value,20)<360 ,21,0) +
If(Sum(value,22)>=360 AND Sum(value,21)<360 ,22,0) +
If(Sum(value,23)>=360 AND Sum(value,22)<360 ,23,0) +
If(Sum(value,24)>=360 AND Sum(value,23)<360 ,24,0) +
If(Sum(value,25)>=360 AND Sum(value,24)<360 ,25,0)
|
H cycle count
3a
value:= Fml("Hilbert cycle period - 1a");
If(Sum(value,26)>=360 AND Sum(value,25)<360 ,26,0) +
If(Sum(value,27)>=360 AND Sum(value,26)<360 ,27,0) +
If(Sum(value,28)>=360 AND Sum(value,27)<360 ,28,0) +
If(Sum(value,29)>=360 AND Sum(value,28)<360 ,29,0) +
If(Sum(value,30)>=360 AND Sum(value,29)<360 ,30,0) +
If(Sum(value,31)>=360 AND Sum(value,30)<360 ,31,0) +
If(Sum(value,32)>=360 AND Sum(value,31)<360 ,32,0) +
If(Sum(value,33)>=360 AND Sum(value,32)<360 ,33,0) +
If(Sum(value,34)>=360 AND Sum(value,33)<360 ,34,0) +
If(Sum(value,35)>=360 AND Sum(value,34)<360 ,35,0)
|
Hilbert cycle
period - final-a
c1:= Fml( "H cycle count 1a") + Fml( "H cycle
count 2a") + Fml( "Hcycle count 3a") ; c2:=If(c1=0,PREV,c1);
(0.25*c2) + (0.75*PREV)
|
|
 |
 |
|
Historical Volatility
10 day
Std(Log(C/Ref(C,-1)),10)*Sqrt(365)*100
|
Historical
Volatility 100 day
Std(Log(C/Ref(C,-1)),100)*Sqrt(365)*100
|
Historical
Volatility Indicator
Std(Log(C/Ref(C,-1)),10)/Std(Log(C/Ref(C,-1)),100)
|
| |
|