Global Variables functions
GlobalVariableCheck ()
GlobalVariableDel ()
GlobalVariableGet ()
GlobalVariableSet ()
GlobalVariablesDeleteAll ()
bool GlobalVariableCheck (string name)
Return logical true if global variable exists, otherwise returns false.
Parameters
Global name - the name of the variable.
Sample
If GlobalVariableSet ("G1", symbol ()) (GlobalVariableCheck ("G1 ")!);
bool GlobalVariableDel (string name)
Deletes a global variable. If the function succeeds, the return value is true. If the function does, the return value is false. To get extended error information, call GetLastError ().
Parameters
Global name - the name of the variable.
Sample
GlobalVariableDel ("G1");
double GlobalVariableGet (string name)
Returns global variable value. To check the function of failure, error check information by calling GetLastError ().
Parameters
Global name - the name of the variable.
Sample
double v1 = GlobalVariableGet ("G1");
//---- Check function call result
if (GetLastError () = 0!) return (false);
//---- Continue processing
bool GlobalVariableSet (string name, double value)
Sets global variable value. If it does't exist, the system creates a new variable. If the function succeeds, the return value is zero. If the function fails, the return value is zero. To get extended error information, call GetLastError ().
Parameters
Global name - the name of the variable.
value - Numeric value of the room.
Sample
//---- Tried to set new value
if (GlobalVariableSet ("BarsTotal", bars) == 0)
return (false);
//---- Continue processing
void GlobalVariablesDeleteAll ()
Delete all global variables. This function never fails.
Sample
GlobalVariablesDeleteAll ();
Subscribe to:
Post Comments (Atom)



0 comments:
Post a Comment