Using named pipes in remote agents on the same network

 

Hello everyone,

My setup :

Server1, has 74 local agents, this is where I start the optimization process

Server2, has 74 local agents, which are added to Server1 Local Network Farm.

Both are running Windows10 and latest stable MT5 version (build 4620).

My problem is that I'm running a c++ pipe server on Server1, all local agents can talk to it, but when a remote agent tries to connect to it, I get error 4014 (ERR_FUNCTION_NOT_ALLOWED) on the FileOpen call.

I know that Server2 can talk to Server1's pipe as I tested it with a nodejs script mimicking what the EA does under the hood, so I assume it has to do with the metatester.exe services themselves. Should I assume that Metatrader disallow this completly when error 4014 is received thus there will be absolutely no way of doing this ?

A bit of context on what I'm trying to achieve: my EA does not use MT5's input system as it is not scalable enough for me, it uses a json based config. When an optimization process is started, all possible config permutations are generated in separate json files which are then loaded in the pipe server. For every optimization pass, the EA sends a request to the pipe server and receives the serialized json of what config it needs to run. This setup works perfectly for me as long as I don't use remote agents from the local farm.

I am opened to suggestions on how to approach this problem, but another approach that I tried was to place all json files in Common folders of each servers, and it seems that even then, the remote farm agents were not able to access them. Scratching my head over here.

Thanks for any help!

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties
  • www.mql5.com
To obtain information about the currently running mql5 program, constants from ENUM_MQL_INFO_INTEGER and ENUM_MQL_INFO_STRING are used. For...
 
how about using WebRequest ?
 
Soewono Effendi #:
how about using WebRequest ?
It would be ideal, but according to the docs: WebRequest() cannot be executed in the Strategy Tester.
 
Mike D-rock #:
It would be ideal, but according to the docs: WebRequest() cannot be executed in the Strategy Tester.

yes indeed.
You might want to try this out then
https://www.mql5.com/en/docs/constants/io_constants/fileflags

especially the  FILE_SHARE_READ and  FILE_SHARE_WRITE

NOTE:
Never tried this before.

Good luck

Documentation on MQL5: Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags
Documentation on MQL5: Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags
  • www.mql5.com
File opening flag values specify the file access mode. Flags are defined as follows: One or several flags can be specified when opening a file...