Don`t read this thread..Make Money with it. - page 28

Automating Chart Patterns in MQL5 (Part 1): The Multi-Timeframe Swing Structure Engine

Automating Chart Patterns in MQL5 (Part 1): The Multi-Timeframe Swing Structure Engine

Most chart pattern implementations share the same limitation. They detect the shape. They do not detect the context. A head and shoulders pattern found at the top of a confirmed uptrend is a high-probability reversal signal. The same shape found in the middle of a sideways range is noise. A double top after three or more consecutive higher highs is a structural warning. A double top after a single rally leg that barely qualifies as a trend is questionable at best. Every experienced technician knows this distinction. Almost no automated implementation enforces it.
Automating Chart Patterns in MQL5 (Part 1): The Multi-Timeframe Swing Structure Engine
Automating Chart Patterns in MQL5 (Part 1): The Multi-Timeframe Swing Structure Engine
  • 2026.08.25
  • www.mql5.com
This article presents CSwingEngine, a reusable MQL5 class that detects H4 swing highs and lows, labels them HH, LH, HL, or LL, and classifies market structure as trend or range. Swings are always computed on H4, regardless of the attached chart, and each point draws correctly on lower timeframes via native datetime anchoring. The engine exposes a clean interface to query the current trend and retrieve the swing array for context-aware pattern logic.

Automating Trading Strategies in MQL5 (Part 53): Double Top and Double Bottom Reversal Model

Automating Trading Strategies in MQL5 (Part 53): Double Top and Double Bottom Reversal Model

A double top or double bottom is easy to see after the fact but hard to trade in real time: peaks rarely match exactly, the valley or ridge between them can be shallow, and human eyes tend to impose tidy shapes on noisy price action. For algorithmic developers the problem is worse. Without fixed rules the same pattern appears and disappears depending on who drew the neckline, which bars count as pivots, or how lenient the tolerance is. That non-determinism makes signals unreproducible in the Strategy Tester, encourages post-hoc parameter fitting, and defeats robust automation.