Hi Karthik,
Here is the code:
Indicator 1:
Name : "zz macd divergence binary wave bullish"
Formula : If((Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E) > Ref(Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E),-5) AND H < Ref(H,-5)) AND (Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E) > Ref(Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E),-4) AND H < Ref(H,-4)),1,0)
Indicator 2:
Name: "zz macd divergence binary wave bearish"
Formula: If(((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E)
< Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-5) AND C > Ref(C,-5)) AND(Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-1) < Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-6)AND Ref(C,-1) > Ref(C,-6)),1,0)
----> Expert :
In highlights :
1) Bullish divergence: Fml( "zz MACD divergence binary wave bullish") = 1 (colour = green)
2) Bearish divergence: Fml( "zz macd divergence binary wave bearish") = 1 (colour = red)
In Symbols:
1) Buy :
Fml( "zz MACD divergence binary wave bullish") = 1 AND C > O AND C > Ref(C,-1)
2) Sell:
Fml( "zz macd divergence binary wave bearish") = 1 AND C < O AND C < Ref(C,-1)
This was coded about 2months back when I started off with metastock coding. You would find terrible coding techniques used here and hence, you must excuse me.
However, here is the MACDH formula with customizable time frames (created today):
FMA:= Input("FastMA",1,500,12);
SMA:= Input("SlowMA",1,500,26);
Sig:= Input("Signal",1,500,9);
a:= Mov(C,FMA,E);
b:= Mov(C,SMA,E);
d:= a - b ;
f:= Mov(a-b,Sig,E);
d-f;
0
BTW, I'd also recommend you visiting www.metastocktools.com
Jose's MACDH divergence toolkit is considered superb but it costs E400 I guess.
Oxy
Here is the code:
Indicator 1:
Name : "zz macd divergence binary wave bullish"
Formula : If((Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E) > Ref(Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E),-5) AND H < Ref(H,-5)) AND (Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E) > Ref(Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E),-4) AND H < Ref(H,-4)),1,0)
Indicator 2:
Name: "zz macd divergence binary wave bearish"
Formula: If(((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E)
< Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-5) AND C > Ref(C,-5)) AND(Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-1) < Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-6)AND Ref(C,-1) > Ref(C,-6)),1,0)
----> Expert :
In highlights :
1) Bullish divergence: Fml( "zz MACD divergence binary wave bullish") = 1 (colour = green)
2) Bearish divergence: Fml( "zz macd divergence binary wave bearish") = 1 (colour = red)
In Symbols:
1) Buy :
Fml( "zz MACD divergence binary wave bullish") = 1 AND C > O AND C > Ref(C,-1)
2) Sell:
Fml( "zz macd divergence binary wave bearish") = 1 AND C < O AND C < Ref(C,-1)
This was coded about 2months back when I started off with metastock coding. You would find terrible coding techniques used here and hence, you must excuse me.
However, here is the MACDH formula with customizable time frames (created today):
FMA:= Input("FastMA",1,500,12);
SMA:= Input("SlowMA",1,500,26);
Sig:= Input("Signal",1,500,9);
a:= Mov(C,FMA,E);
b:= Mov(C,SMA,E);
d:= a - b ;
f:= Mov(a-b,Sig,E);
d-f;
0
BTW, I'd also recommend you visiting www.metastocktools.com
Jose's MACDH divergence toolkit is considered superb but it costs E400 I guess.
Oxy
I have seen you post in www.projectw.org as well as in traderji.com.
You have been very helpful to needy one.
I am looking for macdh divergence kit 10, i am looking for it.
Kindly help.
Regards,
Krishna
;;;;;;;@llllllll.com
Last edited by a moderator: