I used an auto spread detector, that allowed me to run on real ticks, and solved my trailng stop issues, was a while back, not 100% sure now, but I needed it for fast excecution.
Ah ha! If your trailing stop code is executing on every tick, that is burdensome on the Tester.
if that is the case, you might want to replace it with a stepped trailing stop.
Consider making the following changes:
1. Change the modeling mode to 1 Minute OHLC or Open Prices Only.
If your tester is set to Every tick based on real ticks it is processing millions of microscopic price movements and downloading gigabytes of tick data. You can verify this fix by checking the tester Journal to confirm the test completes in a fraction of the time.
2. Change how your EA performs Signal Checks from Every Tick to "New Bar Only."
The most common coding flaw is recalculating heavy technical indicators such as Average True Range, KAMA, or MACD filters, or looping through historical bars on every single tick rather than just once when a new candlestick opens. Wrap your heavy processing inside a "New Bar" check. Verify this was successful by timing the backtest; if it drops from hours to minutes, your tick logic was the bottleneck.
3. Create Input Variables to toggle on and off your EA's GUI (if included in your EA) or Disable Visual Mode and Objects.
Running a test with Visual Mode enabled, or allowing your EA to draw and delete graphical objects per tick, forces the single core to render UI changes instead of calculating logic. Turn off visual mode and disable object drawing during backtests. Verify if this works by unchecking Visual mode in the tester window and observing the immediate speed boost.
1. Change the modeling mode to 1 Minute OHLC or Open Prices Only.
If your tester is set to Every tick based on real ticks it is processing millions of microscopic price movements and downloading gigabytes of tick data. You can verify this fix by checking the tester Journal to confirm the test completes in a fraction of the time.
The OP clearly stated that she/he needs to use every tick:
OHLC prices are only fully accurate for EA's that only analyze OHLC data. Similarly, Open prices are only fully accurate for EA's that only analyze Open prices.
2. Change how your EA performs Signal Checks from Every Tick to "New Bar Only."
The most common coding flaw is recalculating heavy technical indicators such as Average True Range, KAMA, or MACD filters, or looping through historical bars on every single tick rather than just once when a new candlestick opens. Wrap your heavy processing inside a "New Bar" check. Verify this was successful by timing the backtest; if it drops from hours to minutes, your tick logic was the bottleneck.
In the OP's EA that requires ticks data, doing so would do violence to the EA's logic─basically, creating a totally new EA.
The OP clearly stated that she/he needs to use every tick:
(emphasis added).
OHLC prices are only fully accurate for EA's that only analyze OHLC data. Similarly, Open prices are only fully accurate for EA's that only analyze Open prices.
In the OP's EA that requires ticks data, doing so would do violence to the EA's logic─basically, creating a totally new EA.
no. I backtest my tick EA on M1 OP OHLC and it works 98% the same as ticks, but a lot faster. you cannot backtest on tick data or I don't know how to do it
Jean Francois Le Bas #: no. I backtest my tick EA on M1 OP OHLC and it works 98% the same as ticks, but a lot faster. you cannot backtest on tick data or I don't know how to do it
How do you know that if you can't backtest on tick data ? Unless your EA is coded specifically for M1 OHLC it will not be the "same at 98%" as real ticks.
The 11% CPU usage is not necessarily a sign that your new CPU is being underused.
If you are running one backtest pass, MT5 doesn't simply spread that single test across all CPU cores. So on a multi-core CPU, the total CPU percentage can look surprisingly low. Multiple cores are mainly useful when running optimization passes through the local agents. MQL5
If even one pass takes ~8 hours, I would look at the EA itself and the tester settings. Every tick/real-tick testing, repeated CopyBuffer() /history calls, large loops, excessive logging, or heavy calculations inside OnTick() can make a test extremely slow.
Check the Agents tab during optimization and check the Journal for the actual modelling mode. I would optimize the EA/test configuration first rather than judging the speed from overall CPU usage alone.
I have found you need to identify in your tester how many CPU cores you want to use( be careful some computers don't have an auto fan setting in them - LENOVO is a classic example). In mine I have 20, at 16 cores it can turn an all nighter into 20 minutes if done properly. You can monitor the core usage in your MT5 strategy tester environment. #NOTE; do not use 20 if you have 20, you will not be able to do anything with your system until it finishes, and if your fan doesn't auto max speed you will burn out your CPU in about 2 minutes.
yes, I use real tick
EA use trailing stop need run on every tick
Ah ha! If your trailing stop code is executing on every tick, that is burdensome on the Tester.
if that is the case, you might want to replace it with a stepped trailing stop.
The OP clearly stated that she/he needs to use every tick:
Forum on trading, automated trading systems and testing trading strategies
Very Very Slow backtest speed but CPU only use 11%
LEE Chun Wing, 2026.08.09 15:48
yes, I use real tick
EA use trailing stop need run on every tick
(emphasis added).
OHLC prices are only fully accurate for EA's that only analyze OHLC data. Similarly, Open prices are only fully accurate for EA's that only analyze Open prices.
In the OP's EA that requires ticks data, doing so would do violence to the EA's logic─basically, creating a totally new EA.
The OP clearly stated that she/he needs to use every tick:
(emphasis added).
OHLC prices are only fully accurate for EA's that only analyze OHLC data. Similarly, Open prices are only fully accurate for EA's that only analyze Open prices.
In the OP's EA that requires ticks data, doing so would do violence to the EA's logic─basically, creating a totally new EA.
no. I backtest my tick EA on M1 OP OHLC and it works 98% the same as ticks, but a lot faster. you cannot backtest on tick data or I don't know how to do it
How do you know that if you can't backtest on tick data ? Unless your EA is coded specifically for M1 OHLC it will not be the "same at 98%" as real ticks.
Why could you not backtest on tick data ?
The 11% CPU usage is not necessarily a sign that your new CPU is being underused.
If you are running one backtest pass, MT5 doesn't simply spread that single test across all CPU cores. So on a multi-core CPU, the total CPU percentage can look surprisingly low. Multiple cores are mainly useful when running optimization passes through the local agents. MQL5
If even one pass takes ~8 hours, I would look at the EA itself and the tester settings. Every tick/real-tick testing, repeated CopyBuffer() /history calls, large loops, excessive logging, or heavy calculations inside OnTick() can make a test extremely slow.
Check the Agents tab during optimization and check the Journal for the actual modelling mode. I would optimize the EA/test configuration first rather than judging the speed from overall CPU usage alone.