BYBIT:BNBUSDT.P   BNBUSDT Perpetual Contract
//@version=4
strategy("5-Minute Chart Strategy", overlay=true)

// Input parameters
rsiLength = input(14, title="RSI Length")
overbought = input(70, title="Overbought Level")
oversold = input(30, title="Oversold Level")
emaLength = input(20, title="EMA Length")

// Calculate RSI
rsi = rsi(close, rsiLength)

// Calculate EMA
ema = ema(close, emaLength)

// Define entry and exit conditions
if crossover(close, ema) and rsi < oversold
strategy.entry("Buy", strategy.long)
if crossunder(close, ema) and rsi > overbought
strategy.entry("Sell", strategy.short)

// Plot EMA
plot(ema, color=color.blue)

// Plot RSI
plot(rsi, color=color.red)

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。