Anchored Moving Averages - Interactive
Apr 11, 2023

The Anchored Moving Averages - Interactive indicator allows users to plot cumulative moving averages from specific user-defined points in time to identify significant support and resistance levels based on price history.
Usage
The Usage section describes how the script can be used to analyze price trends from specific historical events. Upon adding the indicator to a chart, users are prompted to select three distinct anchor points. These points typically represent significant market events such as swing highs, swing lows, or earnings releases.
- Trend Identification: The indicator calculates a cumulative average from the chosen starting bar. Because the denominator increases with every new bar, the average becomes more stable over time, reflecting the "mean" price since the anchor event.
- Dynamic Support/Resistance: Traders often use these lines as dynamic levels where price may react. If the price remains above an Anchored Moving Average (AMA) started at a major low, the trend since that low is considered bullish.
- Visual Gradient: The script automatically changes the color of the lines based on their current slope. A rising slope indicates strengthening momentum from the anchor point, while a falling slope suggests weakening momentum.
Details
The Anchored Moving Average (AMA) operates similarly to an Anchored VWAP but excludes volume data. This makes it particularly useful for markets or assets where volume data is unavailable, unreliable, or secondary to pure price action.
The calculation uses a cumulative sum of the selected price source (defaulting to HLC3) starting from the user-selected bar index. This sum is then divided by the number of bars elapsed since the anchor point. Unlike standard simple moving averages (SMA) which use a fixed lookback window, the AMA's lookback window expands with every new bar, providing a comprehensive view of the average price since a specific point in time.
Settings
- Start Time 1/2/3: These settings determine the exact timestamp where each of the three moving averages begins its calculation.
- Source: Defines the price data used for the calculation (e.g., Close, HL2, HLC3, OHLC4).
- Bullish Color: Sets the color of the AMA line when the slope is positive (rising).
- Bearish Color: Sets the color of the AMA line when the slope is negative (falling).
FAQ
How do I change the anchor points after the initial setup?
You can modify the anchor points by opening the indicator settings and adjusting the "Start Time" inputs, or by dragging the anchor icons if the platform supports interactive UI elements for timestamps.
What is the advantage of using HLC3 as a source?
HLC3 (the average of High, Low, and Close) provides a more balanced representation of a bar's price action compared to using the Close alone, which can help smooth out volatility in the anchored calculation.
How can I access the Anchored Moving Averages - Interactive indicator?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.