You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Suppose an event occurred in OnTradeTransaction() after which some action needs to be performed, but an error occurred at the first attempt to perform this action. What to do? Obviously, we must try to do it again, and for this we need to save somewhere data about necessity of these actions repetition - most likely, this data is saved in global variables of Expert Advisor or in static functions. And suddenly I had to restart the terminal... the data is gone.
And when you analyze the current situation and history - nothing has gone anywhere.
If the terminal crashed, then after the restart in OnInit() and so it is customary to conduct a full inventory.
This can even be used as an incomplete OnTrade()
Yes, I've read everything in this thread and concluded that this solution is simple, reliable and "cheap". I will try to look through all functions of mql4 once again, if I find something, I will add it to this post. Thanks for the help.
I also remembered the logs of Metatrader 4 terminal, as a rule all trade events are added there. Also, there are also notifications to the mobile terminal about trade events. upd: unfortunately. these events also cannot be accessed without dll