
이것은 Supertrend, 지수 이동 평균 ((EMA) 와 상대적으로 약한 지수 ((RSI) 를 결합한 다중 지수 거래 전략이다. 이 전략은 시장의 추세, 동력 및 잠재적인 역전점을 식별하기 위해 이 세 가지 기술 지표의 교차 신호와 초매 초매 수준을 사용하여 시장에서 이상적인 거래 기회를 찾습니다. 이 전략은 여러 지표의 장점을 최대한 활용하여 다양한 차원의 시장 분석을 통해 거래의 정확성과 신뢰성을 향상시킵니다.
전략의 핵심 논리는 세 가지 주요 기술 지표의 조합 분석에 기반합니다.
구매 신호는 다음과 같은 조건을 동시에 충족해야 합니다.
판매 신호는 다음과 같은 조건을 동시에 충족해야 합니다.
이것은 구조적이고 논리적으로 명확한 다중 지표 수량 거래 전략으로, 트렌드 추적, 동력 분석 및 오버 바이 오버 시드 지표를 결합하여 비교적 포괄적 인 거래 시스템을 구축합니다. 전략의 장점은 다중 지표 교차 검증이 신호 신뢰성을 높이고 명확한 위험 제어 장치가 있다는 것입니다. 일부 고유한 위험이 있지만, 지속적인 최적화 및 개선으로 전략은 다양한 시장 환경에서 안정적인 성능을 유지할 것으로 예상됩니다.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-09 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © satyakipaul3744
//@version=6
//@version=6
strategy("Supertrend + EMA Crossover + RSI Strategy", overlay=true)
// --- Input Parameters ---
supertrend_length = input.int(10, title="Supertrend Length", minval=1)
supertrend_multiplier = input.float(3.0, title="Supertrend Multiplier", step=0.1)
short_ema_length = input.int(9, title="Short EMA Length")
long_ema_length = input.int(21, title="Long EMA Length")
rsi_length = input.int(14, title="RSI Length")
rsi_overbought = input.int(70, title="RSI Overbought Level")
rsi_oversold = input.int(30, title="RSI Oversold Level")
// --- Indicator Calculations ---
// Supertrend calculation
[supertrend, direction] = ta.supertrend(supertrend_multiplier, supertrend_length)
// EMA calculations
short_ema = ta.ema(close, short_ema_length)
long_ema = ta.ema(close, long_ema_length)
// RSI calculation
rsi = ta.rsi(close, rsi_length)
// --- Buy/Sell Conditions ---
// Buy condition: Supertrend bullish, EMA crossover, RSI not overbought
buy_condition = direction > 0 and ta.crossover(short_ema, long_ema) and rsi < rsi_overbought
// Sell condition: Supertrend bearish, EMA crossunder, RSI not oversold
sell_condition = direction < 0 and ta.crossunder(short_ema, long_ema) and rsi > rsi_oversold
// --- Plot Buy/Sell signals ---
plotshape(buy_condition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sell_condition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// --- Strategy Orders for Backtesting ---
if buy_condition
strategy.entry("Buy", strategy.long)
if sell_condition
strategy.close("Buy")
// --- Plot Supertrend ---
plot(supertrend, color=direction > 0 ? color.green : color.red, linewidth=2, title="Supertrend")
// --- Plot EMAs ---
plot(short_ema, color=color.blue, title="Short EMA")
plot(long_ema, color=color.orange, title="Long EMA")
// --- Strategy Performance ---
// You can see the strategy performance in the "Strategy Tester" tab.