This repository is an article-derived reference project based on the original MQL5 article. It does not claim to reproduce the full original source code unless files are explicitly attached.
## Overview
Reference repository for MQL5 article 22597 describing a refactor of an economic news dashboard from a monolithic chart-object implementation into a modular canvas-based system.
The article presents a four-module architecture:
- core data/state module
- logic module
- rendering module
- interaction module
It also discusses a dual-theme UI, runtime resizing, pixel-based scrolling, collapsible day groups, unit-aware calendar value formatting, live remain/countdown updates, and toast notifications.
## Original Article
- **Article ID:** 22597
- **Title:** MQL5 Economic Calendar Dashboard, Part 11
- **Author:** Allan Munene Mutiiria
- **Publication date:** 2026.05.26
- **Category:** Trading / GUI
- **URL:** https://www.mql5.com/en/articles/22597
## Repository Purpose
This repository is intended as a technical reference/reconstruction project for the article<6C>s architecture and code organization.
Its purpose is to preserve and organize the article-described implementation details for:
- modular MQL5 EA design
- canvas-based dashboard rendering
- economic calendar event visualization
- interaction handling without chart objects
- pre-news trading workflow integration
## Key Concepts
- Canvas-based dashboard rendering with `CCanvas`
- Separation of concerns across `.mqh` modules
- Runtime-resizable layout with width/height bounds
- Pixel-based scrolling with draggable scrollbar thumb
- Proportional table column scaling
- Unit-aware formatting for calendar values
- Relative time formatting for upcoming/released events
- Collapsible day-group row planning
- Hit-testing and hover-code action dispatch
- Crop-based canvas resizing instead of bitmap reallocation
- Timer-driven partial repaint of changing cells
- Trade deduplication using stable calendar event IDs
## Algorithm / Architecture Summary
The article describes an Expert Advisor structured around a thin main entry point and four supporting modules:
1.**Main EA file**
- declares inputs
- embeds CSV resource for tester mode
- includes all modules
- forwards `OnInit`, `OnDeinit`, `OnTick`, `OnChartEvent`, and `OnTimer`
- The repository is article-derived; full compile-ready original source is only supported to the extent of the explicitly attached files listed in the article.
- Some implementation details are described narratively rather than fully reproduced in the processed input.
- The article references additional prior work and shared helpers; not all supporting context is included here.
- Build success may depend on the presence and placement of `EconomicCalendar.csv` as described by the article.
- This README does not assume undocumented installation or usage steps beyond what the article states.
## Reference
- Original article: https://www.mql5.com/en/articles/22597