Discussing the article: "Introduction to MQL5 (Part 7): Beginner's Guide to Building Expert Advisors and Utilizing AI-Generated Code in MQL5" - page 2

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
And why would a beginner's guide immediately teach them to code incorrectly?
Firstly, there are efficiency problems that will become noticeable as soon as a person starts writing something a bit more complex and realistic (but continues to use the same technique). On every tick, a StringToTime conversion of the same strings is called three times. It would be possible to clean up for the AI - make the conversion once in global variables:
Secondly, there is no guarantee that the tick times will match the given alert times - most likely this code will miss them in the if-times. And even if we had made checks in the OnTimer handler, it would not guarantee that we would "catch" the necessary moments, because all events (OnTick, OnTimer, etc.) come from the queue, which is emptied as fast as possible, but may slow down if some other programme is doing heavy calculations. Therefore, the condition of checking the occurrence of alerts must be rewritten thoroughly, and at least without additional variables is not possible (in the future, it is suggested to remake alerts under classes, but of course not in this article).
I don't understand how this automatic translation feature works here. During initial writing the forum showed me a different, more accurate translation to English. But here it's translated very bad. Normally I reply in English, but this time hoped in vain that autotranslation will suffice, but it disoriented me with different wording here and there.
I don't understand how this automatic translation feature works here. During initial writing the forum showed me a different, more accurate translation to English. But here it's translated very bad. Normally I reply in English, but this time hoped in vain that autotranslation will suffice, but it disoriented me with different wording here and there.
Hello, Mr. Korotky,
Thank you very much for your comment. You raised some excellent points. At this series stage, I try to keep the material as simple as possible, as it's intended for beginners. I intentionally use this method to explain step-by-step, as the program is simple. When we start working on more complex projects, those issues will be addressed.
I appreciate your remarks and your insight on code efficiency. Thank you for your understanding and for sharing your experience.