Tried to create afl
HTML:
/*
Setup
1). Timeframe : 5min chart
2). EMA : 110 period
3). CCI : 14 days
Why EMA 110? To be frank no idea but when tested proved with results to guage the TREND!
RULE
BUY / GO LONG CONDITION
a). The 5 min candle should be above 110 EMA.
b). CCI should be > 100. We consider CCI reading only for ENTRY not for EXIT. This CCI will act as a FILTER to avoid false Traps
c). A 0.10% filter on the High price
SELL / GO SHORT CONDITION
a). The 5 min candle should be below 110 EMA.
b). CCI should be < -100. We consider CCI reading only for ENTRY and not for EXIT. This CCI will act as a FILTER to avoid false Traps
c). A 0.10% filter on the Low price
EXIT : Rs.10/- min
SL : Rs.10/- (as I want to keep RR as 1:1)
Recommended Scrips : MARUTI, AXISBANK, LT, TCS, ICICIBANK & SBI
I have tested the strategy with the above scrips and hence posted as recommendation. Why I have selected the above scrip is bacause of the highly traded volume.
I will explain in detail with the Charts
Karthik
*/
_SECTION_BEGIN("Price");
SetChartBkGradientFill( ParamColor("BgTop", colorDarkOliveGreen),
ParamColor("BgBottom", colorDarkGrey),ParamColor("titleblock",colorDarkOliveGreen ));
TimeFrameSet( in5Minute);
EMA110=EMA(C,110);
pt=CCI()>100;nt=CCI()<-100;
bullish=C>EMA110 AND pt;
bear=C<EMA110 AND nt;
Color=IIf(bullish,colorGreen,IIf(bear,colorRed,colorBlack));
GraphXSpace=5;
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", color , styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Plot(EMA110,"EMA110",5,1);
Buy=Cover=bullish;
Short=Sell=bear;
//Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
//Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
/*
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,L,Offset=-10);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,Offset=-10);
PlotShapes(IIf(Short, shapeHollowDownArrow , shapeNone), colorRed);
PlotShapes(IIf(Cover, shapeHollowUpArrow , shapeNone), colorGreen);
*/
TimeFrameRestore();
_SECTION_END();
Last edited: