User-supplied function that is called on arrival of a new price quote of any asset used in the strategy. This function can be used when an immediate reaction on every new price quote is required.


User-supplied function that is called once per minute (adjustable via TockTime), regardless of price quotes. This function can be used for auxiliary purposes, such as periodic input/output tasks when live trading.

callback(void* Address)

User-supplied function that is called when either the BrokerProgress function is triggered with a pointer as argument, or when Zorro receives a WM_APP+2 window message. This function is not in sync with other functions or I/O operations, so use the call scheduler when modifying global variables or accessing non-reentrant parts of the broker API.  


Examples (see also HWnd):

// print every price quote in a file
function tick()
strf("\n%i.%i %2i:%2i:%2.3f => %s %4.5f",
// shift a static series in a tick function
vars MySeries; // use a global series variable

function tick()
{ ... shift(MySeries,priceClose(),100); // shift the series ...
} function run() { ... MySeries = series(0,-100); // generate a static series ...

See also:

Bars and Candles, Bar, BarPeriod, TickTime, manage, run, call, user supplied functions

► latest version online