イチモク混合均衡表 マクドとチー統合戦略

作者: リン・ハーンチャオチャン,日付: 2023年11月27日 11:50:43
タグ:

img

I. 戦略の概要

この戦略は,Ichimoku Kinko Hyo,Macd,Chaikin Money Flow,Tsi オシレーターなどの技術指標を全面的に利用し,短期取引の市場動向の方向性を正確に判断します.

戦略の原則

この戦略は,日中価格動向を判断するために,イチモクにおけるテンカンセン線,キジュンセン線,センコスパンA線,センコスパンB線を使用する.同時に,マックドの高速および遅い移動平均線とマネーフロー指標と振動指標のクロス信号を組み合わせ,資金の流入と流出を決定する.複数の指標の包括的な判断の後,購入と売却の決定が決定される.

テンカンセン線がキジュンセン線上を横切ると,チコウ・スパンは0軸上にあり,閉じる価格がイチモク雲上にある場合,それは上昇信号である.逆に,テンカンセン線がキジュンセン線下を横切ると,チコウ・スパンは0軸下にあり,閉じる価格が雲下にある場合,それは下落信号である.同時に,戦略はMACDヒストグラムが正であるかどうかを検知し,チャイキンマネーフロー指標とTSIオシレータが同じ方向に正であるかどうかを検知する.指標が同じ方向に上昇している場合,ロングポジションは購入で開く,指標が同じ方向に下落している場合,ショートポジションは売り出で開く.

インディケーターが前回と対照的な信号を出したら,前回のポジションを平らにするため逆取引が行われます.

戦略の利点

  1. 複数の指標を組み合わせることで判断の正確性が向上します

  2. 短期取引は 市場の変動をリアルタイムで追跡します

  3. 手動の介入なし 完全に自動化されたアルゴリズム取引です

IV. 戦略のリスクと解決策

  1. 複数の指標が同時に上昇または下落するという組み合わせの判断は,判断の誤りのリスクがあります.判断の誤り率を減らすために,一部の審査基準は適切に緩和されることがあります.

  2. 高頻度短期取引では,相対的に高い手数料があり,トレンドを把握するのは困難です.コストをカバーするために余剰収益を求めるため,ポジション保持期間を適切に延長することができます.

  3. ストップ・ロスの設定がない場合,より大きな損失を引き起こす可能性があります.適切なストップ・ロスのポイントまたは移動ストップ・ロスは,ATRに基づいて設定できます.

戦略の最適化に関する指針

  1. パラメータの組み合わせを最適化します 移動平均のパラメータを調整して 異なるサイクルや種類に適応します

  2. ストップ・ロスのメカニズムを増やし,動的ストップ・ロスの線をATRインジケーターと組み合わせて設定する.

  3. ポジション管理を強化し 取引量の割合を動的に調整する

  4. 機械学習技術を組み合わせて インディケーターとシグナルを最適化します

結論

この戦略は,高周波の短期取引のために,トレンド変動をリアルタイムで決定するために,複数の技術指標を包括的に使用しています.いくつかのリスクがあるにもかかわらず,最適化によって改善することができます.この戦略は,さらなる深層研究とライブ取引検証に価値がある.ストップ損失とポジション管理を増やすことで,取引リスクは軽減できます.


/*backtest
start: 2023-10-01 00:00:00
end: 2023-10-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © exlux99

//@version=4
strategy("Ichimoku with MACD/ CMF/ TSI", overlay=true, margin_long=0, margin_short=0)



//Inputs
ts_bars = input(10, minval=1, title="Tenkan-Sen Bars")
ks_bars = input(30, minval=1, title="Kijun-Sen Bars")
ssb_bars = input(52, minval=1, title="Senkou-Span B Bars")
cs_offset = input(26, minval=1, title="Chikou-Span Offset")
ss_offset = input(26, minval=1, title="Senkou-Span Offset")
long_entry = input(true, title="Long Entry")
short_entry = input(true, title="Short Entry")

middle(len) => avg(lowest(len), highest(len))

// Ichimoku Components
tenkan = middle(ts_bars)
kijun = middle(ks_bars)
senkouA = avg(tenkan, kijun)
senkouB = middle(ssb_bars)


ss_high = max(senkouA[ss_offset-1], senkouB[ss_offset-1])
ss_low = min(senkouA[ss_offset-1], senkouB[ss_offset-1])

// Entry/Exit Signals
fast_length = input(title="Fast Length", type=input.integer, defval=17)
slow_length = input(title="Slow Length", type=input.integer, defval=28)
src = input(title="Source", type=input.source, defval=close)
signal_length = input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 50, defval = 5)
sma_source = input(title="Simple MA(Oscillator)", type=input.bool, defval=true)
sma_signal = input(title="Simple MA(Signal Line)", type=input.bool, defval=true)

// Calculating
fast_ma = sma_source ? sma(src, fast_length) : ema(src, fast_length)
slow_ma = sma_source ? sma(src, slow_length) : ema(src, slow_length)
macd = fast_ma - slow_ma
signal = sma_signal ? sma(macd, signal_length) : ema(macd, signal_length)
hist = macd - signal


tk_cross_bull = tenkan > kijun
tk_cross_bear = tenkan < kijun
cs_cross_bull = mom(close, cs_offset-1) > 0
cs_cross_bear = mom(close, cs_offset-1) < 0
price_above_kumo = close > ss_high
price_below_kumo = close < ss_low


//CMF
lengthA = input(8, minval=1, title="CMF Length")
ad = close==high and close==low or high==low ? 0 : ((2*close-low-high)/(high-low))*volume
mf = sum(ad, lengthA) / sum(volume, lengthA)


//TSI
long = input(title="Long Length", type=input.integer, defval=8)
short = input(title="Short Length", type=input.integer, defval=8)
price = close
double_smooth(src, long, short) =>
	fist_smooth = ema(src, long)
	ema(fist_smooth, short)
pc = change(price)
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(abs(pc), long, short)
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)



bullish = tk_cross_bull and cs_cross_bull and price_above_kumo and hist > 0 and mf > 0.1 and tsi_value > 0
bearish = tk_cross_bear and cs_cross_bear and price_below_kumo and hist < 0  and mf < -0.1 and tsi_value < 0



strategy.entry("Long", strategy.long, when=bullish and long_entry)
strategy.entry("Short", strategy.short, when=bearish and short_entry)

strategy.close("Long", when=bearish and not short_entry)
strategy.close("Short", when=bullish and not long_entry)

もっと