//-------------------------------------------------------------------+ Команда на удаление линий отображающую среднюю цену мин и макс ордеров и текстаif(CountTrade() == 0 || Drawdown < DrawdownClosingMinMaxOrdersZero)
{
flag_close2=0;flag_close3=0;
Yes, or if the drawdown is below a certain level. But as far as I understand zeroing has nothing to do with it. If there is no zeroing then there is an endless closure of orders and in my case one order is not closed.
Yes, or a drawdown below a certain level. But as far as I understand zeroing has nothing to do with it, if there is no zeroing then there is an endless closure of orders and in my case one order is not closed.
This is because after the first order has been closed this condition does not work any more
Because after the first order has been closed, this condition is no longer valid
that means it does not reach further, to the function of closing
Do you think that this condition is in the command to close orders and in the function to close orders if I remove this condition from the function to close orders will it change anything?
Do you think this condition is in the command to close orders and in the function to close orders if I remove this condition from the function to close orders will it change anything
It will speed things up...why check the same thing twice.
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.
Where does your flag reset?
If I put it in here it would be right
If I put it in here, it'll be right.
No. This way it will reset when all orders are closed.
Considering that you do not need to close all the orders, it is better to re-run the tickets and close them.
No. This way it will reset when all orders are closed.
Considering that you don't need to close all orders, it's better to re-run the tickets and close
Just a minute.
Just a moment.
but this way.
No. This way it will reset when all orders are closed.
Taking into account that you do not need to close all orders, it is better to loop through the tickets and close them.
Don't I go through the tickers in the close order function?
but like this.
It means if there are no orders
It means if there are no orders
Yes, or if the drawdown is below a certain level. But as far as I understand zeroing has nothing to do with it. If there is no zeroing then there is an endless closure of orders and in my case one order is not closed.
Yes, or a drawdown below a certain level. But as far as I understand zeroing has nothing to do with it, if there is no zeroing then there is an endless closure of orders and in my case one order is not closed.
This is because after the first order has been closed this condition does not work any more
so it does not go further to the close function
Because after the first order has been closed, this condition is no longer valid
that means it does not reach further, to the function of closing
Do you think that this condition is in the command to close orders and in the function to close orders if I remove this condition from the function to close orders will it change anything?
Do you think this condition is in the command to close orders and in the function to close orders if I remove this condition from the function to close orders will it change anything
It will speed things up...why check the same thing twice.
By the way, you posted two different functions
и
Is that the intention?