TradingView

Chart CAGR

█ OVERVIEW


This simple script displays in the lower-right corner of the chart the Growth Rate and the Compound Annual Growth Rate (​CAGR) between the open of the chart's first visible bar and the close of its last bar. As you zoom/scroll the chart, calculations will adjust to the chart's bars. You can change the location and colors of the displayed text in the script's settings.

If you need to calculate the ​CAGR between any two points on the chart, see our CAGR Custom Range indicator.



█ FOR Pine Script™ CODERS


Like our Chart VWAP publication, this script calculates on the range of visible bars utilizing the new Pine Script™ functions announced here and the VisibleChart library by PineCoders. It also uses the `cagr()` function from our ta library, which was recently augmented with many new functions.



Look first. Then leap.


Get $15 worth of TradingView Coins for you and a friend: www.tradingview.com/share-your-love/

Read more about the new tools and features we're building for you: www.tradingview.com/blog/en/
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?