I wrote a basic function in Matlab, this function outputs anythng that is inputted.
Using the Matlab compiler with the following instruction, 8 files were generated.
The following files were generated, these files are attached in the zipped file.
dlltest.lib
dlltest.exp
dlltest.dll
dlltest_mcc_component_data.c
dlltest.ctf
dlltest.h
dlltest.exports
dlltest.c
When i load the dlltest.dll back into Matlab to see what function are available, the following shows up:
In MT4, i used the following commands to use the Matlab function:
MT4 throws the following error:
cannot call function 'mlfCo_int_function' from dll 'dlltest.dll' (error 127)
Matlab created standard DLLs, for some reason, i cannot execute it.
I followed these same steps using Matlab R2010b and Visual Studio 2008 professional and do not get the error 127.
Maybe it is specific to the Matlab version you are using.
OTOH I am trying to work out how to pass the parameters to the mlfCo_int_function.
I assume iint is a misprint for int?
After you initialise first with dlltestInitialize the function call to mlfCo_int_function just crashes MetaTrader.
BTW I am aware this is an old thread but am adding my experiences for other people doing searches on MATLAB and MQL4.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I wrote a basic function in Matlab, this function outputs anythng that is inputted.
Using the Matlab compiler with the following instruction, 8 files were generated.
The following files were generated, these files are attached in the zipped file.
dlltest.lib
dlltest.exp
dlltest.dll
dlltest_mcc_component_data.c
dlltest.ctf
dlltest.h
dlltest.exports
dlltest.c
When i load the dlltest.dll back into Matlab to see what function are available, the following shows up:
In MT4, i used the following commands to use the Matlab function:
MT4 throws the following error:
cannot call function 'mlfCo_int_function' from dll 'dlltest.dll' (error 127)
Matlab created standard DLLs, for some reason, i cannot execute it.