Problem with indicator loading and removing during backtests

 

I am backtesting on two terminals simultaneously. I updated the EA on one terminal, and then copied it to the other and re-compiled it there as well. Both terminals are loaded with the relevant indicators. Both terminals have identical history data.

When I run the two EA's side by side, with identical input parameters, the original one runs fine and completes the backtest in a few seconds, but the newly copied one goes x100 slower and spams the journal log with messages saying the same indicator has been loaded and removed many times.

Neither EA's actually log any errors.

I can not understand why the second EA is repeatedly loading and unloading the same indicator. The EA code is EXACTLY the same, because I copied the .mq4 file directly from the terminal which works (and deleted both the .ex4 and .mq4 from the target directory before pasting across).

Does anyone know what might cause indicators to be loaded and removed repeatedly during a backtest? Could this be a problem with terminal rather than my code?

 
clerin6:

I can not understand why the second EA is repeatedly loading and unloading the same indicator. The EA code is EXACTLY the same, because I copied the .mq4 file directly from the terminal which works (and deleted both the .ex4 and .mq4 from the target directory before pasting across).

Does anyone know what might cause indicators to be loaded and removed repeatedly during a backtest? Could this be a problem with terminal rather than my code?

OK, the EA is the same . . .   is the Indicator the same ?
 

Yes, I think so. I copied the indicators across in the same way. I made sure there was no previous version of them in directory as well. I re-compiled them in the new directory.

I can load those indicators into a blank chart and there are no errors in the experts log. When the EA runs with those indicators then there are no errors in the journal log of the backtester ...

I think it must be either with the history data, or with the terminal version. I think the history is the same though because I imported that from the same source and checked it was complete afterwards.

I just noticed that the terminal I am copying the EA to is a slightly older version (because it has been hiding behind a firewall for a while). I shall update it and see if that fixes it.

 
These two MT4 installations . . . neither are installed into Program Files directory are they ?
 

OK. Updating the terminal actually fixed it. I suspect that might be because the live connection changed the history data of D1 (the default chart I had loaded by accident) ...

I was running the backtest on M5. Usually I just increase the period of an indicator to make it MTF, but of course that doesn't work past 4000 with the default indicators, so I couldn't get D1 equivalents from the M5 chart. I wrote a reverse MACD so that the value is the same during the entire candlestick, and was running that from PERIOD_D1 so that I could apply it to the current bar. I had used the period converter to get D1 from M1, but there must have been a problem with that conversion in the terminal which was not working. I guess the broker data filled in the holes. Lucky.

 Thanks for your help RaptorUK

Reason: