Discussing the article: "Building Automated Daily Trading Reports with the SendMail Function"
I would add at least one more trade per day to a report like this. For example: the day closed at +200, but during the day an open position was down by 1,800 in terms of equity. This isn’t visible in the closed trades, but it is precisely this figure that is important for the daily drawdown limit on a proprietary account. I call AccountInfoDouble(ACCOUNT_EQUITY) in OnTick, store the minimum value in a terminal global variable and reset it to zero at the start of the new daily candle. It’s also better to take the start of the day based on server time via iTime(_Symbol, PERIOD_D1, 0), otherwise the report from a broker on GMT+2 will be off by a couple of hours.
Check out the new article: Building Automated Daily Trading Reports with the SendMail Function.
We build an MQL5 Expert Advisor that emails a structured daily trading report. The article shows how to configure SMTP in MetaTrader 5, collect and filter closed trades for the previous day, compute totals for profit, wins, losses, and trade count, and assemble account details into the subject and body. You also schedule one send per day and prevent duplicates using daily candle detection.
Traders often struggle to keep track of their performance at the end of each trading day, as manual review of trades in MetaTrader 5 can be time-consuming and prone to oversight. However, MetaTrader 5 does not provide a built-in system for automatically generating structured daily trading reports and sending them via email in a formatted way.
In this article, we will build a system that automates the generation of daily trading reports directly from MetaTrader 5. You will learn how to retrieve historical trade data within a specified time range, calculate key performance metrics, and dynamically construct an email subject and body based on account activity. Finally, we will automate the process by sending the report once per day using the SendMail() function, giving you a consistent and hands-free trading journal delivered directly to your inbox.
Author: ALGOYIN LTD