
이 전략은 지수 이동 평균 ((EMA) 와 상대적으로 약한 지표 ((RSI) 를 결합한 트렌드 역전 거래 시스템이다. 9주기 및 21주기 EMA의 교차 신호를 통해 RSI 지표가 50 수준에서 돌파구를 확인하고 거래자에게 정확한 트렌드 전환점을 제공합니다. 시스템은 고정된 스톱 스톱 손실 비율을 포함한 완전한 위험 제어 장치를 설계하여 반전을 효과적으로 제어합니다.
전략의 핵심 논리는 빠른 EMA ((9주기) 와 느린 EMA ((21주기) 의 교차에 기반하며, RSI 지표를 사용하여 동력을 확인한다. 빠른 EMA가 느린 EMA를 상향으로 넘어가고 RSI가 50보다 크면, 시스템은 여러 신호를 낸다. 빠른 EMA가 느린 EMA를 상향으로 넘어가고 RSI가 50보다 작으면, 시스템은 평지 신호를 낸다.
이 전략은 EMA와 RSI의 동력을 확인하는 EMA와 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA의 동력을 확인하는 EMA와 RSI의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의 동력을 확인하는 EMA의
/*backtest
start: 2024-11-26 00:00:00
end: 2024-12-25 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("EMA Crossover with RSI Confirmation and Buy/Sell Signals", overlay=true)
// Input for EMAs and RSI
fastLength = input.int(9, title="Fast EMA Length")
slowLength = input.int(21, title="Slow EMA Length")
rsiLength = input.int(14, title="RSI Length")
rsiLevel = input.int(50, title="RSI Level", minval=0, maxval=100)
// Calculate the EMAs and RSI
fastEMA = ta.ema(close, fastLength)
slowEMA = ta.ema(close, slowLength)
rsi = ta.rsi(close, rsiLength)
// Plot the EMAs on the chart
plot(fastEMA, color=color.green, linewidth=2, title="Fast EMA (9)")
plot(slowEMA, color=color.red, linewidth=2, title="Slow EMA (21)")
// Plot the RSI on a separate pane (below the chart)
hline(rsiLevel, "RSI Level", color=color.gray)
plot(rsi, color=color.blue, linewidth=2, title="RSI")
// Buy condition: Fast EMA crosses above Slow EMA and RSI crosses above 50
buyCondition = ta.crossover(fastEMA, slowEMA) and rsi > rsiLevel
// Sell condition: Fast EMA crosses below Slow EMA and RSI crosses below 50
sellCondition = ta.crossunder(fastEMA, slowEMA) and rsi < rsiLevel
// Execute trades based on conditions
if (buyCondition)
strategy.entry("Buy", strategy.long)
label.new(bar_index, low, "Buy", color=color.green, textcolor=color.white, style=label.style_label_up, size=size.small)
if (sellCondition)
strategy.close("Buy")
label.new(bar_index, high, "Sell", color=color.red, textcolor=color.white, style=label.style_label_down, size=size.small)
// Strategy exit (optional): Fixed risk-to-reward ratio (take profit and stop loss)
takeProfit = input.int(2, title="Take Profit (Risk-Reward)", minval=1)
stopLoss = input.int(1, title="Stop Loss (Risk-Reward)", minval=1)
strategy.exit("Exit Buy", "Buy", stop=close * (1 - stopLoss / 100), limit=close * (1 + takeProfit / 100))
// Plot buy/sell arrows for visualization
plotarrow(buyCondition ? 1 : na, offset=-1, colorup=color.green, maxheight=30, title="Buy Signal Arrow")
plotarrow(sellCondition ? -1 : na, offset=-1, colordown=color.red, maxheight=30, title="Sell Signal Arrow")