You have an account with a broker. the MT4 platform conects with the the brokers server. The server sends the account status to MT4. Instance's of MT4 only have local setup information as being diferent like EA's running on a chart. When you request OrderTotal() you get the number of orders you have open from the brokers server.

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
Hi
I have an EA that covers all 3mjor timezone trading sessioms, what I am trying to do is only allow the EA to trade on a particular trading once per session.
The problem that I am having is the EA will only trade once per sesssion per running of the EA but I have it attached to many charts and two istances of mT4 running, this is t help organise thing better.
I have this code running below:
order properties:
code:
What I am trying to do if possible is if there is an open position already, or there has been a trade in that session then no trades can take place until the next session.
I noticed that even with 2 instances of MT4 running, the trade history is updated almost instance ven if there was no trade with that particular terminal.
Thank you
Antony