Version |
Returns the current version number of the system |
Sleep |
Sleep function, parameter is the value of milliseconds to pause |
IsVirtual |
Determine the execution environment, return a true value to indicate a backtest environment |
Mail |
Send an email |
Mail_Go |
Asynchronous version of the Mail function |
SetErrorFilter |
Filter error logs, the parameter is a regular expression string, the error logs matched by this regular expression will not be uploaded to the logging system |
GetPid |
Get the bot process Id |
GetLastError |
Get the last error message |
GetCommand |
Get strategy interaction commands, strategy interaction control settings can be queried: interaction control |
GetMeta |
Get the value of Meta written when generating the strategy registration code |
Dial |
Used for raw socket access |
HttpQuery |
Send Http request |
HttpQuery_Go |
Asynchronous version of the HttpQuery function |
Encode |
Data encoding function |
UnixNano |
Get nanosecond timestamps |
Unix |
Get second-level timestamps |
GetOS |
Getting system information |
MD5 |
Calculate MD5 |
DBExec |
Database functions that can be used to execute SQL statements and perform database operations |
UUID |
Generate UUID |
EventLoop |
Listen for events and return after any websocket is readable or concurrent tasks such as exchange.Go , HttpQuery_Go , etc. are completed, this function is only available for live tradings |
_G |
Persistently saving data, this function implements a saveable global dictionary function. The data structure is a KV table, which is stored in the docker’s local database file permanently |
_D |
Timestamp handler, converts a millisecond timestamp or Date object to a time string |
_N |
Formatting a floating point number, e.g. _N(3.1415, 2) will remove the value of 3.1415 after two decimal places, and the function returns 3.14 |
_C |
Retry function for interface fault tolerance. Note that, for example, fault tolerance for the exchange.GetTicker function is _C(exchange.GetTicker) and not _C(exchange.GetTicker()) |
_Cross |
Cross judgment function, _Cross() function’s return value is a positive number indicates the period of the upward penetration, a negative number indicates the period of the downward penetration, and 0 refers to the current price of the same |
JSONParse |
Parsing JSON, which can correctly parse JSON strings containing larger values, will parse larger values to a string type. The JSONParse() function is not supported in the backtesting system. |