거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
지표

Session Boxes - MetaTrader 5용 지표

Duy Van Nguy
Duy Van Nguy
안녕하세요, 저는 Duy Van Nguy입니다. MQL5.com에서 고성능 자동매매 시스템(EA), 지표 및 유틸리티를 개발하는 전문 개발자입니다. 저의 사명은 정밀하고 신뢰할 수 있으며 탁월한 성과를 내는 최고의 도구를 통해 트레이더 여러분의 성공을 돕는 것입니다. 모든 제품은 세심한 디테일로 제작되며, 빠르고 맞춤형 지원도 함께 제공됩니다.
문의 사항이 있으시면 ‘메시지 보내기’를 클릭해 주세요. 신속하게 도와드리겠습니다.
지금 프리미엄 도구를 확인하시고, 여러분의 트레이딩을 한 단계 업그레이드해 보세요:
조회수:
187
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Brief Description

Session Boxes is a custom indicator for MetaTrader 5 that draws color-coded rectangular boxes on the chart representing the high-low range of the Asia, London, and New York trading sessions. The indicator uses H1 data internally and supports configurable session hours in GMT along with a broker server offset parameter.


What ideas is the code based on?

The indicator is built on the concept of trading session analysis — the observation that price behavior and volatility differ across the three major global market sessions: Asia (Tokyo), London (Europe), and New York (US). By identifying the high-low range of each session per day, traders can mark significant price levels for use in breakout, liquidity, and range-based strategies.

Technically, the indicator converts broker server time to GMT by applying a configurable hour offset (InpBrokerGMTOffset). It then determines whether each H1 bar falls within a given session's GMT window using an hour-range check that correctly handles overnight sessions where the start hour is greater than the end hour — cross-midnight logic is handled by the IsHourInSession function. A per-day tracking mechanism ensures that one rectangle object is drawn per session per calendar day, spanning from the session's first to last H1 bar and covering the full high-low range of that period.

How can the indications be interpreted?

Each drawn rectangle represents the complete high-low range of a trading session for a single trading day. Three session boxes are displayed:

Asia box (default color: Slate Blue) — marks the overnight consolidation range before the London open. A narrow Asia range often precedes a significant directional move during the London or New York session. Traders use the Asia high and low as reference levels for liquidity sweeps and breakout entries.

London box (default color: Sea Green) — captures the European session range, typically the most active and directional period for XAUUSD and major forex pairs. Price that breaks and closes outside the London box during the New York session may indicate continuation or reversal.

New York box (default color: Goldenrod) — represents the US session range. The overlap between the London and New York sessions (approximately 12:00 to 16:00 GMT) generates increased volatility, and both session boxes will cover that shared period. The New York box is useful for identifying late-session range extensions or consolidations.

All boxes are drawn on the chart background so they do not obscure candlestick visibility. The number of historical days displayed is controlled by InpBoxLookbackDays.

Suitable Symbols and Timeframes

The indicator can be applied to any chart timeframe — it fetches H1 data internally regardless of the period selected for the chart. It is suitable for any liquid trading symbol; it is particularly relevant for instruments with strong session-based behavior, such as XAUUSD (Gold), major forex pairs (EURUSD, GBPUSD, USDJPY), and indices (US30, NAS100). Before using in live conditions, verify the InpBrokerGMTOffset value matches the GMT offset of the broker server.

Description of #include Files Used

This code does not use external #include files.

Description of Main External Variables

Variable Default Description
InpAsiaStartGMT 0 Asia session start hour in GMT (0-23)
InpAsiaEndGMT 8 Asia session end hour in GMT (0-23)
InpLondonStartGMT 7 London session start hour in GMT (0-23)
InpLondonEndGMT 16 London session end hour in GMT (0-23)
InpNYStartGMT 12 New York session start hour in GMT (0-23)
InpNYEndGMT 21 New York session end hour in GMT (0-23)
InpBrokerGMTOffset 2 Broker server time offset relative to GMT in hours (adjust to match your broker)
InpBoxLookbackDays 50 Number of past calendar days for which session boxes are drawn on the chart
InpAsiaColor clrSlateBlue Fill color of the Asia session rectangle
InpLondonColor clrSeaGreen Fill color of the London session rectangle
InpNYColor clrGoldenrod Fill color of the New York session rectangle
Long-Term Trend TRIX Oscillator Long-Term Trend TRIX Oscillator

A long-term momentum and trend oscillator based on dual TRIX and LWMA filtering.

ADX Trend Pullback EA ADX Trend Pullback EA

This Expert Advisor combines an ADX-based trend strength filter with an EMA pullback entry technique, using ATR for dynamic stop loss and take profit sizing. It is designed for trading a single symbol with one position open at a time.

Gold FVG Finder Gold FVG Finder

The indicator identifies areas of imbalance (Fair Value Gaps) on the chart and signals them with an arrow when the price returns to them. It is suitable for Gold, Forex and any liquid instruments on timeframes ranging from M5 to H4.

V1N1 LONNY MT5 V1N1 LONNY MT5

Asian Range Breakout day-trading EA. Multi-symbol, M15/M30/H1. Places pending stop orders during the London session outside the pre-London Asian range, using PSAR + MACD + Stochastic signals, with automatic London/NY DST handling, structural stops, trailing and break-even.