Discussing the article: "Building a Session Performance Analytics Dashboard in MQL5"

 

Check out the new article: Building a Session Performance Analytics Dashboard in MQL5.

This article builds an MQL5 dashboard that classifies closed deals into Sydney, Tokyo, London, and New York trading sessions by UTC close time. It computes per-session P&L, win rate, and average hold time, then renders the results as a persistent CCanvas bar chart with an account-wide summary row, alongside an Experts tab summary table. A verification script confirms the classification and metrics logic behaves correctly.

Trading statistics in MetaTrader read like a smooth, undifferentiated feed: time, symbol, and profit for every deal, but no answer to the question many traders actually want to test, which market hours generate profit and which quietly drag results down. A trader testing the hypothesis that a strategy performs well during the London session but suffers overnight in Sydney gets no ready-made breakdown by session from the terminal. This usually ends in exporting history to a spreadsheet, marking rows by UTC hour by hand, and repeating the same routine for every new period reviewed. What is needed instead is a way to read closed deals for a chosen lookback window, assign each one to a trading session by its close time, and aggregate the metrics so every session's contribution shows on one screen.

This article builds a dashboard that removes that manual step. A script reads the terminal's closed-deal history for a configurable lookback window. It classifies each deal into one of four trading sessions based on its UTC close time, computes per-session metrics (net P&L, win rate, trade count, and average hold time), and renders a color-coded CCanvas bar chart. A parallel summary table goes to the Experts tab. The sections below walk through six include files and a main script function by function, followed by a verification script.


Author: Ushana Kevin Iorkumbul