tick()

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.

tock()

User-supplied function that is called once per minute (adjustable via TockTime), regardless of price quotes. This function can be used f.i. for periodic input/output tasks.

Remarks:

Example:

// print every price quote in a file
function tick()
{
file_append("Log\\ticks.txt",
strf("\n%i.%i %2i:%2i:%2.3f => %s %4.5f",
day(),month(),hour(),minute(),second(),Asset,priceClose()));
}

See also:

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

► latest version online