
動態トレンド同期戦略は,相対的動態指数 (RMI) とカスタマイズされたpresentTrend指標を組み合わせた取引戦略である.この戦略は,動態分析とトレンド判断を組み合わせた多層のアプローチを採用し,トレーダーにより柔軟で敏感な取引機構を提供している.
RMI指数は,相対的強弱指数 (RSI) の変形であり,前段の価格変化に比べて価格上昇と下落の動力の大きさを測定する.計算式は次のとおりです.
RMI = 100 - 100/ (−1 + 平均上昇数 / 平均減少数)
RMI指数の値は0から100の間で,数値が大きいほど上昇勢いが強く,数値が小さいほど下落勢いが強くなる.
presentTrend指標は,実際の波動範囲 ((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)