Please help me in coding my stratergy

Intraday 5 minutes
 2) Rsi period (14) and buy above rsi crosses 30 and

3) Bollinger bands previous candle closing prices should be below lower bollinger band and current candle open and close price should be above the lower bollinger band.

Exit Buy:

1) Stop loss 20 % of the stock price

2) When ever rsi crosses above 80 and when ever prices falls below previous candle low.

3) Trailing stop loss when ever rsi crosses above 80
.

 
 
 

Buy Script:

SET A = BBB(CLOSE, 20, 2, EXPONENTIAL)
RSI(CLOSE, 14) > 30 AND
REF(A,1)<A

Sell Script:

LAST<REF(LOW,1)
RSI(CLOSE, 14) > 80 AND
 AND LAST* 1.2