OS
FMZ Quant Trading Platform supports file read/write operations. The os library provides a complete file system operation interface to help users with data persistence, configuration management, and logging during strategy development.
Note that this feature only supports JavaScript language strategies.
The os library supports: File objects, File list objects, and File information objects.
| Object | Description | Notes |
|---|---|---|
| File Object: File | Provides file read/write, positioning and other operations. | Obtained through os.open(), need to call close() to release resources after use. |
| File List Object: ListFilesResult | Used to record directory listing information. | Supports wildcard matching patterns, returned by os.listFiles() function. |
| File Information Object: FileStat | File statistics information. | Returned by os.stat() function. |
Supports live trading and backtesting systems.
- Live trading environment:
Each live trading has its own file directory: thefilesfolder at the same level as the live trading database file in the docker directory, i.e.logs/storage/xxx/files(relative to the docker directory), wherexxxis the live trading ID, and the docker program (robot) is at the same level aslogs. Files of different live tradings do not affect each other. - Backtesting system environment:
The backtesting system is a sandbox environment. The system simulates a file directory with the default directory:/logs/storage/1/files.
When backtesting ends, the created file contents will be cleared.
In this sectionRead the whole section
| Name | Description |
| os (13) | Provides strategies with a complete file system operation interface. |
| File (11) | An object that provides file read/write, positioning and other operations. |
| ListFilesResult | File list object used to record directory listing information. |
| FileStat | File statistics information object. |