I have a question about the low level custom back tester interface. I have used custom backtesters to write new metrics and so forth, but I am wondering if it can be used for a different purpose.
I have found that only 25% of the total backtest time is in the AFL evaluation, at least with my data set of 5 minute data and 1000 symbols. Meaning that if I replace the AFL code with a "empty" system that just sets the buy/sell arrays to false, it only reduces the run time by about 25%. This implies that even if I optimized the AFL code to run in zero time, overhead in other parts of the backtest process would only result in a small savings. My question is that looking at the custom backtest documentation, it looks like the PreProcess() call does a great deal of work, possibily including setting up the price arrays and AFL execution. If a low level custom backtest function used the EnterTrade(), ExitTrade() functions, is it possible to avoid the call to PreProcess () and execution of AFL code and creation of the price arrays? The actual trade decisions would be pre-calculated. I know that this is a odd question and might be trying to push AmiBroker outside of its design goals.
