Need signal script to make order following RSI and candle colours

Hello, please I’d like some help to write a simple code to trade binary options within this strategy:
1 - when the RSI touches top line (at 80) OR price touches top BB, signal sell order
2 - when the RSI touches bot line (at 20) OR price touches bot BB, signal buy order
3 - when the candle changes colour, order to the same color that it is now (example, the candle was red, and it just closed green. next order will be call, and it should be made less than a second to expirate the buying time). Other example: GREEN, GREEN, RED -> NEXT ORDER WILL BE SELL

I’m a computer scientist so I’m very interested on learning how to write this code. I’ve never used Zerodha, actually I’ve just discovered it after I was searching for a language to make a script to signa trades. I’m a begginner in binary optiions and technical analysis, but if you teach me these 3 signals I think I can go on from there. Thank you alot!