You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Monthly Profit and Loss Calendar Heatmap Renderer in MQL5.
The article presents an MQL5 script that reads closed deals, groups them by date, and renders a calendar grid for daily P&L and trade count. It explains the data model, normalization to midnight, robust week/weekday mapping, diverging and single-hue color scales, and CCanvas-based drawing, plus a verification script and weekday summary. This helps you quickly locate clusters and quiet periods and cross-check findings with logged totals.
A trading account's history report is a list. It tells you what happened, in the order it happened, and it is very good at telling you the total. What it is not good at is telling you the shape of your trading over time. Was last month's drawdown one bad week, or a string of small losses spread evenly across the month? Are Fridays quietly worse than the rest of the week? Did a burst of overtrading on a handful of dates coincide with a losing streak, or was it unrelated? A report answers these questions only if you scroll through it and keep a mental tally. This is exactly the kind of task human vision is bad at, while pattern recognition is good at.
A calendar heatmap reframes the same data as a picture instead of a list. Anyone who has used a version control platform has seen the contributions graph: a grid of small colored squares, one column per week, one row per day of the week, shaded by how much happened on that date. The same layout works for trading performance. Week columns run left to right, weekday rows run top to bottom, and each calendar cell is shaded according to that date's daily P&L. Clusters, streaks, and weekday patterns that would take real effort to extract from a table become visible in a glance.
This article builds an MQL5 script that reads closed deal history. It reduces the data to net profit and trade count per calendar date and renders a calendar heatmap using CCanvas. It also renders a second view of the same grid, colored by trade count instead of P&L, and it prints a weekday-level numerical summary to the Experts tab so that the visual pattern can be checked against exact figures.
It is worth being honest up front about what this tool does and does not do. A calendar heatmap is an exploratory device. It can suggest that Mondays look weaker than other days, or that a losing streak clustered in a particular week, but it cannot tell you whether that pattern is a real, repeatable effect or an artifact of a small sample looked at with the benefit of hindsight. Nothing in this project performs a significance test, and nothing in it should be read as a trading signal. Treat the heatmap the way you would treat a good chart in any other kind of analysis: a tool for asking better questions, not an answer in itself.
Author: Ushana Kevin Iorkumbul