[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] MACD Divergence



PureBytes Links

Trading Reference Links


##############################################################################
Thomas Zmuck <tzg@xxxxxxxxxxxxxxxx> wrote:

Hello Alex,

 

i am not sure but take a search for RSI divergence. I thought that someone has written such a formula.

 

Best regards

 

Thomas Zmuck

www.tradingbasis.com


From: alex huynh [mailto:ahuynh7@xxxxxxxxx]
Sent: Tuesday, February 08, 2005 5:41 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] MACD Divergence

 

Anyone has MACD divergence like to share? I have searched AFL library and found "Divergence indicator"  and tried modify but unsucceed. I am looking for MACD divergence not MACD histogram divergence. Thanks in advance!

 

Alex

##########################################################

 

Hi,

 

       06-07-04 06:19 PM


Quote from TSOKAKIS:

Here is my AFL code for MACD-Price divergence.
Excellent entries/exits when available.
The combination with the respective Stochadtic Divergene is true gold for Crude Oil futures.

//MACD-Price divergence, by D. Tsokakis
ST33=MACD();bars=100;d=5;
TR1=LLVBars(ST33,d);
COND1=TR1>0 AND Ref(TR1,-1)==0 AND Ref(ST33,-1)<0;
TR2=IIf(COND1,Ref(ST33,-1),0);
Plot(st33,"MACD",1,8);
M1=ValueWhen(COND1,ST33);
P1=ValueWhen(COND1,LLV(L,3));
DM1=M1-Ref(M1,-1);DP1=P1-Ref(P1,-1);
DT=Ref(BarsSince(COND1),-1);
POSDIV=DM1>0 AND DP1<0 AND DT
Plot(POSDIV*LastValue(Lowest(ST33)),"",5,2);
TR11=HHVBars(ST33,d);
COND11=TR11>0 AND Ref(TR11,-1)==0 AND Ref(ST33,-1)>0;
TR21=IIf(COND11,Ref(ST33,-1),0);
M11=ValueWhen(COND11,ST33);
P11=ValueWhen(COND11,HHV(H,3));
DM11=M11-Ref(M11,-1);DP11=P11-Ref(P11,-1);
DT1=Ref(BarsSince(COND11),-1);
NEGDIV=DM11<0 AND DP11>0 AND DT1
Plot(NEGDIV*LastValue(Highest(ST33)),"",4,2);
GraphXSpace=5;



A clear Sell/Short signal for CLZ04 was confirmed by June2 session. Since the markets were confused about OPEC decisions etc, there were opportunities to Short even the next bar, when the prices gave the [tricky and wrong] bullish impression .

    

 



Warm regards,
Natasha !
 
Visit The Doll Palace [Where Cartoon Dolls Live]


Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Yahoo! Groups Sponsor
ADVERTISEMENT


Yahoo! Groups Links

GIF image