Free Forex indicator · MT4 / MT5

Trading Session Time for MT4 & MT5: Free Download

Mark the hours you want to study directly on your Forex chart. Compare session lines, price-range boxes and colored candles, then download ForexBestRobots edition source for desktop MT4 or MT5.

ForexBestRobots edition 1.06

Reviewed by ForexBestRobots Editorial Team

Original sourceEarnForex 1.05
PlatformsDesktop MT4 · MT5
LicenseApache 2.0 · Free
On this page

Highlight a custom part of the trading day

Trading Session Time is an EarnForex indicator that marks one custom schedule per instance. It can draw a vertical start line, a box around the prices inside a time window, or a candle overlay. Add independently named instances to compare more than one schedule. It does not select a market session automatically or generate trading entries.

The download is ForexBestRobots edition 1.06, a marked derivative of EarnForex 1.05. It corrects time validation, overnight notifications, capped-bar detection, session boundaries and object ownership. Original source, author notices, the Apache 2.0 license and a change patch are included.

Display modes and range calculation

DrawCandles=true selects the candle overlay. Otherwise a blank TimeLineEnd selects vertical lines, while a supplied end selects range boxes. With no end, candle highlighting and line-range labels run to the end of that broker date. ShowFutureSession projects vertical lines up to 30 calendar dates ahead; it does not create future OHLC, boxes or candle prices.

Edition 1.06 includes a chart bar when its opening timestamp is at or after the start and before the end: start ≤ bar_open < end. The special end 2359 includes the last minute and therefore ends at the next midnight. A valid one-bar window is supported. The entire selected bar’s OHLC is used, so choose fine or boundary-aligned bars for accurate minute-window extremes; no intrabar interpolation is performed.

ShowRange displays round((H−L)/Point), using the session’s available high and low and rounding to the nearest terminal point. For five-digit EUR/USD, Point=0.00001 and 10 points equal 1 pip. These are price-range units, not profit, percentage return or traded volume. Missing quotes can understate an observed range.

Real EUR/USD session examples

The charts reconstruct real archived Yahoo Finance EUR/USD H1 quotes. The illustrative broker clock is UTC. They are not MetaTrader screenshots, a live tick replay or a strategy backtest. Completed historical boxes use the final session extremes, which were not known at the session start.

The first chart uses TimeLineStart=0800 and TimeLineEnd=1700. On 11 June 2025 the nine selected H1 candles span 775 points, or 77.5 pips at five-digit precision. On 12 June the corresponding range is 1073 points, or 107.3 pips. The candle opening at 17:00 is outside the window.

The overnight example uses 2200–0600. Monday 16 June 22:00 to Tuesday 17 June 06:00 contains eight H1 candles and 227 points; the next night contains 317 points. The weekday filter belongs to the session’s starting date, so the first window uses ShowMonday even though it ends on Tuesday.

The final figure compares two closed-bar snapshots of 12 June: three candles completed by 11:00 give 749 points, while the nine candles completed by 17:00 give 1073. The upper panel omits later prices. It illustrates how a developing box can expand, not a prediction or an exact live-terminal state. CSV files identify candle close times, membership and running ranges.

Real EUR/USD H1, custom 08:00–17:00 UTC windows. Completed ranges: 775 and 1073 terminal points.
Real EUR/USD H1, custom 08:00–17:00 UTC windows. Completed ranges: 775 and 1073 terminal points.2025-06-11 00:00 — 2025-06-12 23:00 UTC · 48 candles
Real 22:00–06:00 UTC windows crossing midnight. Weekdays refer to the start date; observed ranges are 227 and 317 points.
Real 22:00–06:00 UTC windows crossing midnight. Weekdays refer to the start date; observed ranges are 227 and 317 points.2025-06-16 16:00 — 2025-06-18 15:00 UTC · 48 candles
Same 12 June session at two closed-bar cutoffs: 749 points by 11:00 and 1073 by 17:00. Later prices are absent from the upper panel.
Same 12 June session at two closed-bar cutoffs: 749 points by 11:00 and 1073 by 17:00. Later prices are absent from the upper panel.2025-06-12 08:00 — 2025-06-12 16:00 UTC · 9 candles

Real final Yahoo Finance OHLC, EUR/USD H1; illustrative broker time UTC. Full historical boxes are retrospective. CSV includes membership and running ranges; the examples do not establish trading performance.

Download chart calculation data (CSV) · 1Download chart calculation data (CSV) · 2Download chart calculation data (CSV) · 3

Broker time, overnight windows and weekdays

TimeLineStart and TimeLineEnd use the broker chart’s clock, not your computer timezone and not automatically UTC. If a broker is UTC+2 and your intended window is 08:00–17:00 UTC, enter 1000–1900. Update the inputs if the broker or desired local-session offset changes; there is no timezone converter or automatic daylight-saving calendar.

Accepted examples include 0830, 8:30, 13h50 and 22.15, with ordinary digits. Surrounding spaces are trimmed; a blank end is optional. Invalid times, 2400 and identical explicit start/end times are rejected. For a full broker day use 0000–2359; its final minute is included and its effective end is the next 00:00.

ShowMonday through ShowSunday filter the start date. Monday–Friday are enabled by default; Saturday and Sunday are off. An overnight session starting Sunday is therefore absent unless ShowSunday is enabled. For several schedules use unique independent names, such as ForexBestRobots-Session-A and ForexBestRobots-Session-B; empty, duplicate or nested object namespaces are rejected.

BarsToScan=1000 limits the chart history examined. Zero uses all available history and can be expensive. Sessions starting before the retained window are omitted to avoid a clipped range. No missing quotes are invented. A new chart candle or a history reset rebuilds the selected window; ticks update the active session.

Settings and platform differences

MT4 exposes 28 functional inputs; MT5 exposes 26. The four Comment_ inputs are separators. CandleColorBullish and CandleColorBearish are MT4-only; MT5 candle styling is controlled through its Colors tab. The table includes both. IndicatorName must be nonempty, unique, without spaces and at most 40 characters. LineThickness accepts 1–5 for vertical lines; box borders use width 1. Use an intraday chart: D1 and higher are rejected.

InputDefaultPractical meaning
IndicatorName"ForexBestRobots-TST"Unique instance name and object namespace; empty, conflicting or nested names are rejected.
DrawCandlesfalseTrue draws candle overlays; false uses a line or box according to the end input.
TimeLineStart"0000"Broker-clock start time; default midnight.
TimeLineEnd""Optional broker-clock end. Blank selects line mode unless DrawCandles is true.
ShowMondaytrueEnable sessions starting on Monday.
ShowTuesdaytrueEnable sessions starting on Tuesday.
ShowWednesdaytrueEnable sessions starting on Wednesday.
ShowThursdaytrueEnable sessions starting on Thursday.
ShowFridaytrueEnable sessions starting on Friday.
ShowSaturdayfalseEnable Saturday start dates; off by default.
ShowSundayfalseEnable Sunday start dates; off by default.
BarsToScan1000Maximum chart bars; 0 means all available history.
ShowFutureSessiontrueProject vertical-line schedules up to 30 calendar dates ahead; not future boxes.
SessionLabel""Optional text above the session; also used in notification messages.
ShowRangefalseShow rounded session range in terminal points.
LineColorclrLightGrayVertical-line and text-label color.
LineThickness5Vertical-line width 1–5; box borders remain width 1.
CandleColorBullishclrLimeGreenMT4 only: bullish candle-overlay color.
CandleColorBearishclrRedMT4 only: bearish candle-overlay color.
AreaBorderColorclrDarkGrayBox outline color; clrNONE hides the border.
AreaFillColorclrSlateGrayBox background color; clrNONE hides the fill.
NotifyOnSessionStartfalseEnable start-boundary events; off by default.
NotifyOnSessionEndfalseEnable end events when an explicit end is configured.
SendAlerttruePopup channel; requires an event switch.
SendAppfalseMobile push channel; requires terminal setup.
SendEmailfalseEmail channel; requires terminal setup.
SendSoundfalseEnable the sound channel.
SoundFile"alert.wav"Sound file available to the terminal, such as alert.wav.

Notifications and practical use

Notifications require NotifyOnSessionStart or NotifyOnSessionEnd plus an enabled delivery channel. Both event switches default to false. SendAlert=true alone does not send anything. End notifications require an explicit end time; a blank-end line or candle session has no end notification.

The first calculation and history resets are silent. Boundaries are checked when a new chart bar arrives, even if the terminal’s bar count has reached its cap. A 09:30 boundary on H1 may therefore notify at the 10:00 bar. There is no timer; without quotes there is no new-bar event. Gaps longer than 24 hours do not replay missed notifications.

Overnight end alerts use the starting weekday. Start and end are deduplicated separately, so both can be reported when a coarse candle crosses both boundaries. Messages identify the indicator, symbol, timeframe and boundary time without account identity. Configure email, mobile push and sound in the terminal; failed delivery is not retried on every tick.

Install and compile the source

  1. Download and extract the ZIP for your desktop platform.
  2. In MetaTrader open File → Open Data Folder, then MQL4 or MQL5.
  3. Copy the ZIP’s Indicators and Files folders there. Keep upstream separately as the original reference.
  4. Open Trading_Session_Time_ForexBestRobots.mq4 or .mq5 in the matching MetaEditor, press F7 and inspect errors or warnings.
  5. Refresh Navigator → Indicators and attach the compiled program to an intraday demo Forex chart.
  6. Set broker-clock hours, weekdays, display mode and a unique IndicatorName; start with a finite BarsToScan and notifications off.

No DLL imports or extra include files are required. A desktop custom indicator cannot be installed directly into the MetaTrader mobile app.

Download Trading Session Time free

Each platform ZIP contains the marked MQ4/MQ5 source, required icon in Files, the unchanged original source, Apache 2.0 license, author notices, changes, a patch, checksums and instructions in all 12 site languages. Keep upstream as a reference copy.

There is no ready EX4 or EX5 executable. We reviewed the source and checked extracted scheduling, parsing, window-selection and range helpers outside MetaTrader. We did not compile or run this derivative in native MT4/MT5. Compile in the matching MetaEditor, inspect the result and test on a demo chart.

Free source ZIP · ForexBestRobots edition 1.06 · Compile in MetaEditor

History, changing ranges and limits

A session box is an observation aid, not a buy/sell signal. Seeing a large range after a session ends does not show that it was predictable or profitable. The figures do not model spreads, commission, slippage, stops or order execution.

The active box can expand as new extremes arrive. Closed-session boxes can change after the broker corrects history. Whole-bar OHLC on a coarse or misaligned timeframe can include prices outside an exact minute boundary. Future lines are schedule markers, not price forecasts or an exchange holiday calendar.

This edition redraws the selected window on each new bar for consistent rolling limits. Use a finite scan window and a sensible number of instances on slower terminals. Desktop MetaTrader must remain running for drawing and notifications. C++ checks of extracted logic do not establish native MQL compilation, rendering, broker synchronization or actual notification delivery.

Frequently asked questions

Which clock do the inputs use?

The broker chart’s clock. It is not automatically your local time or UTC; convert the intended schedule manually.

Can a session cross midnight?

Yes. For example 2200–0600 ends the next morning. Its weekday filter is the starting date.

Why are there no notifications?

Enable an event and a channel. Initial calculation is silent; checks need new chart bars and end events need an explicit end.

Can it draw future range boxes?

No. ShowFutureSession projects vertical schedule lines only. Future prices and ranges are unknown.

Is ShowRange measured in pips?

It is rounded terminal points. On five-digit EUR/USD, 10 points equal 1 pip.

Why do MT4 and MT5 candle settings differ?

MT4 has two candle-color inputs; MT5 uses the Colors tab. The two MT4 inputs are absent in MT5.

Is the download ready to run?

It contains source, not EX4/EX5. Compile with F7 in the matching desktop MetaEditor; native compilation and runtime have not been verified here.

Sources and review scope

This review follows a pinned EarnForex revision and marked ForexBestRobots changes. The charts and CSV files are our own real-data reconstructions; they do not imply endorsement by the original developer.