// Buy/Sell Conditions based on EMA Cross and RSI buyCondition = ta.crossover(ema9, ema21) and rsi < 70 sellCondition = ta.crossunder(ema9, ema21) and rsi > 30
// RSI plotting in the same script but with a secondary scale plot(rsi, color=color.purple, title="RSI", offset=0) hline(70, "Overbought", color=color.red, linestyle=hline.style_dotted) hline(30, "Oversold", color=color.green, linestyle=hline.style_dotted)