
この戦略は,まず123形状判断逆転信号を利用し,次にクリンガー定量振動器をフィルターとして組み合わせ,逆転機会を効率的に捕捉する定量双打利権戦略を実現する.
戦略は2つの部分から構成されています.
123形状判断逆転信号部分: 閉盘価格が2日連続下落後3日目終盤,ストッチ指数低位でfor多頭; 閉盘価格が2日連続上昇後3日目終盤,ストッチ指数高位でfor空頭。
クリンガー定量振動器の部分: クリンガー定量振動器は,価格の変動範囲と取引量の変化を組み合わせて,資金の流れと流れを判断する. 定量振動器上を平均値を通過するときは多頭信号; 下を平均値を通過するときは空頭信号.
最後に,上記の2つの部分のシグナルを戦略的に統合して,二重勝負が最終入場を決定する.
この戦略の最大の利点は,反転形状と量能指標を組み合わせて,反転の機会を効率的に捕捉できるということです.また,偽の突破を避けるためにstoch指標を使用し,クリンガー定量振動器によって本当の資金流動を判断し,入場タイミングを正確に確保できます.
この戦略の主なリスクは,反転形状判断とパラメータ設定の問題にある.反転信号が一定に遅れているため,パラメータ設定が合理的であることを確認し,最適な反転時刻を逃さないようにする必要がある.さらに,反転形状自体が失効する可能性がある.
リスクを減らすために,逆転信号をより敏感でタイムリーにするためにパラメータを適切に最適化することもできます.また,逆転回数と幅を十分に確保し,逆転拡大を避けるために,他のフィルタリング条件を追加することもできます.
この戦略は,主にパラメータの調整と他の補助判断を追加するスペースを最適化できます.具体的には,ストッチ指標のパラメータを適切に縮小して123形状判断の感度を最適化できます.また,MACD金叉死叉,またはdouble top / bottom多重底などの判断など,現在主流の指標と形状の組み合わせに参加することもできます.
さらに,ストップとストップオフの条件を動的に調整することで,市場変化に戦略を適応させることも考えられます. また,機械学習を組み合わせてパラメータをリアルタイムで最適化することもできます.
この戦略は,古典的な反転理論と量子エネルギー技術指標を総合的に適用し,反転の機会を効率的に捉えることができます.最適化スペースは大きく,効果をさらに向上させる可能性があり,実用的な検証と継続的な最適化に値します.
/*backtest
start: 2023-10-22 00:00:00
end: 2023-11-21 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 23/12/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 Klinger Oscillator (KO) was developed by Stephen J. Klinger. Learning
// from prior research on volume by such well-known technicians as Joseph Granville,
// Larry Williams, and Marc Chaikin, Mr. Klinger set out to develop a volume-based
// indicator to help in both short- and long-term analysis.
// The KO was developed with two seemingly opposite goals in mind: to be sensitive
// enough to signal short-term tops and bottoms, yet accurate enough to reflect the
// long-term flow of money into and out of a security.
// The KO is based on the following tenets:
// Price range (i.e. High - Low) is a measure of movement and volume is the force behind
// the movement. The sum of High + Low + Close defines a trend. Accumulation occurs when
// today's sum is greater than the previous day's. Conversely, distribution occurs when
// today's sum is less than the previous day's. When the sums are equal, the existing trend
// is maintained.
// Volume produces continuous intra-day changes in price reflecting buying and selling pressure.
// The KO quantifies the difference between the number of shares being accumulated and distributed
// each day as "volume force". A strong, rising volume force should accompany an uptrend and then
// gradually contract over time during the latter stages of the uptrend and the early stages of
// the following downtrend. This should be followed by a rising volume force reflecting some
// accumulation before a bottom develops.
//
// 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
KVO(TrigLen,FastX,SlowX) =>
pos = 0.0
xTrend = iff(hlc3 > hlc3[1], volume * 100, -volume * 100)
xFast = ema(xTrend, FastX)
xSlow = ema(xTrend, SlowX)
xKVO = xFast - xSlow
xTrigger = ema(xKVO, TrigLen)
pos := iff(xKVO > xTrigger, 1,
iff(xKVO < xTrigger, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Klinger Volume 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)
//-------------------------
TrigLen = input(13, minval=1)
FastX = input(34, minval=1)
SlowX = input(55, minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posKVO = KVO(TrigLen,FastX,SlowX)
pos = iff(posReversal123 == 1 and posKVO == 1 , 1,
iff(posReversal123 == -1 and posKVO == -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 )