Download MetaTrader 5
To add comments, please log in or register
Do you know C++? MQL5 has much in common with it. Just try it yourself!
MetaQuotes Software Corp.
Moderator
177308
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
15
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()
{
mclmcrInitialize();
return mclRunMain((mclMainFcnType)run_main,0,NULL);

}

Or


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