Skip to content
All library documents

Monitoring External Indicator Buffers for Signal Changes in MQL4

Article MQL5 articles

Summary

This article describes an MQL4 utility that reads an external indicator’s buffers and notifies the trader when a buffer changes between zero and a positive value. It uses indicators that encode a line’s changing state across two buffers, with only one buffer active at a time. The method checks values across the available buffers and compares adjacent bars, beginning at a user-selected bar offset.

The example exposes settings for the external indicator name, scan start, optional vertical line, alert window, chart comment, sound, and custom message. It demonstrates scanning up to eight buffers over a recent range and stopping when a transition is found. This is a notification and chart-annotation technique, not a strategy for deciding whether to trade. The method depends on the target indicator’s buffer conventions and on zero representing inactivity; other indicators may use empty values or different encodings. The article does not report tests across a range of indicators or discuss how to validate buffer mappings.

Key ideas

  • An external indicator’s buffers can be read to detect changes in its plotted state.
  • The example identifies transitions between zero and positive buffer values across adjacent bars.
  • Users can select a scan offset and configure alerts, comments, sounds, and chart markers.
  • The approach assumes the target indicator uses zero to mark an inactive buffer.
  • Buffer monitoring reports indicator events but does not determine whether a trade is appropriate.

Tags

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