この戦略は,反転戦略と振動器戦略の組み合わせで,より信頼性の高い取引シグナルを得ることを目的としている.これは,反転予知戦略とChande予測振動器戦略を組み合わせて,両方の戦略が同時に買ったり売ったりするシグナルを発信すると,取引を実行する.
逆転予測策
ストキャスティック・オシレータの指標を用いて超買超売現象を判断する
価格が連続して2つのバーの閉店価格に逆転し,ストキャスティックオシレータの指標がオーバーバイまたはオーバーセールシグナルを示したときに逆転操作を行う
チャンデが予測した振動器の戦略
線形回帰分析を用いた価格予測
振動器曲線は,閉盘価格と予測価格の差値に等しい
実際の価格と予測価格が明らかに偏っている場合,取引シグナルを生成します.
戦略ロジック
逆転予測策とChandeの予測振動器策の信号を同時に計算する
2つの戦略のシグナルが一致するときにのみ,つまり,両方が買入シグナルまたは売出シグナルである場合にのみ,実際の取引シグナルが生成される
単一の戦略で発生する偽信号を組み合わせて除することで,信号の信頼性を高める.
複数の戦略を組み合わせ,市場を総合的に判断し,信頼性が高くなる
単一の技術指標で発生する偽信号を排除する
逆転予測戦略は,短期的な逆転の機会を捉える
チャンデは振動器が長期のトレンドを正確に予測している.
ストキャスティック・オシレータの指標パラメータは調整可能で,適応性が強い
複数の分析方法を融合させ,さまざまな次元での取引機会を把握する
組合せ戦略は信頼性を高めても,信号発生頻度は低下する.
戦略のパラメータを同時に最適化する必要があります.
逆転の時期が把握できないため,損失の危険性がある
線形回帰予測は,価格の急激な変動のある市場には適用されない
ストキャスティック・オシレータから外れている株価に注目する
記録が不十分で,実態は疑わしい
ストキャスティックオシレータのパラメータを最適化し,K線とD線周期を短縮
線形回帰周期を調整し,より多くの周期パラメータをテストする
単一損失を減らすために ストップ・ロスを増やす
ポジション開設論理を修正し,ストキャスティックオシレータが超買い超売り領域に完全に入るまで待つ
取引品種の統計分析を追加
MACDなどの他の指標と組み合わせることで,より多くの次元を判断できます.
この戦略は,複数の分析方法を総合的に適用し,信号の質を組み合わせて改善し,短期逆転の発見と大トレンドの判断の両面を兼ねながら,より包括的な取引機会を捉えることができる.しかし,実盤効果に注意し,パラメータを適切に調整する必要があります.この戦略の考え方は,より多くの指標と戦略の組み合わせに拡張され,実際の取引操作を導くために使用できます.全体的に,この戦略は,一定の革新性と参照価値を持っています.
/*backtest
start: 2023-09-09 00:00:00
end: 2023-10-09 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 08/08/2019
// 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 Chande Forecast Oscillator developed by Tushar Chande The Forecast
// Oscillator plots the percentage difference between the closing price and
// the n-period linear regression forecasted price. The oscillator is above
// zero when the forecast price is greater than the closing price and less
// than zero if it is below.
//
// 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
ChandeForecastOscillator(Length, Offset) =>
pos = 0
xLG = linreg(close, Length, Offset)
xCFO = ((close -xLG) * 100) / close
pos := iff(xCFO > 0, 1,
iff(xCFO < 0, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Chande Forecast Oscillator", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
LengthCFO = input(14, minval=1)
Offset = input(0)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posChandeForecastOscillator = ChandeForecastOscillator(LengthCFO, Offset)
pos = iff(posReversal123 == 1 and posChandeForecastOscillator == 1 , 1,
iff(posReversal123 == -1 and posChandeForecastOscillator == -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 )