call (int Mode, void* Function, int P1, var P2)

Put a function on a scheduler in order to to be exeuted at a certain event. Two parameters, int and var, can optionally be passed to the function.

Parameters:

Mode Run the function: 1 when the system is idle, 2 at the next incoming tick, 4 after closing a trade, +16 for repeating.
Function Pointer to a script-defined function.
P1 int variable to be passed to the function as first parameter, or 0 when the function has no parameters.
P2 var variable to be passed to the function as second parameter, or 0 when the function has no second parameter.
 

Remarks:

Example:

void calltest(int a,var b)
{
  printf("\nCalled with (%i,%.2f) at bar %i",a,b,Bar);
}

void run()
{
  ...
  call(1,calltest,2,3.45);
  ...
}

See also:

 run, lock, quit, version, wait, click

► latest version online