
이 전략은 이동 평균 (EMA) 과 상대적으로 약한 지표 (RSI) 를 결합한 짧은 라인 거래 시스템이다. 이 전략은 다중 평균의 교차 신호와 RSI 지표의 동력을 확인하여 잠재적인 거래 기회를 식별한다. 이 전략은 15 분 시간 주기에서 거래하는 데 적합한 자율적 인 중지 및 수익 목표를 설계했다.
이 전략은 3개의 다른 주기 ((9,21,50) 의 지수 이동 평균과 14주기 RSI 지표를 사용한다. 다중 신호의 경우, 9주기 EMA가 상향으로 21주기 EMA를 통과하고 가격이 50주기 EMA 위에 있고, RSI가 40-70의 영역에 있을 때, 다중 신호를 촉발한다. 공백 신호의 경우, 9주기 EMA가 하향으로 21주기 EMA를 통과하고 가격이 50주기 EMA 아래에 있고, 그리고 RSI가 30-60의 영역에 있을 때, 공백 신호를 촉발한다. 거래는 각 퍼센트에 기반한 손실 및 이익 목표를 설정한다.
이 전략은 복수의 기술적 지표를 결합하여 비교적 완전한 거래 시스템을 구축한다. 그것은 진입과 출퇴근의 명확한 신호를 포함하고 있을 뿐만 아니라, 위험 제어 장치를 설계했다. 이 전략의 핵심 장점은 복수의 확인을 통해 거래의 신뢰성을 높이는 데 있다. 그러나 동시에 거래자는 시장 환경의 변화에 주의를 기울이고, 적절한 경우에 파라미터 설정을 조정해야 한다.
/*backtest
start: 2024-02-22 00:00:00
end: 2025-02-19 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("RSI + EMA Scalping Strategy", overlay=true)
// Input for EMAs
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
ema50 = ta.ema(close, 50)
// RSI Input
rsi = ta.rsi(close, 14)
// User-defined input for Stop Loss & Target percentages
stop_loss_percent = input.float(0.5, "Stop Loss (%)", step=0.1)
target_percent = input.float(1.0, "Target (%)", step=0.1)
// Long condition
longCondition = ta.crossover(ema9, ema21) and close > ema50 and rsi > 40 and rsi < 70
if (longCondition)
strategy.entry("Buy", strategy.long)
stopLossPrice = close * (1 - stop_loss_percent / 100)
takeProfitPrice = close * (1 + target_percent / 100)
strategy.exit("Exit Buy", "Buy", stop=stopLossPrice, limit=takeProfitPrice)
// Short condition
shortCondition = ta.crossunder(ema9, ema21) and close < ema50 and rsi < 60 and rsi > 30
if (shortCondition)
strategy.entry("Sell", strategy.short)
stopLossPrice = close * (1 + stop_loss_percent / 100)
takeProfitPrice = close * (1 - target_percent / 100)
strategy.exit("Exit Sell", "Sell", stop=stopLossPrice, limit=takeProfitPrice)
// Plot EMAs
plot(ema9, color=color.orange, linewidth=1, title="EMA 9")
plot(ema21, color=color.blue, linewidth=1, title="EMA 21")
plot(ema50, color=color.purple, linewidth=2, title="EMA 50")