OPEN-SOURCE SCRIPT
Adaptive Centric Moving Average [LuxAlgo]

The Adaptive Centric Moving Average indicator provides a dynamic smoothing tool that adjusts its reactivity based on where the price sits relative to its recent trading range midpoint.
🔶 USAGE
The Adaptive Centric Moving Average (AMA) is designed to filter out noise during periods of consolidation while remaining highly responsive during trending moves. When the price is near the center of its recent high-low range, the indicator becomes flatter and less prone to "whipsaws." As price moves toward the extremes of its range, the indicator accelerates to catch the emerging trend.
Users can utilize the AMA for trend identification and trailing stop-loss levels. The visual gradient fill between the source price and the AMA line helps traders quickly identify the current trend strength and the distance between price and the smoothed average.
🔶 DETAILS
The core logic of the script relies on a normalized relative position (similar to a Stochastic calculation) to determine how far the price is from its range midpoint.
🔹 Adaptive Smoothing Logic
The indicator calculates a smoothing factor (alpha) based on the absolute distance from the 50% level of the range.
🔹 The Centric Calculation
Unlike standard moving averages that track the source price directly, this indicator centers its target around the range midpoint. The Attenuation Factor scales the distance between the source and the midpoint, while the Power Factor applies an exponent to the smoothing factor, allowing for non-linear reactivity.
🔶 SETTINGS
🔹 Price Settings
🔹 Adaptive Settings
🔹 Colors
🔶 USAGE
The Adaptive Centric Moving Average (AMA) is designed to filter out noise during periods of consolidation while remaining highly responsive during trending moves. When the price is near the center of its recent high-low range, the indicator becomes flatter and less prone to "whipsaws." As price moves toward the extremes of its range, the indicator accelerates to catch the emerging trend.
Users can utilize the AMA for trend identification and trailing stop-loss levels. The visual gradient fill between the source price and the AMA line helps traders quickly identify the current trend strength and the distance between price and the smoothed average.
🔶 DETAILS
The core logic of the script relies on a normalized relative position (similar to a Stochastic calculation) to determine how far the price is from its range midpoint.
🔹 Adaptive Smoothing Logic
The indicator calculates a smoothing factor (alpha) based on the absolute distance from the 50% level of the range.
- When price is at the midpoint (50%), the alpha is zero, causing the moving average to stay flat.
- As price moves toward the upper or lower boundaries (0% or 100%), the alpha increases, making the average more reactive.
🔹 The Centric Calculation
Unlike standard moving averages that track the source price directly, this indicator centers its target around the range midpoint. The Attenuation Factor scales the distance between the source and the midpoint, while the Power Factor applies an exponent to the smoothing factor, allowing for non-linear reactivity.
🔶 SETTINGS
🔹 Price Settings
- Source: The price series used for calculations (default is Close).
- Length: The window size used for pre-smoothing the source and determining the highest highs and lowest lows for the range.
🔹 Adaptive Settings
- Attenuation Factor: Controls the intensity of the price input relative to the midpoint. Lower values increase reactivity, while higher values provide a more stable, base smoothing speed.
- Power Factor: Exponents the smoothing factor. Higher values make the moving average significantly flatter when the price is near the range midpoint, requiring stronger moves to trigger a reaction.
🔹 Colors
- AMA Color: The color of the main Adaptive Centric Moving Average line.
- Bullish Fill: The color used for the gradient fill when the price is above the AMA.
- Bearish Fill: The color used for the gradient fill when the price is below the AMA.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Build your own edge with AI: luxalgo.com
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Build your own edge with AI: luxalgo.com
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.