Ok, this guy had exacty the same problem as me. What i need to use is something like this.
int OrderTickets[];
int ctTickets = 0;
for (int i = 0; i < OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS)) {
ctTickets++;
ArrayResize(OrderTickets, ctTickets);
OrderTickets[ctTickets - 1] = OrderTicket();
}
}
Array and arrayResize is new to me. How do i implement this into my function above. Thanks alot for your responces by the way.
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.
Have a read of this thread: https://www.mql5.com/en/forum/122462
Ok, this guy had exacty the same problem as me. What i need to use is something like this.
Array and arrayResize is new to me. How do i implement this into my function above. Thanks alot for your responces by the way.