Zorro Engine API

Zorro's trading, training, backtesting, and charting engine is available as a licensed library for developing own trading software or financial tools. For details and license fees please contact info@opgroup.de. All Zorro functions and variables can be accessed through the engine. Individual functions can be implemented on request. The following basic standard functions are available for initializing the engine, running a session, or plotting a chart:

zOpen () : GLOBALS*

Opens and initializes the engine. Call this before calling any other Zorro function. Returns a pointer to the GLOBALS singleton that contains all variables. GLOBALS is defined in include\trading.h.

Returns:

GLOBALS* when successful, NULL otherwise.
 

zClose ()

Closes the engine and frees all resources.
 

zStart (char* User, char* Pwd, char* Account, long Mode): int

Starts a trading, training, or backtest session. Logs in to the broker in trade mode. Starting a session is required for opening trades or retrieving prices.

Parameters:

User Input, User name for logging in.
Pwd Input, Password for logging in.
Account Input, account type like "Real" or "Demo", or a name from an account list.
Mode TRADEMODE, TRAINMODE, TESTMODE

Returns:

1 when successful, 0 otherwise.
 

zStep (long Mode): int

Proceeds the test, training, or trading session by one bar. Series are shifted and time parameters are updated.

Parameters:

Mode Not used yet.

Returns:

0 when the simulation is at its end, 1 otherwise. 
 

zTick (long Mode): int

Updates time, prices, trade statuses, and account status, in live trading as well as in the backtest. Automatically called by zStep(), but can also be called inbetween for intrabar evaluation.

Parameters:

Mode Not used yet.

Returns:

1 when new prices are available, 0 otherwise. 
  

zEnd (long Mode): int

Terminates the current session, and calculates trade statistics.

PParameters:

Mode 0 for normal termination, 1 for abort without calculating statistics

Returns:

1 when successful, 0 otherwise.
  

zChart (long Mode): int

Opens a chart window with the charts of the current or last session.

Parameters:

Mode 0 for opening with default size/scale, 1 for opening with the last size/scale.

Returns:

1 when successful, 0 otherwise.
  

See also:

enterShort/Long, price, chart, licenses ► latest version online