Discussion of article "MetaTrader 5 and MATLAB Interaction" - page 3

 

I found a little bug in UnitDll.cpp

Its better to check  with OR and not AND

So you cant send a command to a closed Engine



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;
}
 
Can you post your detailed tutorial?