ABCD Harmonic Pattern Indicator Access Indicator: AB=CD Legs

Written by Dominic Walsh · Published · Last updated

The abcd harmonic pattern indicator access indicator looks for the simplest harmonic structure there is. Four fractal pivots become A, B, C and D, and the tool asks one question: does the CD leg cover roughly the same distance as AB? When it does, Pattern draws the shape and an arrow marks D.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H4.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 3: Pattern, Buy, Sell
Alerts popup, push notification, email, sound
Inputs 9

What the ABCD Harmonic Pattern Indicator Access Indicator renders

Pattern joins the four pivots into the shape on the chart.

Buy marks point D when the structure completes at a low.

Sell marks it when D completes at a high.

Nothing prints until four alternating fractal pivots exist.

  • Pattern: zigzag, medium orchid, width 2
  • Buy: arrow, lime, width 4, arrow code 233
  • Sell: arrow, red, width 4, arrow code 234
EURUSD H4: the abcd harmonic pattern indicator access indicator marking point D with a Buy arrow.
EURUSD H4: the abcd harmonic pattern indicator access indicator marking point D with a Buy arrow.

Under the hood

Finding the pivots

Depth sets how many bars either side a fractal has to beat. At the default of 6 a pivot needs to be the extreme across a fair stretch, which keeps the count down.

The code collects the four most recent alternating pivots. Because they alternate, the type of the newest one decides whether the structure reads bullish or bearish.

The equal legs test

Two distances get measured: AB as the absolute move between the second and third pivots, and CD as the move between the newest two.

The test divides the difference between them by AB and compares it against Tolerance. So this is a proportional check, which keeps it meaningful whether the legs are twenty pips or two hundred.

Placing the arrow

A structure completing at a low reads bullish and puts the arrow under D. Completing at a high does the reverse.

ArrowOffsetPoints spaces the marker from the candle and plays no part in whether the structure qualifies.

How to read what it shows

This is the equal legs pattern rather than a Fibonacci one. No ratio table is involved.

Point D is where the structure completes, which is after the CD leg has already run.

A wide Tolerance turns loosely similar legs into matches, so the setting decides how strict the shape is.

The pattern redraws when a fresher pivot qualifies, since it always uses the newest four.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

Alerts cover popup, push, email and sound when a structure completes. A bar time check keeps it to one alert per closed bar.

Every ABCD Harmonic Pattern Indicator Access Indicator input

Core settings

Setting What it does Default
Depth Depth is how many bars either side a fractal has to beat. It defaults to 6, and raising it finds fewer, larger structures. 6
Tolerance Tolerance is how far CD may differ from AB, as a fraction of AB. It defaults to 0.25, which is generous. 0.25

Display settings

Setting What it does Default
ArrowOffsetPoints ArrowOffsetPoints is the cosmetic gap between an arrow and point D, 45 points by default. 45

Alert settings

Setting What it does Default
EnableAlerts master toggle. EnableAlerts gates the message block and defaults to true. on
EnablePopup MT4 popup dialog. on
EnablePushNotify mobile MT4 push notification. off
EnableEmail SMTP email (Tools > Options > Email). off
EnableSound play sound file from MT4/Sounds/. off
SoundFile (see inputs panel) alert.wav
Inputs panel for the abcd harmonic pattern indicator access indicator showing Depth and Tolerance.
Inputs panel for the abcd harmonic pattern indicator access indicator showing Depth and Tolerance.

Where this one belongs

The screenshot uses EURUSD H4. Equal legs need swings with room in them, so H1 and above give the fractal scan something real to work with. On M5 a Depth of 6 still qualifies pivots inside ordinary noise and the shapes pile up. Raising Depth is the usual answer on a fast chart.

Limits worth knowing

Tolerance at 0.25 means CD can differ from AB by a quarter and still count. That is a loose definition of equal.

Four pivots define a shape whether or not those swings belong together.

The structure only completes at D, so the move that formed the CD leg has already happened by the time anything prints.

Only the newest four pivots get tested, so an older structure that would have matched drops out silently.

Copy the compiled ABCD Harmonic Pattern Indicator Access Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Background reading on the method behind the ABCD Harmonic Pattern Indicator Access Indicator: Resistance at Investopedia, Direct market access on Wikipedia.

Download the ABCD Harmonic Pattern Indicator Access Indicator for MT4 and MT5

The zip holds the compiled ABCD Harmonic Pattern Indicator Access Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Does Tolerance test Fibonacci ratios or equal legs?

No, and it does not claim to. The only test is whether the CD leg covers roughly the same distance as AB, within Tolerance. That equal legs structure is a genuine harmonic shape in its own right, and it needs no ratio table to identify.

What does Tolerance 0.25 allow in practice?

CD can differ from AB by up to a quarter of AB and still register. On a hundred pip AB leg that means CD anywhere between seventy five and a hundred and twenty five pips. Tightening it towards 0.10 makes the shape far stricter and much rarer.

How does Depth 6 change what counts as a pivot?

A bar has to beat every neighbour within six bars on both sides. That is a demanding test, so it picks out reasonably significant swings rather than every wiggle. Lowering Depth finds many more pivots and produces a much busier chart.

Why does the Pattern shape sometimes redraw?

It always uses the four most recent alternating pivots. When a fresher pivot qualifies it displaces the oldest of the four, so the structure gets rebuilt from the new set and the drawn shape moves with it.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the ABCD Harmonic Pattern Indicator Access Indicator as one input. Always backtest before trading live.

Category: this is part of our Support and Resistance collection. Also, still, yet, hence, browse more Support and Resistance for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment