I want to be sure I understand how MT4 handles the forex servers.
I’ve been working with the assumption that there are market data servers which tick the EA and a broker server which I need to query separately for account information. I started cleaning up an EA to stop it from checking OrdersTotal() every tick, thinking that reduces server queries and lightens my communication load. But maybe this is not the case?
So my question is: Does each tick download account, as well as market, info? Is a check of OrdersTotal() for example, a local, and not a remote, check?
Thanks for your help.
Thanks for the help!
I understand that the value of OrdersTotal() can change intra tick. I just want to be clear about #4:
Then a line like "int numTickets=OrdersTotal();" DOES NOT constitute an additional server query, it just retrieves the value of a local variable "OrdersTotal()", which was refreshed to the value which existed at the instant of the tick, correct?
It retrieves the last value saved from the last update received. If an update is received while your OnTick is busy (server calls takes time seconds/minutes) the value changes between calls.
It is not the value at the beginning of the tick, it is the current value.
To add comments, please log in or register