OPEN-SOURCE SCRIPT
True Average Price

True Average Price
Overview
The indicator plots a single line representing the cumulative average closing price of any symbol you choose. It lets you project a long-term mean onto your active chart, which is useful when your favourite symbol offers limited history but you still want context from an index or data-rich feed.
How It Works
The script retrieves all available historical bars from the selected symbol, sums their closes, counts the bars, and divides the totals to compute the lifetime average. That value is projected onto the chart you are viewing so you can compare current price action to the broader historical mean.
Inputs
Usage Tips
Disclaimer
This indicator is designed as a technical analysis tool and should be used in conjunction with other forms of analysis and proper risk management.
Past performance does not guarantee future results, and traders should thoroughly test any strategy before implementing it with real capital.
Overview
The indicator plots a single line representing the cumulative average closing price of any symbol you choose. It lets you project a long-term mean onto your active chart, which is useful when your favourite symbol offers limited history but you still want context from an index or data-rich feed.
How It Works
The script retrieves all available historical bars from the selected symbol, sums their closes, counts the bars, and divides the totals to compute the lifetime average. That value is projected onto the chart you are viewing so you can compare current price action to the broader historical mean.
Inputs
- *Use Symbol: Toggle on to select an alternate symbol; leave off to default to the current chart.
 *Symbol: Pick the data source used for the average when the toggle is enabled.
 *Line Color: Choose the display color of the average line.
 *Line Width: Adjust the thickness of the plotted line.
Usage Tips
- *Apply the indicator to exchanges with shallow history while sourcing the average from a complete index (e.g., BTCUSD for crypto pairs). 
 *Experiment with different symbols to understand how alternative data feeds influence the baseline level.
Disclaimer
This indicator is designed as a technical analysis tool and should be used in conjunction with other forms of analysis and proper risk management.
Past performance does not guarantee future results, and traders should thoroughly test any strategy before implementing it with real capital.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.