I created a script to buy / sell when stoch oversold, overbought and BB when the price is above the upper BB and falls below it. I want to combine with rsi but I do not know how to do it and I want to put SL to avoid the trap of market. Do you have any way to help me optimize the scirpt?