Skip to content
FXNook HubBeta

Alex / Trading Sessions Indicator (Asia, London, New York) for MT5

MetaTrader 5IndicatorMITCompiled · build 6333
AlexFirst version.build 6333v1.01 day ago1 version
  • FXN_SessionBoxes.mq5First version.9 KB
  • FXN_SessionBoxes.ex5Compiled by the Lab with MetaEditor build 633319 KB
README

Overview

Draws Asia, London and New York session high-low boxes for the last N days, with your broker time offset and range labels in pips.

What it is
A free Indicator for MetaTrader 5, written in MQL5.
What it does
Draws Asia, London and New York session high-low boxes for the last N days, with your broker time offset and range labels in pips.
Shared by
Alex
Licence
MIT
Version
1.0 (1 Dec 2026)
Settings
17 inputs
Lab check
Compiled with MetaEditor build 6333 for MT5 on 1 Dec 2026: 0 errors, 0 warnings.
Price
Free to download

Session Boxes marks the Asia, London and New York trading sessions on your chart as boxes that span each session's high and low. You can see at a glance where the Asian range formed, whether London broke it, and how far each session travelled. Session hours are entered in GMT and shifted by one broker offset, so the boxes line up on any broker's server time.

How it works

  • For each of the last N trading days (taken from the daily bars) the indicator builds each session window: start = day start + (session start hour + GMT offset) hours. If the end hour is smaller than the start hour the session runs past midnight.
  • The high and low of the window come from H1 data (or from the chart's own bars on charts below H1). Because the sessions use whole hours, this is exact.
  • A rectangle is drawn from the session start to its planned end, between that high and low. A label shows the session name and its range in pips (on 3 and 5 digit symbols one pip is 10 points).
  • A session that is still running grows with each tick. Everything else is only redrawn when a new H1 bar (or chart bar on lower timeframes) begins, so the indicator stays light.

Inputs

InputDefaultWhat it does
GMT offset2Broker server time minus GMT, in hours. Use 3 for a GMT+3 server.
Days back5Number of trading days to draw (1-60).
Show Asia / London / New YorktrueTurns each session on or off.
Asia start / end0 / 9Asia session hours in GMT.
London start / end7 / 16London session hours in GMT.
New York start / end12 / 21New York session hours in GMT.
Session coloursblue, green, rustColour of each box and its label.
Fill boxestrueFills the boxes behind the candles; off draws outlines only.
Show labelstrueShows the session name and range in pips.
Label font size8Size of the label text.

How to use it

  1. In MetaTrader choose File > Open Data Folder.
  2. MT4: copy FXN_SessionBoxes.mq4 into MQL4/Indicators. MT5: copy FXN_SessionBoxes.mq5 into MQL5/Indicators.
  3. Restart the terminal, or right-click Indicators in the Navigator and choose Refresh. If the indicator does not appear, open the file in MetaEditor and press F7 to compile it.
  4. Drag the indicator onto a chart, adjust the inputs and press OK.

First find your broker's server offset: compare the time in Market Watch with GMT. Enter that number as GMT offset. Use the indicator on M5 to H1 charts. If your broker changes its offset for daylight saving time, update the input when the clocks change, or adjust the session hours instead.

Good to know

  • The session hours are approximate market hours; edit them to match the hours you trade.
  • The indicator uses one fixed offset. It does not switch daylight saving time by itself.
  • The box of a running session changes until the session ends. Finished sessions do not change.
  • On H4 and higher charts the boxes still draw, but they cover only a few candles and are less useful.
  • If price history for older days is not loaded yet, those boxes appear once MetaTrader downloads it.
  • All objects use the prefix FXN_SB_ and are removed when you remove the indicator. It does not trade.

Trading carries risk. Test on a demo account first; past results do not predict future results.

Settings read from the code

InputTypeDefaultNote
InpGmtOffsetint2Broker server time minus GMT in hours (2 = server at GMT+2)
InpDaysBackint5Number of trading days to draw (1-60)
InpShowAsiabooltrueDraw the Asia session
InpAsiaStartint0Asia start hour, GMT (0-23)
InpAsiaEndint9Asia end hour, GMT (0-23)
InpAsiaColorcolorC'70,110,160'Asia box colour
InpShowLondonbooltrueDraw the London session
InpLondonStartint7London start hour, GMT (0-23)
InpLondonEndint16London end hour, GMT (0-23)
InpLondonColorcolorC'60,140,90'London box colour
InpShowNYbooltrueDraw the New York session
InpNYStartint12New York start hour, GMT (0-23)
InpNYEndint21New York end hour, GMT (0-23)
InpNYColorcolorC'170,90,60'New York box colour
InpFillbooltrueFill the boxes (drawn behind the candles)
InpShowLabelsbooltrueShow session name and range in pips
InpFontSizeint8Label font size

How to use it

  1. Download the compiled file (or the source and compile it in MetaEditor).
  2. Put it in MetaTrader: File → Open Data Folder → MQL5 → Indicators, then refresh the Navigator.
  3. Test it on a demo account before any real money.
  4. Want changes? Open a copy in your Lab and ask for them in plain words.