Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
OS
os
File
ListFilesResult
FileStat
Structures
Built-in Variables and Constants
Conventions
Exchanges

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.

ObjectDescriptionNotes
File Object: FileProvides file read/write, positioning and other operations.Obtained through os.open(), need to call close() to release resources after use.
File List Object: ListFilesResultUsed to record directory listing information.Supports wildcard matching patterns, returned by os.listFiles() function.
File Information Object: FileStatFile statistics information.Returned by os.stat() function.

Supports live trading and backtesting systems.

  • Live trading environment:
    Each live trading has its own file directory: the files folder 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), where xxx is the live trading ID, and the docker program (robot) is at the same level as logs. 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

NameDescription
os (13)Provides strategies with a complete file system operation interface.
File (11)An object that provides file read/write, positioning and other operations.
ListFilesResultFile list object used to record directory listing information.
FileStatFile statistics information object.