Slow performance in a especific function
HistorySelect is notoriously slow function, especially with a large number of trades in history.
To avoid cache being rebuild, do not change the first date as it will invalidate the cache.
Use a smaller time range and divide into more tests
My backtests take forever to execute when I call this function inside the OnTick:
(currentDateLastCheck gets the current day, so I don't store the whole historic)
When I say it takes forever, I'm talking about more than an hour to run 2 months of data.