ダイナミックサポートプライスアクショントレーディングシステム

SR PA
作成日: 2024-12-04 15:19:00 最終変更日: 2024-12-04 15:19:00
コピー: 0 クリック数: 422
1
フォロー
1617
フォロワー

ダイナミックサポートプライスアクショントレーディングシステム

概要

この戦略は,価格行動とダイナミックなサポートとレジスタンス位置に基づく取引システムで,サポートとレジスタンス位置の近くで重要な価格パターンを識別することによって取引を行う.システムは,16サイクルのダイナミックなサポートとレジスタンス計算方法を採用し,市場における潜在的な反転の機会をキャプチャするために4つのクラシックな反転の形状 - 子線,流星線,十字星,針の形状を組み合わせている.

戦略原則

戦略の核心は,サポートとレジスタンス値を動的に計算して,価格活動の上下境界を形成することです.価格がこれらの重要なレベルに近づくと,システムは特定の図形状を反転信号として探します.入場条件は,価格がサポートのレジスタンス値の1.8%の範囲 ((デフォルトの感受性) の内での反転形状の出現を要求します.システムは,16%のストップと9.5%のストップを組み合わせた35%の資金管理ルールを使用し,各取引のリスクを約5.6%の口座総額で効果的に制御します.戦略は,Pine Scriptで実装され,完全な取引管理と視覚的な表示機能が含まれています.

戦略的優位性

  1. この戦略は,価格の形状とサポートレジスタンスという技術分析の最も信頼性の高い2つの要素を組み合わせて,取引信号の信頼性を高めています.
  2. 市場条件の変化に対応する,動的計算によるサポート抵抗位
  3. 資金管理とリスク管理の厳格な措置により,大規模な撤収を防止する
  4. 戦略の論理が明確で,パラメータは調整可能で,異なる市場状況に応じて最適化できます
  5. 入場信号は明快で,主観的な判断要素がない,自動取引に適しています.

戦略リスク

  1. 波動性高い市場では,抵抗点を支える効果が低下する可能性があります.
  2. 止損位置は比較的遠い (<16%),激しい状況では大きな損失を負う可能性があります.
  3. 取引頻度と正確性に重要な影響を与えるセンシビリティパラメータの設定
  4. 価格の動きにだけ依存すると,他の重要な市場信号が失われる可能性があります.
  5. 取引コストが戦略のリターンに与える影響を考慮する必要がある

戦略最適化の方向性

  1. 信号信頼性を高めるための補助確認指標として交差量導入
  2. 市場変動の動向に合わせて適応可能なセンシビリティパラメータの開発
  3. モバイルストップまたは分期ストップを使用することを検討するストップ設定を最適化する
  4. トレンドフィルターを追加し,強気なトレンドで逆転を避ける
  5. 市場状況に応じて取引規模を調整するダイナミックなポジション管理システムの開発

要約する

この価格行動に基づく取引戦略は,ダイナミックサポートのレジスタンスレベルとクラシック反転形態を組み合わせることで,トレーダーに体系化された取引方法を提供します.戦略の優点は,論理的明晰さとリスクの制御性にあるが,実際の取引効果に基づいて継続的な最適化が必要である.トレーダーは,実用化される前に十分なフィットバックとパラメータの最適化を行い,市場経験と組み合わせて戦略に個別的な調整を行うことをお勧めします.

ストラテジーソースコード
/*backtest
start: 2024-11-26 00:00:00
end: 2024-12-03 00:00:00
period: 1h
basePeriod: 1h
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/
// © felipemiransan

//@version=5
strategy("Price Action Strategy", overlay=true)

// Settings
length = input.int(16, title="Support and Resistance Length")
sensitivity = input.float(0.018, title="Sensitivity")

// Stop Loss and Take Profit
stop_loss_pct = input.float(16, title="Stop Loss percentage", minval=0.1) / 100
take_profit_pct = input.float(9.5, title="Take Profit percentage", minval=0.1) / 100

// Function to identify a Hammer
isHammer() =>
    body = close - open
    price_range = high - low
    lower_shadow = open - low
    upper_shadow = high - close
    body > 0 and lower_shadow > body * 2 and upper_shadow < body * 0.5 and price_range > 0

// Function to identify a Shooting Star
isShootingStar() =>
    body = open - close
    price_range = high - low
    lower_shadow = close - low
    upper_shadow = high - open
    body > 0 and upper_shadow > body * 2 and lower_shadow < body * 0.5 and price_range > 0

// Function to identify a Doji
isDoji() =>
    body = close - open
    price_range = high - low
    math.abs(body) < (price_range * 0.1)  // Doji has a small body

// Function to identify a Pin Bar
isPinBar() =>
    body = close - open
    price_range = high - low
    lower_shadow = open - low
    upper_shadow = high - close
    (upper_shadow > body * 2 and lower_shadow < body * 0.5) or (lower_shadow > body * 2 and upper_shadow < body * 0.5)

// Support and resistance levels 
support = ta.lowest(low, length)
resistance = ta.highest(high, length)

// Entry criteria
long_condition = (isHammer() or isDoji() or isPinBar()) and close <= support * (1 + sensitivity)
short_condition = (isShootingStar() or isDoji() or isPinBar()) and close >= resistance * (1 - sensitivity)

// Function to calculate stop loss and take profit (long)
calculate_levels(position_size, avg_price, stop_loss_pct, take_profit_pct) =>
    stop_loss_level = avg_price * (1 - stop_loss_pct)
    take_profit_level = avg_price * (1 + take_profit_pct)
    [stop_loss_level, take_profit_level]

// Function to calculate stop loss and take profit (short)
calculate_levels_short(position_size, avg_price, stop_loss_pct, take_profit_pct) =>
    stop_loss_level = avg_price * (1 + stop_loss_pct)
    take_profit_level = avg_price * (1 - take_profit_pct)
    [stop_loss_level, take_profit_level]

// Buy entry order with label
if (long_condition and strategy.opentrades == 0)
    strategy.entry("Buy", strategy.long)
    pattern = isHammer() ? "Hammer" : isDoji() ? "Doji" : isPinBar() ? "Pin Bar" : ""
    label.new(x=bar_index, y=low, text=pattern, color=color.green, textcolor=color.black, size=size.small)

// Sell entry order with label
if (short_condition and strategy.opentrades == 0)
    strategy.entry("Sell", strategy.short)
    pattern = isShootingStar() ? "Shooting Star" : isDoji() ? "Doji" : isPinBar() ? "Pin Bar" : ""
    label.new(x=bar_index, y=high, text=pattern, color=color.red, textcolor=color.black, size=size.small)

// Stop Loss and Take Profit management for open positions
if (strategy.opentrades > 0)
    if (strategy.position_size > 0)  // Long position
        avg_price_long = strategy.position_avg_price  // Average price of long position
        [long_stop_level, long_take_profit_level] = calculate_levels(strategy.position_size, avg_price_long, stop_loss_pct, take_profit_pct)
        strategy.exit("Exit Long", from_entry="Buy", stop=long_stop_level, limit=long_take_profit_level)
    if (strategy.position_size < 0)  // Short position
        avg_price_short = strategy.position_avg_price  // Average price of short position
        [short_stop_level, short_take_profit_level] = calculate_levels_short(strategy.position_size, avg_price_short, stop_loss_pct, take_profit_pct)
        strategy.exit("Exit Short", from_entry="Sell", stop=short_stop_level, limit=short_take_profit_level)

// Visualization of Support and Resistance Levels
plot(support, title="Support", color=color.green, linewidth=2)
plot(resistance, title="Resistance", color=color.red, linewidth=2)