Loading…

Month In Review Page

A monthly trading journal usually means either a spreadsheet tab per month or a wall of numbers pasted into a notes app. This script generates one HTML file per month instead: trade count, win rate, net P/L, profit factor, average win/loss, largest win/loss and expectancy laid out as headline stat cards, with an inline SVG sparkline of the month's running equity underneath, all in a single file with no external assets, so it opens in any browser and can be archived or emailed as-is. The sparkline is built the same way as StandaloneHtmlChart.mq4 elsewhere in this catalogue - a raw SVG polyline with plain numeric coordinates, so there is no text to escape between the MQL4 string literals and the embedded markup. That approach is reimplemented locally in this file rather than shared, since each CodeBase submission must stand alone. Notes and limitations Only market orders (OP_BUY/OP_SELL) that closed within the chosen month (by close time, in the terminal's local/server time) are included - no allowance is made for a trade that opened in one month and closed in the next being split across two pages. The equity sparkline plots the running sum of this month's included trades' P/L only, starting from zero at the first trade of the month - it is a within-month shape, not the account's actual balance curve, and does not account for deposits/withdrawals or trades excluded by the filters. If no closed trades match the chosen month and filters, the script alerts and writes no file, rather than producing an empty or misleading page.

Script · MT4 · v1.0 · Free

About Month In Review Page

Month In Review Page is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Year, Month and Magic filter. MQL source code included.

Files in the download: MonthInReviewPage.mq4, MonthInReviewPage.txt.

Settings

SettingDefaultWhat it does
Year0Year to review (0 = current year)
Month0Month to review, 1-12 (0 = current month)
Magic filter-1Magic number filter (-1 = every magic)
Symbol filterSymbol filter ("" = every symbol)
File nameOutput file ("" = auto name from year/month)

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 → Scripts.
  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 script onto a chart to run it once.

Download the PDF guide

Tags: Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria