
多指標共識取引戦略は,3つの異なる技術指標を組み合わせた量化取引システムで,指標間の相互検証によって取引信号を確認する.この戦略は,流動性加重超トレンド (LWST),トレンドシグナルシステムと強化型波動型トレンド振動器 (WT) を統合し,少なくとも2つの指標が同じ方向の信号を与える場合にのみ,買取または販売操作を実行する.この共識の仕組みは,信号の信頼性を大幅に高め,偽突破による損失を減らす.同時に,戦略は,内蔵の止損と停止メカニズムで,取引ごとにリスク制御の枠組みを提供します.
マルチ指標共識取引戦略の核心原則は,市場状態の多次元分析によって取引方向を確認することである:
流動性の重量化スーパートレンド (LWST):ATRと交通量情報を組み合わせて,ダイナミックなサポートレジスタンス帯を作成する. この指標は,従来のスーパートレンド指標と交通量重量を組み合わせて,高交通量領域での帯域をより敏感にします. 計算過程には,以下のものが含まれます.
トレンドシグナルシステム:双EMAシステムの利用で価格トレンドを検出する. 急速と遅い移動平均の比率差を比較して,市場トレンドの強さを判断する. 急速EMAが遅いEMAを超えて設定された値に達すると,多頭信号を生成する. 逆には空頭信号を生成する.
強化波動トレンド振動器 ((WT): 価格と平滑平均値の偏差度に基づいて振動値を計算し,超買超売状態を識別する. この指標は以下のステップで信号を生成する.
共識信号機構策略:少なくとも2つの指標が一致するときにのみ取引を実行する.これは,多頭指標の数を計算することによって実現される (範囲は-3から3),数値が2に等しいときに買取シグナルを生成し,小さい値が2に等しいときに売りシグナルを生成する.
リスク管理: 各取引は,入場価格に基づくストップ・ロース ((デフォルト2%) とストップ・ストップ ((デフォルト4%) を設定し,任意の条件を満たしたときに自動的に退出する.
シグナルフィルタリング強化: 複数の指標のコンセンサスを要求して取引を行うことで,単一の指標によって発生する誤導信号を大幅に削減し,取引の正確性を向上させる.
市場の状況に適応する3つの指標は,異なる市場属性 (トレンド,動力,変動) に注目し,異なる市場環境で戦略が有効であることを可能にします.
流動性の敏感な調整流動性加重の超トレンドは,取引量動向に敏感性を調整し,高流動性の領域でトレンドの変化を迅速に捉え,低流動性の領域で保守的に策略を可能にします.
内部リスク管理: 預設のストップ・ロス・アンド・ストップ・メカニズムは,取引ごとに明確なリスク・リターン比率を提供し,単一取引のリスクを許容範囲で制御する.
視覚化ツール戦略は,リアルタイム信号表とグラフィックマークを提供し,トレーダーが現在の市場状況と各指標の信号を迅速に把握できるようにします.
資金管理統合: 口座権益に基づくポジションサイズを設定することで,スマートな資金管理を実現し,過度のリスクの発生を回避する.
パラメータ感度策略: 多数の調整可能なパラメータを使用し,不適切なパラメータ設定は過度最適化または信号不足につながる可能性があります. 解決策: 完全なパラメータ感受性分析を行い,複数の市場条件下で安定したパフォーマンスを示すパラメータの組み合わせを選択します.
信号が遅れた: 移動平均と複数の指標の確認を使用しているため,戦略はトレンドの初期に部分的な動きを逃す可能性があります. 解決策: 異なる時間周期に異なるパラメータの組み合わせを設定するか,より敏感な短期指標を追加することを検討できます.
横盤市場がうまくいかない: 明確なトレンドがない市場では,複数のトレンド指標が混合信号を与え,頻繁に取引または無取引を引き起こす可能性があります. 解決策:横断市場を特定するフィルターを追加し,横断に識別されたときに取引を一時停止するか,横断に設計された戦略に切り替える.
固定ストップリスク: 固定パーセントのストップを用いると,異なる資産の変動特性に適応できないかもしれない. 解決方法:ATRまたは歴史的変動率に基づいてストップ距離を動的に調整する.
資金管理のリスク: 口座資金の100%をデフォルトで使用することは,過度のリスク集中につながる可能性があります. 解決策: 市場状況とシグナル強さの動向に応じてポジションサイズを調整し,分散取引戦略を実施します.
動態参数調整:
市場環境フィルターを追加:
ストップ/ストップダスの最適化:
信号の強度階層:
タイムフィルター:
多指数共識取引戦略は,流動性の重み付けの超トレンド,トレンドシグナルシステム,強化波動のトレンド振動器を統合することで,堅牢な取引システムを創造する.その核心的な優点は,多指数共識機構が信号信頼性を大幅に向上させ,流動性の重み付けの構成要素が,戦略に市場の深さに敏感性を追加することにある.内蔵されたリスク管理フレームワークは,各取引に既定のリスク・リターン比率があることを保証する.
それにもかかわらず,戦略には最適化のための余地があり,特にパラメータの自己適応性,市場状態の認識,動的ストップ・ロスの面で最適化できる.推奨された最適化方向,特に市場環境のフィルターと信号強度等級システムの構築を実行することにより,戦略は,さまざまな市場条件下での適応性と安定性をさらに向上させることができる.
全体として,これは熟練したトレーダーがリターンとパラメータの最適化を行うために適した設計された量化取引システムです.戦略のモジュール化設計はまた,個人のニーズに応じて変更と拡張を容易にします.
/*backtest
start: 2024-03-25 00:00:00
end: 2025-03-24 00:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Multi-Indicator Consensus Strategy", overlay=true, initial_capital=100000, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// =================== Input Parameters ===================
// Liquidity Weighted Supertrend
lwst_period = input.int(10, "LWST Period", minval=1, tooltip="Period for ATR calculation")
lwst_multiplier = input.float(3.0, "LWST Multiplier", minval=0.1, tooltip="Multiplier for ATR bands")
lwst_length = input.int(20, "Volume SMA Length", minval=1, tooltip="Length for volume SMA")
// Trend Signals
trend_length = input.int(14, "Trend Length", minval=1, tooltip="Length for EMA calculation")
trend_threshold = input.float(0.5, "Trend Threshold", minval=0.1, tooltip="Percentage threshold for trend signals")
// Enhanced Wavetrend
wt_channel_length = input.int(9, "WT Channel Length", minval=1, tooltip="Smoothing period for initial calculations")
wt_average_length = input.int(12, "WT Average Length", minval=1, tooltip="Smoothing period for final signal")
wt_ma_length = input.int(3, "WT MA Length", minval=1, tooltip="Moving average length for signal line")
wt_overbought = input.float(53, "WT Overbought", minval=0, tooltip="Level to identify overbought conditions")
wt_oversold = input.float(-53, "WT Oversold", minval=-100, tooltip="Level to identify oversold conditions")
// Risk Management
sl_percent = input.float(2.0, "Stop Loss %", minval=0.1, tooltip="Stop loss percentage from entry")
tp_percent = input.float(4.0, "Take Profit %", minval=0.1, tooltip="Take profit percentage from entry")
// =================== Indicator 1: Liquidity Weighted Supertrend ===================
// Volume-weighted component for dynamic sensitivity
vol_sma = ta.sma(volume, lwst_length)
vol_weight = volume / vol_sma
// ATR-based bands with volume weighting
atr = ta.atr(lwst_period)
upperBand = hl2 + lwst_multiplier * atr * vol_weight
lowerBand = hl2 - lwst_multiplier * atr * vol_weight
// Trend determination based on price action
var float lwst_trend = 0.0
lwst_trend := close > lwst_trend[1] ? 1 : close < lwst_trend[1] ? -1 : lwst_trend[1]
// =================== Indicator 2: Trend Signals ===================
// Dual EMA system for trend detection
fast_ema = ta.ema(close, trend_length)
slow_ema = ta.ema(close, trend_length * 2)
trend_diff = (fast_ema - slow_ema) / slow_ema * 100
trend_signal = trend_diff > trend_threshold ? 1 : trend_diff < -trend_threshold ? -1 : 0
// =================== Indicator 3: Enhanced Wavetrend ===================
// Calculate Wavetrend components
ap = hlc3 // Typical price
esa = ta.ema(ap, wt_channel_length) // Smoothed price
d = ta.ema(math.abs(ap - esa), wt_channel_length) // Average volatility
ci = (ap - esa) / (0.015 * d) // Base oscillator
tci = ta.ema(ci, wt_average_length) // Smoothed oscillator
// Generate main and signal lines
wt1 = tci
wt2 = ta.sma(wt1, wt_ma_length)
// Generate Wavetrend Signal based on overbought/oversold conditions
wt_signal = 0
wt_signal := wt1 > wt_overbought and wt2 > wt_overbought ? -1 :
wt1 < wt_oversold and wt2 < wt_oversold ? 1 :
wt_signal[1]
// =================== Consensus Signal Generation ===================
// Count bullish signals (1 point for each bullish indicator)
var int consensus_count = 0
consensus_count := (lwst_trend == 1 ? 1 : 0) +
(trend_signal == 1 ? 1 : 0) +
(wt_signal == 1 ? 1 : 0)
// Generate trading signals when majority (2+ indicators) agree
bool buy_signal = consensus_count >= 2
bool sell_signal = consensus_count <= -2
// =================== Trade Execution ===================
// Long position entry and exit with risk management
if (buy_signal and strategy.position_size <= 0)
strategy.entry("Long", strategy.long)
strategy.exit("Long TP/SL", "Long",
profit = close * tp_percent / 100,
loss = close * sl_percent / 100)
// Short position entry and exit with risk management
if (sell_signal and strategy.position_size >= 0)
strategy.entry("Short", strategy.short)
strategy.exit("Short TP/SL", "Short",
profit = close * tp_percent / 100,
loss = close * sl_percent / 100)
// =================== Visualization ===================
// Signal markers for entry points
plotshape(buy_signal ? low : na, "Buy Signal", shape.triangleup, location.belowbar, color.green, size=size.small)
plotshape(sell_signal ? high : na, "Sell Signal", shape.triangledown, location.abovebar, color.red, size=size.small)
// Indicator lines
plot(wt1, "Wavetrend 1", color.blue, linewidth=1)
plot(wt2, "Wavetrend 2", color.orange, linewidth=1)
plot(wt_overbought, "Overbought", color.red, linewidth=1)
plot(wt_oversold, "Oversold", color.green, linewidth=1)
plot(fast_ema, "Fast EMA", color.yellow, linewidth=1)
plot(slow_ema, "Slow EMA", color.white, linewidth=1)
plot(lwst_trend == 1 ? upperBand : na, "Upper Band", color.green, linewidth=2)
plot(lwst_trend == -1 ? lowerBand : na, "Lower Band", color.red, linewidth=2)
// =================== Information Table ===================
// Real-time display of indicator signals
var table info = table.new(position.top_right, 2, 4)
table.cell(info, 0, 0, "Indicator", bgcolor=color.gray, text_color=color.white)
table.cell(info, 1, 0, "Signal", bgcolor=color.gray, text_color=color.white)
table.cell(info, 0, 1, "LWST", text_color=color.white)
table.cell(info, 1, 1, str.tostring(lwst_trend), text_color=lwst_trend == 1 ? color.green : color.red)
table.cell(info, 0, 2, "Trend", text_color=color.white)
table.cell(info, 1, 2, str.tostring(trend_signal), text_color=trend_signal == 1 ? color.green : color.red)
table.cell(info, 0, 3, "Wavetrend", text_color=color.white)
table.cell(info, 1, 3, str.tostring(wt_signal), text_color=wt_signal == 1 ? color.green : color.red)