MT-調整取引戦略

作者: リン・ハーンチャオチャン開催日:2024年1月25日 15:06:04
タグ:

img

概要

MT調整取引戦略は,金融市場で短期間の取引機会を特定するために複数の技術指標を統合した高度な定量取引戦略です.有名なトレーダーI3ig_Tradesによって設計され,高周波取引に特化されています.

戦略の論理

この戦略には,異なる時間枠 (21, 50, 200) の3つのスムーズ移動平均値 (SMA),14日間の相対強度指数 (RSI) およびウィリアムスフラクタル (2日) が組み込まれています. 特定のエントリーロジックは次のように定義されています:

ロング信号: ストローが3つのSMA以上,RSIが50以上,現在の高値が前回のフラクトルアップより大きいときにトリガーされます.

ショート信号: 3つのSMA以下で,RSIが50以下で,現在の低値が前回のフラクトルダウンより小さいとき,クローズがアクティベートされます.

ポジションのサイジングは,選択された自己資本の割合とレバレッジレベルに基づいて動的に計算されます.

利点分析

この戦略は,複数の指標を組み合わせて,偽信号をフィルターし,高い確率のブレイクアウトレベルを特定し,取引リスクを大幅に削減します.一方,ポジションのサイズは,口座資本の割合に応じて設定され,単一の損失を制御します.

特殊な強みとは

  1. 罠を避けるために複数のタイムフレームの指標を使用します. SMAは短期,中期,長期間のトレンドを認識します.

  2. RSIは過買い・過売りゾーンを避ける.50以上の値は上昇傾向を示し,50以下の値は下落傾向を示します.

  3. ウィリアムズ・フラクタルは 突破をさらに確認し 極度の突入時にのみ入ります

  4. 設定可能なパラメータは 異なる取引スタイルに適しています

リスク分析

この戦略の主なリスクは以下のとおりです.

  1. SMAが偏ったとき,完全に鞭打ちを避けられない.

  2. 傾向の逆転前にタイミングで退場できず,指標が遅れているため.

  3. 負荷が既定値を超えると,極端な動きで全ポジションを失うリスク

解決策:

  1. 最適なパラメータを見つけるために SMAの組み合わせを最適化します

  2. 偽のブレイクをさらに避けるために ろうそくフィルターを追加します

  3. 適切な割合とレバレッジを 減らす

オプティマイゼーションの方向性

戦略は以下によってさらに強化される:

  1. 最適なパラメータを測るため,SMAsとRSIの異なる組み合わせをテストする.

  2. ボリンジャーバンドの幅,トレーダー・ジャック・シグナルなどの追加フィルターを組み込む.

  3. ストップ・ロスのメカニズムを追加して 既定レベルでの損失を削減します

  4. サポートと抵抗の検出のためのディープラーニングモデルを統合する

  5. ポジションの合理的なスケーリングのための適応型位置サイズスケーリングの実施

結論


/*backtest
start: 2024-01-17 00:00:00
end: 2024-01-24 00:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
// Written by I3ig_Trades. Follow And Let Me Know Any Strategies You'd Like To See!
strategy("Best Scalping Strategy Period (TMA)", shorttitle="Best Scalping Strategy Period (TMA)", overlay=false,
         initial_capital=100000, 
         default_qty_type=strategy.percent_of_equity, 
         default_qty_value=100)

// Leverage Input
leverage = input.float(1, title="Leverage", minval=1, step=0.1)

// Calculate position size based on the percentage of the portfolio and leverage
percentOfPortfolio = input.float(100, title="Percent of Portfolio")

// Define input options
rsiLength = input.int(14, title="RSI Length", minval=1)
williamsLength = input.int(2, title="Williams Fractals Length", minval=1)
sma21Length = input.int(21, title="SMA 21 Length", minval=1)
sma50Length = input.int(50, title="SMA 50 Length", minval=1)
sma200Length = input.int(200, title="SMA 200 Length", minval=1)

// Smoothed Moving Averages
sma21 = ta.sma(close, sma21Length)
sma50 = ta.sma(close, sma50Length)
sma200 = ta.sma(close, sma200Length)

// RSI
rsiValue = ta.rsi(close, rsiLength)

// Williams Fractals
fractalUp = ta.highest(close, williamsLength)
fractalDown = ta.lowest(close, williamsLength)

// Conditions for Buy Entry
buyCondition = close > sma21 and close > sma50 and close > sma200 and rsiValue > 50 and high > fractalUp[1]

// Conditions for Sell Entry
sellCondition = close < sma21 and close < sma50 and close < sma200 and rsiValue < 50 and low < fractalDown[1]

positionSizePercent = percentOfPortfolio / 100 * leverage
positionSize = strategy.equity * positionSizePercent / close

// Executing strategy with dynamic position size
if buyCondition
    strategy.entry("Buy", strategy.long, qty=positionSize)

if sellCondition
    strategy.entry("Sell", strategy.short, qty=positionSize)

// Plotting the Smoothed Moving Averages
plot(sma21, color=color.white)
plot(sma50, color=color.green)
plot(sma200, color=color.red)

// Plotting RSI and Fractals for visual confirmation
hline(50, "RSI 50", color=color.yellow)
plot(rsiValue, color=color.blue, title="RSI")

// Input text boxes for trading actions
var buy_entry_params = input("", title="Buy Entry Parameters")
var buy_exit_params = input("", title="Buy Exit Parameters")
var sell_entry_params = input("", title="Sell Entry Parameters")
var sell_exit_params = input("", title="Sell Exit Parameters")


もっと