
이 전략은 여러 기술 지표들을 결합한 트렌드 추적 시스템으로, 주로 슈퍼트렌드 지표의 트렌드 방향을 판단하고, ADX (평균 트렌드 지수) 의 트렌드 강도 확인과 RSI (상대적으로 강한 지수) 의 변동 영역 판단을 결합하여 진입 시기를 최적화한다. 이 전략은 일방향 다중 모드를 채택하여 여러 지표의 교차 검증을 통해 거래의 정확성과 신뢰성을 향상시킨다.
전략의 핵심 논리는 다음과 같은 세 가지 핵심 구성 요소에 기반합니다.
다음 진입 조건을 동시에 충족해야 합니다.
평지 조건: 수퍼트렌드 방향이 위쪽으로 돌면 [[supertrendDirection == 1) 평점 포지션을 수행한다。
이 전략은 여러 기술 지표의 조합을 통해 비교적 완벽한 트렌드 추적 거래 시스템을 구축한다. 전략의 핵심 장점은 서로 다른 지표의 교차 검증을 통해 거래 신호의 신뢰성을 높이는 데 있지만, 동시에 신호 지연 및 변수 최적화의 도전에 직면하고 있다. 제안된 최적화 방향을 통해 전략은 기존의 장점을 유지하면서 그것의 적응성과 안정성을 더욱 향상시킬 것으로 보인다.
/*backtest
start: 2025-02-13 00:00:00
end: 2025-02-20 00:00:00
period: 5m
basePeriod: 5m
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=6
strategy("Supertrend + ADX Strategy", overlay=true)
// Parameter für ADX und Supertrend
diLength = input.int(14, title="DI Length")
adxSmoothing = input.int(14, title="ADX Smoothing")
adxThreshold = input.float(14)
supertrendFactor = input.float(3.0, title="Supertrend Factor")
supertrendPeriod = input.int(14, title="Supertrend Period")
// Berechnung von +DI, -DI und ADX
[diplus, diminus, adx] = ta.dmi(diLength, adxSmoothing)
// RSI-Berechnung
rsiLength = input.int(14, title="RSI Length")
rsi = ta.rsi(close, rsiLength)
// Supertrend-Berechnung
[supertrendValue, supertrendDirection] = ta.supertrend(supertrendFactor, supertrendPeriod)
// Long-Einstiegsbedingung
longCondition = supertrendDirection == -1 and adx > adxThreshold and (rsi < 40 or rsi > 60)
// Long-Ausstiegsbedingung (wenn Supertrend grün wird)
exitCondition = supertrendDirection == 1
// Visualisierung der Einstiegssignale (Pfeile)
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.triangleup, title="Buy Signal")
plotshape(series=exitCondition, location=location.abovebar, color=color.red, style=shape.triangledown, title="Sell Signal")
// Supertrend-Plot im Chart
plot(supertrendValue, color=supertrendDirection == -1 ? color.yellow : color.red, linewidth=2, title="Supertrend Line")
// Alerts für Einstieg/Ausstieg
alertcondition(longCondition, title="Long Signal", message="Supertrend + ADX: Long Entry")
alertcondition(exitCondition, title="Exit Signal", message="Supertrend turned Green: Exit")
// Strategieausführung
if longCondition and supertrendDirection == -1
strategy.entry("Long", strategy.long)
if exitCondition
strategy.close("Long")