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

Re: [amibroker] divergences



PureBytes Links

Trading Reference Links

Hello,
 
Try this for RSI. Modify suitably for MACD, stochasticts.
 

// Bearish Divergence

Cond1=( Close >= HHV( Close, 21 ) AND RSI(14) < HHV( RSI(14), 21 ));

Cond2=RSI(14) <= LLV( RSI(14), 21) AND Close > LLV(Close,21);

// Bullish Divergence

Cond3= RSI(14) >= HHV( RSI(14), 21 ) AND Close < HHV( Close, 21 );

Cond4= Close <= LLV( Close, 21 ) AND RSI(14) > LLV( RSI(14), 21 );

Buy = Cond3 OR Cond4;

Sell = Cond1 OR Cond2

Cheers

Prashanth

----- Original Message -----
From: Ed
Sent: Friday, September 02, 2005 9:54 PM
Subject: [amibroker] divergences

Does anyone know how to write code that shows divergences between an
indicator (RSI, Stochastics, MACD) and price over a period of time?
I'm hoping to save myself a lot of time manually searching for
indicator/price divergences through code. Thanks, Ed




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS