Skip to content
All library documents

A EURUSD Expert Advisor Using Closing Clusters and Moving-Average Crosses

Article MQL5 code base

Summary

This Expert Advisor searches the previous 500 closing bars for price levels where closes cluster, then uses a cross of three moving averages of different lengths as a trend-development signal. After detecting a directional trend, it identifies the nearest resistance level and enters when price approaches within 0.005. A configurable threshold sets how many closes at a price level are needed for that level to qualify; the author says 15 worked best for EURUSD.

The description provides the rule outline and the author's chosen EURUSD setting, but no backtest period, performance statistics, risk controls, or evidence for the claimed optimum. It also warns that the system was trained for EURUSD and would need substantial changes for other currency pairs. The entry logic's use of resistance for both buying and selling is not explained in detail, so implementation and interpretation remain underspecified.

Key ideas

  • The Expert Advisor detects potential levels by finding repeated closing prices within the preceding 500 bars.
  • A cross among three moving averages serves as its trend-development signal.
  • It enters near the closest resistance level when price comes within 0.005.
  • The author reports a resistance-strength threshold of 15 for EURUSD but provides no supporting performance data.
  • The system is described as pair-specific and may need substantial adaptation for other currencies.

Tags

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