OPEN-SOURCE SCRIPT
Anchored Cumulative Average

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.
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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.