Building a Multi-Chart Condition Scanner in MetaTrader 4
Summary
This document explains a workflow for extending a MetaTrader 4 condition scanner. A new scan is assigned an identifier, then organized into custom indicators, chart and panel indicators, and an include file that returns a value for each tested bar. The result value controls whether a bar is marked and whether its display is green or red. Templates and a saved profile preserve the chart and panel setup for reuse.
The notes emphasize implementation details that affect reliability and speed: custom indicator names must exactly match iCustom references, and an absent indicator may not trigger a warning. A reported panel issue can produce results inconsistent with the displayed chart until a timeframe change forces recalculation. To limit load, the author usually processes a bounded history and uses a timer so the panel does not retest conditions on every tick. The document describes scanner construction and operational caveats, but gives no trading setup, validation results, or evidence that any scanned condition is profitable.
Key ideas
- A new scan can be assembled from custom indicators, chart and panel indicators, and condition logic in an include file.
- Returned integer values can encode both whether a condition was found and how the panel colors its marker.
- Exact custom indicator names matter because incorrect iCustom references may fail silently.
- The author reports a panel recalculation inconsistency that may clear after changing the timeframe.
- Limiting history and scheduling checks with a timer are used to reduce repeated processing.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.