Download MetaTrader 5

Cannot load DLL file from MT5 - No error specified

To add comments, please log in or register
kaleb
161
kaleb  

Dear Forum,

 

I've been trying to load a DLL file from MT5 but the following messages appears under experts tab:

2013.03.12 12:30:45 TestMLEngine (USDJPY,H1) unresolved import function call

2013.03.12 12:30:45 TestMLEngine (USDJPY,H1) Cannot call 'mlxOpen', 'LibMlEngine.dll' is not loaded

 2013.03.12 12:30:45 TestMLEngine (USDJPY,H1) Cannot load 'C:\MetaTrader 5\MQL5\Libraries\LibMlEngine.dll'

It's not an EA which is making the call but a script. I don't think it's due to a bad coding because I have taken the files from a MT5 collaborator in this link: https://www.mql5.com/en/articles/44. The files I'm using are contained in this zip: https://c.mql5.com/2/7/dllmatlab_en__3.zip

 

Could anybody teach me which is the problem?

Many thanks.

Ethan. 

MetaTrader 5 and MATLAB Interaction
MetaTrader 5 and MATLAB Interaction
  • 2010.08.05
  • Andrey Emelyanov
  • www.mql5.com
This article covers the details of interaction between MetaTrader 5 and MatLab mathematical package. It shows the mechanism of data conversion, the process of developing a universal library to interact with MatLab desktop. It also covers the use of DLL generated by MatLab environment. This article is intended for experienced readers, who know C++ and MQL5.
Alain Verleyen
Moderator
29862
Alain Verleyen  
kaleb:

Dear Forum,

 

I've been trying to load a DLL file from MT5 but the following messages appears under experts tab:

2013.03.12 12:30:45 TestMLEngine (USDJPY,H1) unresolved import function call

2013.03.12 12:30:45 TestMLEngine (USDJPY,H1) Cannot call 'mlxOpen', 'LibMlEngine.dll' is not loaded

 2013.03.12 12:30:45 TestMLEngine (USDJPY,H1) Cannot load 'C:\MetaTrader 5\MQL5\Libraries\LibMlEngine.dll'

It's not an EA which is making the call but a script. I don't think it's due to a bad coding because I have taken the files from a MT5 collaborator in this link: https://www.mql5.com/en/articles/44. The files I'm using are contained in this zip: https://c.mql5.com/2/7/dllmatlab_en__3.zip

 

Could anybody teach me which is the problem?

Many thanks.

Ethan. 

Can you show your script code (start with # import, not all the script) ?
kaleb
161
kaleb  
angevoyageur:
Can you show your script code (start with # import, not all the script) ?
#import "MatlabEngine.ex5"
bool mlOpen(void);
void mlClose(void);
bool mlInputChar(string array);
bool mlInputDouble(double &array[],
                   int sizeArray,
                   string NameArray);
bool mlInputInt(int &array[],
                int sizeArray,
                string NameArray);
int mlGetDouble(double &array[],
                string NameArray);
int mlGetInt(int &array[],
             string NameArray);
bool mlInputLogical(bool &array[],
                    int sizeArray,
                    string NameArray);
int mlGetLogical(bool &array[],
                 string NameArray);
int mlGetSizeOfName(string strName);
#import
Thanks!
Alain Verleyen
Moderator
29862
Alain Verleyen  
kaleb:
Thanks!

Are you sure you have copy LibMlEngine.dll here C:\MetaTrader 5\MQL5\Libraries\ ?

What is your system Windows xx, 32 or 64 bits ?

kaleb
161
kaleb  
angevoyageur:

Are you sure you have copy LibMlEngine.dll here C:\MetaTrader 5\MQL5\Libraries\ ?

What is your system Windows xx, 32 or 64 bits ?

 

Yes, I'm sure. See attached. 

Windows 7 -32 bit

Files:
dll_problem.jpg 274 kb
Alain Verleyen
Moderator
29862
Alain Verleyen  
kaleb:

 

Yes, I'm sure. See attached. 

Windows 7 -32 bit

Sorry but I can't help you. I have 64 bits system only and no experience with Mathlab. Maybe another moderator or admin, be patient...and read carefully article and comments that you give the link, as I see another member that have problem too.
Simon Gniadkowski
Moderator
18058
Simon Gniadkowski  
kaleb:

 

Yes, I'm sure. See attached. 

Windows 7 -32 bit

Did the comments at the bottom of the article help at all ?
Andrey Voytenko
16432
Andrey Voytenko  

Copy all this DLL to <terminal path>\MQL5\Libraries


All this DLLs you can take from C:\Program Files\MATLAB\R2011a\bin\x86

kaleb
161
kaleb  
avoitenko:

Copy all this DLL to <terminal path>\MQL5\Libraries


All this DLLs you can take from C:\Program Files\MATLAB\R2011a\bin\x86

Thank you all for you replies.

I found the problem. Many missing DLLs under system32 folder of Windows. Thanks avoitenko, I used the Dependency Walker to discover the DLL files. 

sandeep_93
5
sandeep_93  

@kaleb / Anybody else with this problem:

I am facing the exact same issue. How exactly did you fix it? I have placed C:\Program Files (x86)\MATLAB\R2013b\bin\win32 in my system PATH, have confirmed that all .dlls (libmx.dll, libeng.dll etc) are present either in <terminal path>\MQL5\Libraries or C:\Windows\System32 folder or C:\Program Files (x86)\MATLAB\R2013b\bin\win32, but I am still unable to load the LibMlEngine.dll in MetaTrader 5.

 

Any help would be appreciated. Thanks!

Ionescu Mihai Florin
1737
Ionescu Mihai Florin  

it's probably late, 

but I've bumped into this issue also.

 

In my case,

because I've installed metatrader 5 64bit version,

the solution was a 64 bits version of the dll (which I found eventually)

Maybe this will help others 

To add comments, please log in or register