DLL import for optimisation in Local Network Farm not allowed?

 

Hi,

I've been trying to run an EA with an Indicator that uses a DLL.  I can get it to run in the optimiser perfectly using all "Local Agents" selection, however I can't get it to run when I switch to 'Local Network Farm'. Regardless of whether the agents are set up on another machine or the same machine, I keep getting "DLL loading is not allowed" in the logs.


Another forum topic https://www.mql5.com/en/forum/377926 discusses this, but I don't know what the answer from Fernando means - 'disable the Cloud optimisations completely' ? I don't see any further options to disable optimisations.


I have tried updating the common.ini in both the "C:\Program Files\MetaTrader 5\Tester\Manager" and "C:\Program Files\MetaTrader 5\Tester\Agent-0.0.0.0-2000"  folders to include:

[Experts]
AllowDllImport=1

These folders are where the config for the local agents are stored (the port 2000 series of agents which are the 'Local Network Farm Agents', as opposed to the 3000 series, which are the 'Local Agents'.


If anyone knows of a possible way to do this, or know for sure that it is forbidden to ever run dll's from the Local Network Farm, please let me know.


Thanks in advance.

Tester - imported DLL "kernel32.dll" not allowed in Cloud Network
Tester - imported DLL "kernel32.dll" not allowed in Cloud Network
I get this message during optimizations Tester - imported DLL "kernel32.dll" not allowed in Cloud Network...
Tester - imported DLL "kernel32.dll" not allowed in Cloud Network
Tester - imported DLL "kernel32.dll" not allowed in Cloud Network
  • 2021.09.18
  • www.mql5.com
I get this message during optimizations Tester - imported DLL "kernel32.dll" not allowed in Cloud Network...
 

Please refer to the documentation ... Strategy Optimization - Algorithmic Trading, Trading Robots - MetaTrader 5 Help

How to Create a Farm of Agents

Remote agents can only be used in 64 bit systems.

To save traffic and disk space, as well as for security reasons:

  • messages of Expert Advisors (Print() function) and messages about trade operations are not added to the Journal;
  • DLL call is prohibited on remote agents.
Strategy Optimization - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
  • www.metatrader5.com
The Strategy Tester allows you to test and optimize trading strategies ( Expert Advisors ) before using them for live trading. During testing, an...
 

Thanks Fernando.


I thought 'Local Network Farm' Agents were different from 'Remote Agents', perhaps not. Now seems any Agent that is not Local is Remote. I'm sure in the past I've used DLLs in the Local Network Farm, something has changed.


If the DLL is accessed from the EA, you get the message 'imported DLL "test.dll" not allowed in Cloud Network'. This seems to differentiate the 'Cloud Network' from 'Local Network Farm', but it stops both.

What I was actually doing was calling the DLL from a custom indicator called from an EA so the above message wasn't displayed, but  "DLL loading is not allowed" was in the agent logs. And it's doubly confusing because sometimes you need to restart the MetaTrader client if you've moved between 'Local Network Farm' and 'Local Agents', otherwise you still get the error message regardless.


Seems strange they don't let us use dll's on a Local Farm, because if we have access to install the agents, then giving us access to run a dll isn't any more dangerous.


Regards.