モメント・プルバック・戦略

作者: リン・ハーンチャオチャン, 日付: 2023-12-12 16:34:52
タグ:

img

概要

モメントム・プルバック戦略は,RSIの極端な値がロング/ショート戦略のモメントム・シグナルとして認識される.ほとんどのRSI戦略とは異なり,極端なRSIの方向に最初のプルバックを購入または販売することを目指す.

5期間のEMA (低) /5期間のEMA (高) の最初の引き戻りで長/短に入っており,ローリング12バーの高/低で終了する.ローリング高/低の特徴は,価格が長期間の統合に入ると,利益目標が新しいバーごとに減少し始めることを意味します.最良の取引は2-6バー以内に動作する傾向があります.

提案されるストップロスはエントリー価格からX ATR (インプットで調整可能) です.

この戦略は,60~70%の勝利率とより大きな勝利取引で,時間枠と市場全体でかなり堅調である.ニュース波動から発生する信号は避けるべきである.

戦略の論理

  1. 6 期間の RSI を計算し,90 以上 (過買い) と10以下 (過売り) の値を特定します.

  2. RSIが超値に上がると 6バー以内の5期 EMA (低値) に戻る.

  3. RSIが過売れた場合 6バー以内の5期間の EMA (高値) への引き下げでショートします

  4. アクシート戦略は移動的な取利益で,最初の目標は過去12バーの最高高/最低低値で,ローリングアウトのための新しいバーごとに更新されます.

  5. ストップロスはエントリー価格からX ATR (カスタマイズ可能) です.

利点分析

この戦略は,RSIの極限をモメントシグナルとプルバックエントリーとして組み合わせ,高い勝利率でトレンドの潜在的な逆転点を捕捉します.

移動して利益を得るメカニズムは,実際の価格動向に応じて部分的な利益をロックし,引き下げを減らす.

ATRストップは単一の取引の損失を効果的に制御するのに役立ちます.

異なる市場とパラメータセットに適用できる良好な安定性,実際の取引の複製を容易にする.

リスク分析

ATR マルチプリキュアが高く設定されれば,取引毎の損失が増加します

長期的 konsolidiation が起こると,利益を引き出すメカニズムの移動が利益率を低下させる可能性があります.

引き下げが6バーを超えると取引が失敗する.

大事なニュースイベントが起きた場合 誤った情報発信

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

入力バー数を6から4に短縮して 入力率を向上させる

ATR マルチプリキュアをテストし,取引ごとに制御損失をさらに増やす.

集約における差異による損失を回避するために,量指標を組み込む.

60分間の中点の引き戻し休憩で入力してノイズをフィルターします.

結論

モメントム・プルバック戦略は,短期間の平均逆転アプローチとして,トレンド,逆転,リスク管理の要素を組み込み,アルファ生成可能性を保持しながら,簡単な実際の取引を行う.パラメータ調整と追加の指標の組み合わせにより,さらなる安定性向上が可能である.これは量子取引にとって大きな恩恵であり,学び,適用する価値があります.


/*backtest
start: 2022-12-05 00:00:00
end: 2023-12-11 00:00:00
period: 1d
basePeriod: 1h
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/
// © Marcns_

//@version=5
strategy("M0PB", commission_value = 0.0004, slippage = 1, initial_capital=30000)
// commision is equal to approx $3.8 per round trip which is accurate for ES1! futures and slippage per trade is conservatively 1 tick in and 1 tick out. 

// *momentum pull back* //

// long / short strategy that identifies extreme readings on the rsi as a *momentum signal*
//Strategy buys/ sells a pullback to the 5ema(low)/ 5ema(high) and exits at rolling 12 bar high/ low. The rolling high/ low feature means that 
//if price enters into a pronlonged consolidation the profit target will begin to reduce with each new bar. The best trades tend to work within 2-6 bars
// hard stop is X atr's from postion average price. This can be adjusted in user inputs.
// built for use on 5 min & 1min intervals on: FX, Indexes, Crypto
// there is a lot of slack left in entries and exits but the overall strategy is fairly robust across timeframes and markets and has between 60%-70% winrate with larger winners.
// signals that occur from economic news volatility are best avoided.  


// define rsi
r = ta.rsi(close,6) 

// find rsi > 90
b = 0.0

if r >= 90
    b := 1.0
else
    na

// find rsi < 10
s = 0.0

if r <= 10
    s := -1.0
else
    na

// plot rsi extreme as painted background color
bgcolor(b ? color.rgb(255, 82, 82, 49): na)
bgcolor(s? color.rgb(76, 175, 79, 51): na)



// exponential moving averages for entries. note that source is high and low (normally close is def input) this creates entry bands
//entry short price using high as a source ta.ema(high,5)
es = ta.ema(high,5)

//entry long price using low as a source ta.ema(low,5)
el = ta.ema(low,5)


// long pullback entry trigger: last period above ema and current low below target ema entry 
let = 0.0

if low[1] > el[1] and low <= el
    let := 1.0
else
    na
//short entry trigger ""
set = 0.0

if high[1] < es[1] and high >= es
    set := -1.0
else
    na

// create signal "trade_l" if RSI > 90 and price pulls back to 5ema(low) within 6 bars
trade_l = 0.0

if ta.barssince(b == 1.0) < 6 and let == 1.0
    trade_l := 1.0
else
    na

plot(trade_l, "l_entry", color.green)

//create short signal "trade_s" if rsi < 10 and prices pullback to 5em(high) wihthin 6 bars
trade_s = 0.0

if ta.barssince(s == -1.0) < 6 and set == -1.0
    trade_s := -1.0
else
    na

plot(trade_s, "s_entry", color.purple)

// define price at time of trade_l signal and input value into trade_p to use for stop parems later
trade_p = strategy.position_avg_price

//indentify previous 12 bar high as part of long exit strat
// this creates a rolling 12 bar high target... a quick move back up will exit at previous swing high but if a consolidation occurs system will exit on a new 12 bar high which may be below prev local high
ph = ta.highest(12)

// inverse of above for short exit strat - previous lowest low of 12 bars as exit (rolling)
pl = ta.lowest(12)


// 1.5 atr stop below entry price (trade_p defined earlier) as part of exit strat
atr_inp = input.float(2.75, "atr stop", minval = 0.1, maxval = 6.0)

atr = ta.atr(10)

stop_l = trade_p - (atr* atr_inp)
stop_s = trade_p + (atr* atr_inp)

//strat entry long

strategy.entry("EL", strategy.long, 2, when = trade_l == 1.0)

//strat entry short

strategy.entry("ES", strategy.short, 2, when = trade_s == -1.0)   
    
//strat long exit

if strategy.position_size == 2
    strategy.exit(id = "ph", from_entry = "EL", qty = 2, limit = ph)
    if strategy.position_size == 2
        strategy.close_all(when = low[1] > stop_l[1] and low <= stop_l)

// strat short exit

if strategy.position_size == -2
    strategy.exit(id = "pl", from_entry = "ES", qty = 2, limit =pl)
    if strategy.position_size == -2
        strategy.close_all(when = high[1] < stop_s[1] and high >= stop_s)




// code below to trail remaining 50% of position //

 //if strategy.position_size == 1 
        //strategy.exit(id ="trail", from_entry = "EL", qty = 1, stop = el)
        


もっと