Loading…

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

SettingDefaultWhat it does
Show triple witchingtrueAuto-mark 3rd-Friday quarterly expiry dates
Years ahead2Years ahead (and behind) to compute triple witching for
Triple witching colorclrDodgerBlueLine colour for triple witching dates
Show custom filetrueAlso read InpFileName for instrument-specific expiries
File nameExpiryCalendarMarker.csvFile in MQL4\Files\ (Date,Label)
Custom expiry colorclrGoldenrodLine colour for file-loaded expiry dates
Refresh seconds300Seconds between file re-read checks
Label font size8Expiry label font size

How to install

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

Download the PDF guide

Tags: MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria