If you only call to the WaitEvent() function once in OnInit() or in class constructor they are only executed on the first trade. Debugged.
On the other hand, in order to use the events in the signal class, it is necessary to start the signal within the derived class MyExpert. I can't think of another way, but it works.
Predefined Macro Substitutions - Named Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
If you only call to the WaitEvent() function once in OnInit() or in class constructor they are only executed on the first trade. Debugged.
On the other hand, in order to use the events in the signal class, it is necessary to start the signal within the derived class MyExpert. I can't think of another way, but it works.
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.
Felipe, hello again. Where WaitEvent(EVENT) function has to be called? In to OnTick function?
You just need to call it once, so it is better to call it at OnInit() after all the wizard checks.
You just need to call it once, so it is better to call it at OnInit() after all the wizard checks.
Ok, thanks Felipe.
You just need to call it once, so it is better to call it at OnInit() after all the wizard checks.
Felipe, i want to share my code with you.
If you only call to the WaitEvent() function once in OnInit() or in class constructor they are only executed on the first trade. Debugged.
On the other hand, in order to use the events in the signal class, it is necessary to start the signal within the derived class MyExpert. I can't think of another way, but it works.
Solved. Thanks so much, Felipe.
Felipe, i want to share my code with you.
If you only call to the WaitEvent() function once in OnInit() or in class constructor they are only executed on the first trade. Debugged.
On the other hand, in order to use the events in the signal class, it is necessary to start the signal within the derived class MyExpert. I can't think of another way, but it works.
Solved. Thanks so much, Felipe.
Excellent. Thank you for clarifying my comment.