OPEN-SOURCE SCRIPT
Average Candle

Average Candle is a custom indicator that plots a synthetic candle built from the average open, high, low, and close of the last X periods, providing a smoother view of price behavior and trend. It helps filter noise by summarizing recent market action into a single, representative **candle** per bar.
1. Introduction
Average Candle calculates the simple moving average of each OHLC component (Open, High, Low, Close) over a user-defined lookback period and renders that as a separate candle on the chart.
This creates a smoothed representation of price that is less affected by short-term volatility while still respecting the overall structure of the market.
By visualizing these averaged candles, traders can better identify underlying direction and momentum without removing the original price bars.
2. Key features
- Uses the average of the last X opens, highs, lows, and closes to build a synthetic candle for each bar, allowing consistent smoothing across all OHLC components.
- Colors the Average Candle bullish or bearish based on whether the average close is above or below the average open, making directional bias visually clear at a glance.
- Can be overlaid on the main chart to compare raw price candles with their averaged counterpart, helping traders distinguish meaningful swings from short-term noise.
3. How to use
- Add the indicator to your chart, choose the desired lookback length (X periods), and tune it according to your trading timeframe and style—for example, shorter lengths for more responsive signals and longer lengths for smoother trends.
- Use the Average Candle to confirm trend direction, detect potential reversals, or validate entries and exits by checking whether price action aligns with the smoothed average structure.
- Combine it with other tools such as support/resistance, volume, or momentum indicators, ensuring it is used as a complementary visualization aid rather than a standalone signal generator.
1. Introduction
Average Candle calculates the simple moving average of each OHLC component (Open, High, Low, Close) over a user-defined lookback period and renders that as a separate candle on the chart.
This creates a smoothed representation of price that is less affected by short-term volatility while still respecting the overall structure of the market.
By visualizing these averaged candles, traders can better identify underlying direction and momentum without removing the original price bars.
2. Key features
- Uses the average of the last X opens, highs, lows, and closes to build a synthetic candle for each bar, allowing consistent smoothing across all OHLC components.
- Colors the Average Candle bullish or bearish based on whether the average close is above or below the average open, making directional bias visually clear at a glance.
- Can be overlaid on the main chart to compare raw price candles with their averaged counterpart, helping traders distinguish meaningful swings from short-term noise.
3. How to use
- Add the indicator to your chart, choose the desired lookback length (X periods), and tune it according to your trading timeframe and style—for example, shorter lengths for more responsive signals and longer lengths for smoother trends.
- Use the Average Candle to confirm trend direction, detect potential reversals, or validate entries and exits by checking whether price action aligns with the smoothed average structure.
- Combine it with other tools such as support/resistance, volume, or momentum indicators, ensuring it is used as a complementary visualization aid rather than a standalone signal generator.
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.
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.
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.