intraday scalping improved for Amibroker (AFL)
tsarvjit about 14 years ago Amibroker (AFL)
Previous afl had one defect . It failed to give signal when RSI used to cross 50 line a bit later than EMA cross . Now i have improved it .
Indicator / Formula
Copy & Paste Friendly
_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 5, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods",13, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
Buy =
( RSI( 14 ) > Ref( RSI( 14 ) , -1 )
AND RSI( 14 ) > 50
AND Cross (EMA (Close,5), EMA ( Close,13)))
OR
( Cross ( RSI (14) , 50 ) AND EMA ( Close, 5 ) > EMA ( Close, 13 ));
Sell =
( RSI( 14 ) < Ref ( RSI (14 ) , -1 )
AND RSI( 14 ) < 50
AND Cross (EMA (Close,13) , EMA ( Close,5)))
OR ( Cross ( 50 , RSI (14)) AND EMA ( Close , 13) > EMA( Close , 5 ) );
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-10);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-10);
AlertIf( Sell, "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2 );
AlertIf( Buy, "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2 );
4 comments
Leave Comment
Please login here to leave a comment.
Hellow,
This is great AFL, works not only for scalping but also for TF. Its best for High liquid stocks.
Many many thanks for sharing this
Viswanath
its simple ema crossover system
Good
very interesting…good one..thank u friend