PineLab
Chart
Watchlist
Screener
Ideas
Symbol:
BTCUSDT
ETHUSDT
SOLUSDT
BNBUSDT
Interval:
1m
5m
15m
1h
4h
1d
Loading...
Add to Chart
Clear
Export to TV
Ready
Pine Script™ (v5)
//@version=5 indicator("Pro RSI + SMA + Strategy", overlay=true) // === INPUTS === rsiLength = input.int(14, "RSI Length", minval=1) smaLength = input.int(20, "SMA Length", minval=1) rsiOverbought = input.int(70, "RSI Overbought") rsiOversold = input.int(30, "RSI Oversold") // === CALCULATIONS === rsi = ta.rsi(close, rsiLength) sma = ta.sma(close, smaLength) // === PLOTS === plot(rsi, color=color.purple, title="RSI") plot(sma, color=color.orange, title="SMA") hline(rsiOverbought, "Overbought", color=color.red, linestyle=hline.style_dashed) hline(rsiOversold, "Oversold", color=color.green, linestyle=hline.style_dashed) // === STRATEGY === if ta.crossover(rsi, rsiOversold) strategy.entry("Long", strategy.long) if ta.crossunder(rsi, rsiOverbought) strategy.entry("Short", strategy.short)
Chart Preview – BTC/USDT (1h)
0
Trades
0%
Win Rate
0
Profit Factor
$0
Net Profit
Line 1, Column 1
Pine Script™ v5 • UTF-8 • Spaces: 2