Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1186
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'm not talking about customers))) I'm talking about version control of a project. When a customer tells you that I want to roll back to this one, you not only have the ability to roll back, but also to create a new branch, plus you don't clog up the catalogue with a bunch of versions.
Actually an idea)))) so as not to litter one's own shelves on the git to do))))
Greetings. Please help me out. I have this question. Do I understand correctly. The program is executed from the beginning to the end, but stops when an event occurs, e.g. a tick, the ontick function starts to execute, then it finishes its execution and the program is executed again from the beginning? This question is related to the following, where do I write for example the size of the trading lot, in the program body or in the ontick function?
I look at the official bot, which is like an example in the terminal, there calculation of the lot is performed in the program body, and I do not understand why so.
I thought it needed some kind of protection, I just have no idea how to change EA's name programmatically - that's why I was surprised by such a binding ))))
Greetings. Please help me out. I have this question. Do I understand correctly. The program is executed from the beginning to the end, but stops when an event occurs, e.g. a tick, the ontick function starts to execute, then it finishes its execution and the program is executed again from the beginning? This question is related to the following, where do I write for example the size of the trading lot, in the program body or in the ontick function?
I look at the official bot, which is an example in the terminal, there calculation of the lot is performed in the program body, and I do not understand why so.
No. The tick does not interrupt the Expert Advisor. If the Expert Advisor is working, the incoming ticks are skipped. When finished, the next tick will restart it in standby mode.
No. The tick is not cut by the expert. If the EA is working, incoming ticks are skipped. When it finishes, the next tick will restart it in the standby mode.
No. Expert Advisor does not interrupt the tick. If the expert is working, the incoming ticks are skipped. When it is done, the next tick will restart it in the standby mode.
Kalash or Maxim? ))))))))))))
Question:
I have 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 Inclusions?
No. The tick does not break the Expert Advisor. If the EA is running, incoming ticks are skipped. When finished, the next tick will restart it in standby mode.
Thank you. Only I didn't understand anything at the time. I took the EA template that came with the terminal as my template. And that's how the functions are written there.
function to set the lot volume
check whether to open a deal or not
check if a deal will be closed or not
initialize
on each tick
{ check if trade will be closed or not
otherwise check whether to open the deal or not}
deinitialise
So when will the program go to the lot setting function? After executing "on every tick" ? And will it execute once ?
Thank you. Only I didn't understand anything at the time. I took the EA template that came with the terminal as my template. And that's how the functions are written there.
function to set the lot volume
check whether to open a deal or not
check if a deal will be closed or not
initialize
on each tick
{ check if trade will be closed or not
otherwise check whether to open the deal or not}
deinitialise
So when will the program go to the lot setting function? After executing "on every tick" ? And will it execute once ?
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 executes"?
A tip - first of all, understand what is OnInit, OnTick and OnDeinit. I think that everything will fall into place ))))
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 ))))