Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1187
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
I could be wrong, but I don't think you have any idea how the EA works at all. What do you mean by "program is running"?
A tip - first of all, find out what OnInit, OnTick and OnDeinit are. I think that everything will fall into place ))))
Good day all! I am testing an Expert Advisor in MT4.
Can you please advise how to use MQL4 function Print() to print only 1 time in MT4 Tester Log and only with the last hour value. Here is a simple code.
Print() is printed in the МТ-4 Log-File on each hour.
But I need Print() to be printed in the MT-4 Logger only once with the last value of the hour. It would be logical to delete the penultimate, i.e. previous Print ( ) entry after the last one appears in the log. I know how to delete an order, a graphic object. But I don't know how to delete Print() entry from the Logbook yet.
Thank you for your help.
No. The tick is not cut off by the examiner. If the EA is running, incoming ticks are skipped. When it finishes, the next tick will start it again in standby mode.
Kalash or Maxim? ))))))))))))
Question:
There is a script. It cannot be launched from the EA using the standard means. So, we have to add it to the Expert Advisor as a function. But I do not want to make the same changes in the Expert Advisor when editing the script. How to do it? By means of inclusions?
By your logic, it comes out that the software will never go to the lot setting function. But this is how the program is written from the official publisher. I wrote the order of functions in previous posts.
Generally, judging by your response, you yourself don't really understand how the program works. So it seems that it is a silly question. Just like the previous commenter thinks it stops. Just from programming experience in other languages I think it executes its body in a loop, and when an event comes, it dives into it. If the program executes its body in a loop, that explains why the program is written that way.
Judging by your comment, you don't understand that either. (((
This is not "other languages", this is MQL!
Advice to you too - figure out exactly how this bunch works.
All other functions are derived.
Figure it out.
Yeah, I don't get it, so I'm asking. I know that ontick is an event, but I don't understand where the EA goes afterwards. It will go to the body of the programme and calculate the lot volume, or it won't go? Why has the EA from the official publisher been written in such a way?
And you think someone here is going to start rewriting the documentation for you personally? Just for you? In here? Scratch that yourself....
Yeah, I don't understand, that's what I'm asking. I know that ontick is an event, it's just not clear to me where the EA then goes. Why has it been written in this way by the publisher?
You would show the code (but you have to understand that if you show the code then the copyright is in plain sight) and the guys will look at the EA's schematic and say what is called and what is not opened a deal or not.