Guarda come scaricare robot di trading gratuitamente
Ci trovi su Facebook!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Indicatori

Candle Timer Countdown - indicatore per MetaTrader 5

Cristhian Alexander Gaibor Cuasquer
Cristhian Alexander Gaibor Cuasquer
  • Founder & Systems Engineer al  Xander Pro
  • Ecuador
  • 6851
4.9 (30)
Trader e membro di MQL5 dal 2017.
Visualizzazioni:
239
Valutazioni:
(1)
Pubblicato:
Freelance MQL5 Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

A countdown to the close of the current candle on Gold (XAUUSD), EURUSD or any chart, shown next to the price or in a fixed corner. It counts with TimeTradeServer, the broker server clock, so it keeps running when the market is quiet and no ticks arrive.

The format follows the timeframe: minutes and seconds on intraday charts, hours, minutes and seconds from H1, and days plus hours on D1 and above. The current spread can sit beside the timer, and the text changes color in the last seconds of the candle.

An optional pop-up or sound alert fires once per candle, the number of seconds you choose before the close. It is one text object that is created once and rewritten every half second. No canvas, no buffers, nothing else on the chart.

Candle Timer Countdown indicator on a MetaTrader 5 chart showing time left and spread next to the price

Settings

Display

  • Where to show the timer (next to the current price): next to price moves with the bid, or choose a fixed corner of the chart.
  • Corner (right upper), Horizontal offset (10 px) and Vertical offset (30 px): used only in corner mode.
  • Bars to the right of the last candle (2): how far from the last candle the timer sits in price mode.
  • Show the spread (true): current spread in points after the time.
  • Show symbol and timeframe (false): for example EURUSD M15 before the time.
  • Font (Arial), Font size (10), Text color (silver).
  • Text color in the last seconds (orange red) and Last seconds that change the color (10, 0 turns it off).

Alerts

  • Alert this many seconds before the close (0 = off): one alert per candle.
  • Pop-up alert and Sound alert (both false), Sound file (alert.wav).

Indicator settings

  • Object prefix (XP_CTC_): the timer object starts with it, and only that object is removed when you take the indicator off. To show two timers on one chart, for example one next to price and one in a corner, give each copy its own prefix.

What it needs

  • MetaTrader 5, any symbol, any timeframe, any account type. It is an indicator, it does not trade.
  • The time comes from the trade server clock, so the countdown matches the candles of your broker, not the clock of your computer.
  • On weekends and outside the trading session the last candle does not close, so the timer stops at 00:00 until the next candle opens.

Make it yours

Put it on the chart you trade the open of the next candle on: M5 or M15 on XAUUSD, EURUSD, GBPUSD, US30, NAS100 or BTCUSD. Scalpers who wait for a candle close before entering can set the alert to 5 or 10 seconds and stop watching the clock. If you trade Smart Money Concepts or price action, the countdown tells you when a BOS or CHoCH will be confirmed on close. The update routine is short and has no dependencies, so the time-left calculation can go straight into your own EA or panel.

About this code

Open source. Use it as it is, adapt it, build your own version on top of it.

New versions and new tools are announced first on my MQL5 channel: https://www.mql5.com/en/channels/xander

Questions, suggestions and your own backtests are welcome in the Xander Lab group: https://www.mql5.com/en/messages/02eec85e4364dd01

More tools on my profile: https://www.mql5.com/en/users/09151993a

Provided as is, use at your own risk.

Related

Changelog

  • v1.0 - 2026-10-25 - Initial release
Session Boxes Asia London New York Session Boxes Asia London New York

Draws Asia, London and New York session boxes on the chart with each session's high and low.

Close All Positions and Pending Orders Close All Positions and Pending Orders

Closes all open positions and optionally deletes pending orders with one click. Filter by symbol and magic number.

CanvasTabs: a lightweight tab bar for MQL5 based on CCanvas CanvasTabs: a lightweight tab bar for MQL5 based on CCanvas

A lightweight tab bar for chart panels, drawn with the standard CCanvas class. One include file, several independent instances per chart, click selection, resizing and safe cleanup. Includes a demo Expert Advisor.

Awesome Oscillator Pullback EA for EURUSD, +209 Percent in a 2021-2026 Backtest Awesome Oscillator Pullback EA for EURUSD, +209 Percent in a 2021-2026 Backtest

EURUSD EA that trades both directions: when the Awesome Oscillator turns against a weighted moving average filter, it places a stop order at the daily low or high of three days ago, with an ATR stop. Self-contained, no custom indicators. Backtest on EURUSD H1, October 2021 to October 2026: +209% on a 1,000 USD deposit with a fixed 20 USD risk per trade, 15.55% maximum equity drawdown.