複数の指標を組み合わせた逆転取引戦略

作者: リン・ハーンチャオチャン開催日:2023年9月13日15時04分40秒
タグ:

この戦略は"多指標複合逆転取引戦略"と呼ばれています.これは,短期的な価格逆転の機会を特定し,利益のための以前の傾向に反して取引するためのさまざまな技術指標を統合しています.

123の逆転パターンは,3日連続で価格が大きく格差し,3日目は前2日の逆方向で閉じる.統計的には123の逆転信号で取引するとより高い得率がある.

第2に,RSIインジケーターは逆転信号の信頼性を評価するために組み込まれています.50未満のRSIは過売り状態を表し,50以上のRSIは過買い状態を表します.RSIを使用すると,123パターンのみに基づいて過度な信頼性のない信号を生成することが避けられます.

第三に,CMO指標の多期クロスオーバーが導入される.CMOクロスオーバーは,異なる期間の指数関数移動平均を組み合わせて,モメント逆転を判断する.その信号は,逆転タイミングのさらなる確認を提供します.

複数の指標を組み合わせることで,過剰な不確実性信号を避けることで,価格逆転を把握する成功率が高まります.RSIとCMOが両方とも123パターンをサポートする場合にのみ,強力な逆転トレード信号が現れます.

この戦略は,短期間の価格変動を把握するために,範囲,振動する市場に適しています.しかし,あまりにも多くの指標を組み合わせると,衝突も起こり得ます.パラメータの最適化が必要です.ストップロスは,取引毎の最大損失を制限するためにも使用する必要があります.

結論として,マルチインジケーター組み合わせの逆転取引戦略は,市場の逆転の判断の正確性を向上させるためのさまざまなツールを統合しています. しかし,単一の戦略は完璧ではありません.トレーダーは,柔軟な取引マインドセットを維持しながら,現在の市場状況に基づいて検証し調整する必要があります.


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

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 25/02/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
// The related CMOaDisparity Index article is copyrighted material from Stocks & Commodities Dec 2009
// My strategy modification.
//
// 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

CMOD(LengthFirst, LengthSecond, LengthThird) =>
    pos = 0.0
    xEMAFirst = ema(close,LengthFirst)
    xEMASecond  = ema(close,LengthSecond)
    xEMAThird  = ema(close,LengthThird)
    xResFirst = 100 * (close - xEMAFirst) / close
    xResSecond = 100 * (close - xEMASecond) / close
    xResThird = 100 * (close - xEMAThird) / close
    pos := iff(xResThird > xResFirst, -1,
             iff(xResThird < xResSecond, 1, nz(pos[1], 0)))     
    pos

strategy(title="Combo Backtest 123 Reversal & CMOaDisparity Index", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
LengthFirst = input(50, minval=1)
LengthSecond = input(25, minval=1)
LengthThird = input(10, minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posCMOD = CMOD(LengthFirst, LengthSecond, LengthThird)
pos = iff(posReversal123 == 1 and posCMOD == 1 , 1,
	   iff(posReversal123 == -1 and posCMOD == -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 )

もっと