
概要:双K弾弓戦略は,123反転戦略とマーティン・プリング特K戦略の利点を融合した組み合わせ戦略である.この戦略は,反転戦略と循環指数戦略の利点を利用して,より正確な買出シグナルを実現することを目的としている.
戦略の原則:
双K弓術は2つの部分から成り立っています.
123逆転戦略:この戦略は,株が2日連続で閉店価格を逆転した特徴に基づいて,ランダムな指標と組み合わせて,買入や出売のタイミングを判断する.閉店価格が前日より高く,ランダムな指標が50を下回ったときは,収束段階にあると考えられ,買入シグナルを生成する.閉店価格が前日より低く,ランダムな指標が50以上であるときは,配分段階にあると考えられ,出売シグナルを生成する.
Martin Pring特K戦略:この戦略は,異なる周期量価格曲線の重複を利用して,総合循環指標を形成する.この指標の上を移動平均線を横切るとき,買入シグナルを生成する.下を移動平均線を横切るとき,売り出せるシグナルを生成する.
双K弾弓戦略は,2つの戦略信号を合并処理する.つまり,2つの戦略が同時に買い/売る信号を発信すれば,実際の取引が行われるのみである.このようにして,2つの戦略がそれぞれの判断点の優位性を発揮し,単一の戦略が誤った信号を生じさせないようにすることができる.
優位分析:
この2つの戦略の判断を融合させることで,取引の誤りを回避し,取引の信憑性を高めます.
123の逆転戦略は,短期的な逆転の機会を捉え,Martin PringettKの戦略は,長期のトレンドを判断し,両方を組み合わせて,短期的と長期的の両方を考慮する.
多周期量価格曲線を用いて,大周期市場のリズムを鋭く判断する.
ランダムな指標のパラメータは最適化され,異なる状況の株式特性に自律的に適応することができます.
リスク分析:
合併の信号は,一部の買出点を逃し,短期的な市場状況に完全に追いつくことはできません.
抽象的な状況では,二つの戦略信号が一致しない可能性があり,好ましい方向を正確に確認する必要がある.
この2つの戦略のパラメータを同時に監視し,最適化することが必要であり,最適化することがより困難である.
長期・短期周期指標パラメータの最適化が不適切で,周期変換の位を逃す可能性があります.
改善する方向:
異なるパラメータが戦略の効果に与える影響をテストし,最適なパラメータの組み合わせを見つけます.
ストップ・モジュールを追加し,損失を拡大しないようにする.
ポジション開設量最適化モジュールを追加し,市場状況に応じてポジションを調整する.
機械学習の手法と組み合わせて,より強固な買入シグナルモデルを訓練する.
戦略のパラメータを動的に市場のペースに追随できるように,自己適応パラメータ最適化モジュールを追加しました.
結論から言うと
双K弾弓戦略は,反転戦略と循環指数戦略の優位性を成功裏に組み合わせ,信号品質を保証しながら,短期と長期の利益機会を兼ね備えている.この戦略は,新しいアイデアであり,さらなるテストと最適化に値し,安定策になる潜在性を持っている.しかし,リスク管理とパラメータ最適化には,複雑な変動する市場で安定した利益を得るためには,注意が必要である.
/*backtest
start: 2023-09-17 00:00:00
end: 2023-10-17 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 17/02/2021
// 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
// Pring's Special K is a cyclical indicator created by Martin Pring.
// His method combines short-term, intermediate and long-term velocity
// into one complete series. Useful tool for Long Term Investors
// Modified for any source.
//
// 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
MPSK(a, sources) =>
pos = 0.0
roc1 = (sma(roc(sources,10),10)*1)
roc2 = (sma(roc(sources,15),10)*2)
roc3 = (sma(roc(sources,20),10)*3)
roc4 = (sma(roc(sources,30),15)*4)
roc5 = (sma(roc(sources,40),50)*1)
roc6 = (sma(roc(sources,65),65)*2)
roc7 = (sma(roc(sources,75),75)*3)
roc8 = (sma(roc(sources,100),100)*4)
roc9 = (sma(roc(sources,195),130)*1)
roc10 = (sma(roc(sources,265),130)*2)
roc11 = (sma(roc(sources,390),130)*3)
roc12 = (sma(roc(sources,530),195)*4)
osc = roc1+roc2+roc3+roc4+roc5+roc6+roc7+roc8+roc9+roc10+roc11+roc12
oscsmt = sma(osc,a)
pos := iff(osc > oscsmt, 1,
iff(osc < oscsmt, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Martin Pring's Special K", shorttitle="Combo", overlay = true)
line1 = input(true, "---- 123 Reversal ----")
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
line2 = input(true, "---- Martin Pring`s ----")
a = input(10, title = "Smooth" )
sources = input(title="Source", type=input.source, defval=close)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posMPSK = MPSK(a,sources)
pos = iff(posReversal123 == 1 and posMPSK == 1 , 1,
iff(posReversal123 == -1 and posMPSK == -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 )