Candle Countdown Indicator: A Tag That Rides The Price

Written by Dominic Walsh · Published · Last updated

The candle countdown indicator puts the clock where your eyes already are. Rather than parking a readout in a corner, it pins the timer to the live price on the current bar. The tag then rides up and down with the market.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 0
Alerts popup, push notification, sound
Inputs 27

What the Candle Countdown Indicator draws on the chart

A text tag sits at the live price on the newest bar when `InpShowTag` is true.

`InpShowPercent` adds how much of the bar is still open beside the clock.

A filling progress bar shows completion when `InpShowProgress` is true.

Three colours grade the tag as the bar runs down.

Candle countdown indicator price-anchored tag and progress bar on EURUSD H1.
Candle countdown indicator price-anchored tag and progress bar on EURUSD H1.

How the Candle Countdown Indicator calculates its values

Time left, then position

Remaining time is the bar open plus one period, less the server clock. The code then anchors the tag at the live bid and shifts it by `InpTagOffsetPts` `0`, so it tracks price instead of the window.

The bar fills as the candle completes

A track and a fill make the progress bar. Its fill spans the completed share of the period across `InpBarWidth` `168` pixels. So completion reads at a glance without parsing any digits.

The tag flows left by default

`InpTagOnRight` `false` anchors the text to the right of its position, which pushes it left out of the current bar. That keeps it on screen when the chart has no right margin. Flip it if you prefer the margin.

How to read the signals

The tag moves with price, so it never sits in the same place twice.

The percentage and the progress bar say the same thing in two shapes.

`InpTagShiftBars` `0` nudges the tag sideways if it covers the candle.

No plot buffers exist here, so nothing reaches the data window.

Alert channels in this build: popup, push notification and sound, one message per closed bar.

This build warns before the close rather than at it. `EnableAlerts` arrives false and `InpAlertSeconds` `5` sets how early. Turn it on and `EnablePopup` shows the box, with `EnablePushNotify` and `EnableSound` as the other two routes. This build offers no mail option.

Every Candle Countdown Indicator input

Core settings

Setting What it does Default
InpTagOnRight Tag text flows right of the bar (needs chart margin). Let the tag flow into the right margin, default `false`. off
InpTagShiftBars Shift the tag sideways (bars, +right / -left). Nudge the tag sideways in bars, default `0`. 0
InpTagOffsetPts Shift the tag vertically (points, +up / -down). Nudge the tag vertically in points, default `0`. 0
InpX Panel X offset (px). 16
InpY Panel Y offset (px) – clears the one-click panel. 120
InpBarHeight Progress bar height (px). Progress bar height in pixels, default `14`. 14

Display settings

Setting What it does Default
InpShowTag Show the price-anchored countdown tag. Show the countdown tag that follows price, default `true`. on
InpTagFontSize Tag font size. Tag text size, default `12`. 12
InpShowPercent Add the % of the bar still open to the tag. Add the percentage still open, default `true`. on
InpShowProgress Show the completion progress bar. Show the filling progress bar, default `true`. on
InpCorner Panel corner (0=UL 1=UR 2=LL 3=LR). 0
InpBarWidth Progress bar width (px). Progress bar width in pixels, default `168`. 168
InpSmallFont Panel header font size. 9
InpFont Font for tag and panel. Consolas
InpPanelBg Panel background. RGB 16,20,28
InpTrackColor Progress track colour. RGB 34,40,52
InpBorderColor Panel border. slate gray
InpHeaderColor Panel header text. gainsboro
ColorFresh More than half the bar left. medium spring green
ColorMid 25-50% of the bar left. gold
ColorUrgent Less than 25% of the bar left. orange red

Alert settings

Setting What it does Default
EnableAlerts Alert shortly before the candle closes. Warn shortly before the candle closes, default `false`. off
InpAlertSeconds Fire the alert this many seconds early. How many seconds early that warning fires, default `5`. 5
EnablePopup (see inputs panel) on
EnablePushNotify (see inputs panel) off
EnableSound (see inputs panel) off
SoundFile (see inputs panel) alert.wav
Candle countdown indicator inputs panel with InpShowTag, InpBarWidth and InpAlertSeconds.
Candle countdown indicator inputs panel with InpShowTag, InpBarWidth and InpAlertSeconds.

Settings that fit your chart

A price-anchored clock helps most when you are watching price closely. EURUSD H1 is the reference chart. On M5 the tag moves constantly, which some traders find distracting. On H4 and daily it barely shifts between glances.

When the Candle Countdown Indicator fails

A tag that follows price can cover the newest candle on a compressed chart.

Server time drives the clock, so it need not match your own.

`EnableAlerts` ships false, so the early warning stays silent until you enable it.

Copy the compiled Candle Countdown Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Background reading on the method behind the Candle Countdown Indicator: Purchase price adjustment on Wikipedia, Chart Types at StockCharts ChartSchool.

Download the Candle Countdown Indicator for MT4 and MT5

The zip holds the compiled Candle Countdown Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does InpAlertSeconds 5 do?

It fires the warning five seconds before the candle closes rather than at the close itself. That gap is there so you can act on the bar while it still exists. Raise it if five seconds is too tight.

Why does InpTagOnRight ship false?

Because most charts have no right margin, and a tag flowing into empty space would sit off screen. Anchoring right makes the text flow left over the chart instead. Enable it only if you keep a margin.

What does InpShowProgress add?

A bar that fills as the candle completes, which reads faster than digits when you are scanning several charts. It carries no extra information, so switching it off loses nothing but the visual.

How does InpShowTag differ from a corner timer?

The tag is anchored to the live price on the current bar, so it travels with the market and stays in your eye line. A corner readout stays put and needs a separate glance away from price.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Candle Countdown Indicator as one input. Always backtest before trading live.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment