Predefined and user-supplied strings

Script

Name of the script without the ".c" extension. Can be changed for generating or loading parameters, rules, and factors from files with a different name, this way sharing training data with other scripts. Script names must not contain spaces or special characters.

Algo

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

Asset

The current asset name (read/only), set up initially by the [Asset] scrollbox. Is automatically changed at runtime with the asset function, a tick function, a TMF or a trade loop

AssetPrev

The name of the previously selected asset; in a trade loop the name of the asset that was selected before the loop.

Assets

A NULL-terminated string array containing the names of all available assets in the asset list (read/only). Can be used either as a loop parameter, or for enumerating assets, 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.

AssetBox

The name of the currently visible asset in the [Asset] scrollbox (read/only).

Account

The name selected with the [Account] scrollbox, f.i "Demo" or "FXCM".

Factors

Name suffix and 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 Factors f.i. to "oos.fac" for reading the factors from the file "Z12oos.fac".

History

User-supplied string with path, name suffix, and extension of the historical data files, for selecting between different sets and types (.t1, .t2, .t6, .t8) of price histories. If not set, .t6 and the HistoryFolder path is assumed. A '*' character at the begin of the name represents the asset name and an optional year number, '?' represents the asset name with no year number. History must be set before the first asset() or assetHistory() call. Examples (for AAPL 2015):
History = "*a.t6";
reads price history from AAPL_2015a.t6; if not found, uses AAPLa.t6.
History = "?.t6"; reads price history from AAPL.t6.
History = "History\\Temp\\*.t1"; reads tick data history from History\Temp\AAPL_2015.t1.
History = "D:\\Data\\Options\\*.t8"; reads price history from option chains in D:\Data\Options\AAPL.t8.

Curves

User-supplied string with path, name, and extension of the file containing the exported 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 exporting curves. If the file already exists, the curves are appended to the end. 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.

SymbolTrade

The trading symbol of the current asset as set up in the asset list; or the asset name when the asset has no assigned trading symbol. Does not contain the optional broker or price source name. Can be modified with strcpy.

SourceTrade

The trading account assigned to the current asset as set up in the asset list; for instance an account name in a multi-broker strategy, or an empty strig for trading with the currently selected account. Can be modified with strcpy.

SymbolLive

 

SourceLive

 

SymbolHist

SourceHist

The symbols and price sources of the current asset for live and historical prices. Can be modified with strcpy.

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.

Type:

string
 

Remarks:

Examples:

Script = "MyScriptV2"; // store and load parameters under "MyScriptV2.par"
History = "*s1.t6";    // read historical data from f.i. "EURUSD_2013s1.t6"
History = "?.t6";    // enforce historical data with no year number, f.i. "EURUSD.t6"
WebFolder = "C:\\inetpub\\vhosts\\httpdocs\\trading";  // VPS web folder
assetAdd(Asset,strf("%s:%s",NewSource,SymbolLive)); // change source of current asset

See also:

algo, asset, report, LogNumber, included scripts