AFL code for RSI

Sir can you please provide me AFL code for the below strategy ;

Buy when RSI 14 > 40
Sell when RSI 14 < 60

For the above given condition check this below amibroker AFL

P = ParamField( “Price field” );
periods = Param(“Periods”, 15, 1, 200, 1 );
Plot( RSIa( P, periods), _DEFAULT_NAME(), ParamColor( “Color”, colorCycle ), ParamStyle(“Style”) );

Buy = RSIa(C,14) > 40;
Sell = RSIa(C,14)<60;

Sir it is giving lots of errors…

Sir can I request you to please send me the complete AFL code for this strategy top to bottom without any error which I can just paste and start working on it as I not knowledge about AFL code writing…please

Sir waiting your revert.

In this trading should only take place once i.e. when RSI (14) closing is above 40