Memory leaks and the platform that slows down over days
Some trading terminals run fine after a restart and gradually degrade. Memory usage climbs, the interface becomes sluggish, and eventually the platform freezes or crashes. Long-running EAs, custom indicators, and accumulated chart objects are common causes.
The effect on scalping is subtle at first. Order response slows by tens of milliseconds, then hundreds. Because the degradation is gradual, it is easy to miss until a failure occurs at a critical moment.
Monitor memory and CPU usage over several days. A steadily rising trend suggests a leak. Restarting the terminal on a schedule, such as every day before the main session, is a simple mitigation.
For EAs and indicators written in-house, check for objects created but never released, arrays that grow without bound, and log files that accumulate. Third-party tools may need updates or replacement.
Automatic restart scripts and watchdogs add resilience, but they should handle open positions properly on restart.
How often is the terminal restarted, and does performance improve afterward?
Memory leaks and the platform that slows down over days
-
Amanhasnoname
- Posts: 2060
- Joined: Fri Oct 30, 2026 9:45 am
Re: Memory leaks and the platform that slows down over days
MT5 on my VPS felt fine on Monday and heavy by Thursday. I logged the working-set memory every hour for three weeks. It started around one point one gigabytes after a Sunday restart and climbed past three gigabytes by late Wednesday. By then a market order that normally confirmed in about one hundred and fifty milliseconds was taking closer to four hundred. Two custom indicators were creating chart objects and never deleting them.
I removed those indicators, capped the log file, and scheduled a restart at half past six London, before I sit down. Memory now stays under one point four gigabytes through the week, and Thursday morning fills went back to the same speed as Monday.
I still glance at the task manager on Wednesday nights. If anything is creeping up again I restart before the New York overlap rather than waiting for a freeze in the middle of a trade.
I removed those indicators, capped the log file, and scheduled a restart at half past six London, before I sit down. Memory now stays under one point four gigabytes through the week, and Thursday morning fills went back to the same speed as Monday.
I still glance at the task manager on Wednesday nights. If anything is creeping up again I restart before the New York overlap rather than waiting for a freeze in the middle of a trade.