I'm not looking past OnInit() because you either return -1 or 0 and I have no idea what that equates to!
Use the enums, it makes the code easy to read.
ID | Description |
---|---|
INIT_SUCCEEDED | Initialization successful, EA test can be continued. This code means the same as the zero value – the EA initialization in the tester is successful. |
INIT_FAILED | Initialization failed. There is no point in continuing the test due to unavoidable errors. For example, it is impossible to create an indicator necessary for the EA operation. The return of this value means the same as returning the value different from zero – EA initialization in the tester failed. |
INIT_PARAMETERS_INCORRECT | Designed to denote an incorrect set of input parameters by a programmer. In the general optimization table, the result string with this return code is highlighted in red. A test for such a set of EA inputs is not performed. The agent is ready to receive a new task. When this value is received, the strategy tester does not pass this task to other agents for repeated execution. |
INIT_AGENT_NOT_SUITABLE | No program execution errors during initialization. However, for some reasons, the agent is not suitable for conducting a test. For example, there is not enough RAM, no OpenCL support, etc. After returning this code, the agent no longer receives tasks until the very end of this optimization. |
Due to this on the chart you made a screenshot:
you know that the EA BolRSIMAs is running - and Algo Trading is ON as well.
If it doesn't trade run the debugger (or the tester in visual mode) and check the variables that should start trading:
https://www.metatrader5.com/en/metaeditor/help/development/debug // Code debugging
https://www.mql5.com/en/articles/2041 // Error Handling and Logging in MQL5
https://www.mql5.com/en/articles/272 // Tracing, Debugging and Structural Analysis of Source Code
https://www.mql5.com/en/articles/35 // scroll down to: "Launching and Debuggin"

- www.metatrader5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Please help me to know if below EAs working in real account? I have applied and saw no movement, not even able to know if it's running or not.
Attaching screenshot and code
Am I missing something?