WHRoeder: You should use explanatory variable names and self documenting code. A variable named "parameter" says nothing. Your routine doesn't get any information, it get the open order count. Better:Still it can't be used for pending orders. Best:Use of the magic number and pair filtering is done once in MySelect, not in every orderSelect loop. MyOrdersTotal (does what OrdersTotal() does with filtering My) can select All types and can be used for both open orders and history.
(Whroeder code is on page 1 )
I would like to use this to count Pending orders, although it seems it can check balance etc.
That is a bad idea . . . you would be doing yourself a favour by spending the time to understand the code and then write you own version, you will learn in the process, it's much better than copy and pasting someone else's code . . that may have issues in it.
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.
Try this . . .
You should use explanatory variable names and self documenting code. A variable named "parameter" says nothing. Your routine doesn't get any information, it get the open order count. Better:Still it can't be used for pending orders. Best:Use of the magic number and pair filtering is done once in MySelect, not in every orderSelect loop. MyOrdersTotal (does what OrdersTotal() does with filtering My) can select All types and can be used for both open orders and history.
(Whroeder code is on page 1 )
I would like to use this to count Pending orders, although it seems it can check balance etc.
Does anyone know how to put it in to an EA; https://book.mql4.com/appendix/examples eg: tradingexpert.mql4 . I have tried to put it in to it as per below:
If any one could guide me better that would be great. Thanks
(Whroeder code is on page 1 )
I would like to use this to count Pending orders, although it seems it can check balance etc.
Does anyone know how to put it in to an EA; https://book.mql4.com/appendix/examples eg: tradingexpert.mql4 . I have tried to put it in to it as per below: