OPEN-SOURCE SCRIPT
تم تحديثه Seasonality

This is my attempt to bring an open source Seasonality indicator to TradingView.
There are still outstanding issues I couldn't figure out, so I am hoping some more seasoned Pine Script coders can take the lead from here.
What is Seasonality: https://www.investopedia.com/terms/s/seasonality.asp
How to Use
Known Issues
Areas for Improvement
There are still outstanding issues I couldn't figure out, so I am hoping some more seasoned Pine Script coders can take the lead from here.
What is Seasonality: https://www.investopedia.com/terms/s/seasonality.asp
How to Use
- The indicator plots the avg % change per bar for all complete years, up to 20 years back.
- It will only show in the daily resolution.
- For charts with more data, you need to scroll back a bit to get the line to display.
- Use Offset Adjust in the menu for charts that do not align perfectly to the start of the year.
- Use Smoothing in the menu to apply an EMA to the line.
- The panel shows YTD % gain, 5-day rolling seasonality, and 20-day rolling seasonality.
Known Issues
- Does not work for tickers with over 10,000 bars of data.
- Some tickers do not align correctly.
- Only works with tickers that have ~252 bars a year.
Areas for Improvement
- Figure out a way to use barssince() to get the precise amount of bars for each year. This will make the seasonality calculation and automatic offset more accurate.
- Have an option for calendar week, month, and year seasonality.
ملاحظات الأخبار
Cleaned up the script.ملاحظات الأخبار
Cleaned up the code some more so it is easier to read.نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.