# Anchored MA

A Trend concept (MA applications) in the LuxAlgo Library, with 1 indicator implementation.

## What is an Anchored MA?

An anchored moving average starts at a chosen event and averages every bar from that point forward, so its window expands instead of sliding. The anchor can be a session, week or year open, an earnings or news bar, a major swing high or low, or a [breakout](https://www.luxalgo.com/library/concept/breakout/) bar. It answers a different question from a rolling average: not what price has averaged lately, but what price has averaged since this event started mattering.

The best-known anchored average is the anchored VWAP, which weights each bar by its volume much as a rolling [VWMA](https://www.luxalgo.com/library/concept/vwma/) does; the plain anchored MA applies the same expanding-window idea to price alone. Fresh anchors produce a jumpy line, since few bars are in the mean; as bars accumulate, each new one moves the average less, so the line hardens into a slow reference for the entire move since the event.

The arithmetic is a cumulative mean: sum each bar's price since the anchor and divide by the bar count, a lookback that grows by one every bar. The idea generalizes: platforms offer anchored exponential and volume-weighted variants, and tools such as LuxAlgo's Anchored Powered KAMA apply the same anchoring logic to adaptive averages.

The appeal is that the reference comes from the market's story rather than a parameter. A 50-bar average answers what price has done lately with an arbitrary 50; an anchored average answers how price has traded since the event, no length to tune. It is the computed cousin of a [trendline](https://www.luxalgo.com/library/concept/trendline/) drawn from a major low: objective and reproducible where hand-drawn lines drift. The cost is anchor subjectivity: different anchors give different lines, which matter only as far as other participants track something similar.

## How to set up an anchored moving average

Anchored tools need one decision a rolling average never asks for: where history starts.

1. Pick the anchor event: a prominent swing high or low, an earnings gap or news bar, a breakout bar, or a scheduled open such as the year's first session.
2. Apply an anchored MA and set the anchor to that bar; the line begins there and extends right, ignoring everything earlier.
3. Discount the first stretch: with few bars in the mean the line whips around, so many users wait a few dozen bars before treating it as a reference.
4. Re-anchor deliberately when a new event resets the story; on auto-anchoring tools, learn the swing definition, since re-anchoring redraws the whole line.

## How it's calculated

The average price over an expanding window that starts at a chosen anchor bar.

```
N_t = t - a + 1
AMA_t = (1 / N_t) × Σ P_i for i = a to t

  P_i: source price of bar i (commonly close)
  a: index of the anchor bar (session open, swing point, event date)
  t: current bar index
  i: bar index inside the sum
  N_t: number of bars from the anchor through bar t
  AMA_t: anchored moving average at bar t
```

The window grows by one bar each step, so the line reacts less the further it runs from the anchor.

Choosing a new anchor restarts the calculation from that bar.

Weighting each bar by its volume instead yields the anchored VWAP.

## How traders use it

- As an event-relative trend reference: price holding above an average anchored to a major low says the advance has stayed above its own mean, while losing the line says price has slipped below the average of the entire move since the anchor, a caution rather than an automatic reversal signal.
- For dueling anchors: averages anchored at the last significant high and the last significant low bracket the market, and which line price respects is used as a rough control test between the two moves.
- At period opens: anchoring at the day, month, quarter, or year open yields calendar-to-date means that reset on schedule, a calendar-based way to frame trend.
- As a slow mean for pullbacks: the line anchored at a trend's origin becomes a deep-retracement reference, a steadier cousin of rolling [dynamic S/R via MA](https://www.luxalgo.com/library/concept/dynamic-s-r-via-ma/), with reactions judged for continuation.
- In derived constructions: a fast rolling average crossing the anchored line flags recent trade departing from the whole-move mean, kin to [moving average crossovers](https://www.luxalgo.com/library/concept/moving-average-crossovers/), and deviation [envelopes](https://www.luxalgo.com/library/concept/ma-envelope/) around it frame stretch from that mean.

## Anchored MA vs related moving averages

- **SMA** (https://www.luxalgo.com/library/concept/sma/): A simple moving average slides a fixed window: every bar eventually falls out and the line keeps adapting to recent conditions. An anchored MA fixes the start and lets the window grow, so nothing since the event is forgotten; the two agree only in passing, at the moment the expanding window matches the SMA's length.
- **EMA** (https://www.luxalgo.com/library/concept/ema/): An EMA never fully drops history but discounts it geometrically, staying responsive indefinitely. An anchored MA weights all post-anchor bars equally, so its responsiveness decays as bars accumulate, by design. One is built to keep up, the other to settle into a reference.
- **Adaptive-lookback MA** (https://www.luxalgo.com/library/concept/adaptive-lookback-ma/): Adaptive averages also reject a fixed length, but volatility or efficiency measures resize their window continuously. An anchored MA resizes on discrete, human-chosen events: one adapts to market state automatically, the other encodes a judgment about when the regime began.

## FAQ

### Does an anchored moving average repaint?

The average itself does not: once a bar closes, its contribution is fixed, and a manually placed anchor stays put. What can change is the anchor. Tools that auto-anchor to the latest swing point re-anchor when a new swing forms, which makes the whole line jump. Check how the anchor is selected before trusting historical behavior.

### Where should you anchor a moving average?

Anywhere the market plausibly repriced: major swing highs and lows, gap or earnings bars, breakout bars, or scheduled opens (week, month, quarter, year). The anchor is a hypothesis about what participants still care about, and different anchors give different lines, so treat the level as meaningful only if price demonstrably reacts around it.

### Is an anchored MA the same as anchored VWAP?

No. Anchored VWAP weights each bar by traded volume, tracking the average price actually transacted; an anchored MA weights bars equally, tracking average price over time. After heavy-volume events the two start close and drift apart as volume gets lopsided; comparing them shows whether time or participation drives the mean.

### Why does an anchored moving average go flat over time?

Each new bar carries weight one over the number of bars since the anchor, so a year in, a single daily bar barely shifts the line. That hardening is the point, a stable whole-move reference, and the limitation, insensitivity to new conditions. Once the line flattens into irrelevance, the usual response is re-anchoring at a more recent event.

### Is an anchored MA just a very long moving average?

No. A long rolling average still slides, so its window eventually excludes the event you care about, and its length remains arbitrary. An anchored average is pinned: its window always begins at the event. It also differs from a displaced average, which merely shifts an ordinary rolling line sideways without changing the calculation.

### Can averages other than the simple mean be anchored?

Yes. The anchor defines where accumulation restarts, and the reset works for exponential, weighted, volume-weighted, and adaptive averages alike, as anchored EMA, VWAP, and KAMA tools show. Reading any of them comes down to: where is the anchor, and how many bars have hardened the mean since?

## Implementations in the Library

- Anchored Powered KAMA (LuxAlgo): https://www.luxalgo.com/library/indicator/anchored-powered-kama/

## Related concepts

- Moving Average Crossovers: https://www.luxalgo.com/library/concept/moving-average-crossovers/
- MA Slope Filter: https://www.luxalgo.com/library/concept/ma-slope-filter/
- Dynamic S/R Via MA: https://www.luxalgo.com/library/concept/dynamic-s-r-via-ma/
- MA Ribbon: https://www.luxalgo.com/library/concept/ma-ribbon/
- Golden Cross: https://www.luxalgo.com/library/concept/golden-cross/
- Death Cross: https://www.luxalgo.com/library/concept/death-cross/
- Guppy GMMA: https://www.luxalgo.com/library/concept/guppy-gmma/
- Displaced MA: https://www.luxalgo.com/library/concept/displaced-ma/
- MA of MA: https://www.luxalgo.com/library/concept/ma-of-ma/

---

Source: https://www.luxalgo.com/library/concept/anchored-ma/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/