Could you please tell me what the code should look like under the following condition: itshould check buy entry conditions and open buy if there are no open buy positions or if a buy position is closed.
I took the code from MT, but it doesn't work, it opens buy on every tick, a million buys on three candlesticks
Here is the order search function and if buy search = 0, we open, etc.
Unfortunately, it's hard to understand how to use this code.
Tried to put a flag in 1 when a buy order opens, and a flag in 0 when it closes, and added the latter to the open condition. It didn't work) It is strange, in fact the rule is broken: open if the flag==0. And it still opened at 1 on the same candle anyway.
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.
What this timer is for
You could have answered... it wasn't a personal question)
Once I wrote to read the help, the moderators pointed out that you can't do that. And there asked you specifically.
Once wrote to read the reference, the moderators pointed out that you can't do that. And it was a personal one there, asking you specifically.
It's a question on a built-in function - that's why the help
It's just that no one has answered before, so I wrote to whoever is answering
This is a question on a built-in function - so help
It's just that no one has responded before, so I wrote to whoever is answering
If someone in particular is being pointed out, I consider it a personal reference.
Can you give me a hint on that? https://www.mql5.com/ru/forum/160683/page1650#comment_25081067
If they point to someone in particular, I consider it a personal appeal.
Any advice on that? https://www.mql5.com/ru/forum/160683/page1650#comment_25081067
Polemic...
The question is not of a personal nature.
Here
I understand that the timer can be used to adjust the speed of optimisation and testing?
As far as I understand it is possible to adjust the speed of optimisation and testing with this timer?
The timer does not work in the tester.
If you need to execute something after a certain time regardless of the ticks, you use the Timer.
I took the code from MT, but it doesn't work, it opens buy on every tick, a million buys on three candlesticks
I want buy and sell to be independent from each other and open on different signals
Here is the order search function and if buy search = 0, then open, etc.
Here is the order search function and if buy search = 0, we open, etc.
Unfortunately, it's hard to understand how to use this code.
Tried to put a flag in 1 when a buy order opens, and a flag in 0 when it closes, and added the latter to the open condition. It didn't work)
It is strange, in fact the rule is broken: open if the flag==0. And it still opened at 1 on the same candle anyway.