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

RE: [amibroker] Re: MACD-Price divergence, by D. Tsokakis



PureBytes Links

Trading Reference Links

//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;



Ken Henderson <kjh@xxxxxxxxxxxxxxx> wrote:

Hi

 

The code for the above indicator was recently posted.  Unfortunately, I deleted it before having a proper look.

 

Could someone please retransmit this code to me please.

 

Many thanks

 

Ken



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

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



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 Links