Overview
Shows the live spread and a countdown to the candle close next to price or in a chart corner, and turns the spread red when it is above your limit.
Two numbers matter right before you click: how wide the spread is and how long until the candle closes. This small utility shows both on the chart, updates every second and changes the spread colour when it is wider than your limit, so you do not enter during a spike.
How it works
- Spread is read from the live Ask and Bid:
(Ask - Bid) / Point, rounded to whole points. On 3- and 5-digit symbols it can be shown in pips (points / 10). - If the spread is above
Spread limitpoints, the spread text uses the warning colour. - Time left is the end of the current candle minus the current server time. Monthly candles end at the start of the next month.
- The text refreshes every second from a timer, not only on ticks, so the countdown keeps running in quiet markets. MT5 uses the terminal's trade-server clock; MT4 runs the last tick time forward with the local clock.
- When the countdown passes zero before a new tick arrives, the timer shows "waiting for the next tick".
- Two display modes: next to price (text a few bars to the right of the current candle, at the Bid) or in a corner of the chart.
Inputs
| Input | Default | What it does |
|---|---|---|
| Position | Next to price | Next to price or in a corner |
| Shift bars | 3 | Next to price: bars to the right of the current candle |
| Corner | Right lower | Corner mode: which corner |
| X / Y distance | 10 / 20 | Corner mode: offset in pixels |
| Show in pips | true | Pips on 3/5-digit symbols (false = points) |
| Spread limit | 20 | Points; above this the spread turns to the warning colour |
| Text colour | DarkGray | Normal colour |
| Warning colour | OrangeRed | Spread colour above the limit |
| Font / size | Consolas / 10 | Text style |
How to use it
- In MetaTrader open File > Open Data Folder.
- MT4: copy
FXN_SpreadCandleTimer.mq4intoMQL4/Indicators. MT5: copyFXN_SpreadCandleTimer.mq5intoMQL5/Indicators. - Right-click Indicators in the Navigator and choose Refresh (or restart the terminal). The file compiles on first use; you can also open it in MetaEditor and press Compile.
- Drag the indicator onto a chart and set the inputs.
Set Spread limit to the most you accept for that symbol, for example 20 points (2 pips) for EURUSD on a standard account, or higher for gold and indices. If the text covers candles in "next to price" mode, increase the chart shift (the small triangle at the top of the chart) or switch to corner mode.
Good to know
- The spread shown is the broker's current quote; it can widen quickly around news and the daily rollover.
- In the Strategy Tester the spread is the tester's spread setting.
- It does not place, change or close trades; it only displays information.
- The objects use the prefix
FXN_SCT_and are removed when you remove the indicator.
Trading carries risk. Test on a demo account first; past results do not predict future results.
At a glance
- What it is
- A free Indicator for MetaTrader 5, written in MQL5.
- What it does
- Shows the live spread and a countdown to the candle close next to price or in a chart corner, and turns the spread red when it is above your limit.
- Shared by
- Alex
- Licence
- MIT
- Version
- 1.0 (1 Dec 2026)
- Settings
- 11 inputs
- Lab check
- Compiled with MetaEditor build 6333 for MT5 on 1 Dec 2026: 0 errors, 0 warnings.
- Price
- Free to download
Settings read from the code
| Input | Type | Default | Note |
|---|---|---|---|
| InpPosition | ENUM_SCT_POSITION | SCT_AT_PRICE | Where to show the text |
| InpShiftBars | int | 3 | Next to price: bars to the right of the current bar |
| InpCorner | ENUM_BASE_CORNER | CORNER_RIGHT_LOWER | Corner mode: which corner |
| InpX | int | 10 | Corner mode: horizontal distance in pixels |
| InpY | int | 20 | Corner mode: vertical distance in pixels |
| InpInPips | bool | true | Show pips on 3/5-digit symbols (false = points) |
| InpMaxSpread | int | 20 | Spread limit in points (colour changes above it) |
| InpColor | color | clrDarkGray | Normal text colour |
| InpHighColor | color | clrOrangeRed | Spread colour above the limit |
| InpFont | string | Consolas | Font name |
| InpFontSize | int | 10 | Font size |
How to use it
- Download the compiled file (or the source and compile it in MetaEditor).
- Put it in MetaTrader: File → Open Data Folder → MQL5 → Indicators, then refresh the Navigator.
- Test it on a demo account before any real money.
- Want changes? Open a copy in your Lab and ask for them in plain words.