Discussione sull’articolo "Interazione MetaTrader 5 e MATLAB" - pagina 3

 

Ho trovato un piccolo bug in UnitDll.cpp

È meglio controllare con OR e non con AND

Così non si può inviare un comando a un motore chiuso



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;
}
 
Puoi pubblicare il tuo tutorial dettagliato?