Summary: Discover a little-known MT4 backtest optimization: removing trade arrows and lines during historical testing can boost speed by up to 300%. Plus learn other hidden performance tweaks.




I spent the better part of last year running backtests on a complex EA – thousands of trades across multiple timeframes. What frustrated me wasn't the strategy itself, but how painfully slow the testing got as time went on. The first 3 months of data would zip by in minutes. Then, around the 6-month mark, the whole thing would grind to a crawl.

At first, I blamed my VPS. Upgraded the plan. Still slow. Then I blamed MT4 itself. Tried every "optimization guide" I could find – reducing max bars, disabling news, hiding unused symbols. Marginal improvements at best.

Then I stumbled onto something completely by accident while poking around the EA's chart after a test run.

The 300% Speed Boost Nobody Mentions



Here's the thing: during backtesting, MT4 automatically plots every single trade on the chart – entry arrows, exit arrows, and connection lines showing the trade's lifecycle. This is useful for visualization, but when you're running thousands of trades, those objects accumulate and eat up your CPU.

According to the MQL4 documentation, "Every object placed on a chart requires resources for its display and redrawing" – and during backtesting, the chart is constantly refreshing after each tick. More objects = more redraw operations = slower testing.

The forum discussion confirmed this: "随着回测开平仓的增加, 图表上的箭头和交易线不断增多...把线和箭头删掉, 速度立即肉眼可见提高了" . I tested this myself and saw speed improvements of roughly 300% on longer test periods.

How to Do It (Without Breaking Your Backtest)



You don't need to code anything special. During a backtest run:

  • Open the chart where your EA is testing

  • Look for the <strong>Remove</strong> buttons in the toolbar – there's one for removing lines and one for removing arrows

  • Click them periodically during the test (I do it every 2-3 months of simulated data)

  • The trades themselves remain in the testing results – you're just removing the visual clutter


  • Pro tip from experience: If you're running overnight backtests, set up a simple script to auto-click these buttons using AutoHotkey or similar tools. But honestly, just remembering to do it manually every few hours makes a massive difference.

    One More Hidden Speed Killer



    This one's from the Exness help center, and it's a classic: "Market Watch窗口中隐藏所有未使用的品种...点击图形窗口上的X图标关闭所有未使用的图表" . Before starting a backtest, close every chart except the one you're testing on. I've seen speed improvements of 15-20% just from this.

    ---

    Reference:
  • MetaTrader 4 Help Center – Chart Settings and Objects

  • Exness Help Center – Performance Optimization for MetaTrader

  • Eabang Forum Discussion – Backtest Speed Discovery


  • 本文首发于FXEAR.com,原创内容,未经授权禁止转载