Type/to search
Getting Started
Platform Basics
Writing Strategies
Strategy Structure
Programming Languages
Strategy Parameters
Interface Parameter Types
Component Configuration
Save Parameter Settings
Interactive Controls
Strategy Frontend
Template Library
Built-in Libraries
UI Text Localization
API Quick Reference
Development Tools
Backtesting System
Advanced Topics
Data and Research
Extended API Interface

Strategy parameters set for a backtest can be saved into the strategy code; a live robot's parameters can be exported to a file and imported into another robot.

Saving backtest parameters

After changing strategy parameters on the backtest page, click "Save Backtest Settings": the parameters are saved together with the backtest configuration as a comment block at the top of the strategy code; see Backtest Configuration and Saving. For example, for a strategy with these parameters:

VariableDescriptionTypeDefault
numberNumberNumber (number)1
stringStringString (string)Hello FMZ
comboxDropdownDropdown (selected)1|2|3
boolBooleanBoolean (true/false)true
numberANumber A (filter isShowA: available only when isShowA is true)Number (number)2
isShowAWhether to show numberABoolean (true/false)false

after changing the values and saving, the block at the top of the code looks like this (JavaScript and Rust use /*backtest ... */, Python uses '''backtest ... '''):

javascript
/*backtest start: 2020-02-29 00:00:00 end: 2020-03-29 00:00:00 period: 1d args: [["number",2],["string","Hello"],["combox",2],["bool",false],["numberA",666],["isShowA",true]] */
python
'''backtest start: 2020-02-29 00:00:00 end: 2020-03-29 00:00:00 period: 1d args: [["number",2],["string","Hello"],["combox",2],["bool",false],["numberA",666],["isShowA",true]] '''

If a Rust strategy declares dependencies in a frontmatter block at the top, the backtest configuration block must come after the frontmatter; see Rust.

Importing and exporting live robot parameters
  1. On the robot page, click "Parameter Settings", then "Export Parameters"; the parameters are saved as a json file.
  2. On the robot page that should receive them, click "Import Parameters" and choose the exported file.
  3. Click "Update Parameters" to save; the imported parameters take effect only then.