OPEN-SOURCE SCRIPT
Aggiornato 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.
Note di rilascio
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.
Note di rilascio
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.