Candle Close Countdown
Reads the open time of the bar currently forming and the chart's own period, adds them together to get the scheduled close time, and displays the difference against the current time as H:MM:SS (or MM:SS once under an hour remains). A one-second timer drives the display so it keeps ticking down even between price ticks, which matters most on quiet symbols and higher timeframes where minutes can pass with no new tick at all. The label changes colour inside a configurable warning window before close, so the last few seconds before a bar completes are visually distinct without having to read the number. This is a clock, not a trading signal - there is no pattern here to repaint. The display is meant to change every second; that is its entire purpose. Notes and limitations - The countdown is computed from the bar's scheduled close (open time plus the chart period), not from actual market sessions - across a weekend or holiday gap between Friday's last bar and the next bar's true open, the displayed countdown does not know the market is closed and will read a stale or misleading value until the next real bar arrives. It is meant for continuous trading hours within a session, not for bridging closures. - Uses one chart label object, removed in OnDeinit; nothing is left behind when the indicator is taken off the chart. - Uses no indicator buffers - it has no data series to plot, only a live display, so removing it never leaves stray plot lines either.
Indicator · MT4 · v1.0 · Free
About Candle Close Countdown
Candle Close Countdown is an indicator for MetaTrader 4. It has 7 settings, such as Corner, X distance and Y distance. MQL source code included.
Files in the download: CandleCountdown.ex4, CandleCountdown.mq4, CandleCountdown.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Corner | CORNER_LEFT_UPPER | Chart corner to anchor the label |
| X distance | 10 | Horizontal offset, pixels |
| Y distance | 20 | Vertical offset, pixels |
| Font size | 12 | Font size |
| Normal color | clrWhite | Label colour, normal |
| Warn color | clrOrangeRed | Label colour, inside the warn window |
| Warn seconds | 10 | Switch to warn colour at this many seconds left |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Risk & Lot Size · MT4 Indicator · MQL4 Source Code