Type/to search
Getting Started
Welcome to FMZ Quant Trading Platform
Quick Start
Key Security
Platform Basics
Account and Billing
Live Robot Billing and Top-up
Sub-accounts
Exchange
General Protocol
Local Credential Files
Exchange-Specific Notes
Securities and Futures
Crypto
Docker
Strategy Library
Live Trading
Writing Strategies
Development Tools
Backtesting System
Advanced Topics
Data and Research
Integrations

init() is the initialization function implemented by the user. When a strategy starts running, the init() function is automatically executed first to complete the initialization tasks designed within the strategy.

Examples

javascript
function main(){ Log("First line of code executed!", "#FF0000") Log("Exiting!") } // Initialization function function init(){ Log("Initializing!") }
python
def main(): Log("First line of code executed!", "#FF0000") Log("Exiting!") def init(): Log("Initializing!")
rust
fn main() { Log!("First line of code executed!", "#FF0000"); Log!("Exiting!"); } // Initialization function fn init() { Log!("Initializing!"); }