List of user-supplied functions

The following functions can be supplied in the script and are automatically executed at certain events:


The main function of a standard C program, executed at the start of the program.


The main function of a strategy script, executed at the end of every bar period (-> run).


Executed at every price tick from the historical files or from the broker's price server (-> tick).


Executed every minute (-> tock).

callback(void* ptr): int

Executed by the broker API with a BrokerProgress call.

click(int row, int col)

Executed when a control panel button is clicked.

TMF(var Parameter1, ... var Parameter8)

Trade Management Function, assigned to a trade and executed at certain trade events (-> TMF).

evaluate(PERFORMANCE *)

Called at the end of every simulation run in [Test] mode for evaluating or storing the result (-> evaluate).


Called at the end of every simulation run in [Train] mode; determines the optimizing objective. Pre-defined in default.c for calculating the PRR, but can be replaced by a user defined function (-> optimize).

order(int type)

Function for executing or displaying orders (-> order).

neural(int mode, ínt model, int numSignals, void* Data), neuralInit

Function for calling external machine learning algorithms (-> advise).

bar(vars Open, vars High, vars Low, vars Close, vars Price, DATE Start, DATE Time)

Defines special bars, such as price movement bars or smoothed bars (-> bar).

See also:


► latest version online