Derrick Mutange #: Thank you so much , let me test it out look at the code below and let me know if I have made any mistakes
When only trading the current symbol, then you don't need to use the timer event.
When setting the timer event you have to verify its return value to make sure it succeeded, and if not, you have to retry after a small delay. It does not always succeed on the first attempt.
Since you have not shown your code processing the CopyTicks() data, I am unable to comment on that.
When only trading the current symbol, then you don't need to use the timer event.
When setting the timer event you have to verify its return value to make sure it succeeded, and if not, you have to retry after a small delay. It does not always succeed on the first attempt.
Since you have not shown your code processing the CopyTicks() data, I am unable to comment on that.
Derrick Mutange #: I used the code this way sorry about that, do I need to use the CheckForOpen() function also in ontimer?
Derrick Mutange #: Thanks for the reply the EA is not based on bars. How can I fix then, do I just place the EA on the individual symbols?
You stated earlier that your EA did not operate on Bars, but Ticks instead. However, your code is working with Bars and not Ticks. Please make up your mind.
If you are unable to understand the basics of a single symbol EA, it will difficult for you to code a multi-symbol one. So I suggest you first design your EA to work with only one symbol (the current symbol), and then once it is working properly and you understand how to program it, then you can move on to Multi-symbol EA.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I used the code this way sorry about that, do I need to use the CheckForOpen() function also in ontimer?
You stated earlier that your EA did not operate on Bars, but Ticks instead. However, your code is working with Bars and not Ticks. Please make up your mind.
If you are unable to understand the basics of a single symbol EA, it will difficult for you to code a multi-symbol one. So I suggest you first design your EA to work with only one symbol (the current symbol), and then once it is working properly and you understand how to program it, then you can move on to Multi-symbol EA.