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
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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