文章 "MetaTrader 5 和 MATLAB 交互" - 页 3

 

我在 UnitDll.cpp 中发现了一个小错误

最好用 OR 而不是 AND 进行检查

因此您不能向关闭的引擎发送命令



bool __stdcall mlxInputChar(char *CharArray)
{//100% ready. Function of passing command/function/text to desktop
	/*
	** Check if virtual machine and string are present
	*/
----> // Original with Bug -> if((pEng == NULL)&&(strlen(CharArray)<1)) return false;        <---
	if (( pEng == NULL) || (strlen(CharArray)<1)) return false;
	/*
	** Enter formula into MATLAB desktop
	*/
	engEvalString((Engine *) pEng, CharArray);
	return true;
}
 
哥能不能把你的详细教程发一个