The Expert Advisor based on a custom indicator takes a long time to calculate the previous values before starting the test. The indicator graph is calculated and
drawn in a separate window for the entire known history (visual mode).
After the history is finally calculated, the test goes normally.
1. Will these “extra” calculations be performed in optimization mode, or just when visual mode is disabled?
2. Does it make sense to try to optimize and skip the history before the test starts, of course we are talking only about the tester, since in other
cases it is obvious that calculations and their rendering are needed in full.
3. If so, how do I make it so that calculations are skipped only for the tester, and up to the test period?
The Expert Advisor uses the following overload OnCalculate:
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time,
const double &open,
const double &high,
const double &low,
const double &close,
const long &tick_volume,
const long &volume,
const int &spread)
There is a concern that with a large number of optimized parameters, the optimization speed may drop significantly, since half the time
resources will be spent to calculate the values of indicators before the test.
If someone knows at least a partial answer to one of the questions raised, I would be very grateful.