Need codes for my below strategy

I need codes for my below strategy ,@Zerodha plz help
TIMEFRAME 15 MINS. For
BUY IF 3 succesive candles make higher high and RSI >50
Stoploss lowest point of three candles
Exit at 3.15 pm or at 20 points profit

SELL IF 3 Succesive candles make lower low and rsi < 50
Stoploss highest point of three candles
Exit at 3.15 pm or 20 points profit

Plz reply asap