Multi-Timeframe Double Top and Bottom Detection with Neckline Entries
Summary
The article describes an MQL5 detector for double tops and bottoms that separates higher-timeframe market context from trade timing. A swing engine classifies trend and supplies confirmed swing points on a configurable swing timeframe. The detector checks for two similar highs or lows with one opposing swing between them, a minimum pattern height, and a permitted time span. It uses ATR from the swing timeframe to scale the equality and height thresholds.
A qualifying pattern is locked into a lifecycle: the EA watches for a neckline close on its own chart timeframe, then targets a measured move based on pattern height. The account describes scanning, waiting, and in-trade states, with expiry and safeguards against repeat entries. The article says the MQL5 code was compiled and tested, but supplies no performance results or backtest evidence. Its thresholds are configurable, and the approach depends on swing identification and trend classification; it does not establish that the patterns are profitable across markets or settings.
Key ideas
- The detector first requires an established uptrend for a double top or downtrend for a double bottom on the configured swing timeframe.
- Two same-type confirmed swings qualify only when separated by one opposite swing and sufficiently close in price.
- ATR from the swing timeframe scales both peak tolerance and minimum pattern height.
- The neckline break is checked on the EA chart timeframe, while the target projects the pattern height beyond the neckline.
- A locked pattern is tracked through a state lifecycle to prevent repeat entries and allow expiry.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.