linux80s:
I need to get only today's orders (both open/closed). This function runs 5 times within every second (please don't ask why, I need it).
My problem is I only can do it by examine all orders of the given account.
It can be a big problem if the account's history has a huge number of orders.
Is it possible to shorten this process, ie. not running the whole cycle for all the orders of history?
I need to get only today's orders (both open/closed). This function runs 5 times within every second (please don't ask why, I need it).
My problem is I only can do it by examine all orders of the given account.
It can be a big problem if the account's history has a huge number of orders.
Is it possible to shorten this process, ie. not running the whole cycle for all the orders of history?
You really don't need it... looking up historical orders 5 times a second is a complete waste of resources they are not going to change from the first time you look them up.
So look them up once then manage the delta change as time goes by.
Not the answer you wanted but it is the sensible answer
Agreed. Only if OrdersTotal has changed do you need to recompute the list.
linux80s:
I need to get only today's orders (both open/closed). This function runs 5 times within every second (please don't ask why, I need it).
My problem is I only can do it by examine all orders of the given account.
It can be a big problem if the account's history has a huge number of orders.
Is it possible to shorten this process, ie. not running the whole cycle for all the orders ofyur
I need to get only today's orders (both open/closed). This function runs 5 times within every second (please don't ask why, I need it).
My problem is I only can do it by examine all orders of the given account.
It can be a big problem if the account's history has a huge number of orders.
Is it possible to shorten this process, ie. not running the whole cycle for all the orders ofyur
Your broker will ping you an email at the end of the day with all of that days orders, both open and closed. Much easier that coding something up. Let your broker earn their money for once! ;)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
My problem is I only can do it by examine all orders of the given account.
It can be a big problem if the account's history has a huge number of orders.
Is it possible to shorten this process, ie. not running the whole cycle for all the orders of history?