
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
One of the easiest ways to insert
where you want to check if the code works or check if a condition is true (i.e., if all the conditions are true and an action must be taken)
I, for example, insert Alert inside each complex function with different text, in order to check if the function was executed at all and if the EA reaches it
Maybe you use some conditions and they are always false.
The thing is that there are no errors in the log, but the EA sometimes stops working, and is restored only after restarting the terminal.
I am not quite clear how you define that "the Expert Advisor stops working sometimes". Maybe, it just starts an endless loop. Its log is empty and the Expert Advisor is working non-stop. Or maybe it has some other special feature.
I need an answer to the question in this post: https://www.mql5.com/ru/forum/3775/page215#comment_379520
Does anyone know the answer?
There seems to be no direct answer, so we are left to speculate.
So, the type of license can be found out using Mql5InfoInteger(MQL5_LICENSE_TYPE). I.e., out of all possible values of the ENUM_LICENSE_TYPE enumeration some one will be returned. Further - by the exception method: the operating time limit(LICENSE_TIME) cannot be returned together with the previous three values of the specified enumeration. In particular, LICENSE_TIME must not be returned concurrently with LICENSE_DEMO .
With this reasoning, I would give a negative answer to the question "is it implied that a paid program for the Market can be time-limited in a demo test?" Becausethe demo of a paid product from the Market has its own identifier - LICENSE_DEMO.
There seems to be no direct answer, so we are left to speculate.
So, the type of license can be found out using Mql5InfoInteger(MQL5_LICENSE_TYPE). I.e., out of all possible values of the ENUM_LICENSE_TYPE enumeration some one will be returned. Further - by the exception method: the operating time limit(LICENSE_TIME) cannot be returned together with the previous three values of the specified enumeration. In particular, LICENSE_TIME must not be returned concurrently with LICENSE_DEMO .
With this reasoning, I would give a negative answer to the question "is it implied that a paid program for the Market can be time-limited in a demo test?" Becausethe demo of a paid product from the Market has its own identifier - LICENSE_DEMO.
I think that LICENSE_TIME can contain both LICENSE_DEMO and LICENSE_TIME. A clear example is given by such identifiers as MQL5_VISUAL_MODE and MQL5_TESTING. That is, they both let us know that we are in a tester. ))
So I wonder what did the developers actually put in this identifier? And in general, if there is no possibility to limit the time of some paid programs in demo mode, it would be nice to have such a possibility. Because there may be options that can be very profitable to use for yourself programs even without buying them. )))
I agree that I completely missed the terminological peculiarities of the reference materials, due to which the exclusion method may lead to incorrect results due to one reason or another. ...Well, at least, the misunderstandings on the subject have been voiced, and only the authors of this listing can answer.
I'm not quite sure how you determine that "the EA sometimes stops working". Maybe, it just starts an endless loop. The log is empty, but the Expert Advisor is working non-stop. Or maybe some other peculiarity is triggered.
This is getting closer to the subject. So it turns out that your EA stops reacting to the indicator signals? But it does not mean that the EA "does not work". Perhaps, it still works, but not in the way intended by the author.
Try setting a timer with a period of, for example, 10 minutes. And print out all indices that are significant for your Expert Advisor. See if the figures change over time. If the log is empty in this case too, you should definitely go to Service Desk with a copy of the code.
Addition. Or here's another idea. You have a place in your code with condition like if, after triggering which trade request must be sent. Try to print the cases of triggering/not triggering of this condition, for example: