日中反転トレンドフォロー戦略


作成日: 2023-11-06 15:34:06 最終変更日: 2023-11-06 15:34:06
コピー: 0 クリック数: 666
1
フォロー
1617
フォロワー

日中反転トレンドフォロー戦略

概要

この戦略の主な構想は,月曜日の市場盤で,その日の逆転の市場状況を利用してトレンドを追跡し,利益を上げることです.

原則

この戦略の核心的な論理は:

  1. 取引は月曜日か否かを判断し,もしそうなら後続論理を実行します.

  2. その日のK線が,下から上への逆転形に変化しているかどうかを判断する.具体的には,第1のK線の閉店価格<第2のK線の閉店価格,および第2のK線の閉店価格<第3のK線の閉店価格である.

  3. 上述の逆転形が成立した場合,第3K線の終了時に多項を開き,トレンドを追跡する.

  4. ストップ条件は,当日の高点突破,またはストップレード退出です.

  5. 持株6時間後に強制退出.

戦略は,月曜日の特定の時間帯の逆転の動きを利用し,逆転K線形状を識別して,低価格で高価格で売る利得モードを実現する.同時に,ストップ・ストップ・損失条件を設定し,リスクを制御する.

利点

この戦略の最大の利点は,

  1. 月曜の取引セッション中の逆転を活用して,利益を得ます.

  2. 特定のキャンドルスティックパターンを特定することによって,それは明確なエントリー信号を持っています.

  3. ストップ・ロスとテイク・プロフィット条件は,リスクをコントロールするために設定されています.

  4. トレンドフォローのアプローチは利益を最大化します.

  5. The logic is simple and easy to understand and implement 戦略の論理はシンプルでわかりやすく,理解しやすく,実装しやすい

リスク

この戦略にはいくつかのリスクがあります.

  1. 月曜日の逆転が目立たない場合,損失が発生する; Losses can occur if Monday reversals are not significant

  2. Price may retrace after reversal leading to stop loss (価格が逆転後,再び逆転して損失を止めてしまう)

  3. 急な市場の変化により,大きなストップ損失が発生する.

  4. ポジションを長期間保有すると,損失が発生する可能性があります.

対応策は: ストップ・ロスの戦略を最適化し,適正に保持時間を短縮し,単一損失を厳格に制御する.

The solutions are: Optimizing stop loss strategy, shortening holding time, strictly controlling single loss.

最適化の方向

この戦略は,以下のような点で最適化できます.

  1. 機械学習を使用して,逆転パターンをより正確に識別します.

  2. 移動ストップ,分期ストップなどのストップ戦略を最適化する.

  3. トレンドの強さを判断する要因をさらに組み込む,例えば取引量の変化.

  4. 動的に保持時間を調整する

  5. アルゴリズムを使用して合理的なパラメータを自動的に決定する.

  6. ポジションスイッチングメカニズムを追加し,多空双方向取引を実現する.

戦略の成功率と収益性を向上させるための最適化です.

These optimizations can improve the win rate and profitability of the strategy.

要約する

総じて,この戦略は,月曜日の特定の段階の逆転状態を利用し,明確な入場・退出機構を設定することで,簡単なトレンドを追跡し,利益のモデルを実現している. 固定ストップ・ロストと比較して,この戦略は,より良い効果を上げることができる. もちろん,市場の不確実性に対処するために,さらなる最適化が必要である.

In summary, this strategy utilizes the reversal during Monday trading session, with clear entry and exit mechanisms, to implement a simple trend following profitable model. Compared to fixed stop loss and take profit, this strategy can achieve better results. However, further optimizations are still needed to deal with market uncertainty. The strategy provides a reference idea and template for intraday trading.

ストラテジーソースコード
/*backtest
start: 2023-10-06 00:00:00
end: 2023-11-05 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy("ET Forex TurnaroundMonday", overlay=true)
FirstYear = input(2018, minval=2000, maxval=2023, step=1)
FirstMonth = 1 //input(1, minval=1, maxval=12, step=1)
FirstDay = 1 //input(1, minval=1, maxval=31, step=1)

deltaDay = input(0)
StartHour = input(0)

f_barssince(_cond, _count) => _barssince=bar_index-valuewhen(_cond, bar_index, _count)

HoldTime = input(6, step=1)

MM = input(1)

startHour = input(-7, step=1)
endHour = input(34, step=1)
exitHour = input(30, step=1)


startdateCond = (year > FirstYear or (year == FirstYear and (month > FirstMonth or (month == FirstMonth and dayofmonth >= FirstDay))))

iHour = hour
if iHour > 19 
    iHour := iHour-20
else
    iHour := iHour+4    
    
    
timeCondition = true //(iHour>=startHour and iHour<=endHour and iHour<=exitHour)

since_flat_condition = strategy.position_size == 0

entryPrice=strategy.position_avg_price
EntryLongCondition = dayofweek == (dayofweek.monday+deltaDay) and close[0] < close[1] and close[1]<close[2] and startdateCond //and timeCondition and iHour > StartHour
ExitTimeCondition = false//(f_barssince(since_flat_condition, 0)>=HoldTime)
ExitLongCondition = strategy.position_size > 0  and (close[0] > high[1])// or close[0]< entryPrice-abs(close[1]-close[2])*0.2)//(ExitTimeCondition) //iHour >= exitHour or 
strategy.initial_capital =50000
// MM Block
lots = if MM < 2 
    strategy.initial_capital 
else 
    strategy.equity

lots := lots/close

entryPrice:=strategy.position_avg_price
strategy.close("ETLong",when=(ExitLongCondition==true))
strategy.entry("ETLong", strategy.long, qty=lots, comment="OpenLong",when=(EntryLongCondition==true))