PureBytes Links
Trading Reference Links
|
Title: Message
Is
there a way to avoid the use of PREV Function in these formulas??It's too
"heavy" for use on Intraday charts:-(
TiA
P.
Here you go. It's not worth much, but knock
yourself out. You should read Roy's newsletter and learn to program for
yourself. It's worth every penny.
www.metastocktips.co.nz
AMA-1
Periods:=12; Direction
:= CLOSE - Ref(CLOSE,-periods); Volatility :=
Sum(Abs(ROC(CLOSE,1,$)),periods); ER :=
Abs(Direction/Volatility); FastSC := 2/(2 + 1); SlowSC := 2/(30 +
1); SSC := ER * (FastSC - SlowSC) + SlowSC; Constant :=
Pwr(SSC,2); AMA:=If(Cum(1)=periods
+1,Ref(C,-1)+constant*(C-Ref(C,-1)), PREV*(1-Constant)+C*Constant); AMA;
AMA-2
Periods:=26;
Direction := CLOSE - Ref(CLOSE,-periods); Volatility :=
Sum(Abs(ROC(CLOSE,1,$)),periods); ER :=
Abs(Direction/Volatility); FastSC := 2/(2 + 1); SlowSC := 2/(30 +
1); SSC := ER * (FastSC - SlowSC) + SlowSC; Constant :=
Pwr(SSC,2); AMA:=If(Cum(1)=periods
+1,Ref(C,-1)+constant*(C-Ref(C,-1)), PREV*(1-Constant)+C*Constant); AMA;
MACD
AMA
signal:=Input("Enter the signal periods:
",3,50,9); Fml("AMA-1")-Fml("AMA-2"); Mov(Fml("AMA-1")-Fml("AMA-2"),signal,E)
The
DEMA smoothed MACD is much better.
shortperiods:=Input("Enter the
shorter DEMA periods: ",3,20,12); longperiods:=Input("Enter the
longer DEMA periods: ",21,50,26); signal:=Input("Enter the number of
signal line periods:
",3,50,9); Dema(C,shortperiods)-Dema(C,longperiods); Mov(Dema(C,shortperiods)-Dema(C,longperiods),signal,E)
Yahoo! Groups Sponsor |
ADVERTISEMENT
| |
|
Yahoo! Groups Links
|