Need the Picture AFL.

#1
Hello seniors members,

I need afl of below picture of RSI DIVERGENCE AFL For amibroker. (Divergence Lines shown with candles)

Can anyone help me???

Thanx you

Regards
 
Last edited:

hitesh

Active Member
#4
This should help


/*---------------------------------------------------
RSI Divergence
--------------------------------------------------------*/

GraphXSpace=7;
//n=Param("% Reverse ",12,0,100,1);
n=Optimize("ZIG",9,5,50,1);
per=Optimize("rsi",28,5,50,1);
Buy=Sell=0;
Var = Zig(RSI(per), n);
t= Trough(RSI(per), n, 1);
p= Peak(RSI(per), n, 1);
x[0] =Var[0];
price[0] = C[0];
j=0;

// bearish divergence
for ( i=0; i<BarCount; i++)
{
if(Var == p)
{

j++;
x[j] =Var;
price[j] =C;
if(x[j] <x[j-1] && price[j-1]< price[j])
Sell =1;
}
}

// bullish divergence
for ( i=0; i<BarCount; i++)
{
if(Var == t)
{
j++;
x[j] =Var;
price[j] =C;
if(x[j] >x[j-1] && price[j]<price[j-1])
Buy =1;
}
}
Short=Sell;
Cover=Buy;

Plot(Var, "", 39);
PlotShapes ( IIf(Sell, shapeSmallCircle, shapeNone), colorRed, 0 , Var,0);
PlotShapes( IIf(Buy, shapeSmallCircle, shapeNone), colorBrightGreen, 0, Var,0);

Title ="RSI Divergence" ;
_SECTION_END();

_SECTION_BEGIN("TEMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( TEMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
 
#5
Hello hitesh, thanx you for ur efforts.

i already have afl which u gave but i want Rsi divergence with Lines on candles as shown in picture. I dont want scanner.

Seniors (Kevinhand or johnny sir) pls help

Thanx you

Regards
 

Similar threads