Type/to search
Built-in Functions
Global
Version
IsVirtual
GetOS
GetPid
GetMeta
Sleep
Unix
UnixNano
_D
GetCommand
GetLastError
SetErrorFilter
_N
_C
_Cross
JSON.parse
JSON.stringify
Encode
MD5
UUID
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Functions that need no exchange object: sleeping and time, error handling and retries, number formatting, JSON, encoding and hashing, and information about the runtime.

The most used are Sleep (polling interval), _D (format a time), _N (truncate decimals), _C (retry on failure) and GetLastError (read the latest error).

In this sectionRead the whole section

NameDescription
VersionReturns the current system version number.
IsVirtualUsed to determine whether the strategy's runtime environment is the backtesting system.
GetOSRetrieves the operating system information of the device hosting the bot.
GetPidGet the ID of the live trading process.
GetMetaGet the Meta value written when generating the strategy registration code.
SleepPauses program execution for a specified period of time.
UnixGet the second-level timestamp of the current moment.
UnixNanoGet the nanosecond-level timestamp of the current moment.
_DConvert a millisecond-level timestamp or a Date object into a time string.
GetCommandGet the strategy's interactive command.
GetLastErrorRetrieves the most recent error message.
SetErrorFilterFilters error logs.
_NFormat a floating-point number.
_CA retry function used for fault-tolerant handling of interface calls.
_CrossReturns the number of crossover periods between array arr1 and array arr2.
JSON.parseDecodes (parses) a JSON string; a method of the ECMAScript standard built-in object JSON.
JSON.stringifyConverts JavaScript values to JSON strings; a method of the ECMAScript standard built-in object JSON.
EncodeThis function encodes data according to the parameters passed in.
MD5Calculate the MD5 hash of the parameter data.
UUIDCreate a UUID.