Dear karthik Sir,
i am not afl expert but try to learn & i think this afl should be usefull for all traderji afl lovers
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("WMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( h, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("WMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( L, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
a=WMA(H,5);
b=WMA(L,5);
Buy=C>a AND CCI(14)>50 AND L>b;
Sell=C<b AND CCI(14)<-50 AND H<a;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell,Buy);
Short=Sell;
Cover=Buy;
Buyt=ValueWhen(Buy,H,1);
Sellt=ValueWhen(Sell,L,1);
Buytt=Cross(H,Buyt);
selltt=Cross(Sellt,L);
GraphXSpace = 5;
dist = 1*ATR(5);
for( i = 0; i < BarCount; i++ )
{if( Buytt ) PlotText( "Buy Triger", i, L[ i ]-dist, colorGreen );
if( Selltt ) PlotText( "Sell Triger", i, H[ i ]+dist,colorRed);
}
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-10);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-10);
PlotShapes(IIf(Buytt, shapeUpTriangle, shapeNone),colorGreen, 0,L, Offset=-10);
PlotShapes(IIf(Selltt, shapeDownTriangle, shapeNone),colorRed, 0,H, Offset=-10);
Abhishek