Skip to content
All library documents

Exploring Indicator Buffers to Build Alerts and Check Repainting

Article MQL5 code base

Summary

The document describes a MetaTrader tool for inspecting custom indicators and generating alerts without editing their source. Its Explore mode samples indicator buffers and shows how often each contains values, helping distinguish continuous lines from sparse signal buffers. Users can then select a buffer and configure alerts for a value appearing, a level crossing, a cross between buffers, or a value change. Alerts can use the chart timeframe or a selected higher timeframe, and can be limited to closed bars or evaluated on every tick.

A separate check rereads closed bars and classifies a blank-to-value change as a late signal and a moved or vanished value as a repaint. Examples on RSI, Fractals, and ZigZag illustrate the distinction, alongside sample alert counts and a test with a third-party indicator. These observations cover only the sampled period and configured lookback; they do not guarantee future behavior. The tool cannot interpret what a buffer means or read signals drawn only as chart objects, and alert delivery itself was not tested in the Strategy Tester.

Key ideas

  • Buffer inspection can reveal which indicator outputs behave like continuous lines and which are sparse signals.
  • Alerts can respond to new buffer values, level crossings, crosses between buffers, or value changes.
  • Reading an indicator on a higher timeframe allows its bars and triggers to follow that timeframe.
  • A blank bar that later receives a value is treated as a late signal, while a moved or vanished value is treated as a repaint.
  • Repaint checks are limited to the configured closed-bar lookback and provide observations rather than guarantees.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.