OPEN-SOURCE SCRIPT
Annual Performance Table

Annual Returns Table | Yearly Performance + Sharpe Ratio
A clean, customizable table displayed directly on your chart giving you an instant overview of any asset's yearly performance — stocks, ETFs, crypto, indices, commodities, forex.
What it shows
Annual return (%) for each complete year — incomplete years at the start of history are automatically excluded
Current year YTD performance (marked with *)
Sharpe Ratio per year (calculated from monthly returns, annualized ×√12)
A separate stats panel: Average annual return, Cumulative return, Global Sharpe Ratio, Total years of history
Key features
Works on Daily, Weekly, Monthly and Yearly timeframes
Automatic row wrapping when history is too long to fit on one line
Configurable: max years displayed, years per row, show/hide each row independently
Color coded: green for positive years, red for negative, gradient on Sharpe quality
Fully customizable colors
For informational purposes only. Not financial advice.
A clean, customizable table displayed directly on your chart giving you an instant overview of any asset's yearly performance — stocks, ETFs, crypto, indices, commodities, forex.
What it shows
Annual return (%) for each complete year — incomplete years at the start of history are automatically excluded
Current year YTD performance (marked with *)
Sharpe Ratio per year (calculated from monthly returns, annualized ×√12)
A separate stats panel: Average annual return, Cumulative return, Global Sharpe Ratio, Total years of history
Key features
Works on Daily, Weekly, Monthly and Yearly timeframes
Automatic row wrapping when history is too long to fit on one line
Configurable: max years displayed, years per row, show/hide each row independently
Color coded: green for positive years, red for negative, gradient on Sharpe quality
Fully customizable colors
For informational purposes only. Not financial advice.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.