
십자 돌파형 쌍평선 시스템 전략은 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")