市場の潜在力 イチモク ブリーッシュ・クラウド戦略

作者: リン・ハーンチャオチャン,日付: 2024-02-02 16時57分46秒
タグ:

img

概要

この戦略は,長時間のみのイチモク・クラウド・トレード・戦略である. 変換線がベースラインの上を横切ると長行し,ベースラインが変換線以下を横切るとポジションを閉じる. さらに,ポジションを開閉する際には,Lagging Spanが雲の上下にあるかどうかをチェックする.

戦略の論理

この戦略は イチモク指標からいくつかの線を使用します.

  1. 変換線:過去9日間の高値と低値の平均値で,短期トレンド変換を表します.

  2. ベースライン:過去26日間の高値と低値の平均値で,その期間の平均価格動きを表します.

  3. Leading Span A: 変換とベースラインの平均値.

  4. Leading Span B: 過去52日間の高値と低値の平均値で,中長期トレンドの主要指標です.

  5. 遅延期間:26日遅れの閉店価格で,トレンドの勢いを表しています.

ポジションを開くには,変換線がベースラインの上を横断し,Lagging Spanが雲の上を横断する必要があります.これは短期,中期/長期の両方で上昇傾向を示します.

ポジションを閉じるには,ベースラインがコンバージョンラインの下を横切る必要があり,Lagging Spanは雲の下にある必要があります.これはトレンドの逆転をシグナル化し,ポジションを終了することを示唆します.

戦略 の 利点

  1. イチモク雲を使って 傾向の方向を正確に判断します

  2. 複数の線を組み合わせることで 誤った信号を避ける.

  3. 仮想通貨の長期上昇傾向と一致します

  4. 厳格な条件フィルタリングにより 高品質な信号が伝わります

戦略 の リスク

  1. 位置のサイズを調整することはできません.

  2. 牛市では非常に良い業績を上げていますが 熊市では大きな損失を冒します

  3. 暗号に設定されたデフォルトパラメータは 他の資産の調整が必要かもしれません

  4. 貿易信号が少なくなったら 機会が逃れられる

改善

  1. 損失が限界に達すると,ポジションの一部を閉鎖するためのポジションサイズ機能を追加します.

  2. 損失を減らすために キーサポートレベルが破られると ショートセールシグナルを追加します

  3. パラメータを最適化して より多くのシンボルに対応し 安定性を向上させる

  4. 損失がダウンサイドリスクを抑えるレベルに達するとストップロスを追加します.

概要

このアプローチは,長期間のイチモク戦略として,複数のイチモク線を組み合わせてトレンド逆転を信頼的に決定する.仮想通貨などの持続的な上昇傾向のある資産では特にうまく機能する.ストップ損失やポジションサイジングなどのリスク管理のさらなる強化により,この戦略はさまざまな市場環境や資産タイプでより堅牢になる.


/*backtest
start: 2024-01-02 00:00:00
end: 2024-02-01 00:00:00
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/
// Simple long-only Ichimoku Cloud Strategy
// Enter position when conversion line crosses base line up, and close it when the opposite happens. 
// Additional condition for open / close the trade is lagging span, it should be higher than cloud to open position and below - to close it.
//@version=4
strategy("Ichimoku Cloud Strategy Long Only", shorttitle="Ichimoku Cloud Strategy (long only)", overlay=true )

conversion_length = input(9, minval=1, title="Conversion Line Periods"),
base_length = input(26, minval=1, title="Base Line Periods")
lagging_length = input(52, minval=1, title="Lagging Span 2 Periods"),
delta = input(26, minval=1, title="Delta")

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

conversion_line = average(conversion_length) // tenkan sen - trend
base_line = average(base_length) // kijun sen - movement
lead_line_a = avg(conversion_line, base_line) // senkou span A
lead_line_b = average(lagging_length) // senkou span B
lagging_span = close // chikou span - trend / move power

plot(conversion_line, color=color.blue, linewidth=2, title="Conversion Line")
plot(base_line, color=color.white, linewidth=2, title="Base Line")
plot(lagging_span, offset = -delta, color=color.purple, linewidth=2, title="Lagging Span")

lead_line_a_plot = plot(lead_line_a, offset = delta, color=color.green, title="Lead 1")
lead_line_b_plot = plot(lead_line_b, offset = delta, color=color.red, title="Lead 2")
fill(lead_line_a_plot, lead_line_b_plot, color = lead_line_a > lead_line_b ? color.green : color.red)

// Strategy logic

long_signal = crossover(conversion_line,base_line) and ((lagging_span) > (lead_line_a)) and ((lagging_span) > (lead_line_b))
short_signal = crossover(base_line, conversion_line) and ((lagging_span) < (lead_line_a)) and ((lagging_span) < (lead_line_b))

strategy.entry("LONG", strategy.long, when=strategy.opentrades == 0 and long_signal, alert_message='BUY')
strategy.close("LONG", when=strategy.opentrades > 0 and short_signal, alert_message='SELL')
    
    // === Backtesting Dates === thanks to Trost

testPeriodSwitch = input(true, "Custom Backtesting Dates")
testStartYear = input(2021, "Backtest Start Year")
testStartMonth = input(1, "Backtest Start Month")
testStartDay = input(1, "Backtest Start Day")
testStartHour = input(0, "Backtest Start Hour")
testPeriodStart = timestamp(testStartYear, testStartMonth, testStartDay, testStartHour, 0)
testStopYear = input(2021, "Backtest Stop Year")
testStopMonth = input(12, "Backtest Stop Month")
testStopDay = input(1, "Backtest Stop Day")
testStopHour = input(0, "Backtest Stop Hour")
testPeriodStop = timestamp(testStopYear, testStopMonth, testStopDay, testStopHour, 0)
testPeriod() => true
testPeriod_1 = testPeriod()
isPeriod = testPeriodSwitch == true ? testPeriod_1 : true
// === /END

if not isPeriod
    strategy.cancel_all()
    strategy.close_all()

もっと