Global
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
| Name | Description |
| Version | Returns the current system version number. |
| IsVirtual | Used to determine whether the strategy's runtime environment is the backtesting system. |
| GetOS | Retrieves the operating system information of the device hosting the bot. |
| GetPid | Get the ID of the live trading process. |
| GetMeta | Get the Meta value written when generating the strategy registration code. |
| Sleep | Pauses program execution for a specified period of time. |
| Unix | Get the second-level timestamp of the current moment. |
| UnixNano | Get the nanosecond-level timestamp of the current moment. |
| _D | Convert a millisecond-level timestamp or a Date object into a time string. |
| GetCommand | Get the strategy's interactive command. |
| GetLastError | Retrieves the most recent error message. |
| SetErrorFilter | Filters error logs. |
| _N | Format a floating-point number. |
| _C | A retry function used for fault-tolerant handling of interface calls. |
| _Cross | Returns the number of crossover periods between array arr1 and array arr2. |
| JSON.parse | Decodes (parses) a JSON string; a method of the ECMAScript standard built-in object JSON. |
| JSON.stringify | Converts JavaScript values to JSON strings; a method of the ECMAScript standard built-in object JSON. |
| Encode | This function encodes data according to the parameters passed in. |
| MD5 | Calculate the MD5 hash of the parameter data. |
| UUID | Create a UUID. |