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

[amibroker] Re: MACD divergence



PureBytes Links

Trading Reference Links

Dimitris,

Thank you for this fine indicator. Can we use this formula for
Stochastic Divergence by just changing the St33=stoch();

Alan

--- In amibroker@xxxxxxxxxxxxxxx, "Dimitris Tsokakis" <TSOKAKIS@xxxx>
wrote:
> 
> ST33=MACD();
> bars=50;
> TR1=LLVBars(ST33,5);
> COND1=TR1>0 AND Ref(TR1,-1)==0 AND Ref(ST33,-1)<0;
> TR2=IIf(COND1,Ref(ST33,-1),0);
> Plot(st33,"MACD",1,1);
> 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<BARS;Plot(Ref(POSDIV*Ref(ST33,-1),1),"",5,2);
> TR11=HHVBars(ST33,5);
> 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<BARS;Plot(NEGDIV*ST33,"",4,2);
> Filter=posdiv OR negdiv;
> AddColumn(posdiv,"POSITIVE DIV",1.0);
> AddColumn(NE

GDIV,"NEGATIVE DIV",1.0);
> 
> Paste in indicator builder or in AA and explore .
> For the N100 database, 13/100 of the population presented a bullish
MACD divergence on March13, signaling the recent movement.
> Another version of MACD divergence may come through trendlines.
> There are some code problems, trendlines are based on Peak/Trough ,
which do not function properly with negative arrays.
> We may overcome this difficulty using a 1000+MACD() instead of
MACD() itself [I think the lowest MACD() for the last 10 years
> was around -800 for ^N225]. I have to check some details for a
uniform per= value and post this alternative too.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/46VHAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/