OPEN-SOURCE SCRIPT
Güncellendi Average Daily % Change by Weekday

📊 Average Daily % Change by Weekday
This script calculates and displays the average daily percentage change for each weekday (Monday through Sunday) based on historical price data. It helps traders analyze which days tend to be bullish or bearish over a selected backtest date range.
✅ Features:
Customizable date range (From Year/Month/Day to To Year/Month/Day)
Calculates average % change for each weekday (Mon–Sun)
Supports assets that trade 7 days (e.g., crypto)
Color-coded outputs (green = positive, red = negative)
Final results shown as a table in the bottom-right corner
Works only on the 1D timeframe (daily)
🧠 How it works:
For each day within the selected date range:
The script calculates the % change as: (Close - Open) / Open * 100
Then, it groups the data by weekday and averages the values
This gives you insight into how each day of the week behaves historically for the current asset.
⚠️ Notes:
This script only works on daily (1D) timeframes.
For most accurate results, use it on assets with long trading history (e.g., BTCUSD).
Designed for educational and statistical analysis purposes.
This script calculates and displays the average daily percentage change for each weekday (Monday through Sunday) based on historical price data. It helps traders analyze which days tend to be bullish or bearish over a selected backtest date range.
✅ Features:
Customizable date range (From Year/Month/Day to To Year/Month/Day)
Calculates average % change for each weekday (Mon–Sun)
Supports assets that trade 7 days (e.g., crypto)
Color-coded outputs (green = positive, red = negative)
Final results shown as a table in the bottom-right corner
Works only on the 1D timeframe (daily)
🧠 How it works:
For each day within the selected date range:
The script calculates the % change as: (Close - Open) / Open * 100
Then, it groups the data by weekday and averages the values
This gives you insight into how each day of the week behaves historically for the current asset.
⚠️ Notes:
This script only works on daily (1D) timeframes.
For most accurate results, use it on assets with long trading history (e.g., BTCUSD).
Designed for educational and statistical analysis purposes.
Sürüm Notları
Update: "Avg Daily % Change by Weekday" Indicator v2- Added input option to enable or disable date range filtering for backtesting flexibility.
- Refactored code to use arrays instead of multiple separate variables, improving efficiency and maintainability.
- Added detailed statistics per weekday: Winrate, Average Winning %, Average Losing %.
- Enhanced summary table with new columns showing count, winrate, average win/loss percentages.
- Changed overlay to true for displaying on price chart.
- Added validation to restrict script usage to daily timeframe only.
- Improved color coding with transparency for better visual clarity.
- Prepared plot of current day average change (commented out by default).
- Added consolidated "ALL" row summarizing statistics across all weekdays.
This update improves analytical depth and usability of the indicator, enabling better weekday performance evaluation.
Sürüm Notları
Update: "Average Daily % Change by Weekday" Indicator v3- Added a new Mode selection input: Choose between "% Change" and absolute "Price Change" (close - open).
- Dynamic unit display: Table columns now automatically adjust units (% or value) based on the selected mode.
- Updated default date range start to year 2010 for better relevance on modern assets.
- Retained enhanced per-day statistics: Winrate, Avg Win, Avg Loss, and summary "ALL" row.
- Improved flexibility for both percentage-based and raw price-based weekday performance analysis.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.