Very Very Slow backtest speed but CPU only use 11% - page 2

 
LEE Chun Wing #:

yes, I use real tick


EA use trailing stop need run on every tick

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. 
 
Ryan L Johnson #:

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.

I hope these helps. 
 
Vincent Vandeyua Orya #:
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:

(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.

Vincent Vandeyua Orya #:
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.