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
||Run the function: 1 when the system is idle,
2 at the next incoming tick, 4 after
closing a trade, +16 for repeating.
||Pointer to a script-defined function.
||int variable to be passed to the function as first
parameter, or 0 when the function has no parameters.
||var variable to be passed to the function as second
parameter, or 0 when the function has no second
- Function can be a function either with no parameters
f(), with one f(int), or with two
parameters f(int,var). Automatic int/var
conversion will not take place here, so make sure that the first parameter
(if any) of the function is really a int or global pointer, and
the second parameter (if any) is really a var.
- call(1, ...) can be used to prevent that the called
function interrupts other functions or I/O operations. This is useful f.i. for entering
a trade or
writing to a file in a click or
- After being run, Function normally removes itself from the scheduler.
16 was added to Mode, the
function stays on the scheduler and keeps being called at the given event.
- Up to 16 functions can be placed on the scheduler at the same time. They
are then run in the order of their placement.
void calltest(int a,var b)
printf("\nCalled with (%i,%.2f) at bar %i",a,b,Bar);