Expiry Calendar Marker
Two different kinds of "expiry" matter to traders and neither is well served by a generic MQL4 tool alone. Triple witching - the quarterly simultaneous expiry of stock index futures, index options and stock options - falls on the third Friday of March, June, September and December every year, a fixed calendar rule this indicator computes directly with no external data needed. Instrument-specific futures contract expiries (a given CME contract's last trading day, for example) are not something any generic program can know for every broker and every symbol, so those are read from a plain CSV file the trader maintains themselves, using the same "date,label" convention already used by other calendar-reading tools in this catalogue. Both kinds of date are drawn as dashed vertical lines with a text label, so a trader can see at a glance when volume and volatility around index-linked instruments are likely to spike from forced rebalancing, or when their own tracked contract's rollover is coming up. Notes and limitations Triple witching dates are a calendar rule (third Friday of the quarter month) computed in server time; this indicator does not know or adjust for exchange holidays that might shift an actual settlement date. The custom expiry file is entirely the trader's responsibility to keep current and correct - this tool only draws whatever is in it and performs no validation against a real contract specification. Labels are placed at the current Ask price at draw time and will not track price afterward until the next refresh; this is a static timeline marker, not a live-following annotation.
Indicator · MT4 · v1.0 · Free
About Expiry Calendar Marker
Expiry Calendar Marker is an indicator for MetaTrader 4. It has 8 settings, such as Show triple witching, Years ahead and Triple witching color. MQL source code included.
Files in the download: ExpiryCalendarMarker.ex4, ExpiryCalendarMarker.mq4, ExpiryCalendarMarker.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Show triple witching | true | Auto-mark 3rd-Friday quarterly expiry dates |
| Years ahead | 2 | Years ahead (and behind) to compute triple witching for |
| Triple witching color | clrDodgerBlue | Line colour for triple witching dates |
| Show custom file | true | Also read InpFileName for instrument-specific expiries |
| File name | ExpiryCalendarMarker.csv | File in MQL4\Files\ (Date,Label) |
| Custom expiry color | clrGoldenrod | Line colour for file-loaded expiry dates |
| Refresh seconds | 300 | Seconds between file re-read checks |
| Label font size | 8 | Expiry label font size |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 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: MT4 Indicator · MQL4 Source Code