OPEN-SOURCE SCRIPT
CAGR between 2 points

This script lets you measure the Compound Annual Growth Rate between any two points on the chart.
Instead of estimating performance by eye, you can place two interactive points directly on the chart and the indicator will automatically calculate:
* CAGR
* Total return
* Elapsed time in days and years
It also draws a line between both selected points and displays the result on the chart, making it very useful for quickly comparing long term trends, price runs, and historical compounding.
This is especially helpful when analyzing stocks, indices, ETFs, or any asset where understanding the annualized growth rate matters more than just looking at the raw percentage gain.
**Features**
* Select 2 custom points directly on the chart
* Automatic CAGR calculation
* Shows total return
* Shows elapsed time in days and years
* Draws a visual reference line between both points
* Simple and practical for long term chart analysis
**Use cases**
* Measure the annualized return of a stock from a major low to a major high
* Compare different historical uptrends
* Evaluate whether a trend has compounded at an attractive rate
* Analyze long term performance in a cleaner way than using raw return alone
**How to use**
1. Add the indicator to the chart
2. Select the first point
3. Select the second point
4. Read the CAGR, total return, and time elapsed directly on the chart
Instead of estimating performance by eye, you can place two interactive points directly on the chart and the indicator will automatically calculate:
* CAGR
* Total return
* Elapsed time in days and years
It also draws a line between both selected points and displays the result on the chart, making it very useful for quickly comparing long term trends, price runs, and historical compounding.
This is especially helpful when analyzing stocks, indices, ETFs, or any asset where understanding the annualized growth rate matters more than just looking at the raw percentage gain.
**Features**
* Select 2 custom points directly on the chart
* Automatic CAGR calculation
* Shows total return
* Shows elapsed time in days and years
* Draws a visual reference line between both points
* Simple and practical for long term chart analysis
**Use cases**
* Measure the annualized return of a stock from a major low to a major high
* Compare different historical uptrends
* Evaluate whether a trend has compounded at an attractive rate
* Analyze long term performance in a cleaner way than using raw return alone
**How to use**
1. Add the indicator to the chart
2. Select the first point
3. Select the second point
4. Read the CAGR, total return, and time elapsed directly on the chart
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน