//@version=5 indicator("Binary_options with rsi CROSS", overlay=true) rsiLengthInput = input.int(5, minval=1, title="RSI Length", group="RSI Settings") rsiSourceInput = input.source(ohlc4, "Source", group="RSI Settings") maLengthInput = input.int(14, title="MA Length", group="MA Settings") up = ta.rma(math.max(ta.change(rsiSourceInput), 0), rsiLengthInput) down = ta.rma(-math.min(ta.change(rsiSourceInput), 0), rsiLengthInput) rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down)) rsiMA = ta.sma(rsi,maLengthInput) is_call=ta.crossover(rsi,rsiMA) and rsi<70 and rsi>30 is_put=ta.crossunder(rsi,rsiMA) and rsi<70 and rsi>30 plotshape(is_call , title="BUY ARROW", color=color.green, text="*CALL*",textcolor = color.lime, style=shape.arrowup, location=location.belowbar) plotshape(is_put , title="SELL ARROW", color=color.red, text="*PUT*",textcolor = color.red, style=shape.arrowdown) alertcondition(is_call, title='Alert on Call', message='take call') alertcondition(is_put, title='Alert on put', message='take Put')