Double tops/bottoms look obvious in hindsight but are hard to automate because pivots, necklines, and tolerances are often subjective. This article turns the pattern into a deterministic contract suitable for MT5 Strategy Tester. The MQL5 design confirms swing pivots using a fixed left/right bar window, then pairs two same-type pivots only if their prices match within a tolerance scaled by pattern height. The neckline is strictly the opposite pivot between peaks, with spacing, leg-balance, and optional prior-trend filters to reject noisy shapes. A small state machine manages progression from detection to entry: arm the setup, trigger on a close through the neckline or wait for a retest, then invalidate on extreme breach or timeout. Risk rules are explicit: stop beyond the paired extreme with buffer, targets via measured-move or reward-to-risk, opti... 👉 Read | Freelance | @mql5dev
Open in Telegram
Double tops/bottoms look obvious in hindsight but are hard to automate because pivots…
Views8,050−11%vs avg
Forwards7
Reactions34
Comments—
Views growth
Hours after publication
Show as table
| Hours after publication | Views |
|---|---|
| 0 h | 0 |
| 28 h | 7,200 |
| 45 h | 8,050 |
- After 24 hours7,200
- Total to date8,050
More from MQL5 Algo Trading
- 01Views12.5KForwards5Reactions34Comments—
- 02Views12KForwards6Reactions40Comments—
- 03Views11.3KForwards5Reactions31Comments—
- 04Views11.1KForwards5Reactions29Comments—
- 05Views10.6KForwards4Reactions27Comments—