
동력 트렌드 동기화 전략은 상대적 동력 지수 ((RMI) 와 사용자 정의된 presentTrend 지표를 결합한 거래 전략이다. 이 전략은 다층적 인 방법을 사용하여 동력 분석과 트렌드 판단을 결합하여 거래자에게 더 유연하고 민감한 거래 장치를 제공합니다.
RMI 지표는 상대적 강도 지표 (RSI) 의 변종으로, 가격 상승과 하락의 동력의 크기를 이전 기간에 대한 가격 변화와 비교하여 측정합니다. 계산 공식은 다음과 같습니다.
RMI = 100 - 100/(1 + 상승 평균/하락 평균)
RMI 지표의 값은 0에서 100 사이이며, 값이 클수록 상승 동력이 강하며, 값이 작을수록 하락 동력이 강하다.
현재 트렌드 지표는 실제 변동 범위 ((ATR) 와 이동 평균을 결합하여 트렌드 방향과 동적 지원 또는 저항 지점을 판단합니다. 계산 공식은 다음과 같습니다.
상단: 이동 평균 + (ATR × F)
하단 트랙: 이동 평균 - (ATR × F)
이동 평균은 지난 M주기의 종결 가격의 평균입니다.
ATR은 지난 M주기의 평균 실제 변동 범위입니다.
F는 감수성을 조정하는 배수입니다.
가격이 PresentTrend의 상하 궤도를 돌파할 때, 트렌드가 변하는 것을 나타냅니다.
입장 조건:
경기 종료 조건 ((동적 상쇄로):
동적 중지 손실의 계산 공식:
이 전략의 장점은 RMI의 동적 판단과 presentTrend의 트렌드 및 동적 상쇄를 결합하여 트렌드를 추적하면서 위험을 효과적으로 제어할 수 있다는 것입니다.
이 전략은 다음과 같은 장점을 가지고 있습니다.
이 전략에는 위험도 있습니다.
적절한 입시 조건의 완화, 변수 조합의 최적화, 추세 판단과 결합하여 위와 같은 위험을 줄일 수 있다.
이 전략은 다음과 같은 방향으로 최적화될 수 있습니다.
동력 트렌드 동기화 전략은 다단계 거래 전략으로 동력 지표와 트렌드 지표를 동시에 고려하여 판단 정확도, 위험 제어의 우수한 특성을 갖는다. 이 전략은 개인 선호도에 따라 유연하게 조정할 수 있으며, 깊이 최적화 된 후, 트렌드 캡처의 장점을 충분히 발휘할 수 있는 추천되는 거래 전략이다.
/*backtest
start: 2024-01-19 00:00:00
end: 2024-02-18 00:00:00
period: 1h
basePeriod: 15m
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/
// © PresentTrading
//@version=5
strategy("PresentTrend RMI Synergy - Strategy [presentTrading]", shorttitle="PresentTrend RMI Synergy - Strategy [presentTrading]", overlay=false)
// Inputs
tradeDirection = input.string("Both", title="Trade Direction", options=["Long", "Short", "Both"])
lengthRMI = input.int(21, title="RMI Length")
lengthSuperTrend = input.int(5, title="presentTrend Length")
multiplierSuperTrend = input.float(4.0, title="presentTrend Multiplier")
// RMI Calculation
up = ta.rma(math.max(ta.change(close), 0), lengthRMI)
down = ta.rma(-math.min(ta.change(close), 0), lengthRMI)
rmi = 100 - (100 / (1 + up / down))
// PresentTrend Dynamic Threshold Calculation (Simplified Example)
presentTrend = ta.sma(close, lengthRMI) * multiplierSuperTrend // Simplified for demonstration
// SuperTrend for Dynamic Trailing Stop
atr = ta.atr(lengthSuperTrend)
upperBand = ta.sma(close, lengthSuperTrend) + multiplierSuperTrend * atr
lowerBand = ta.sma(close, lengthSuperTrend) - multiplierSuperTrend * atr
trendDirection = close > ta.sma(close, lengthSuperTrend) ? 1 : -1
// Entry Logic
longEntry = rmi > 60 and trendDirection == 1
shortEntry = rmi < 40 and trendDirection == -1
// Exit Logic with Dynamic Trailing Stop
longExitPrice = trendDirection == 1 ? lowerBand : na
shortExitPrice = trendDirection == -1 ? upperBand : na
// Strategy Execution
if (tradeDirection == "Long" or tradeDirection == "Both") and longEntry
strategy.entry("Long Entry", strategy.long)
strategy.exit("Exit Long", stop=longExitPrice)
if (tradeDirection == "Short" or tradeDirection == "Both") and shortEntry
strategy.entry("Short Entry", strategy.short)
strategy.exit("Exit Short", stop=shortExitPrice)
// Visualization
plot(rmi, title="RMI", color=color.orange)
hline(50, "Baseline", color=color.white)
hline(30, "Baseline", color=color.blue)
hline(70, "Baseline", color=color.blue)