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.
to sergeev:
Yes, I got a bit confused there, thanks. But still no order with take profit is selected.
to Roger, abolk:
Oops, forgot with the problems and didn't even notice. Thank you!
Yes, I got a bit confused there, thank you. But still no order with a take profit is selected.
to sergeev:
I thought there was just one fix, which you don't need to write. But if you have to, there you go:
I thought there was just one correction there that didn't need to be written. But if you have to, there you go:
You still don't get it. Let me explain it to you.
at the beginning of the loop you have a=0 and OrdersTotal()=2
after the first deletion, you have a=1 and OrdersTotal()=1
that's it. there will be no second iteration. and only one order remains. do you understand?
what conclusions can you draw? i.e. what are the two solutions to the problem?Hello! Please help me. I need the indicator to calculate the sum of the volumes. Something is not working for me.
to sergeev:
In OrderSelect 0 is also a position, i.e. if there are 2 orders, their positions are 0 and 1.
In OrderSelect 0 is also a position, i.e. if there are 2 orders, their positions are 0 and 1.
Yes. There are two orders. And OrdersTotal will return 2.
Please read it again.
If you do not believe me, then use the Print in the journal
Hello! Please help me. I need the indicator to calculate the sum of the volumes. Something is not working for me.
Yeah, it seems to be working.
Hello! Please help me. I need the indicator to calculate the sum of the volumes. Something is not working for me.
Yeah, it seems to be working.
It seems to be working.