ダブル・K・クロスボウ戦略

作者: リン・ハーンチャオチャン開催日:2023年10月18日 11:19:07
タグ:

img

概要:ダブルKクロスボウ戦略は,逆転信号と周期指標の利点を利用するために123逆転戦略とマーティン・プリングのスペシャルK戦略を組み合わせ,両方の戦略の強みを活用してより正確な購入・売却信号を生成することを目的としています.

戦略論理:

ダブルKクロスボウは2つの部分で構成されています:

  1. 123 リバース戦略: ストーカスティックオシレーターの読み込みと組み合わせた,2日連続の閉店価格逆転に基づいて購入・売却信号を識別する. 閉店が2日間の前の閉店よりも高く,ストーカスティックは50未満で,統合を示す. 閉店が2日間の前の閉店よりも低く,ストーカスティックは50以上で,分散を示すときに販売信号を生成する.

  2. マーティン・プリングの特殊K戦略: 異なるタイムフレームからの変化値のレートの積み重ねによって形成された複合的な周期指標を使用する. 指標が移動平均値を超えると購入信号を生成し,下回ると販売信号を生成する.

ダブルKクロスボウは,両戦略からの信号を統合し,実際の取引を誘発するために合意を必要とする.これは各戦略のタイミング強みを利用し,偽信号を回避する.

利点分析

  • より信頼性の高い取引入出のための2つの戦略からのシグナルを組み合わせます.偽の取引を避ける.

  • 123 逆転は短期的逆転を捉え,スペシャルKは長期的傾向を判断する.組み合わせは短期と長期の両方を考慮する.

  • 多時間枠の変動率は,市場のサイクルを把握する情報を提供する.

  • 最適化可能なストカスティックパラメータは,異なる市場状況に適応します.

リスク分析:

  • 統合信号は,いくつかの買い/売点を見逃し,短期的な動きを遅らせる可能性があります.

  • 戦略は異常な出来事によって 意見が一致しないことがあり 方向性についての判断が必要です

  • 両方の戦略のパラメータを監視し最適化し 複雑さを高めます

  • 短期および長期パラメータの誤った最適化は サイクルターニングポイントを見逃す可能性があります.

増進 の 機会:

  • 最適な設定を見つけるために異なるパラメータの組み合わせをテストします

  • 損失を制限するためにストップ損失モジュールを追加します

  • ポジションサイズモジュールを追加して 市場の状況に合わせて調整します

  • 機械学習を組み込み より堅牢な信号モデル化

  • 市場リズムを動的に追跡するための適応最適化を追加します

結論は

ダブル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 )

もっと