一目均衡表取引戦略


作成日: 2024-05-29 17:23:36 最終変更日: 2024-05-29 17:23:36
コピー: 3 クリック数: 581
1
フォロー
1617
フォロワー

一目均衡表取引戦略

概要

この戦略は,市場動向と取引シグナルを判断するために,イチモク・クモ指数を使用する.この戦略は,クモ雲の下に多行して,クモ雲の上に空白をします.この戦略は,ATR指数をストップとして使用し,Kijun-senラインとSenkou Spanラインの突破を入場シグナルの確認として使用します.この戦略は,強いトレンド中の取引機会を捉えながら,リスクをコントロールしようとします.

戦略原則

  1. イチモク指数のキジュン・セン,テンカン・セン,センコウ・スパンの線を用いて市場動向を判断する.
  2. 閉盘価格がSenkou Span線より低く,Kijun-sen線がKumo雲上にあるとき,多行信号が生成される.
  3. 閉店価格がSenkou Span線より高く,Kijun-sen線がKumo雲の下にあるとき,空調信号が生成される。
  4. ATR指数を使用して止損位置を計算し,止損位置は,最近の5つのK線の最高/低点減算/加倍3倍ATRである.
  5. 価格がストップ・ロスを突破すると,平仓を外す.

戦略的優位性

  1. この戦略は,市場動向を全面的に分析できるイチモク指数に基づいています.
  2. 戦略は,価格とキジュン・セン線とセンコ・スパン線との関係を考慮しながら,入場信号の信頼性を向上させる.
  3. ATRをストップとして使用し,ストップポジションを動的に調整し,リスクをより良くコントロールできる.
  4. ストップ・ロスの設定は,市場の変動を考慮し,異なる市場状況に適応します.

戦略リスク

  1. この戦略は,波動的な市場において,偽のシグナルを多く生み出し,頻繁に取引を促し,資金の損失を招く可能性があります.
  2. 戦略のパフォーマンスは,イチモク指数パラメータの選択に依存し,異なるパラメータは異なる取引結果を生成する可能性があります.
  3. 価格が急激な状況では,すぐにストップポイントを突破し,大きな滑落と損失を引き起こす可能性があります.

戦略最適化の方向性

  1. 他の技術指標または量値分析を導入して,トレンドと入場タイミングを判断し,信号の正確性を向上させる.
  2. ストップポジションの設定を最適化します.例えば,トラッキングストップまたは移動ストップを使用することを検討して,アカウントの安全性をよりよく保護します.
  3. 戦略にポジション管理を加え,市場変動と口座リスクに応じて各取引のポジションサイズを調整する.
  4. 戦略のパラメータを最適化し,現在の市場状況に最も適したパラメータの組み合わせを見つけます.

要約する

この戦略は,イチモク指数の複数の構成要素を利用して,市場動向の総合的な分析を実現している.同時に,戦略は,リスクを制御するためにATRの止まりを用い,戦略の安定性を強化している.しかし,この戦略は,震動的な市場で不良なパフォーマンスを発揮し,パラメータ選択に依存している.将来,他の分析方法,止まりの最適化,ポジション管理などの導入によって,戦略のパフォーマンスをさらに向上させることができる.

ストラテジーソースコード
/*backtest
start: 2024-04-01 00:00:00
end: 2024-04-30 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © muratatilay

//@version=5
strategy(
     "Kumo Trade Concept", 
     overlay=true,
     initial_capital=10000,
     currency=currency.USDT,
     default_qty_type=strategy.percent_of_equity, 
     default_qty_value=30,
     commission_type=strategy.commission.percent,
     commission_value=0.1,
     margin_long=10, 
     margin_short=10)


// ICHIMOKU Lines 
//  INPUTS
tenkanSenPeriods = input.int(9, minval=1, title="Tenkan-sen")
kijunSenPeriods = input.int(26, minval=1, title="Kijun-sen")
senkouBPeriod = input.int(52, minval=1, title="Senkou span B")
displacement = input.int(26, minval=1, title="Chikou span")

donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
tenkanSen = donchian(tenkanSenPeriods)
kijunSen = donchian(kijunSenPeriods)
senkouA = math.avg(tenkanSen, kijunSen)
senkouB = donchian(senkouBPeriod)

// Other Indicators
float   atrValue    = ta.atr(5)

// Calculate Senkou Span A 25 bars back
senkouA_current = math.avg(tenkanSen[25], kijunSen[25])
// Calculate Senkou Span B 25 bars back
senkouB_current = math.avg(ta.highest(senkouBPeriod)[25], ta.lowest(senkouBPeriod)[25])

// Kumo top bottom 
senkou_max = (senkouA_current >= senkouB_current) ? senkouA_current : senkouB_current
senkou_min = (senkouB_current >= senkouA_current) ? senkouA_current : senkouB_current

// Trade Setups
long_setup = (kijunSen > senkou_max) and (close < senkou_min) 
short_setup = (kijunSen < senkou_min ) and ( close > senkou_max ) 

// Check long_setup for the last 10 bars
long_setup_last_10 = false
for i = 0 to 50
    if long_setup[i]
        long_setup_last_10 := true
short_setup_last_10 = false
for i = 0 to 50
    if short_setup[i]
        short_setup_last_10 := true


closeSenkouCross = (close > senkou_max) and barstate.isconfirmed 
closeKijunCross = (close > kijunSen ) 

senkouCloseCross = close < senkou_min
kijunCloseCross = close < kijunSen


// Handle Trades
// Enter Trade
var float trailStopLong = na
var float trailStopShort = na
if ( closeSenkouCross and long_setup_last_10 and closeKijunCross ) 
    strategy.entry(id="Buy", direction = strategy.long)
    trailStopLong := na
if senkouCloseCross and short_setup_last_10 and kijunCloseCross
    strategy.entry(id="Sell", direction = strategy.short)
    trailStopShort := na


// Update trailing stop
float temp_trailStop_long = ta.highest(high, 5) - (atrValue * 3)
float temp_trailStop_short = ta.lowest(low, 5) + (atrValue * 3)
if strategy.position_size > 0
    if temp_trailStop_long > trailStopLong or na(trailStopLong)
        trailStopLong := temp_trailStop_long
if strategy.position_size < 0
    if temp_trailStop_short < trailStopShort or na(trailStopShort)
        trailStopShort := temp_trailStop_short

// Handle strategy exit
if close < trailStopLong and barstate.isconfirmed
    strategy.close("Buy", comment="Stop Long")
if close > trailStopShort and barstate.isconfirmed
    strategy.close("Sell", comment="Stop Short")


// PRINT ON CHART
plot(kijunSen, color=color.rgb(214, 58, 30), title="Kijun-sen", linewidth=2)
p1 = plot(senkouA, offset=displacement - 1, color=#A5D6A7, title="Senkou span A")
p2 = plot(senkouB, offset=displacement - 1, color=#EF9A9A, title="Senkou Span B")
fill(p1, p2, color=senkouA > senkouB ? color.rgb(67, 160, 71, 90) : color.rgb(244, 67, 54, 90))
// PRINT SETUPS
plotshape(long_setup , style=shape.circle, color=color.green, location=location.belowbar, size=size.small)
plotshape(short_setup, style=shape.circle, color=color.red, location=location.abovebar, size=size.small)

// Trail Stop
plot(strategy.position_size[1] > 0 ? trailStopLong : na, style=plot.style_linebr, color=color.purple, title="Stop Loss")
plot(strategy.position_size[1] < 0 ? trailStopShort : na, style=plot.style_linebr, color=color.purple, title="Stop Loss")