What MT5 build ?
Please post the 4 lines of your OnInit() just to see.
P.S: There is no need at all for a #property script with MQL5.
Hello Alain,
I understand that you have taken into account the latest microcode updates that Intel is releasing for installation through motherboard manufacturers, right? Right now there is a beta 0x12b that is possibly the final one to stabilize the high voltage that the motherboard supplied to the processor. The processor that has already been degraded, surely cannot be made stable through microcode updates, because physically it is already impossible.
You would also have to consider reducing the voltage from the beginning of the processor purchase to avoid premature wear.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone,
I'm currently working on a robot, and I have to say that I'm confused by the issue I'm facing. Let me explain:
The robot works perfectly during backtests, there are no, and I know it, "out of range" errors, no division by zero, no infinite loops. Similarly, the #property strict is enabled, and there are no errors. I should also mention that I use absolutely no pointers at all. Neither do I call any external libraries except for the classic ones (CTrade, CSymbol and CPositionInfo).
During backtests, everything worked very well. HOWEVER, when optimising the robot, I get one of the following two errors for certain passages:
- "critical runtine error 517 in OnInit function (module -1 exception 0x0000005)"
- "critical runtine error 517 in OnTester function (module -1 exception 0x0000005)"
Note that I've looked everywhere on the MQL5 site and there's no error corresponding to this code. It's very badly done.
I noticed that this error appeared much more often when I was using a linked list implementation, compared with a classic array implementation. However, even with a classic array, these errors occur after several thousand optimization passes.
Furthermore, the OnInit() and OnTester() functions are nothing special. OnInit() only has 4 lines (two ArrayResize() and two ArraySetAsSeries()), and the OnTester() function simply checks the statistics of the optimisations, as in the official documentation.
I should also add that this problem does not occur on all computers. In my opinion, it's a RAM problem. Have you ever had a problem like this?
Find screenshots attached below as well.