Alert and Repaint Check for Any Indicator
- Utilità
-
Ayaz
MQL5 developer working on automated trading systems — Expert Advisors, custom indicators, and TradingView-to-MT5 conversions. - Versione: 1.0
Point it at any indicator you already have, by file name, and it will alert you on that indicator's own buffers. It needs no source code: a compiled .ex5 you downloaded is enough. It can also read that indicator from a higher timeframe, and it re-reads closed bars to tell you whether the indicator repaints or merely lags.
This is free.
The problem it solves
Two of the longest running threads on the MQL5 forum are about putting alerts on indicators and about reading them from a higher timeframe. The answer has always been the same: get the source, edit it, recompile. That does not help when you only have an .ex5, and it does not scale when you use several indicators.
This does the job from outside. iCustom can load any indicator by name and read its buffers without its source, so one tool serves all of them.
EXPLORE mode answers the hard question first
The reason most traders never use iCustom is that it asks for a buffer number, and nothing tells you which number holds the arrow you can see on the chart. So the default mode answers that. It probes the buffers, counts what is in each one, and prints them beside the last bars. This is a real run on a live chart watching the standard RSI:
Buffers found: 3 (checked up to 16, on XAUUSDm PERIOD_H1)
buffer values zeros blank what it looks like range of the values
0 12 0 0 a line - a value on almost every bar 31.47608 .. 55.28984
1 12 0 0 a line - a value on almost every bar 4.11585 .. 6.11288
2 12 0 0 a line - a value on almost every bar 3.86003 .. 8.96028
bar time buf0 buf1 buf2
0 2026.09.04 20:00 45.61107 5.40493 6.44511
1 2026.09.04 19:00 46.88624 5.82069 6.59381
2 2026.09.04 18:00 43.33095 5.42967 7.10102 All three are lines there, which is what RSI is. On an arrow or signal indicator the table looks different, and that difference is the whole point:
buffer values zeros blank what it looks like range of the values
0 0 0 8 nothing here on these bars -
11 8 0 0 a line - a value on almost every bar 16.08798 .. 16.25192
14 7 1 0 sparse - looks like a signal 4166.06000 .. 4166.06000 Buffer 14 is the one to watch there. It is empty on most bars and carries a price only where the indicator marked something, so "a value appears" is the trigger for it. Buffer 11 is an internal line and buffer 0 holds nothing on these bars at all.
Late values and repaints are counted apart
Every closed bar's value is kept and read again on each new bar. When a closed bar has changed there are two very different reasons why.
A late value. The bar was blank and now holds a value, because the indicator needed later bars before it could mark this one. Fractals work this way by design, and so do most swing and structure markers. It is not deceit, but the signal was never visible on the bar it points at.
A repaint. A value that was there has moved or vanished. Something you could have acted on is gone.
Both are reported with the bar time, the old value and the new one, and the chart comment keeps a running count of each. Nothing is inferred from the forming bar, because the forming bar changing is normal.
Tested rather than asserted. On XAUUSD H1, 299 bars, 1 to 20 August 2026, watching buffer 0 of each:
| Watched indicator | Late values | Repaints |
| Examples\Fractals, marks a bar two bars after it closes | 40 | 0 |
| Examples\ZigZag, redraws its last leg by design | 0 | 83 |
| Examples\RSI, settled once a bar closes | 0 | 0 |
So it says "late" about an indicator that lags, "repaint" about one that repaints, and nothing about one that does neither.
Triggers
A value appears on a bar, whether on the bar that just closed or on an earlier bar a lagging indicator has only now marked; a cross above or below a level; one buffer crossing another in either direction; or simply the value changing. Alerts go to a popup, a sound, a push notification or email, one per bar. Closed bars are judged by default; turn that off and the forming bar is judged on every tick, which alerts sooner and can reverse.
A higher timeframe
Set "Read it on this timeframe" and the watched indicator is loaded on that timeframe instead of the chart's. Bars, triggers and the repaint check all follow it. On the test data, RSI read from H4 on an H1 chart produced one alert per H4 bar, 77 of them, each stamped PERIOD_H4.
Two worked examples
Example 1. Tell me when RSI crosses above 70. You know this indicator, so EXPLORE is only a check.
| Input | Value |
| Indicator file | Examples\RSI |
| Its inputs | 14 |
| Read it on this timeframe | Current timeframe |
| Mode | WATCH |
| Buffer to watch | 0 |
| Trigger | buffer crosses above Level |
| Level | 70 |
| Popup alert | true |
On the test data that produced four alerts, at 75.04, 76.31, 70.38 and 74.83. To get the same thing from the four hour chart while you sit on the one hour, set "Read it on this timeframe" to H4 and change nothing else.
Example 2. An arrow indicator you downloaded and have no source for. Here EXPLORE is doing the real work.
- Attach with Mode on EXPLORE and "Indicator file" set to that indicator's name. Leave "Its inputs" blank to use its own defaults.
- Open Toolbox, Experts tab, and find the buffer that is sparse: empty on most bars, a value where you can see an arrow on the chart. Say it is buffer 2.
- Attach it again with Mode on WATCH, Buffer to watch 2, Trigger "a value appears", and Push notification on.
- If EXPLORE printed the note about a buffer being mostly exact zeros, switch on "This indicator writes 0 where it means nothing" and read the table again before choosing.
What each input does
| Input | What it does |
| Indicator file | Path under MQL5\Indicators, without the extension, for example Examples\RSI or MyFolder\MyArrows. It starts empty on purpose, because no indicator is certain to exist on every terminal, and nothing happens until you fill it in. |
| Its inputs | The watched indicator's own inputs, comma separated, in the order it declares them. Blank means use its defaults. Whole numbers are passed as int, numbers with a point as double, true and false as bool, anything else as text. The log prints back what it decided so you can check. |
| Read it on this timeframe | Load the watched indicator on this timeframe instead of the chart's. Current timeframe means the chart's own. |
| This indicator writes 0 where it means "nothing" | Treat an exact 0 as empty. Needed for indicators like ZigZag. EXPLORE tells you when it is worth switching on. |
| Mode | EXPLORE lists the buffers and alerts nothing. WATCH alerts on the buffer you chose. |
| How many buffers to probe | EXPLORE stops here. Raise it if the note says it hit the limit. |
| How many recent bars to print | How many bars EXPLORE shows and counts. |
| Buffer to watch | The buffer number you read off the EXPLORE table. |
| Second buffer | Only used by the two buffer-cross triggers. |
| Trigger | A value appears, a cross above or below Level, buffer A crossing buffer B either way, or the value simply changing. |
| Level | Only used by the two level-cross triggers. |
| Judge closed bars only | On by default: one judgement when a bar closes, and it cannot reverse. Off means the forming bar is judged on every tick, which alerts sooner but can undo itself. |
| Popup, sound, push, email | How you are told. Any combination. Push needs your MetaQuotes ID set in Tools, Options, Notifications. |
| Re-read closed bars and report changes | Turns the late value and repaint reporting on. |
| How many closed bars to keep watching | How far back the check looks. A change further back than this is not seen. |
| Ignore changes smaller than this | Leave at 0 to catch every change. Raise it if an indicator jitters in the last decimal. |
What it does not do
It reads indicator buffers. An indicator that draws only with chart objects exposes no buffers, and there is nothing here for this tool to read. Nothing outside the indicator can change that.
"No repaint seen over 200 bars" is an observation about those bars, not a guarantee about every bar that will ever form. It is evidence, and better than the claim most indicators ship with, but it is not a proof. The check covers the number of closed bars you set; a change further back than that is not seen.
It cannot tell you what a buffer means. It will show you that buffer 3 holds 1.0 on fourteen bars; whether that is a buy signal is yours to decide.
An indicator that signals with a value of exactly 0.0 will not trigger "a value appears", because that is the reading of a bar the indicator has not written yet. Signal buffers carry a price or a flag, never 0.0, so in practice this costs nothing, but it is a rule and you should know it.
If the indicator you named cannot be loaded, because of a typo or a file that has not been compiled, this does not detach itself. It says so on the chart and in the Experts log and keeps trying every few seconds, so correcting the name is enough.
How to install and run it
- Attach it to a chart from the Navigator.
- In "Indicator file" type the path of the indicator you want to watch, relative to MQL5\Indicators and without the extension. Examples\RSI is the one to try first. If it takes inputs, list them comma separated in "Its inputs", for example 14.
- Leave Mode on EXPLORE and press OK.
- Press Ctrl+T for the Toolbox and open the Experts tab. The buffer table is there.
- Read the table, set "Buffer to watch", change Mode to WATCH, choose a trigger, and turn on the alerts you want. To read from a higher timeframe, set "Read it on this timeframe" as well.
Written and verified on MetaTrader 5 build 6140. It places no orders and changes nothing on your account.
