Turned out that API between MT4 terminal and server is proprietary. So it is possible that commercial solution do not exists. It keeps me wonder how FF and myfxbook are dealing with it. Anyway I had to write my own tool for this.