Skip to main content

RSI Divergence Trading for Amibroker (AFL)

saibal1103 almost 14 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    oscillator, trading system, amibroker

RSI Divergence Buy or Sell Scan

Indicator / Formula

Copy & Paste Friendly
//RSI(9) DIVERGENCE BUY:
Buy = RSI(9) >= HHV(RSI(9),-19) AND Close <HHV(Close,-19) OR Close <= LLV(Close,-19) AND RSI(9) > LLV(RSI(9),-19);

//RSI(9) DIVERGENCE SELL:
Sell = Close >= HHV(Close,-19) AND RSI(9)<HHV(RSI(9),-19) OR RSI(9) <= LLV(RSI(9),-19) AND Close > LLV(Close,-19);

Filter=(Buy OR Sell);

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

PlotShapes(IIf(Buy,shapeUpArrow,shapeNone) ,colorBrightGreen);

PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed);

6 comments

almost 14 years ago

Mr.Saibal, Lot of errors in the Scan afl given by u. Kindly correct it. thnx you

over 13 years ago

How did the admin allow this formula with errors without checking. Thanks and regards.

3. joeoil
over 13 years ago

It is only missing ; at the end of lines in Buy and Sell condition.

Try that and it will work

Leave Comment

Please login here to leave a comment.