Predefined Strings

Script

The name of the script without the ".c" extension; can be modified for loading parameters, rules, and factors from the training files of a different script. Script names must not contain spaces or special characters.

Algo

The current algorithm identifier, set up by the algo function or a TMF (read/only). Algo names must be short and not contain spaces or special characters.

Asset

The current asset name, set up by the [Asset] scrollbox, the asset function, a tick function, a TMF or a trade loop (read/only).

Symbol

The full symbol string of the current asset as set up in the asset list, including type, counter currency, and exchange; or the asset name when the asset has no assigned symbol.

Assets

A NULL-terminated string array containing the names of all available assets in the asset list (read/only). Can be used as a loop parameter or for enumerating, f.i. for(N = 0; Assets[N]; N++). The asset names are valid after the first asset or assetList call. The number of assets in the list is returned by assetList.

FactorList

The last part of the file name - including extension - of the file containing the OptimalF factors; can be set for selecting between different sets of factors. If not set up otherwise, the file begins with the script name and ends with ".fac", f.i. "Z12.fac". Set FactorList f.i. to "oos.fac" for reading the factors from the file "Z12oos.fac".

History

The last part of the file name - including extension - of the historical data files; for selecting between different sets of price histories for the same asset. If not set up otherwise, the files begin with the asset name and year number, and end with ".t6". Examples: History = "fxcm.t6" reads price history from f.i. EURUSD_2015fxcm.t6; History = ".t1" reads T1 price history from EURUSD_2015.t1. History = ".t6" has a special meaning - it reads price history files without a year number, f.i. "AAPL.t6" (for daily bars only). History must be set before calling asset().

Curves

The file name - including path and extension - for exporting equity or balance curves of all optimize parameter variants in [Train] mode (see export). Also used for storing the daily equity curve in [Test] mode. The LOGFILE flag must be set for recording curves. If Curves is not set, no curves are exported in [Train] mode, and in [Test] mode the equity/balance curve is exported to a *.dbl file in the Log folder.

ZorroFolder

The folder in which Zorro was installed, with trailing backslash, f.i. "C:\Program Files\Zorro\" (read/only). This is not necessarily the root folder of the data files - see the remarks about UAC.

WebFolder

The folder for the HTML page that displays the trade status. If not set up otherwise, the HTML documents are generated in the Log folder. Can be set up in the Zorro.ini file.

Account

The account name from the scrollbox, f.i "Demo" or "Real" or a user-defined account name from the account list (read/only).

Broker

The broker plugin name from the selected plugin, f.i "MT4" or "FXCM" (read/only).

Factors

String containing the content of the .fac file with the OptimalF factors (read/only). The string is empty in the initial run, as the factors file is loaded after the assets.

Type:

string
 

Remarks:

Examples:

Script = "MyScriptV2"; // store and load parameters under "MyScriptV2.par"
History = "s1.bar";   // read historical data from f.i. "EURUSD_2013s1.bar"
WebFolder = "C:\\inetpub\\vhosts\\httpdocs\\trading";  // VPS web folder

See also:

algo, asset, AlgoVar, data import, included scripts

 

► latest version online