Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 8/12/2005(UTC) Posts: 73
|
I've been working on a more responsive MACD type indicator. I've looked at the countless variations of MACD but I just wanted some experienced analysis of the code I've been working on.
Code: {MACD - Rapid (custom) personal use only not for distribution by FormulaPrimer}
prd1:= Input("Fast period",1,200,12); sqrtpds1:=Sqrt(prd1); prd2:= Input("Slow period",1,200,26); sqrtpds2:=Sqrt(prd2); prd3:= Input("Trigger period",1,200,9); sqrtpds3:=Sqrt(prd3);
HMA1:=Mov(2*Mov(C,prd1/2,W)- Mov(C,prd1,W), LastValue(sqrtpds1),W); HMA2:=Mov(2*Mov(C,prd2/2,W)- Mov(C,prd2,W), LastValue(sqrtpds2),W); HMA3:=Mov(2*Mov(HMA1 - HMA2,prd3/2,W)- Mov(HMA1 - HMA2,prd3,W), LastValue(sqrtpds3),W);
A:=(HMA1 - HMA2) ; Sig:=HMA3; Red:=If(A<Ref(A,-1),A,0); Green:=If(A>Ref(A,-1),A,0); Red{Hist};Green{Hist};Sig;
|