Data exchange between two MT4 terminals? - page 4

 

I used to do such a connection between terminals via WinAPI. The list of open windows would look for all running MT4 terminals. There were 2 options for getting quotes:


1. Read quotes from the "Market Watch" (ListView type control) of found terminals. It can be done only from external DLL.

2) Without using external DLL. In each terminal the Expert Advisor that has been started writes its quotes (for its symbol) into the text descriptor of its window. And an Expert Advisor of another terminal finds this window (with its own symbol name) and reads the quote.


There was one disadvantage: if connection with the trade server on one of the terminals is broken, the Expert Advisor on the other terminal will not know about it. To avoid such a situation, experts on each terminal should write the current time in a text descriptor of some window (the second variant can be written in their windows). This is done after certain short time intervals (e.g. 0.5 sec.). The Expert Advisor of another terminal reads this time and compares it to its own time.

 
Meat:

I used to do such a connection between terminals via WinAPI. The list of open windows would look for all running MT4 terminals. There were 2 options for getting quotes:


1. Read quotes from the "Market Watch" (ListView type control) of found terminals. It can be done only from external DLL.

Could you go into a little more detail, it's very interesting. I'd be very grateful.
 
Sergey_Murzinov писал (а): A little more detail can you, it's very interesting. I would be very grateful.
Unfortunately I don't have the source code of DLL (and DLL itself) at the moment. But I described the general algorithm here: https://www.mql5.com/ru/forum/107435/page3

If you need more detail, you can find a ready-made design on the Internet, using a search engine (something like "get text from ListView").

 

I've done such a bind via files (up to 5 terminals), I haven't seen any lags.

The time it takes to execute a trade operation is several orders of magnitude longer than the time it takes to exchange information.

 
komposter:

I have done such a bind via files (up to 5 terminals), I haven't seen any lags.

The time it takes to execute a trade operation is several orders of magnitude longer than the time it takes to exchange information.

I understand that it's been more than a month, but maybe...

You've mentioned the topic of terminal binding via files, it is what I want to implement for me. Been on the forums for two days now, but still haven't found which way to go. All I need is to copy a written file from one terminal to other terminals (experts/files). I'm not a programmer, I don't know how to do it. I've found a ShellExecuteA function, it can run an external application from an indicator, but if it is possible there is a way to copy files from an EA to another one (not MQL) without creating an additional bat-file. Please help, maybe there is some link to ready-made scripts. I may have a hard time understanding it myself, DLL and WinAMI is still an unfamiliar topic for me. Thanks in advance.

 
I wonder why 2 DCs, take two positively correlated pairs, get the same result.
 
iskatel писал (а):П I realise it's been over a month, but maybe... You've mentioned here the topic of linking terminals via files, it's something I want to implement for myself. Been on the forums for two days now, but still haven't found which way to go. All I need is to copy a written file from one terminal to other terminals (experts/files). I'm not a programmer, I don't know how to do it. I've found a ShellExecuteA function, it can run an external application from an indicator, but if it is possible there is a way to copy files from an EA to another one (not MQL) without creating an additional bat-file. Please help, maybe there is some link to ready-made scripts. I may have a hard time understanding it myself. DLL and WinAMI is still an unfamiliar topic for me. Thanks in advance.

See how it is implemented here: 'Automatic optimization of a trading robot in real trading'.

Copying using ShellExecuteA.

 
xrust:
I wonder why 2 DCs, take two positively correlated pairs, get the same result.

2 DCs, this is from life experience " don't put all your eggs in one basket", whatever: problems with withdrawal, server hangs up. I'm sure you know more about such situations than I do. Looking for scripts to automate their work. I don't really have 2, I have more. I like to trade manually and while repeating one and the same actions you may be mistaken somewhere. And computer on several terminals will execute operations much faster than me. But it looks like I have already found what I was looking for. Thanks for your forum, good job.

By the way, I must confess that I don't know what "positively correlated pairs" are. From the whole sentence I only know the word "result".

Thanks for the answers.

 
The system has long been implemented...
want to get with the details... knock stu_dent [@]mailcan.com
 
DentStu:
The system has long been implemented...
want to get with the details... knock stu_dent [@]mailcan.com

Yeah, I already did. But thanks anyway.