Experiments in Technical Analysis

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
Hi oxusmorous,

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:
Improved MACDH divergence kit :D

Download Link:
http://www.4shared.com/file/10030008/d42b7009/MACDH_Divergence.html

Metastock coding for metastock 8 users:

Indicator 1: zz MACDH
Formula:
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

Indicator 2: zz MACDH Divergence
Formula:
If( H = HHV(H,60) AND Fml( "zz MACDH") = LLV(Fml("zz MACDH"),40),-1,
If(L = LLV(L,25) AND Fml("zz MACDH") = HHV(Fml("zz MACDH"),25),1,0));

Now go to expert advisor ---> new (name it MACDH Divergence kit) ---> symbols:

Symbol 1: Buy
Formula: Fml( "zz MACDH divergence") = 1 AND C > O AND C > Ref(C,-1)

Symbol 2: Sell
Formula: Fml( "zz MACDH divergence") = -1 AND C < O AND C < Ref(C,-1)

Go to highlights:
Highlight 1: Bullish divergence
Formula: Fml( "zz MACDH divergence") = 1

Highlight 2: Bearish Divergence
Formula: Fml( "zz MACDH divergence") = -1

A hectic process, I must say.
I have enclosed a couple of charts.
Note : Trend kills this system (generates too many false trades when in an established trend). The system does not kill the trend ;)

Oxy
Hi,

Sir can you provided me the link for macd divergence kit

http://rapidshare.com/files/105335264/ELWAVE90RetailOnlineSetup.rar

Hope the above one is helpful , i just found it but not yet tried elwave 9 version
Regards,
Krishna
 
Keep in mind about members (like me) who do not have the previlege of using metastock or amibroker. Keep in mind that there are some members (like me) who are still using free softwares like F Charts and Aptistock. Whenever you give codes (I think you are referrring to formulas to calculate indicators), as far as possible, kindly make them compatible with F Charts or Aptistock also. This is my request. Best of luck.
Pl.try QUOTE TRACKER
it is complete free,will get even real time.
with thanks
mks
 

Similar threads