Loading…

Weekday Volatility Profile Export

Range alone (high minus low) understates a day's real volatility when that day gapped hard from the previous close - the true range also checks the distance from the prior close, the same definition Wilder's ATR is built on. This script reports both figures side by side for every weekday, so it is possible to see whether a weekday's width comes mostly from intraday movement or from gapping in, which matter for different kinds of risk (a wide-range, low-gap day suits a different stop placement than a narrow-range, high-gap day). The scan runs over the most recent D1 bars available for the chosen symbol (capped by an input, so it never silently walks the entire history of an old account). Weekday grouping uses TimeDayOfWeek on each bar's own open time, and results print in trading order (Monday through Friday) with any stray weekend bar reported afterwards - some brokers occasionally post a thin weekend bar around a DST transition, and hiding it would understate how rare it actually is rather than just showing a zero count. Notes and limitations - This is a historical base-rate study, not a live signal generator - it does not place, size or manage trades. - Weekday grouping uses the terminal/broker's own server time, which is not necessarily the trader's local time zone. - A weekday with very few sampled bars (e.g. a stray weekend bar, or a symbol with a short history) can show a noisy average - the count column is printed alongside every average for exactly this reason.

Script · MT5 · v1.0 · Free

About Weekday Volatility Profile Export

Weekday Volatility Profile Export is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Symbol, Max days and Save csv. MQL source code included.

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

Settings

SettingDefaultWhat it does
SymbolSymbol to study, blank = this chart's symbol
Max days2000Most recent D1 bars to include
Save csvtrueWrite the weekday table to a CSV file
DelimiterDelimiterCommaCSV column separator

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: ATR · Trading Sessions · Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria