OPEN-SOURCE SCRIPT

Anchored Cumulative Average

110
Anchored Cumulative Price Average
Overview


The Anchored Cumulative Price Average plots the arithmetic mean of price values calculated from a user-defined start date and time.
Instead of using a fixed lookback length, the average continuously incorporates every completed candle since the anchor point, producing a stable reference level that evolves as new data becomes available.

The indicator supports custom source selection, optional higher-timeframe calculation, and an optional High / Low average mode, making it suitable for contextual market analysis across multiple time horizons.

How It Works

• A start date and time define the anchor point.

• From that moment forward, the script accumulates price values and divides them by the total number of candles included.

• The result is a cumulative (since-anchor) average, not a rolling moving average.

• When a higher timeframe is selected, calculations are performed only when a new HTF candle completes, ensuring consistent aggregation.

This approach creates an average that reflects the market’s mean price relative to a specific event, session, or structural point.

Inputs

Calculation Timeframe
Choose the timeframe used for the calculation. Leaving this empty uses the chart timeframe.

Start Date / Time
Defines the anchor point from which the average begins.

Source
Select the price input used for the average:
• Close, Open, High, Low
• HL2, HLC3, OHLC4
• High & Low (plots separate averages for highs and lows)

How to Use

• Anchor the indicator to a session open, swing point, news event, or structural shift.

• Observe how price interacts with the cumulative average as more data is added.

• Use the High & Low mode to visualize mean price boundaries instead of a single central line.

• Apply a higher timeframe to view broader contextual averages while remaining on a lower-timeframe chart.

Common Use Cases

• Contextual reference for mean price since a specific date or event

• Market structure and balance analysis

• Session-based or event-anchored price evaluation

• Multi-timeframe alignment and bias assessment

• Visual support tool alongside discretionary analysis

Notes

• This indicator does not predict price or generate trade signals.

• It is designed as a contextual analysis tool and should be used in conjunction with other forms of market analysis.

• The plotted values will change as new candles form after the anchor point.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.