Weekly Composite Overlay
A weekly seasonality view is only useful if "day 3 of the week" means the same thing across every week compared - a naive bar-count alignment breaks the moment a holiday shortens one week, or the chart period does not divide evenly into a trading day. This overlay aligns every prior week's path by ISO weekday (Monday through Friday) combined with a fixed number of evenly spaced intraday anchor points per day, so Wednesday mid-session in one week lines up with Wednesday mid-session in another regardless of exactly how many bars each day happened to produce. Each weekday/anchor slot only draws once at least InpMinWeeksSample prior weeks contributed a sample there, avoiding a composite that looks smooth but is really built from one or two weeks at the sparser end of the sample. The current week is excluded from its own average by definition, matching the point of the overlay: comparing this week against what came before it, not folding it into its own baseline. Notes and limitations - Weekends are excluded entirely from both the current week's line and the composite; only Monday through Friday are scored. - Percent is measured from each week's own Monday open, so it reflects shape across the week rather than absolute price level. - A short week (public holiday, broker downtime) simply contributes fewer weekday slots to the composite that week rather than distorting the alignment of the weeks around it. - This is a read-only observational overlay; it places no orders and sends no alerts.
Indicator · MT5 · v1.0 · Free
About Weekly Composite Overlay
Weekly Composite Overlay is an indicator for MetaTrader 5. It has 5 settings, such as Weeks back, Min weeks sample and Anchors per day. MQL source code included.
Files in the download: WeeklyCompositeOverlay.ex5, WeeklyCompositeOverlay.mq5, WeeklyCompositeOverlay.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Weeks back | 26 | Number of prior weeks averaged into the composite |
| Min weeks sample | 4 | Minimum weeks of data required at a slot before it is drawn |
| Anchors per day | 4 | Sample points per weekday, evenly spaced across the trading day (2-24) |
| Day start hour | 0 | Server-time hour a trading day is considered to start, for anchor spacing |
| Day end hour | 23 | Server-time hour a trading day is considered to end, for anchor spacing |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Trading Sessions · MT5 Indicator · MQL5 Source Code