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 open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.