I can't get the cycle right, on every tick a couple of orders are opened, it should be like this. When a tick comes, variable X is declared inside the loop, accordingly taking value 0.
Then X=number of orders is calculated within the loop, and if X=0 or 1, then they open.
Thank you!!! I'll reset it now. But all the same, something is wrong, maybe the first loop for some reason does not work and X always remains 0. I cannot even find this out for sure, because Alert ("X",X) does not log anything, only orders with zeros are logged.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Sorry, I can't compile a simple-simple line, it compiled to 0 before I put it in, now it compiles to
.
♪ put it in start ♪
I can't get the cycle right, on every tick a couple of orders are opened, it should be like this. When a tick comes, variable X is declared inside the loop, accordingly taking value 0.
Then X=number of orders is calculated within the loop, and if X=0 or 1, then they open.
You have declared a variable but not zeroed it. Therefore, with every tick it will only grow !!!!!!
That's not the right way to do it.
You have declared a variable but not zeroed it. Therefore, with every tick it will only grow !!!!!!
That's not right.
You are mistaken here. With every tick this variable is declared anew, hence it equals 0.
It takes it out of hand
This is where you are wrong. With every tick this variable is declared anew, so it equals 0.
Yes, if you set it as x=0, it is zeroed if you just set it as x:, it is not zeroed, it is incremented.
Yes, if you set it as x=0, it will go to zero if you just set it as x:, it won't go to zero, it will go up.
Where in the annals did you read that?