
交差突破型二均線システム戦略は,32周期指数移動平均 ((EMA)) の高点と低点に基づく技術分析戦略である.この戦略の核心思想は,価格と32周期EMAの交差点と特殊な”無接触“形状を識別することによってトレンドの方向性を確認し,重要な価格突破を確認した後に入場取引を行うことである.この戦略は,厳格な入場条件と明確な出場ルールによって,トレーダーが短期的なトレンド変化をもたらす機会を捉えるために,5分間の時間枠で設計されている.
この戦略は以下の重要なステップに基づいています.
この戦略の核心的な論理は,価格がEMAと交差することを要求するだけでなく”,無接触“と突破確認によって偽信号をフィルタリングして取引の正確性を向上させるというものである.この複数の確認メカニズムは,整合市場における誤入のリスクを効果的に軽減する.
この戦略は,コードを深く分析することで,以下の顕著な利点があります.
この戦略は巧みに設計されているが,潜在的リスクは以下の通りである.
コード分析に基づいて,この戦略が最適化できる主な方向は以下の通りです.
これらの最適化の方向は,主に戦略の強性と適応性を高め,不利な市場環境での損失を減らすためである.
交差突破型二均線システム戦略は,32サイクルEMA高低点,価格交差,無接触,および突破確認などの複数のメカニズムを使用して,高確率の取引機会を識別する精巧に設計された技術分析取引システムである.この戦略は,トレンドが明確な市場で優れたパフォーマンスを発揮し,厳格な入場確認と明確な出場ルールを介して,誤入場リスクを効果的に低減している.
しかし,どんな取引戦略にも限界があり,横断的または高波動的な市場で挑戦されることがあります.トレンド強度フィルター,動態パラメータ調整,複数時間枠分析などの最適化措置を導入することにより,戦略の安定性と適応性をさらに向上させることができます.
5分間のタイムフレームのショートライン取引システムとして,この戦略は特に日中トレーダーとショートライントレーダーに適しています. 最後に,よいリスク管理は,常に任意の取引戦略の成功的な適用の鍵であり,トレーダーに,実際の適用の前に十分な反省と模擬取引を行い,個人のリスク承受能力と組み合わせた合理的なポジション管理ルールを制定することをお勧めします.
/*backtest
start: 2024-03-26 00:00:00
end: 2025-03-25 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("TrophyFighter 32 EMA HL", overlay=true)
// 32 EMA for high and low
ema_high_32 = ta.ema(high, 32)
ema_low_32 = ta.ema(low, 32)
// Detect crossover and crossunder
cross_above_high_ema = ta.crossover(close, ema_high_32)
cross_below_low_ema = ta.crossunder(close, ema_low_32)
// Identify no-touch candles
no_touch_green = close > open and low > ema_high_32
no_touch_red = close < open and high < ema_low_32
// Track the high and low of no-touch candles
var float first_green_high = na
var float first_red_low = na
var bool waiting_for_long = false
var bool waiting_for_short = false
var bool in_long_trade = false // Whether a long trade is active
var bool in_short_trade = false // Whether a short trade is active
var bool first_no_touch_green_shown = false // First green diamond shown
var bool first_no_touch_red_shown = false // First red diamond shown
if (cross_above_high_ema and not in_long_trade and not in_short_trade)
first_green_high := na
waiting_for_long := true
first_no_touch_green_shown := false // Reset
if (cross_below_low_ema and not in_long_trade and not in_short_trade)
first_red_low := na
waiting_for_short := true
first_no_touch_red_shown := false // Reset
if (no_touch_green and waiting_for_long and ta.valuewhen(cross_above_high_ema, bar_index, 0) > ta.valuewhen(no_touch_green, bar_index, 1))
first_green_high := high
first_no_touch_green_shown := true // Set first green diamond
if (no_touch_red and waiting_for_short and ta.valuewhen(cross_below_low_ema, bar_index, 0) > ta.valuewhen(no_touch_red, bar_index, 1))
first_red_low := low
first_no_touch_red_shown := true // Set first red diamond
// Identify breakout (on the previous candle) - using na() function
long_breakout_check = high > ta.valuewhen(not na(first_green_high), first_green_high, 0) and not na(first_green_high) and waiting_for_long
short_breakout_check = low < ta.valuewhen(not na(first_red_low), first_red_low, 0) and not na(first_red_low) and waiting_for_short
// Buy and sell conditions (on the next same-colored candle)
long_condition = long_breakout_check[1] and close > open and not in_long_trade and not in_short_trade // Next green candle
short_condition = short_breakout_check[1] and close < open and not in_long_trade and not in_short_trade // Next red candle
// Breakout check (only on the signal candle)
long_breakout = long_condition // Blue square only for signal
short_breakout = short_condition // White square only for signal
// Signal for the first no-touch candle
first_no_touch_green = no_touch_green and not first_no_touch_green_shown and waiting_for_long and ta.valuewhen(cross_above_high_ema, bar_index, 0) > ta.valuewhen(no_touch_green, bar_index, 1)
first_no_touch_red = no_touch_red and not first_no_touch_red_shown and waiting_for_short and ta.valuewhen(cross_below_low_ema, bar_index, 0) > ta.valuewhen(no_touch_red, bar_index, 1)
// When a trade starts
if (long_condition)
waiting_for_long := false
in_long_trade := true // Start long trade
if (short_condition)
waiting_for_short := false
in_short_trade := true // Start short trade
// New exit rules
long_exit = close < ema_low_32 and in_long_trade // Price drops below EMA low
short_exit = close > ema_high_32 and in_short_trade // Price rises above EMA high
// Reset when trade closes
if (long_exit)
in_long_trade := false
if (short_exit)
in_short_trade := false
// Plot EMA and levels (cross style)
plot(ema_high_32, color=color.green, title="EMA High 32")
plot(ema_low_32, color=color.red, title="EMA Low 32")
plot(first_green_high, color=color.yellow, style=plot.style_cross, linewidth=1, title="First Green High")
plot(first_red_low, color=color.orange, style=plot.style_cross, linewidth=1, title="First Red Low")
// Debugging signals
plotshape(cross_above_high_ema, title="Cross Above EMA", location=location.belowbar, color=color.yellow, style=shape.circle, size=size.tiny)
plotshape(cross_below_low_ema, title="Cross Below EMA", location=location.abovebar, color=color.orange, style=shape.circle, size=size.tiny)
plotshape(first_no_touch_green, title="No Touch Green", location=location.belowbar, color=color.lime, style=shape.diamond, size=size.tiny)
plotshape(first_no_touch_red, title="No Touch Red", location=location.abovebar, color=color.purple, style=shape.diamond, size=size.tiny)
plotshape(long_breakout, title="Long Breakout", location=location.belowbar, color=color.blue, style=shape.square, size=size.tiny)
plotshape(short_breakout, title="Short Breakout", location=location.abovebar, color=color.white, style=shape.square, size=size.tiny)
plotshape(long_condition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(short_condition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// Execute trades
if (long_condition)
strategy.entry("Long", strategy.long)
if (short_condition)
strategy.entry("Short", strategy.short)
if (long_exit)
strategy.close("Long", comment="Long Exit")
if (short_exit)
strategy.close("Short", comment="Short Exit")