
この戦略は,ADX指標と取引量に基づいたトレンド追跡システムである.これは,ADX指標を組み合わせてトレンドの強さを判断し,取引量を確認信号として使用することで,強いトレンドの市場での信頼できる取引機会を捕獲する.戦略の核心論理は,市場が明らかなトレンドを示し,十分な取引量によってサポートされている場合にのみ取引することである.
戦略はADX指標と取引量の二重フィルタリング機構を採用する.ADXの値が設定された値 (デフォルト26),を超えると,市場の明らかな傾向があることを示す.同時に,現在の取引量の20サイクル取引量の平均線との関係を比較して (デフォルト倍数1.8),トレンドの有効性を確認する.この2つの条件を満たす基礎で,DI+とDI-の相対的に強い関係に基づいてトレンドの方向を判断し,そうしてポジション開設の方向を決定する.逆転の信号が発生すると,戦略はリスクを制御するために自動的にポジションを平準化する.
これは,構造が整った,論理が明確なトレンド追跡戦略である.ADX指標と取引量の組み合わせによる使用により,トレンド取引における信号信頼性の問題をより良く解決している.戦略のパラメータ設定は柔軟で,異なる市場特性に応じて最適化することができる.一定の遅れのリスクがあるものの,適切なパラメータ調整と最適化改進によって,この戦略は,優れた実用価値を持っている.
/*backtest
start: 2024-01-01 00:00:00
end: 2024-11-11 00:00:00
period: 1h
basePeriod: 1h
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("ADX + Volume Strategy", overlay=true)
// Strategy parameters
adxLength = input(21, title="ADX Period") // ADX period
adxThreshold = input(26, title="ADX Threshold") // ADX threshold to determine strong trend
volumeMultiplier = input.float(1.8, title="Volume Multiplier", minval=0.1, maxval=10 , step = 0.1) // Volume multiplier, adjustable float
// Calculate ADX, DI+, DI-
[diPlus, diMinus, adx] = ta.dmi(adxLength, adxLength)
// Average volume for signal confirmation
avgVolume = ta.sma(volume, 20) // Simple Moving Average of volume over 20 bars
// Conditions for entering a long position
longCondition = adx > adxThreshold and diPlus > diMinus and volume > avgVolume * volumeMultiplier
// Conditions for entering a short position
shortCondition = adx > adxThreshold and diMinus > diPlus and volume > avgVolume * volumeMultiplier
// Enter a long position
if (longCondition)
strategy.entry("Long", strategy.long)
// Enter a short position
if (shortCondition)
strategy.entry("Short", strategy.short)
// Close positions on opposite signals
if (strategy.position_size > 0 and shortCondition)
strategy.close("Long")
if (strategy.position_size < 0 and longCondition)
strategy.close("Short")
// Display ADX on the chart
plot(adx, color=color.red, title="ADX")
hline(adxThreshold, "ADX Threshold", color=color.green)