複数の移動平均トレンドクロスオーバートリプルフィルター取引戦略

MA SMA Trend FILTER CROSS RR
作成日: 2025-02-21 10:48:37 最終変更日: 2025-02-21 10:48:37
コピー: 0 クリック数: 374
2
フォロー
319
フォロワー

複数の移動平均トレンドクロスオーバートリプルフィルター取引戦略 複数の移動平均トレンドクロスオーバートリプルフィルター取引戦略

概要

これは,3つのシンプル移動平均 (SMA) に基づくトレンド追跡戦略である. この戦略は,21,50,100周期移動平均の交差と位置関係を利用して,市場トレンドを認識し,適切なタイミングで取引を行う. この戦略は主に5分間の時間枠で動作し,30分間のグラフを参照してトレンドを確認することを推奨する.

戦略原則

戦略は3つのフィルタリングメカニズムを使用して取引信号を決定します.

  1. 21周期平均線を高速平均線として使用し,短期的な価格変動を捉える
  2. 50周期平均線を中間平均線として用いて,急速平均線と交差信号を形成
  3. 100周期平均線をトレンドフィルターとして使用し,取引の方向が主トレンドと一致することを確認する.

購入条件は同時に満たされている必要があります:

  • 平均線21は,平均線50を通って上へ
  • 平均線21と平均線50は,平均線100の上にあります.

販売条件は以下の通りです.

  • 平均線21は,平均線50を通って,下を向いています.
  • 平均線21と平均線50は,平均線100の下にある.

戦略的優位性

  1. 多重確認メカニズムにより 偽信号の減少
  2. トレンドフィルターにより取引成功率が向上
  3. 明確な入場・出場ルール
  4. 複数のタイムフレームで使用できます.
  5. リスク・リターン・レシオンは1:2に設定され,長期的な利益に有利です.
  6. 戦略の論理はシンプルで,理解し,実行しやすい.

戦略リスク

  1. 市場が揺れ動くと取引が頻発する可能性がある
  2. 平均線遅れにより,出場と入場が遅れる可能性がある.
  3. 急速な逆転が大きな損失をもたらす可能性がある.
  4. パラメータの調整は市場環境によって異なります.

リスク管理の提案:

  • ストップ・ローは,近年の重要低点より下にある.
  • より長い時間帯の確認傾向と組み合わせた
  • 横軸の変動市場での取引を避ける
  • 定期的な評価と最適化戦略のパラメータ

戦略最適化の方向性

  1. トレンドの強さを確認する取引量指標の導入
  2. ダイナミック・ストップ・メカニズムの追加
  3. トレンド強度フィルターを追加
  4. 最適化パラメータの自己適応機構
  5. 他の技術指標と組み合わせた信号確認
  6. 市場の変動率のフィルターを増やす

要約する

これは,構造が整った,論理が明確なトレンド追跡戦略である. 三重均線フィルタリングとトレンド確認機構により,偽信号を効果的に軽減し,取引成功率を向上させることができる. この戦略は,優れた拡張性を持ち,異なる市場環境に応じて最適化調整を行うことができる.

ストラテジーソースコード
/*backtest
start: 2024-02-21 00:00:00
end: 2024-06-08 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Vezpa
//@version=5
strategy("Vezpa's Gold Strategy", overlay=true)

// ======================== MAIN STRATEGY ========================
// Input parameters for the main strategy
fast_length = input.int(21, title="Fast MA Length", minval=1)
slow_length = input.int(50, title="Slow MA Length", minval=1)
trend_filter_length = input.int(100, title="Trend Filter MA Length", minval=1)

// Calculate moving averages for the main strategy
fast_ma = ta.sma(close, fast_length)
slow_ma = ta.sma(close, slow_length)
trend_ma = ta.sma(close, trend_filter_length)

// Plot moving averages
plot(fast_ma, color=color.blue, title="21 MA")
plot(slow_ma, color=color.red, title="50 MA")
plot(trend_ma, color=color.orange, title="100 MA")

// Buy condition: 21 MA crosses above 50 MA AND both are above the 100 MA
if (ta.crossover(fast_ma, slow_ma) and fast_ma > trend_ma and slow_ma > trend_ma)
    strategy.entry("Buy", strategy.long)

// Sell condition: 21 MA crosses below 50 MA AND both are below the 100 MA
if (ta.crossunder(fast_ma, slow_ma) and fast_ma < trend_ma and slow_ma < trend_ma)
    strategy.close("Buy")

// Plot buy signals as green balloons
plotshape(series=ta.crossover(fast_ma, slow_ma) and fast_ma > trend_ma and slow_ma > trend_ma, 
     title="Buy Signal", 
     location=location.belowbar, 
     color=color.green, 
     style=shape.labelup, 
     text="BUY", 
     textcolor=color.white, 
     size=size.small, 
     transp=0)

// Plot sell signals as red balloons
plotshape(series=ta.crossunder(fast_ma, slow_ma) and fast_ma < trend_ma and slow_ma < trend_ma, 
     title="Sell Signal", 
     location=location.abovebar, 
     color=color.red, 
     style=shape.labeldown, 
     text="SELL", 
     textcolor=color.white, 
     size=size.small, 
     transp=0)