Download MetaTrader 5
To add comments, please log in or register
Have you developed a profitable strategy? Share it with millions of traders via Signals!
MetaQuotes Software Corp.
MetaQuotes Software Corp. 2009.07.13 12:01 

New article Interaction between MеtaTrader 4 and MATLAB Engine (Virtual MATLAB Machine) is published:

The article contains considerations regarding creation of a DLL library - wrapper that will enable the interaction of MetaTrader 4 and the MATLAB mathematical desktop package. It describes "pitfalls" and ways to overcome them. The article is intended for prepared C/C++ programmers that use the Borland C++ Builder 6 compiler.

Author: Andrey Emelyanov

adam cox
adam cox 2014.10.05 00:47  

How are you initializing Matlab engine and stopping the Engine. I don't have Borland, but in your file I didn't see:

int main()
return mclRunMain((mclMainFcnType)run_main,0,NULL);



if (!mclInitializeApplication(NULL,0))
std::cerr << "could not initialize the application properly"
<< std::endl;
return -1;

 Also, what Matlab Header and Include files are you linking to your project?

In terms of the DLL you made via Matlab, I assume this was a static function in C which you then link via the .lib file made by Matlab? Please confirm you didn;t make a COM component which you then wrapped?

Thanks in advance

To add comments, please log in or register