Automating Gartley Harmonic Pattern Trades with Fibonacci Pivot Rules
Summary
This article describes an MQL5 system for finding bullish and bearish Gartley formations from five successive pivot points, X through D. It defines the pattern with Fibonacci relationships: B retraces about 0.618 of XA, C retraces 0.382 to 0.886 of AB, and D reaches about 0.786 of XA. A configurable left/right bar count identifies pivots, while a tolerance parameter allows deviations from target ratios. Once a pattern is confirmed, the system can plot its legs and labels and place a trade with a stop and multiple take-profit levels.
The document discusses implementation components such as trade controls, pattern locking to avoid acting on an unconfirmed formation, and chart drawing. It says backtesting was conducted, but supplies no readable statistics or report details in the provided text, so the evidence does not establish profitability. Pivot choices, ratio tolerance, market, timeframe, and execution assumptions can all affect signals; the described system is an educational template requiring independent validation and risk controls.
Key ideas
- A Gartley setup is defined by five alternating swing points and specific Fibonacci retracements.
- The B, C, and D points are checked against stated ratios with a configurable tolerance.
- Bullish and bearish versions reverse the sequence of swing highs and lows.
- The system visualizes confirmed patterns and can automate entries, stops, and staged profit targets.
- The article mentions backtesting but provides no results that can be assessed from the text.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.