You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
What if we do a loop like this one,
This is the loop given in the book mql4 to create array for order.
Will the OrdersTotal() decrease by itself each time an order is closed ?
//***************************************************************************
I just have a look in the book, below is the loop given to close an order, so the anwers is yes : ( https://book.mql4.com/trading/orderclose )
What if we do a loop like this one,
This is the loop given in the book mql4 to create array for order.
Will the OrdersTotal() decrease by itself each time an order is closed ?
Is it okay not to declare TotalNumberOfOrders = OrdersTotal() ;
What I mean was straight away use OrdersTotal()
for ( x = OrdersTotal() - 1 ...... )
I'm currently using that but I'm not sure about to output even though it is the same . Since OrdersTotal() is in the for loop, will closing 1 order affect the OrdersTotal again and again ?
No, because you are not checking OrdersTotal, you are checking PositionIndex as the condition to continue the loop
Excellent job of explaining this topic! Without out the graphics it's just impossible to explain... Well done.
The only time I have been forced to use the count up method instead of the countdown method was on a broker
that was really xxx about FIFO and would not let me close the newest trade first.... how stupid.
Again I say ... well done...
Hi experts, what is your opinion about this solution?