Multi Timeframe Boxes and Sessions - User Guide

10 November 2026, 19:17
Claudio Hernan Ibarrola Diaz
0
8

Version 1.00 · MetaTrader 5 · free indicator

Multi Timeframe Boxes and Sessions draws two kinds of boxes on the chart:

  • Timeframe boxes: the high-low range of each bar of a higher timeframe (MN, W1, D1, H4, H1, M30, M15, M5), so you can see on an M15 chart where yesterday's or last week's range was.
  • Session boxes: the high-low range of the Asian, London and New York sessions, with start and end times you set.

Each kind of box has its own colour, line width, fill and fill transparency. The indicator does not trade, does not give signals or alerts and does not change anything outside the chart it is attached to.

About the input names in this guide. In the Inputs tab, MetaTrader shows each input by its description, for example Show D1 boxes or D1 filled. This guide writes the description in italics followed by the internal name in brackets, for example Show D1 boxes (ShowD1). XX stands for a timeframe (MN, W1, D1…) or a session (Asia, London, NewYork).

1. Installing

  1. Download the indicator from the MQL5 Market from inside MetaTrader 5 (Toolbox → Market; free products are listed there too), or from the product page.
  2. In the Navigator, open Indicators → Market and drag Multi Timeframe Boxes and Sessions onto a chart.
  3. Change the inputs you want in the Inputs tab and press OK.

You can attach two or more copies to the same chart, each with its own settings (section 2).

To remove it: right-click the chart → Indicators List (Ctrl+I) → select it → Delete. Every box and label that copy drew is removed with it; the boxes of other copies stay. The boxes are hidden chart objects: they cannot be selected or moved by accident, and the Objects List (Ctrl+B) shows them only after you press List all.


2. Quick start

With the default inputs the indicator draws:

  • D1 boxes (magenta outline): 90 boxes, that is the current day and the 89 before it (about four months), on any chart below D1;
  • the Asian (gold, filled), London (green, filled) and New York (red, filled) sessions of the last 60 trading days, on charts of H1 and below.

The default session times are for brokers whose server clock is New York time + 7 hours (GMT+2 in winter, GMT+3 in summer), which is common among MetaTrader 5 brokers. If your broker's clock is different, set the session times as explained in section 4.

Typical set-ups. MetaTrader mixes the colours where filled boxes overlap (section 3), so each set-up fills only one kind of box:

PurposeChartInputs
Daily and weekly ranges for intraday tradingM15 or H1Show W1 boxes (ShowW1) on; D1 is on by default
H4 and H1 structure on a scalping chartM5 or M1Show H4 boxes and H4 filled (ShowH4, FilledH4), Show H1 boxes (ShowH1); the three sessions off (Show the … session)
The Asian range and what the price does after itM5 to M30Extend the box to the end of the server day in the Asian group (ExtendAsia); London and New York off
US cash session of an indexM5 or M15New York Start 16:30 and End 23:00 on a New York + 7 server
Monthly and weekly contextH4Show MN boxes and MN filled (ShowMN, FilledMN), Show W1 boxes (ShowW1); Show D1 boxes (ShowD1) off

Two configurations on one chart

Many traders want one set of boxes when the chart is on a higher timeframe and another when it is on a lower one. Attach the indicator twice and limit each copy to its chart timeframes with Draw only on charts from this timeframe... (FromChartTF) and ...up to this one (ToChartTF), the first group of inputs:

CopyFromUp toExample settings
1H1D1MN and W1 boxes on, D1 off, sessions on (they are drawn on H1 only)
2M1M15D1 boxes, H4 boxes filled, H1 boxes, sessions off

When you switch the chart from M5 to H4, copy 2 removes its boxes and copy 1 draws its own. A copy whose range does not include the chart's timeframe draws nothing and writes one line in the Experts tab.

Two copies may also be active at the same time, for example one with the timeframe boxes and one with the sessions. Give each copy different settings: two copies with exactly the same settings share their boxes, and removing one of them removes those boxes until the other redraws them.


3. What is drawn

Timeframe boxes

Each box spans one bar of its timeframe, from the bar's open time to the next bar's open time, and from the bar's high to its low. The box of the bar that is still forming grows as new prices arrive.

  • Only timeframes higher than the chart's are drawn, so each box covers more than one chart bar. On an H1 chart, for example, H1, M30, M15 and M5 boxes are not drawn; if they are switched on, the Experts tab says so.
  • XX boxes to draw, the current one included (CountXX) sets how many boxes of each timeframe are drawn: the current bar's box and the ones before it. They are bars, not calendar days: 90 D1 boxes cover about four months.
  • Monthly boxes follow the real length of each month (28 to 31 days).
  • Weekends and holidays: a box ends where the next bar of its timeframe starts, so a Friday D1 box ends at the Monday open and the gap shows no prices.

Session boxes

Each session box spans the session's start and end times on each server day, from the highest to the lowest price traded in between, measured on M1 bars.

  • A session whose end time is not later than its start time ends the next day (for example 22:00–02:00, or the default New York 15:00–00:00).
  • Extend the box to the end of the server day (00:00) (ExtendXX) continues the box to the next 00:00 server time, so you can see what the price does after the session; its height is still the session's range. It has no effect on a session that already ends at or after midnight, such as the default New York 15:00–00:00.
  • The session in progress grows as new prices arrive; a session that has not started yet is not drawn.
  • Show the session name on each box (SessionLabels) writes the name inside the box, at its top left corner. On H1 charts, sessions that start a few bars apart have overlapping labels; turn the labels off there if they get in the way.
  • Sessions are drawn on charts of H1 or lower only.
  • Days of sessions to draw (SessionDays) sets how many server days of sessions are drawn. A session is drawn only if the chart has M1 history for it: sessions older than the M1 history in the terminal are not drawn (see section 7).

Fill and transparency

MetaTrader 5 chart objects cannot be truly transparent. The indicator blends the fill colour with the chart's background colour, so a fill with Fill transparency 80 looks like 80 % transparent over the background. All boxes are drawn behind the bars, so candles are always visible.

Where two filled boxes overlap, MetaTrader 5 mixes their colours, so the overlap may show a colour different from both. If you combine several kinds of boxes, fill only one of them and draw the others as outlines.

If you change the chart's background colour, the indicator redraws the boxes with the new blend. On a light background the session labels are drawn in a darker shade of their colour so they stay readable; outlines keep the colour you chose.

Line width 0

Line width 0 draws no outline. With Filled on, the box is then just the coloured area; with Filled off, nothing is drawn for that box.


4. Session times and your broker's server time

Session times are entered in the broker's server time, the time on the chart's time axis. They are not your local time.

The defaults are for a server clock at New York + 7 hours:

SessionDefault (server time)Local time of the session (approximate)
Asia00:00–08:0007:00–15:00 Tokyo in the northern winter, 06:00–14:00 in summer
London10:00–19:0008:00–17:00 London
New York15:00–00:0008:00–17:00 New York

On a New York + 7 server these stay aligned through the daylight saving changes of the United States. Europe and the United States change their clocks on different dates, so for two or three weeks a year the London session is one hour off.

How to find your server's clock. While the market is open, the title of the Market Watch window shows the server time (for example "Market Watch: 14:05:31"). Compare it with the current time in New York: the difference is your server's offset. A second check: forex opens for the week on Sunday at 17:00 New York time, so on an H1 chart of a forex pair the first candle after the weekend opens at 00:00 on a New York + 7 server and at 22:00 on a New York + 5 server. If your offset is not 7 hours, shift every session time by the difference: on a New York + 5 server, use 22:00–06:00, 08:00–17:00 and 13:00–22:00. Servers that do not follow the US daylight saving dates change their offset twice a year.

US index cash session: the regular session of the US stock market is 09:30–16:00 New York time, that is 16:30–23:00 on a New York + 7 server.

Shifting the timeframe boxes: TimeShift

Timeframe boxes follow the server's bars: on a New York + 7 server a D1 box runs from 17:00 to 17:00 New York time. Shift of every timeframe box (TimeShift) moves every timeframe box by a number of hours, positive or negative, and the box then shows the range of the shifted window. Example: 7 on a New York + 7 server draws D1 boxes from midnight to midnight New York time.

  • When the shift is not a multiple of a timeframe (for example a 7-hour shift of H4 boxes, or any shift of monthly boxes), the range is measured on H1 bars.
  • With a positive shift, the newest box appears when its shifted window starts (with 7, at 07:00 server time).
  • A shift of a whole bar (for example 24 on D1 boxes) simply shows each box one bar later.

5. Inputs reference

Inputs come in groups, in this order. The eight timeframe groups have the same six inputs; the three session groups have the same eight.

Chart timeframes

In the Inputs tabNameDefaultMeaning
Draw only on charts from this timeframe...FromChartTFM1This copy draws only when the chart's timeframe is this one or higher.
...up to this oneToChartTFMN1...and this one or lower. Current means no limit on that side. With the defaults it draws on every timeframe.

Timeframe groups: MN, W1, D1, H4, H1, M30, M15, M5

In the Inputs tabNameDefaultMeaning
Show XX boxesShowXXD1 on, the rest offDraw boxes of this timeframe.
XX colourColorXXMN yellow, W1 orange, D1 magenta, H4 dodger blue, H1 lime, M30 aqua, M15 red, M5 silverColour of the outline and of the fill.
XX line width (0 = no outline)WidthXX2Outline width in pixels.
XX filledFilledXXfalseFill the box.
XX fill transparency (0 = opaque, 100 = invisible)TranspXX70Fill transparency.
XX boxes to draw, the current one includedCountXXMN 24, W1 52, the others 90Number of boxes.

Session groups: Asian, London, New York

In the Inputs tabNameDefault (Asia / London / New York)Meaning
Show the … sessionShowXXtrue / true / trueDraw this session.
Start (server time, HH:MM)StartXX00:00 / 10:00 / 15:00Start of the session.
End (server time, HH:MM)EndXX08:00 / 19:00 / 00:00End; not later than the start = next day.
ColourColorXXgold / medium sea green / tomatoColour of the outline, the fill and the label.
Line width (0 = no outline)WidthXX1Outline width in pixels.
FilledFilledXXtrueFill the box.
Fill transparency (0 = opaque, 100 = invisible)TranspXX80 / 85 / 85Fill transparency.
Extend the box to the end of the server day (00:00)ExtendXXfalseContinue the box to the next 00:00 server time.

General

In the Inputs tabNameDefaultMeaning
Days of sessions to drawSessionDays60Server days of sessions to draw.
Show the session name on each boxSessionLabelstrueWrite the session name inside each box.
Shift of every timeframe box (hours…)TimeShift0Hours added to every timeframe box, positive or negative; the range follows the shifted window.

6. Performance

On each update (once a second, and on each new chart bar) the indicator redraws only the most recent boxes; it redraws everything only when a new bar of a box's timeframe starts or more history is loaded. With the defaults it keeps about 630 chart objects. Hundreds of boxes on several timeframes mean thousands of objects and a slower chart: lower the numbers of boxes and the days of sessions if the chart feels slow.


7. If something looks wrong

The indicator writes its messages to the Experts tab of the Toolbox (not the Journal tab). Each message starts with "Multi Timeframe Boxes:". In the messages, timeframes are written MN1, W1, D1, H4, H1, M30, M15 and M5.

What you seeWhy, and what to do
"H1 M30 not drawn: only timeframes higher than the chart's (H1) can be drawn."Those timeframes are switched on but the chart is on that timeframe or a higher one. Switch the chart to a lower timeframe, or switch them off.
"sessions are drawn on charts of H1 or lower."The chart is above H1. Switch to H1 or lower.
"the London session times must be HH:MM (got … and …); the session is not drawn."A start or end time is not valid (for example 9.30 or 25:00). Use 09:30.
"the number of D1 boxes must be greater than 0; D1 is not drawn."Set XX boxes to draw to 1 or more.
"SessionDays must be greater than 0; sessions are not drawn."Set Days of sessions to draw to 1 or more.
"this copy draws on charts from H1 to D1; the chart is on M5."The chart's timeframe is outside that copy's range. Normal when you use two copies (section 2); otherwise widen the range.
"FromChartTF is above ToChartTF; nothing is drawn."Swap the two values.
Some boxes appear a few seconds after attachingThe terminal is still downloading history. The indicator retries for about a minute and redraws when new bars or more history arrive. If boxes are still missing, switch the chart's timeframe and back, or attach the indicator again.
Older session boxes are missingSessions are measured on M1 bars, and the terminal keeps a limited number of them. Lower Days of sessions to draw, or raise Tools → Options → Charts → Max bars in chart and open an M1 chart of the symbol once so the history is loaded.
No session boxes at all on a symbolThe symbol has no M1 history in the terminal. Open an M1 chart of it once and wait for the history to load.
Sessions at the wrong hoursSession times are in server time; see section 4.
Overlapping fills show an unexpected colourMetaTrader 5 mixes the colours of overlapping filled boxes; fill only one kind of box.
Removing one copy also removes boxes of anotherThe two copies have exactly the same settings; change any setting of one of them.