How to Reduce MT5 Log Bloat | Manual Rotation Guide to Delete Journal, Expert, and Backtest Logs


Introduction

This article explains for beginners how to perform manual rotation (periodically deleting old logs) to prevent log bloat in MT5 (MetaTrader 5) for “Journal”, “Experts”, and “Tester” logs. The operation is not difficult.
If you prefer automatic deletion, please refer to How to Automatically Delete MT5 Logs.

First, simply understanding “where logs accumulate” and regularly deleting old logs can be very effective.


Key Points to Know First (Ultra Summary)

  • MT5 automatically creates log files (YYYYMMDD.log) daily.
  • The main storage locations are Logs (Platform) and MQL5\Logs (EA/Indicators). Backtest logs are saved in Tester\logs.
  • The “Clear” button in the Journal window only clears the display; the files themselves are not deleted from your PC. You need to delete them directly from the folder.

Reasons and Risks of Log Bloat

  • Logs can increase rapidly due to frequent EA Print() output, many errors, 24/7 operation, continuous backtesting, etc.
  • If left unchecked, they consume disk space, potentially causing VPS/PC free space shortage → slow startup, sluggish performance, or even crashes.
  • First, develop the habit of regularly deleting old logs.

Quickest Deletion Steps (Manual Rotation)

1) Deleting Platform (Journal) Logs

  1. Open MT5 → Bottom panel “Toolbox”“Journal” tab.
  2. Right-click on the log → Click “Open” (the Logs folder opens).
  3. Select old .log files by date and delete the unnecessary ones.
    MT5 Toolbox → Right-click in Journal tab → Click OpenLog screen showing contents of the MT5 Logs folder

2) Deleting Expert (EA/Indicator) Logs

  1. “Toolbox” → “Experts” tab.
  2. Right-click → Click “Open” (the MQL5\Logs folder opens. Filenames are in date format).
  3. Delete old .log files based on their date.
    MT5 Toolbox → Right-click in Experts tab → Click Open

3) Deleting Backtest (Tester) Logs

If you frequently use backtesting, also periodically check and delete logs in Tester\logs (also saved by date).
If you don’t run backtests on your live VPS, this is unnecessary.

MT5 Strategy Tester → Right-click in Journal tab → Click Open

Retention Guidelines (Duration and Approach)

  • Retention period can be based on your operation policy (e.g., delete logs older than 7 or 30 days).
  • The key is not to hoard. Proactively clean up logs that are beyond the necessary verification period.

How to Access the Folders

If unsure, use the MT5 menu: “File” → “Open Data Folder” to navigate to the target folders.
MT5 top menu File → Open Data Folder


MT5 Logs folder screen

Screenshot of the Logs folder inside the MQL5 folder

You can also directly access each storage location via Right-click → Open in the respective tabs (Journal/Experts).


Rotation Concept (Operation Example)

MT5 basically has no setting to automatically limit storage days.
Therefore, a simple operation of humans discarding by age is effective.

  • Live trading terminal (including VPS): Keep 14 days, delete logs older than that
  • Development/Testing terminal: Keep 7 days (prone to bloat due to heavy debug output)
  • Backtest logs accumulate in Tester\logs, so organize them according to your testing cycle

* Automation (batch/script, etc.) will be covered in a separate article. This article focuses solely on manual rotation.

Common Misunderstandings

  • “Clearing with ‘Clear’ in the Journal doesn’t reduce disk usage”: It only clears the display; the files remain. You must delete them directly from the folder.
  • “Reducing ‘Max. bars in chart’ reduces log size”: This adjusts the number of bars displayed/chart load and does not directly reduce log file size.

Precautions for Safe Deletion

  • Generally, it’s safe to delete only the .log files inside Logs, MQL5\Logs, and (if needed) Tester\logs.
  • Bases, History, Profiles, etc., serve other purposes (market data, settings). Do not delete them if you are unsure.

Summary

  • Logs are split automatically daily (YYYYMMDD.log). Main locations are Logs and MQL5\Logs (and Tester\logs if needed).
  • Use Right-click → Open in each tab to go to the storage location and delete old .log files.
  • Note that “Clear” is not a physical deletion. Delete files directly in the folder.

Related Article: VPS Operation Basics: Preventing Stops and Sluggishness


FAQ

Q. Is using “Clear” in the “Journal” tab sufficient?
A. No. Clear only clears the display. To address disk space, delete the .log files directly from the folder.
Q. Which files are safe to delete?
A. Generally, only the .log files in Logs, MQL5\Logs, and (if applicable) Tester\logs. Do not delete Bases, History, Profiles, etc.
Q. Does deleting logs affect EA operation or backtest results?
A. It only removes past output records; it does not affect the EA’s logic or trading performance.
Q. How long should I keep logs?
A. It depends on usage. A guideline is 14 days for live trading and 7 days for development/testing. Efficiently clean up logs beyond the necessary verification period.
Q. Should I delete the Tester folder on a VPS where I don’t run backtests?
A. If you don’t run backtests, it’s not mandatory. However, if old test history has accumulated, it’s safe to delete the old logs in Tester\logs.
Q. Does reducing “Max. bars in chart” reduce log size?
A. No. This is a display/load adjustment setting. It is not directly related to reducing log file size.


Leave a Reply