Hello, reenu10:
I am not an expert, but I created this afl.
I put this afl together with the EMA crossing the RSI.
Note: In the parameter window you can adjust the RSI setting and the moving average.
After you put this indicator on your chart, you will have to left-click on your indicator pane and select "Parameters."
There, you can select the settings for your RSI (the default is 15), and then you will need to choose "RSI" in the "Fields" section of the moving average so the moving average will be on the RSI.
You can also select the colors of your moving average as well as the type of moving average.
There are also green arrows for buy and red for sell.
I am sure someone can make this better, but for now I hope this helps.
brevco
SetChartOptions(0,0,chartGrid30|chartGrid70);
periods = Param( "Periods", 15, 1, 200, 1 );
Plot( RSI( periods), "RSI", ParamColor( "RSI Color", colorBlack ), ParamStyle("Style", styleThick) );
Plot(70,"",colorBlack,styleLine|styleNoLabel);//OS
Plot(30,"",colorDarkGrey,styleLine | styleNoLabel);//OB
Plot(50,"",colorYellow,styleDashed|styleNoLabel);//50 line
_SECTION_BEGIN("Weighted MA Color");
SetChartBkColor( ColorHSB( 86, 36, 126 ) );
P = ParamField("Field");
Type = ParamList("Type", "Weighted,Lagless-21,Hull-26,Linear Regression-45,Exponential,Double Exponential,Tripple Exponential,Wilders,Simple");
Periods = Param("Periods", 9, 2, 100 );
Displacement = Param("Displacement", 1, -50, 50 );
m = 0;
if( Type == "Weighted" ) m= WMA( P, Periods );
if( Type == "Lagless-21" ) m= 2*EMA(P, Periods)-EMA(EMA(P, Periods), Periods);
if( Type == "Hull-26" ) m= WMA(2*(WMA(P, Periods/2))-WMA(P, Periods) ,4 );
if( Type == "Linear Regression-45" ) m= LinearReg( P, Periods );
if( Type == "Exponential" ) m = EMA( P, Periods );
if( Type == "Double Exponential" ) m = DEMA( P, Periods );
if( Type == "Tripple Exponential" ) m = TEMA( P, Periods );
if( Type == "Wilders" ) m = Wilders( P, Periods );
if( Type == "Simple" ) m = MA( P, Periods );
Linecolor = IIf( m > Ref( m, -1), ParamColor("UPColor", colorWhite), ParamColor("DOWNColor", colorBlack) );
Plot( m, _DEFAULT_NAME(),Linecolor , styleThick, 0, 0, Displacement );
_SECTION_END();
Buy = RSI ()> m;
Sell = RSI ()< m;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
PlotShapes(IIf(Buy,shapeUpArrow,0) ,colorBrightGreen );
PlotShapes(IIf(Sell,shapeDownArrow,0) ,colorRed);
AlertIf(Buy,"SOUND C:\\Windows\\Media\\tada.wav","Long ");
AlertIf(Sell,"sound C:\\Windows\\media\\tada.wav","sell");