Candle Timer Countdown is an indicator for MetaTrader 5 that shows how much time is left until the current candle closes. The timer is updated every second, even when no new tick arrives, and follows the broker's server time. It is an indicator only: it never opens, closes or changes orders.
What it shows
- Time left until the current candle closes: mm:ss under one hour, h:mm:ss under one day, and days plus hh:mm on long periods (D1, W1, MN).
- Market closed instead of the time when the symbol is outside its trading session, according to the broker's session table.
- Optional: the symbol, the timeframe, the daily % change (with sign, e.g. +0.35%) and your own text before the timer. Example: EURUSD M5 03:27 +0.35%.
How to add it to the chart
Open the Navigator window (Ctrl+N), expand Indicators and then Market, and drag Candle Timer Countdown onto the chart (or double-click it). In the window that opens, the settings are in the Inputs tab, in four groups: Display, Font, Colors and Alert before the candle closes. Click OK. It works on any symbol and any timeframe, and also in the Strategy Tester. Like every custom indicator, it runs on MetaTrader 5 for desktop (or on a VPS), not on the mobile apps.
Display
- Position (Top right corner): where the timer is drawn: Top right corner, Top left corner, Bottom right corner, Bottom left corner, Top center, Bottom center or Next to the current price. With Next to the current price, the timer follows the price, a little to the right of the current candle.
- Horizontal distance (pixels) (10): distance from the side of the chart. In the center positions it shifts the timer from the center (positive values to the right). Not used with Next to the current price.
- Vertical distance (pixels) (20): distance from the top or bottom edge of the chart. Not used with Next to the current price.
- Click and drag with the mouse (position is remembered) (true): lets you move the timer with the mouse (see below).
- Show symbol (false): adds the symbol name before the timer.
- Show timeframe (false): adds the timeframe (M1, M5, H1...) before the timer.
- Show daily % change (true): adds the daily % change of the symbol after the timer.
- Text before the timer (empty): your own text, e.g. Close in:. It is hidden while the market is closed.
Font
- Font name (Verdana): any font installed in Windows, e.g. Arial or Consolas.
- Font size (10): text size; the minimum is 6.
- Bold (false): bold text.
Colors
- Color mode (Automatic (contrast with the chart background)): Automatic (contrast with the chart background): light text on dark backgrounds and dark text on light backgrounds; it follows when you change the chart background. Fixed color: always the Fixed color. Candle direction (up / down): Up candle color while the price is at or above the open of the current candle, Down candle color while it is below.
- Fixed color (DodgerBlue): color used in the Fixed color mode.
- Up candle color (MediumSeaGreen): color for a rising current candle in the Candle direction mode.
- Down candle color (Tomato): color for a falling current candle in the Candle direction mode.
- Warning color in the last seconds (0 = off) (10): in the last seconds of each candle the timer switches to the Warning color, whatever the color mode. 0 turns it off.
- Warning color (Orange): color of the last seconds.
Moving the timer with the mouse
With Click and drag with the mouse (position is remembered) = true, press the mouse button on the timer and drag it: there is no need to select the object first, and the chart does not scroll while you drag. When you release the button, the position is saved and kept when you change the timeframe, change the inputs or restart the terminal. To go back to the distances of the inputs, remove the indicator from the chart and add it again, or set this input to false. Dragging is not available with Next to the current price.
Alert before the candle closes
The indicator can warn you a few seconds before the candle closes. The alert is off by default.
- Seconds before the close (0 = off) (0): for example 10: the alert is given once per candle, when 10 seconds or less are left. Only while the market is open.
- Popup (true): shows the MetaTrader alert window with a message such as EURUSD M5: candle closes in 10 s.
- Sound (false): plays a sound file.
- Sound file (MQL5\Sounds or terminal Sounds) (alert.wav): name of a .wav file from the MQL5\Sounds folder or from the Sounds folder of the terminal.
- Push notification (false): sends the same message to MetaTrader on your phone. Set your MetaQuotes ID first in Tools > Options > Notifications. Not sent in the Strategy Tester.
Tips and frequent questions
- Why does it show Market closed? The symbol is outside its trading session according to the broker. The timer returns by itself when the session opens.
- The time does not match my computer clock. The timer counts to the close of the candle on the broker's server, so it is correct even if your computer is in another time zone.
- Several charts: each chart has its own timer, with its own settings and its own saved position.
- Text too small on a high-resolution screen: raise Font size or turn on Bold.
Download
Questions and suggestions: send me a private message through my MQL5 profile.
Trading involves risk of loss. The indicator shows market information; it does not forecast prices or guarantee results.


