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: Heatmap Visualization of Intraday Return Patterns in MQL5 Using CCanvas.
MetaTrader 5 provides no native tool for visualizing intraday return patterns across time dimensions simultaneously. This article implements a custom indicator that aggregates historical bar returns into a 5×24 matrix indexed by weekday and hour of day, then renders the result as a color-interpolated heatmap inside an indicator subwindow using CCanvas. Green cells represent positive average returns, red cells negative, with color intensity encoding return magnitude.
Experienced traders often observe that certain instruments behave differently depending on the time of day and the day of the week. EURUSD tends to exhibit higher volatility during the London-New York overlap. XAUUSD frequently shows directional movement during Asian-session hours. These tendencies are recognizable to practitioners but rarely quantified systematically, because MetaTrader 5 provides no native tool for aggregating and visualizing return distributions across time dimensions simultaneously.
A heatmap solves this problem directly. The heatmap computes the average bar return for each hour-of-day and day-of-week over a configurable lookback period. It then maps these averages to a color-interpolated grid, turning thousands of data points into an interpretable two-dimensional view. A trader can identify at a glance which hour-day combinations have historically produced positive average returns and which have not — without claiming that this information predicts future behavior.
Author: Ushana Kevin Iorkumbul