移動平均倍数差トレンド追跡戦略


作成日: 2024-01-04 17:43:17 最終変更日: 2024-01-04 17:43:17
コピー: 0 クリック数: 630
1
フォロー
1619
フォロワー

移動平均倍数差トレンド追跡戦略

概要

この戦略は,平均線の多時間枠の差をベースに,中長線のトレンドを追跡し,差のポジション追尾モデルを採用し,資金の指数的な成長を実現する.この戦略の最大の利点は,中長線のトレンドを捉え,分批の分段の追尾を行うことで,余分な利益を得ることである.

戦略原則

  1. 9日平均線,100日平均線と200日平均線に基づいて複数の時間枠を構築する.
  2. 短期平均線が長期平均線を下から上へと突破すると買入シグナルが生成される.
  3. 7級差のポジション追尾モードを採用し,新しいポジションを開くたびに,以前のポジションが満席であるかどうかを判断し,すでに6つのポジションがある場合は,ポジションを増やさない.
  4. ポジションごとに固定ストップ・ストラップポイントを3%設定し,リスクコントロールを行う.

この戦略の基本的な取引の論理はこうです.

戦略的優位性

  1. 市場における指数的な成長を最大限に活用する中長期トレンドを有効に把握する.
  2. 多時間周期平均線を用いた格差は,ショートライン市場の騒音による干渉を効果的に回避できる.
  3. 固定ストップ・ストップ・ポイントを設定し,各ポジションのリスクを効果的にコントロールする.
  4. 格差追尾モデルで,株を積み重ねて,トレンドのチャンスを掴み,余分な利益を得ることができる.

戦略的リスクと解決策

  1. 終了されるリスクがある. 市場が転向し,時間内に止損退出ができない場合,巨額の損失に直面する可能性がある. 解決策は,平均線周期を短くし,止損速度を早めることである.
  2. ポジションリスクがある. 突発的な出来事が承受範囲を超えた損失を引き起こす場合,追加保証金または爆破のリスクに直面する. 解決策は,初期ポジションの割合を適切に減らすことである.
  3. 損失の過大なリスクがある. 市場が急激に下落し,格差追が空頭に転じれば,最大700%以上の損失が起こりうる. 解決方法は,固定ストップ割合を高め,ストップ速度を早めることである.

戦略最適化の方向性

  1. 異なるパラメータの均線組合せをテストして,より優れているパラメータを探します.
  2. ポジションを最適化できるポジションの位数 異なる階層差ポジションの位数をテストして最適解を見つける
  3. 固定ストップ・ストップの設定をテストできます. ストップ範囲を適切に拡大して,より高い収益率を追求します.

要約する

この戦略は,全体として,市場情勢の長線トレンドを捕捉するのに非常に適しており,分批の段階的な追尾方法を採用することで,リスクと利益の比率が非常に高い余剰利益を得ることができる.同時に,一定の操作リスクも存在し,パラメータの調整などの方法によって制御され,利益とリスクの間のバランスを求めることが必要である.全体として,この戦略は,実験的に検証する価値があり,実測の結果に基づいてさらに最適化を調整する.

ストラテジーソースコード
/*backtest
start: 2023-12-27 00:00:00
end: 2024-01-03 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Coinrule
    
//@version=3
strategy(shorttitle='Pyramiding Entry On Early Trends',title='Pyramiding Entry On Early Trends (by Coinrule)', overlay=false, pyramiding= 7, initial_capital = 1000, default_qty_type = strategy.percent_of_equity, default_qty_value = 20, commission_type=strategy.commission.percent, commission_value=0.1)
    
    
//Backtest dates
fromMonth = input(defval = 1,  title = "From Month")     
fromDay   = input(defval = 10,    title = "From Day")       
fromYear  = input(defval = 2020, title = "From Year")       
thruMonth = input(defval = 1,    title = "Thru Month")     
thruDay   = input(defval = 1,    title = "Thru Day")     
thruYear  = input(defval = 2112, title = "Thru Year")       
    
showDate  = input(defval = true, title = "Show Date Range")
    
start     = timestamp(fromYear, fromMonth, fromDay, 00, 00)        // backtest start window
finish    = timestamp(thruYear, thruMonth, thruDay, 23, 59)        // backtest finish window
window()  => true       // create function "within window of time"
    
    
//MA inputs and calculations
inSignal=input(9, title='MAfast')
inlong1=input(100, title='MAslow')
inlong2=input(200, title='MAlong')
    
MAfast= sma(close, inSignal)
MAslow= sma(close, inlong1)
MAlong= sma(close, inlong2)
    
    
Bullish = crossover(close, MAfast) 
    
longsignal = (Bullish and MAfast > MAslow and MAslow < MAlong and window())
    
//set take profit
    
ProfitTarget_Percent = input(3)
Profit_Ticks = (close * (ProfitTarget_Percent / 100)) / syminfo.mintick
    
//set take profit
    
LossTarget_Percent = input(3)
Loss_Ticks = (close * (LossTarget_Percent / 100)) / syminfo.mintick
    
    
//Order Placing
    
strategy.entry("Entry 1", strategy.long, when = (strategy.opentrades == 0) and longsignal)
    
strategy.entry("Entry 2", strategy.long, when = (strategy.opentrades == 1) and longsignal)
        
strategy.entry("Entry 3", strategy.long, when = (strategy.opentrades == 2) and longsignal)
    
strategy.entry("Entry 4", strategy.long, when = (strategy.opentrades == 3) and longsignal)
    
strategy.entry("Entry 5", strategy.long, when = (strategy.opentrades == 4) and longsignal)
        
strategy.entry("Entry 6", strategy.long, when = (strategy.opentrades == 5) and longsignal)
        
strategy.entry("Entry 7", strategy.long, when = (strategy.opentrades == 6) and longsignal)
    
    
    
if (strategy.position_size > 0)
    strategy.exit(id="Exit 1", from_entry = "Entry 1", profit = Profit_Ticks, loss = Loss_Ticks)
    strategy.exit(id="Exit 2", from_entry = "Entry 2", profit = Profit_Ticks, loss = Loss_Ticks)
    strategy.exit(id="Exit 3", from_entry = "Entry 3", profit = Profit_Ticks, loss = Loss_Ticks)
    strategy.exit(id="Exit 4", from_entry = "Entry 4", profit = Profit_Ticks, loss = Loss_Ticks)
    strategy.exit(id="Exit 5", from_entry = "Entry 5", profit = Profit_Ticks, loss = Loss_Ticks)
    strategy.exit(id="Exit 6", from_entry = "Entry 6", profit = Profit_Ticks, loss = Loss_Ticks)
    strategy.exit(id="Exit 7", from_entry = "Entry 7", profit = Profit_Ticks, loss = Loss_Ticks)