All indicators

Displaced MA

By LuxAlgoJan 17, 2026

Static chart image

Displaced MA plots an ordinary moving average shifted along the time axis — a 7-period SMA displaced 5 bars forward by default, DiNapoli's 7x5 — with slope coloring, price-cross alerts, and the DiNapoli set as overlays. The math behind a displaced moving average never changes; only the drawing moves, so forward displacement reads today's price against an average finished bars ago, while negative values re-center it over the window it summarizes.

How to Trade the Displaced MA?

  • Pullback to the displaced line: a forward-displaced average holds still while price retraces to it in a trend — the DiNapoli-style pullback reference.
  • Bullish / Bearish Price Cross: closes through the value under the current bar flip the slow regime read; both carry alerts.
  • Slope coloring: the line tints bullish while the underlying average rises and bearish while it falls — the shift moves the drawing, never the math.
  • DiNapoli overlays: enable the 3x3, 7x5, and 25x5 close-based SMAs for the layered thrust, pullback, and context read.

The stretch past the last bar is an intentionally stale yardstick, not a forecast; a back-displaced line has no value under the newest bars — the dashboard says so instead of faking one.

Displaced MA Settings

  • Type (default SMA): the average formula — any of the five can be displaced.
  • Source (default close): series the average is computed on.
  • Length (default 7): the rolling look-back window.
  • Displacement (default 5): bars the plot is shifted — positive rightward, negative leftward.
  • Undisplaced Average (default disabled): overlays the unshifted average for comparison.
  • 3x3 — SMA 3, Displaced 3, 7x5 — SMA 7, Displaced 5, and 25x5 — SMA 25, Displaced 5 (all disabled): the fixed DiNapoli set.
  • Show Dashboard (default enabled): displacement, slope, and price versus the live value.
  • Slope Trend Coloring (default enabled) and Line Width (default 2) shape the line.

Frequently Asked Questions

How is this different from a standard moving average?

The values are identical — a displaced line is a moving average whose plot has been slid sideways. What changes is timing: touches and crossings arrive later under forward displacement, trading whipsaws for lateness.

Does forward displacement predict future prices?

No. The stretch beyond the last bar was computed entirely from past data; it is useful precisely because it ignores the newest bars.

Why does the dashboard show "No Live Value"?

With negative displacement the line is centered over its window, so its newest segment would need averages not yet computable. Crossings and alerts stay silent until a live value exists.

Original indicatorBuilt in-house by LuxAlgo

The Library is free. Quant makes it yours.

Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.