Did I understand you correctly? You should think of the deinit function (and the loop in particular) as follows:
Correct, in this case removing for example 18 object, 19 becomes its place, 19=>18 i.e. one reverse iteration is automatically obtained. Use this for orders too.
Also, since the list of objects and orders are formally arrays starting from = 0, the maximal index will be one less than the array size:
Thanks, but that's not the point. I wrote "How can I fix the code (without changing the magic) so that the block produces resultsfor each currency pair?"
Thank you, but this is not the right one. In your case all currency pairs will be calculated and you need the block to give results for each currency pair.
Thank you, but that's not what you need. In your case all currency pairs will be calculated and you need the block to give you results for each currency pair.
Then you have to first take data for all orders, and then, calculate the number of currency pairs, divide one array into several (each for its own currency pair), and read the data separately.
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.
Reshetov:спасибо
извиняюсь за то что не в SRC
how to insert it here
Did I understand you correctly? You should think of the deinit function (and the loop in particular) as follows:
Correct, in this case removing for example 18 object, 19 becomes its place, 19=>18 i.e. one reverse iteration is automatically obtained. Use this for orders too.
Also, since the list of objects and orders are formally arrays starting from = 0, the maximal index will be one less than the array size:
How to design a post
Thanks, but that's not the point. I wrote "How can I fix the code (without changing the magic) so that the block produces results for each currency pair?"
Change:
To:
Thank you, but this is not the right one. In your case all currency pairs will be calculated and you need the block to give results for each currency pair.
Thanks, but that's not the point. I wrote "How do I fix the code (without changing magic) so that the block produces a result for each currency pair?"
if you have two or three pairs, just add for each pair if(OrderSymbol() == "EURUSD") countEURUSD++; etc.
if all instruments, then put them into the matrix
Thank you, but that's not what you need. In your case all currency pairs will be calculated and you need the block to give you results for each currency pair.
Then you have to first take data for all orders, and then, calculate the number of currency pairs, divide one array into several (each for its own currency pair), and read the data separately.
if two to three pairs, just add for each pair if(OrderSymbol() == "EURUSD") countEURUSD++; etc.
if all of the instruments, then enter it in the matrix
Thank you.