Moving averages

McGinley Dynamic on a Live Gold Chart

The McGinley Dynamic is one line that follows price and changes its own speed as it goes. It lags more while price runs away above it and catches up fast when price falls below it, which on gold shows as a line that trails rallies and snaps onto sell-offs.

Loading the live chart.

Close
–
McGinley Dynamic
–

Open the gold chart

What it shows

Only the McGinley line itself is drawn, with no bands or marks. The line first appears on the candle number equal to Length, because it starts from an ordinary EMA.

How Pravex works it out

  1. Work out a normal EMA of the source over Length. Its first value, on candle number Length, is where the McGinley line begins.
  2. On every later candle, divide the source by the line’s previous value, raise that ratio to the fourth power and multiply by Length. The result is the divisor for this candle.
  3. New line = previous line + (source − previous line) ÷ divisor. When price sits exactly on the line the ratio is 1, so the line closes 1/14 of the gap with the default Length.
  4. Example numbers, not a live price: when the source is 5% above the line, the divisor is about 17.0 at Length 14 and the line creeps up. When the source is 5% below, it is about 11.4 and the line drops quicker.

Settings

SettingDefaultWhat changing it does
Length14Sets the base pace of the line, and how many candles must exist before it first shows. A larger Length makes every step smaller.
SourcecloseThe price that feeds both the starting EMA and every later step. Since the ratio is raised to the fourth power, a source with less spike in it, such as hlc3, keeps the divisor from jumping as much.

How traders read it

It works as a trend line with fewer false crosses than a fixed-length average. Price above a rising line says buyers have held control; price below a falling line says sellers have. Because the line slows in rallies and speeds up in drops, it tends to sit a little under price in an uptrend and stay close to price in a sell-off.

The usual events are price crossing the line and the line itself turning. In a sideways gold session price crosses it often, and waiting for a close beyond the line, or for the slope to change, filters a lot of those out.

Comparing two Lengths, such as 14 and 21, on the same chart shows how much of the line’s behaviour comes from your setting and how much from price.

When it misleads

The line is built step by step from its own last value, so what it shows depends on where the loaded history starts. A big spike candle pushes the ratio far from 1 and the fourth power makes the divisor jump, which can freeze the line just when price has left it furthest behind. In a range it still crosses price over and over. It also gives no band or level, so it says nothing about how far a move may go.

Questions and answers

What is the McGinley Dynamic?

It is a moving average whose speed changes with price. Each step it moves toward price by the gap divided by Length times the price-to-line ratio raised to the fourth power.

How is it different from an EMA?

An EMA closes a fixed share of the gap every candle. The McGinley Dynamic closes a smaller share when price is above the line and a larger one when price is below it.

Why does the McGinley line hang back in a rally?

With price above the line the ratio is over 1, and its fourth power makes the divisor bigger than Length. Each step closes a smaller part of the gap, so the line trails a rising market on purpose.

Why is the McGinley Dynamic slow to start?

Its first value is an ordinary 14 EMA, so nothing shows until the 14th candle. After that every point builds on the one before, so the early stretch depends on where the loaded history begins.

Related: Moving Average Exponential, Kaufman’s Adaptive Moving Average, Simple Moving Average, Hull Moving Average, every indicator.

Not financial advice. Read our disclaimer.

Pro charts. Zero paywalls.

Charts for gold, oil, US indices and crypto, with every tool free to use.

Open the chart

No card, no trial, no upgrade pop-ups.