Thanks but this is not exactly what I want I need afl which tells RSI divergence aswell as OBV divergence Vs Price for daily analysis on stock
this will help >>>>>>
/*BULLISH OBV DIVERGENCE, DD==Dn*/
ST33=OBV();//
TR1=LLVBARS(ST33,4);
TR2=IIF(ST33<Dn AND TR1>0 AND REF(TR1,-1)==0,ref(ST33,-1),0);
TRC=IIF(TR2>0,C,0);
vs=valuewhen(tr2, ref(st33,-1), 1);
dvs=vs-ref(vs,-1);
vc=valuewhen(trc, LLV(c,3), 1);
dvc=vc-ref(vc,-1);
diver=iif(dvs>0 and dvc<0,Dn,0);
DAS=BARSSINCE(REF(TR2,-1)>0);
DDOBV=IIF(DAS<20 AND C>=REF(C,-1),DIVER,0);
STBULLOBV=DDOBV==Dn;
/*BEARISH OBV DIVERGENCE, BDDD==Bn*/
BTR1=HHVBARS(ST33,4);
BTR2=IIF(ST33>70 AND BTR1>0 AND REF(BTR1,-1)==0,ref(ST33,-1),0);
BTRC=IIF(BTR2>0,C,0);
Bvs=valuewhen(Btr2, ref(st33,-1), 1);
Bdvs=Bvs-ref(Bvs,-1);
Bvc=valuewhen(Btrc, HHV(H,3), 1);
Bdvc=Bvc-ref(Bvc,-1);
Bdiver=iif(Bdvs<0 and Bdvc>0,Bn,0);
BDAS=BARSSINCE(REF(BTR2,-1)>0);
BDOBV=IIF(BDAS<20 AND C<=REF(C,-1),BDIVER,0);
STBEAROBV=BDOBV==Bn;
PlotShapes(STBULLOBV*shapehollowcircle , colorbrightgreen, 0,L, Offset=-10);
PlotShapes(STBEAROBV*shapehollowcircle , colorcustom12, 0,H, Offset=10);