移動平均モメンタム長期継続取引戦略


作成日: 2023-09-12 16:15:44 最終変更日: 2023-09-12 16:15:44
コピー: 0 クリック数: 647
1
フォロー
1617
フォロワー

この戦略は,平均線動力の継続的な状況を観察し,連続した上昇段階において多行して,継続的な追尾操作を実現する.この戦略は,多頭行事の上昇動力を継続的に捕捉することを目的としたトレンド追跡型の戦略である.

戦略の原則:

  1. 価格の動きを反映するために加重移動平均を計算する.

  2. 体重移動平均が5日連続で上昇すると,追加入場を行う.

  3. ウェイトアップ移動平均が4日連続で下落したときは,複数回オフを行う.

  4. 長期トレンドは,長期にわたる上昇数で判断し,短期的な調整によって逆転を避ける.

  5. “日当たりの最大損失を制御する最大ストップを設定します.

この戦略の利点は

  1. 動きを継続的に追跡し,流行のヒットスポットを持続的に捉えます.

  2. 連続した日数判断は,短期的な調整震をスキップするのに有利である.

  3. 最大止損設定は尾部リスクを制限する.

この戦略のリスクは

  1. 継続的な上昇の後に発生するリコール損失を制限することはできません.

  2. 投資の深度調整は大きな損失を招く可能性があります.

  3. ストップ・ローズは過度に緩やかであり,過度の損失の危険性があります.

要するに,この戦略は,継続的な上昇を判断した後に追尾を行うことで,市場情勢のホットポイントを効果的に捉えることができる.しかし,リスクの深さへの調整を警戒し,停止パラメータを適切に調整し,十分なリスク管理を行う必要があります.

ストラテジーソースコード
/*backtest
start: 2023-01-01 00:00:00
end: 2023-09-11 00:00:00
period: 3d
basePeriod: 1d
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/
// © SoftKill21

//@version=4
// strategy("My Script", initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent , commission_value=0.1 )


var candela = 0.0


candela := (high+low+open+close)/4

long = candela > candela[1] and candela[1] > candela[2] and candela[2] > candela[3] and candela[3] > candela[4] and candela[4] > candela[5]
short = candela< candela[1] and candela[1] < candela[2] and candela[2] < candela[3] and candela[3] < candela[4] //and candela[4] < candela[5] 

plot(candela, color=long? color.green : short? color.red : color.white ,linewidth=4)



strategy.entry("long",1,when=long)
//strategy.entry('short',0,when=short)
    
strategy.close("long", when = short)

risk= input(25)
// strategy.risk.max_intraday_loss(risk, strategy.percent_of_equity)
//strategy.close("short", when = not long or short)