Loading…

Weekly Extreme Formation Day Study

Traders often carry an unexamined belief about which day of the week tends to form the week's extreme - "the low is usually made Monday" or similar. This script checks that belief against the symbol's own history instead of memory. For every completed weekly bar in the lookback window it reads the weekly high and low, then scans the daily bars inside that same week to find which day's own high or low matches the weekly extreme. The match uses a small point-based tolerance rather than an exact equality test, because a weekly bar is usually but not always a perfect aggregate of its daily bars - a data gap or a mid-week symbol change can leave a rounding difference of a point or two. The still-forming current week is always excluded, since it has not finished and would bias the count toward whatever day "now" happens to be. Results are shown as a percentage table on the chart and in the Experts log, and optionally written to a CSV file for further analysis. Notes and limitations Requires both W1 and D1 history to be loaded for the symbol - if either is short, the study window shrinks accordingly and the script says so rather than silently reporting on less data than requested. A week where no daily bar matches the weekly extreme closely enough (a history gap) is counted separately as "unmatched" rather than guessed at. This is a historical frequency count, not a predictive signal - a weekday having formed more extremes historically does not mean it will keep doing so.

Script · MT5 · v1.0 · Free

About Weekly Extreme Formation Day Study

Weekly Extreme Formation Day Study is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 2 settings, such as Years back and Write csv. MQL source code included.

Files in the download: WeeklyExtremeDayStudy.ex5, WeeklyExtremeDayStudy.mq5, WeeklyExtremeDayStudy.txt.

Settings

SettingDefaultWhat it does
Years back5How many years of weekly history to study
Write csvtrueAlso write a CSV breakdown to MQL5\Files

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria