一目均衡表とRSIの組み合わせ戦略


作成日: 2023-09-21 10:52:13 最終変更日: 2023-09-21 10:52:13
コピー: 0 クリック数: 1141
1
フォロー
1617
フォロワー

概要

この戦略は,トレンドの方向性を判断するために,一目平衡表と相対的に強い指数 ((RSI) を使用し,トレンド開始時に入場する. 一目平衡表の3本の線段が条件を満たす配列の組み合わせを形成し,RSI信号と結合すると,取引信号を生成する.

戦略原則

  1. 一見均衡表の変換線,基準線,遅延線を計算する
  2. RSIを計算する
  3. 変換線が基準線を横断し,遅延線が陽線より上,閉盘価格が雲のグラフを突破し,RSIが50を下回ると多めにします.
  4. 変換線の下では基準線を横切り,遅延線は陰線の下にあり,閉盘価格が雲図を下回り,RSIが50を超えると空白する
  5. 逆転信号が出ると平仓する

具体的には,この戦略は,一目平衡表のトレンド判断とRSIの超買い超売り判断を融合している.一目平衡表の三線組み合わせ形がトレンドを起動し,RSIが同時に超買い超売りがないことを示すとき,入場信号が生成される.RSIフィルターは,整合時に誤った入場を避けるのに役立ちます.平仓信号は,一目平衡表を完全にベースにFORMATIONを逆行する.

優位分析

  1. RSIを統合して入学率を向上させる
  2. 一見均衡表はトレンドの方向を判断し,トレンドを追跡する能力が強い.
  3. 取引のシグナルがシンプルで直感的で,簡単に理解できます.
  4. 平均線とRSIのパラメータは,異なる周期に対応して調整できます
  5. リスク管理のためのストップ・ロスト戦略

リスク分析

  1. 一見平衡表は,時折遅れていると判断され,誤算される可能性がある.
  2. パラメータの最適化が必要で,そうでなければ取引信号は不正確になる
  3. 長期投資は夜間リスク
  4. RSIは誤った信号を発信しやすい
  5. 逆転したからかもしれない

パラメータ最適化,最適化ストップ・ストップ・ストラスト戦略,適正に保持周期を短縮するなど,リスクを管理することができる.

最適化の方向

  1. 平均線とRSIパラメータの組み合わせをテストする
  2. モバイルストップを導入し,価格変化を追跡する
  3. 制限時間の効果を評価する
  4. 異なる品種のパラメータの好みを研究する
  5. テスト追加再入学と加減ルール
  6. 異なるストップ・ストップ・ストラスト戦略を比較する

要約する

この戦略は,一目平衡表とRSI指標を融合してトレンド判断と取引を行う. 優点は,信号がシンプルで直感的で,ROIが高いこと. 欠点は,滞りや被套リスクの存在である. 戦略の効果をパラメータ最適化,ストップ・ストップ・損失最適化,取引時間を制限するなどで向上させ,リスクを制御することができる. この戦略は,トレーダーに一目平衡表の適用について全面的に理解できるようにする.

ストラテジーソースコード
/*backtest
start: 2022-09-14 00:00:00
end: 2023-09-20 00:00:00
period: 1d
basePeriod: 1h
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/
// © Coinrule

//@version=5
strategy("Ichimoku Cloud with RSI (By Coinrule)",
         overlay=true,
         initial_capital=1000,
         process_orders_on_close=true,
         default_qty_type=strategy.percent_of_equity,
         default_qty_value=30,
         commission_type=strategy.commission.percent,
         commission_value=0.1)

showDate = input(defval=true, title='Show Date Range')
timePeriod = time >= timestamp(syminfo.timezone, 2022, 6, 1, 0, 0)


// RSI inputs and calculations
lengthRSI = 14
RSI = ta.rsi(close, lengthRSI)


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

middle(len) => math.avg(ta.lowest(len), ta.highest(len))


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


// Plot Ichimoku Cloud
plot(tenkan, color=#0496ff, title="Tenkan-Sen")
plot(kijun, color=#991515, title="Kijun-Sen")
plot(close, offset=-cs_offset+1, color=#459915, title="Chikou-Span")
sa=plot(senkouA, offset=ss_offset-1, color=color.green, title="Senkou-Span A")
sb=plot(senkouB, offset=ss_offset-1, color=color.red, title="Senkou-Span B")
fill(sa, sb, color = senkouA > senkouB ? color.green : color.red, title="Cloud color")

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


// Entry/Exit Conditions
tk_cross_bull = tenkan > kijun
tk_cross_bear = tenkan < kijun
cs_cross_bull = ta.mom(close, cs_offset-1) > 0
cs_cross_bear = ta.mom(close, cs_offset-1) < 0
price_above_kumo = close > ss_high
price_below_kumo = close < ss_low

bullish = tk_cross_bull and cs_cross_bull and price_above_kumo
bearish = tk_cross_bear and cs_cross_bear and price_below_kumo

strategy.entry("Long", strategy.long, when=bullish and long_entry and RSI < 50 and timePeriod)
strategy.close("Long", when=bearish and not short_entry)

strategy.entry("Short", strategy.short, when=bearish and short_entry and RSI > 50 and timePeriod)
strategy.close("Short", when=bullish and not long_entry)