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

Text in the strategy interface can be written in both Chinese and English; the web page shows the one matching the current language (refresh the page after switching languages):

  • Strategy name and descriptions of strategy parameters: write Chinese|English.
  • Strategy description, usage instructions and other Markdown text: write [trans]Chinese|English[/trans] or [trans]Chinese||English[/trans].
  • Functions in the strategy code that output strings, such as Log() and LogStatus(): the same as Markdown text; texts of status bar buttons are written Chinese|English directly, without the [trans] tag.
javascript
function main() { Log("[trans]日志|log[/trans]") // no [trans] tag inside buttons var btn = {"type": "button", "cmd": "coverAll", "name": "平仓|cover", "description": "描述|description"} var table = { type: "table", title: "[trans]操作|option[/trans]", cols: ["[trans]列1|col1[/trans]", "[trans]列2|col2[/trans]", "[trans]操作|option[/trans]"], rows: [ ["[trans]比特币|BTC[/trans]", "[trans]以太坊|ETH[/trans]", btn] ] } LogStatus("[trans]信息|message[/trans]", "\n`" + JSON.stringify(table) + "`") throw "[trans]错误|error[/trans]" }
python
import json def main(): Log("[trans]日志|log[/trans]") btn = {"type": "button", "cmd": "coverAll", "name": "平仓|cover", "description": "描述|description"} table = { "type": "table", "title": "[trans]操作|option[/trans]", "cols": ["[trans]列1|col1[/trans]", "[trans]列2|col2[/trans]", "[trans]操作|option[/trans]"], "rows": [ ["[trans]比特币|BTC[/trans]", "[trans]以太坊|ETH[/trans]", btn] ] } LogStatus("[trans]信息|message[/trans]", "\n`" + json.dumps(table) + "`") raise Exception("[trans]错误|error[/trans]")
rust
fn main() { Log!("[trans]日志|log[/trans]"); let table = r#"{ "type": "table", "title": "[trans]操作|option[/trans]", "cols": ["[trans]列1|col1[/trans]", "[trans]列2|col2[/trans]", "[trans]操作|option[/trans]"], "rows": [ ["[trans]比特币|BTC[/trans]", "[trans]以太坊|ETH[/trans]", {"type": "button", "cmd": "coverAll", "name": "平仓|cover", "description": "描述|description"}] ] }"#; LogStatus!("[trans]信息|message[/trans]", format!("\n`{}`", table)); Panic!("[trans]错误|error[/trans]"); }