OPEN-SOURCE SCRIPT

Yearly Percentage Change

122
The "Yearly Percentage Change" indicator analyzes the long-term performance of an asset over the past year (252 trading days). It helps traders identify the strength of an asset at first glance by the color of the drawing.

It calculates two key values:

The percentage change from the closing price 252 days ago (Year-over-Year performance).
The percentage change from the lowest price of the last 252 days.

These values are visualized with colored lines and a performance label.
📊 Features & Benefits

1️⃣ Yearly Percentage Change (YoY)

Compares the current closing price with the closing price from 252 days ago.
Draws a solid line from the previous year’s close to the current price.
Line color indicates market performance:
🔴 Red → Price increased up to 100%.
🟡 Yellow → Price increased between 100% and 200%.
🟢 Green → Price increased more than 200%.

2️⃣ 252-Day Low & Its Performance

Identifies the lowest price in the last 252 days.
Draws a dashed line from this low to the current price.
Line color reflects the performance since the low:
🔴 Red → Price increased up to 100%.
🟡 Yellow → Price increased between 100% and 200%.
🟢 Green → Price increased more than 200%.

3️⃣ Informative Performance Label

Displays two key values:
"YoY" → Percentage change from the closing price 252 days ago.
"Low252" → Percentage change from the lowest price in the past 252 days.
Label color depends on the YoY movement.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน