AFL coding help needed

johnnypareek

Well-Known Member
#21
sir is it full afl??
I have posted afl for this in other thread .

here it is.
HTML:
Plot(C,"",colorLightGrey,styleCandle);
 
r=CdDoji( threshold = 0.05 );
s=CdHammer( rangefactor= 1.1 );
t=CdBearishEngulfing( bodyfactor = 0.4, rangefactor = 0.5);
u=CdBullishEngulfing( bodyfactor = 0.4, rangefactor = 0.5);
//PlotShapes(r*shapeSmallCircle,colorRed,Layer=0,yposition=H,Offset=12);
//PlotShapes(s*shapeCircle,colorYellow,Layer=0,yposition=H,Offset=12);
PlotShapes(t*shapeHollowSmallCircle,colorLime,Layer=0,yposition=H,Offset=15);
PlotShapes(u*shapeHollowCircle,colorBlue,Layer=0,yposition=H,Offset=15);
 
for(i=0;i<BarCount-1;i++)
{
    //if(r[i]==True)PlotText("Doji", i, H[i], colorRed, bkcolor = colorDefault);
    //if(s[i]==True)PlotText("Hammer", i, H[i], colorYellow, bkcolor = colorDefault);
    if(t[i]==True)PlotText("BearishEngulf", i, H[i], colorLime, bkcolor = colorDefault);
    if(u[i]==True)PlotText("BullishEngulf", i, H[i], colorBlue, bkcolor = colorDefault);

}

up=ValueWhen(u,H,1);
dn=ValueWhen(t,L,1);
Plot(up,"Buy Above",5,styleDots);
Plot(dn,"Sell Below",4,styleDots);
Buy=Cross(H,up);
Short=Cross(dn,L);
shape = Buy * shapeUpArrow +Short * shapeDownArrow;

PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ));
 

Similar threads