モメント・リバーサル・トレーディング・戦略

作者: リン・ハーンチャオチャン,日付: 2023年11月15日15時36分39秒
タグ:

img

概要

この戦略は,ターニングポイントで取引するために123逆転パターンとEASY OF MOVEMENT (EOM) を組み合わせます. 123逆転パターンは,3日連続で価格が特定のパターンを形成するときにシグナルを生成します. EOM戦略は,価格とボリュームの変化を使用して市場の勢いを測定します.両方の戦略の組み合わせは,技術パターンだけでなく勢いを考慮し,取引信号の正確性を向上させます.

戦略の論理

戦略は2つの要素で構成されています.

  1. 123 逆転パターン
  • 過剰購入と過剰販売のレベルを識別するためにストックを使用します
  • 価格が2日連続で下がり,ストック・ファスト・ラインがスロー・ライン以上になるとショートします.
  • 2日連続で価格が上昇し,ストック・ファスト・ラインがスロー・ラインを下回るとロングに行く.
  1. 移動 の 容易 な 方法
  • 前日の範囲の真ん点を計算する
  • 前日と比較して中点の変化を計算する
  • 中点移動と体積の比率を計算する
  • 値を下回り 値上がり 値上がり

戦略は EOM と 123 の信号がロングサイドに並べるとロングになり,ショートサイドに並べるとショートになります.

利点分析

この戦略の利点は

  1. 価格パターンとインパントを組み合わせて,より正確な信号を表示します

  2. 123 パターンキャッチ ターニングポイント,EOMメーター トレンドモメンタム,二つの互いを補完

  3. ストックが統合中に失敗を回避する

  4. シンプルで簡単に実行できます

  5. 異なる市場環境に合わせたパラメータ

リスク分析

考慮すべきリスク:

  1. パラメータ設定に過度に依存し,不正な設定は過剰取引または取引を逃す可能性があります.

  2. 多くのフィルタが信号を少なすぎる可能性があります

  3. EOMは変動に敏感で,誤った信号を生む可能性があります.

  4. バックテストよりも弱いのライブパフォーマンス,位置サイズ制御が必要です

  5. トレンドする株式のみ,トレンドする市場には適用されない

改善 の 方向

戦略は以下によって改善できます.

  1. 信号の周波数と質をバランスさせるパラメータの最適化

  2. ストップ・ロスを単一の取引損失を制御するために追加する

  3. トレンドに反する取引を避けるためにトレンドフィルターを追加する

  4. 波動性に基づくポジションサイズ化

  5. マシン学習を使用してパラメータを動的に最適化

結論

この戦略は,高い実用的な価値のために価格パターンと勢いを統合する.しかし,取引頻度,損失制御,反トレンドリスクは管理する必要があります.パラメータのさらなる改善,ストップ損失,トレンドフィルタリングは安定性と収益性を向上させることができます.論理は量子トレーダーにとって明確で実行が簡単です.


/*backtest
start: 2023-10-15 00:00:00
end: 2023-11-14 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 14/04/2020
// This is combo strategies for get a cumulative signal. 
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The 
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close 
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50. 
// The strategy sells at market, if close price is lower than the previous close price 
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
// This indicator gauges the magnitude of price and volume movement. 
// The indicator returns both positive and negative values where a 
// positive value means the market has moved up from yesterday's value 
// and a negative value means the market has moved down. A large positive 
// or large negative value indicates a large move in price and/or lighter 
// volume. A small positive or small negative value indicates a small move 
// in price and/or heavier volume.
// A positive or negative numeric value. A positive value means the market 
// has moved up from yesterday's value, whereas, a negative value means the 
// market has moved down. 
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
    vFast = sma(stoch(close, high, low, Length), KSmoothing) 
    vSlow = sma(vFast, DLength)
    pos = 0.0
    pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
	         iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0))) 
	pos

EOM(BuyZone, SellZone) =>
    pos = 0
    xHigh = high
    xLow = low
    xVolume = volume
    xHalfRange = (xHigh - xLow) * 0.5
    xMidpointMove = mom(xHalfRange, 1)
    xBoxRatio = iff((xHigh - xLow) != 0, xVolume / (xHigh - xLow), 0)
    nRes = iff(xBoxRatio != 0, 1000000 * ((xMidpointMove - xMidpointMove[1]) / xBoxRatio), 0)
    pos := iff(nRes > BuyZone, 1,
             iff(nRes < SellZone, -1, nz(pos[1], 0))) 
    pos

strategy(title="Combo Backtest 123 Reversal & Ease of Movement (EOM)", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
BuyZone = input(4000, minval=1)
SellZone = input(-4000)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posEOM = EOM(BuyZone, SellZone)
pos = iff(posReversal123 == 1 and posEOM == 1 , 1,
	   iff(posReversal123 == -1 and posEOM == -1, -1, 0)) 
possig = iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1 , 1, pos))	   
if (possig == 1) 
    strategy.entry("Long", strategy.long)
if (possig == -1)
    strategy.entry("Short", strategy.short)	 
if (possig == 0) 
    strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )

もっと