
이 전략은 평균 트렌드 지표 ((ADX) 와 패러블 라인 스톱 로즈 회전 지표 ((SAR) 를 결합한 트렌드 추적 거래 시스템이다. 이 시스템은 ADX를 통해 트렌드 강도를 측정하고, SAR를 사용하여 트렌드 방향을 확인하여 강한 트렌드 시장에서 거래 기회를 잡는다. 이 시스템은 트렌드의 존재를 확인하고, 트렌드의 신뢰성을 확인하는 두 가지 확인 메커니즘을 사용합니다.
이 전략의 핵심 논리는 다음과 같은 몇 가지 핵심 요소에 기반합니다.
거래 신호의 발동 조건은 다음과 같습니다.
위험 관리 제안:
변동률 지표 조정 파라미터를 도입합니다.
출전 메커니즘을 최적화
시장 환경 필터링
포지션 관리
이 전략은 ADX와 SAR 지표를 결합하여 견고한 트렌드 추적 시스템을 구축한다. 전략의 주요 장점은 두 개의 확인 메커니즘과 동적 중지 설정이지만, 흔들리는 시장에서 좋지 않을 수 있다. 합리적인 매개 변수 최적화 및 위험 통제를 통해 이 전략은 트렌드가 뚜렷한 시장 환경에서 좋은 성능을 얻을 수 있다.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-10 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/
// © traderhub
//@version=5
strategy("Trend Following ADX + Parabolic SAR", overlay=true)
// Strategy parameters
adxLength = input(14, title="ADX Period")
adxThreshold = input(25, title="ADX Threshold")
adxSmoothing = input(14, title="ADX Smoothing")
sarStart = input(0.02, title="Parabolic SAR Start") // Starting acceleration factor
sarIncrement = input(0.02, title="Parabolic SAR Increment") // Increment step
sarMax = input(0.2, title="Parabolic SAR Max") // Maximum acceleration factor
// Calculate ADX, DI+, and DI-
[diPlus, diMinus, adx] = ta.dmi(adxLength, adxSmoothing)
// Parabolic SAR calculation
sar = ta.sar(sarStart, sarIncrement, sarMax)
// Conditions for a long position
longCondition = adx > adxThreshold and diPlus > diMinus and close > sar
// Conditions for a short position
shortCondition = adx > adxThreshold and diMinus > diPlus and close < sar
// Enter a long position
if (longCondition)
strategy.entry("Long", strategy.long)
// Enter a short position
if (shortCondition)
strategy.entry("Short", strategy.short)
// Close position on reverse signal
if (strategy.position_size > 0 and shortCondition)
strategy.close("Long")
if (strategy.position_size < 0 and longCondition)
strategy.close("Short")
// Plot indicators on the chart
plot(sar, color=color.blue, style=plot.style_circles, linewidth=2, title="Parabolic SAR")
plot(adx, color=color.red, title="ADX")
hline(adxThreshold, "ADX Threshold", color=color.green)