How McGinley Dynamic Is Calculated

Learn how McGinley Dynamic is calculated with inputs and limits.

Direct answer: the McGinley Dynamic update rule

McGinley Dynamic is calculated by updating a moving-average value each new time step using the prior McGinley value and the current price. In its common form, the update can be written as:

McGinley(i) = McGinley(i−1) + (P(i) − McGinley(i−1)) / [N · (P(i)/McGinley(i−1))^4]

Where:

  • i is the current time index (for example, the next candle/bar).
  • P(i) is the selected input price at time i (commonly the close, but it can be another consistent price field).
  • McGinley(i−1) is the previously computed McGinley Dynamic value.
  • N (often called the “period” or “length”) controls responsiveness.
  • ( )^4 means the fourth power.

This definition is a mechanic (a deterministic math update), not a guarantee of trading outcomes.

Mechanism or definition: what the formula is doing

A standard moving average (like a simple moving average) updates with a fixed smoothing factor. McGinley Dynamic instead uses a smoothing step that adapts to how far the price is from the prior average.

In the update rule above:

  • The term (P(i) − McGinley(i−1)) represents the distance between the current price and the prior McGinley value.
  • The denominator N · (P(i)/McGinley(i−1))^4 scales that distance adjustment.

So when P(i) is relatively close to McGinley(i−1), the ratio P(i)/McGinley(i−1) is nearer to 1, and the adaptation effect is smaller. When P(i) is farther away, the ratio departs from 1, and the fourth power amplifies the effect. That makes the update behave like an average that changes its “speed” depending on how stretched the current price is versus the current average.

Parameters and inputs you must choose

To calculate it yourself, you need to define four things:

  1. Time series and time step: Are you computing it on 1-minute bars, 1-hour bars, daily bars, etc.? The sequence must be consistent.
  2. Input price series P(i): Choose one price field (for example, close-to-close). Your choice must be consistent across all i.
  3. N (length/period): Pick a numeric value. Different N values change responsiveness.
  4. Initial value McGinley(0): The formula uses the prior McGinley value, so you need a starting point. Many implementations set the first McGinley value to the first available price or to an initial moving-average estimate; you must mirror whatever method you are trying to replicate.

Evidence or example: a step-by-step calculation with explicit assumptions

Because McGinley Dynamic is deterministic given the inputs, you can verify your understanding by doing one or more updates by hand.

Assume the following (these are example assumptions for demonstration, not market claims):

  • You compute on a discrete time series i = 1, 2, 3, …
  • You use P(i) as the selected price (say, “close”), measured in the same units each step.
  • Choose N = 10.
  • Set an initial value McGinley(0) = P(0).

Now compute the next step, i = 1:

  1. Read P(1).
  2. Take McGinley(0) from the starting rule.
  3. Compute the ratio R = P(1) / McGinley(0).
  4. Compute the denominator D = N · R^4.
  5. Compute the update:
    • McGinley(1) = McGinley(0) + (P(1) − McGinley(0)) / D.

Repeat for i = 2 using the newly computed McGinley(1).

Notes that matter for independent verification

  • Units must be consistent: since you divide P(i) by McGinley(i−1), both must represent the same kind of price measurement.
  • Avoid zeros: if McGinley(i−1) is zero, the ratio and fourth power become undefined. Practical implementations rely on price data that typically stays nonzero, but you should still be aware of this mathematical failure mode.
  • Implementation differences exist: two platforms can show “McGinley Dynamic” but use different conventions (for example, how they initialize the first value, or whether they apply the formula exactly as above). Your independent check should confirm the initialization and N handling.

Limitations and risks: when the calculation can mislead or behave unexpectedly

McGinley Dynamic’s calculation is not a guarantee of quality. Even though the update rule is precise, its use can be limited by modeling assumptions.

1) Sensitivity to choices (inputs and initialization)

Because the formula uses both P(i) and McGinley(i−1), the indicator’s path can change if you:

  • pick a different input price (close vs. typical price),
  • choose a different N, or
  • start from a different McGinley(0).

This is not an error; it’s a consequence of the adaptive formula.

2) Behavior in abrupt moves

The adaptation factor depends on (P(i)/McGinley(i−1))^4. In a sudden regime change where P(i) moves sharply relative to McGinley(i−1), the fourth power can make the denominator change quickly, producing updates that may:

  • lag the new level (still “catching up”), or
  • react in a way that feels non-linear compared with fixed-smoothing averages.

For verification, you can test by recomputing the sequence around a large jump and seeing how much the denominator shifts.

3) Mathematical edge cases

Potential failure modes include:

  • Undefined ratios if McGinley(i−1) is zero.
  • Numerical instability if the implementation uses low precision or if values become extremely large/small.

Even if you never encounter these in typical data, understanding them helps you evaluate an implementation faithfully.

4) Interpretation risk

An indicator value (or its slope) is not automatically a complete explanation of market behavior. McGinley Dynamic is a transformation of your chosen price series into a smoothed adaptive line; it does not by itself identify causality, direction of future prices, or optimal actions.

Verification and next question: how to check you computed it correctly

To verify your own calculation, use a simple reproducible workflow:

  1. Write down your exact formula and confirm it matches the definition you are using (especially the denominator and the exponent).
  2. Record your chosen N, your selected P(i), and your initialization rule for McGinley(0).
  3. Compute the first few steps i = 1, 2, 3 by hand (or in a spreadsheet) and check for consistency with the implementation you want to replicate.
  4. If results differ, compare implementation details first: initialization, indexing, and whether the formula is applied with the same price field.
Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.