FX:GBPUSD   영국 파운드/미국 달러
//@version=5
strategy("Market Structure and Zones Breakout Strategy", overlay=true, margin_long=100, margin_short=100)

// Define support and resistance levels
resistance = highest(high, 10)
support = lowest(low, 10)

// Define market structure zones
zone_top = resistance + abs(resistance - support) * 0.25
zone_bottom = support - abs(resistance - support) * 0.25

// Define breakout conditions
long_breakout = high > zone_top
short_breakout = low < zone_bottom

// Enter long position on breakout
if (long_breakout)
strategy.entry("Long", strategy.long)

// Enter short position on breakout
if (short_breakout)
strategy.entry("Short", strategy.short)

// Exit position when opposite level is reached
if (strategy.position_size > 0)
strategy.exit("Exit Long", "Long", stop=low)
if (strategy.position_size < 0)
strategy.exit("Exit Short", "Short", stop=high)

// Plot support and resistance levels
plot(resistance, color=color.green)
plot(support, color=color.red)

// Plot market structure zones
plot(zone_top, color=color.gray, style=plot.style_area, opacity=0.2)
plot(zone_bottom, color=color.gray, style=plot.style_area, opacity=0.2)
면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.