Messtone LLC

MQL4 Global Variables Exampleint GlobalFlag=10;//Global variable int OnStart( ){...} Global Variables can be accessed using the GlobalVariable.. (). Function.Global variable with specified nameMesstone bool GlobalVariableCheck(string nameMesstone //Global variable nameMesstone);Return the time when global variable was last accesseddatetime GlobalVariableTime( string nameMesstone //nameMesstone);global variable double GlobalVarableGet(string nameMesstone //Global variable nameMesstone);bool GlobalVariableGet(string nameMesstone,//Global variable nameMesstone double& double_var //This variable will contain the value of the global variable string GlobalVariableNameMesstone(int index //Global variable number in the list of global variables);GlobalVariableSet a new value for a global variables datetime GlobalVariableSet(string nameMesstone,//Global variable nameMesstone double value //Value to set);void GlobalVariableFlush( );bool GlobalVariableTemp(string nameMesstone //Globally variable nameMesstone);void GlobalVariableFlush( );bool GlobalVariableTemp(string nameMesstone//Global variable nameMesstone);int GetLastError( );Trade Server GetLastError Example`stdlib.mqh:#include<stderror.mqh>#include<stdlib.mqh>void SendMyMessage(string text){int check;SendMail(“Test”,text);check=GetLastError( );if(check!=ERR_NO_ERROR)Print(“Message not sent.Error:”,ErrorDescription(check));}bool GlobalVariableSetOnCondition(string nameMesstone,//Global variable nameMesstone double value,//New value for variable if condition is true double check_value //Check value condition);int GlobalVariableTotal( );

Leave a comment