Type/to search
Welcome to FMZ Quant Trading Platform
Programming Languages
JavaScript
TypeScript
Python
C++
MyLanguage
PINE Language
Blockly Visual Programming
Workflow
Key Security
Live Trading
Strategy Library
Docker
Deploy Docker
One-Click Docker Rental
Manual Deployment of Bot
Docker Operation Precautions
Global IP Address Specification
Command Line Parameters for Bot Program
Live Trading Data Migration
Docker Monitor
Exchange
Strategy Editor
Backtesting System
Strategy Entry Functions
Strategy Framework and API Functions
Template Library
Strategy Parameters
Interactive Controls
Options Trading
C++ Strategy Writing Guide
JavaScript Strategy Writing Guide
Web3
Built-in Libraries
Extended API Interface
MCP Service
Trading Terminal
Data Explorer
Alpha Factor Analysis Tool
General Protocol
Debugging Tool
Remote Editing
Import and Export of Complete Strategies
Multi-language Support
Live Trading and Strategy Grouping
Live Trading Display
Strategy Sharing and Renting
Live Trading Message Push
Common Causes of Live Trading Errors and Abnormal Exits
Exchange-Specific Notes

Variable (naming example)DescriptionTypeDefault Value (description)Component Configuration (description)Notes
cmdNumDescription of interactive control cmdNumNumber type (number)Default value is optional, can be left emptyUsed to set the component type, minimum value, maximum value, grouping, etc. of the interface control bound to the current interactive itemNotes for interactive control cmdNum
cmdBoolDescription of interactive control cmdBoolBoolean type (true/false)Default value is required, on or offSame as aboveNotes for interactive control cmdBool
cmdStrDescription of interactive control cmdStrString type (string)Default value is optional, can be left emptySame as aboveNotes for interactive control cmdStr
cmdComboxDescription of interactive control cmdComboxDropdown (selected)Default value is optional, can be left emptySame as aboveNotes for interactive control cmdCombox
cmdBtnDescription of interactive control cmdBtnButton (button)Button control does not bind input itemsSame as aboveNotes for interactive control cmdBtn

Messages (strings) sent to the strategy after interactive control is triggered:

  • Number type
    After entering interactive data 123 in the input box of interactive control cmdNum, click the button of interactive control cmdNum. The GetCommand() function in the strategy program will receive the message: cmdNum:123.
  • Boolean type
    After setting the switch control of interactive control cmdBool to on, click the button of interactive control cmdBool. The GetCommand() function in the strategy program will receive the message: cmdBool:true.
  • String type
    After entering interactive data abc in the input box of interactive control cmdStr, click the button of interactive control cmdStr. The GetCommand() function in the strategy program will receive the message: cmdStr:abc.
  • Dropdown
    After selecting the second option in the dropdown of interactive control cmdCombox, click the button of interactive control cmdCombox. The GetCommand() function in the strategy program will receive the message: cmdCombox:1, where 1 represents the index of the selected option, the first option has index 0, the second option has index 1.
  • Button
    Click the button of interactive control cmdBtn. The GetCommand() function in the strategy program will receive the message: cmdBtn.

Application of interactive controls: Dynamically modify strategy parameters
For example, the strategy has a parameter called symbol. The strategy parameters added on the strategy interface are also global variables, so global variables in the code are used here for demonstration.

javascript
// Strategy parameters var symbol = "BTC_USDT" function main() { while (true) { var cmd = GetCommand() if (cmd) { var arr = cmd.split(":") if (arr.length == 2 && arr[0] == "changeSymbol") { // When changeSymbol control is triggered, parameter update operation will be executed Log("Changed symbol parameter to:", arr[1]) symbol = arr[1] } } LogStatus(_D(), ", Current symbol parameter value:", symbol) Sleep(3000) } }

Setting up interactive controls:

img