Test Default Parameter Group Function
In the parameter testing of strategies, backtesting in different time periods, backtesting on multiple underlying objects, etc., the parameters need to be adjusted repeatedly when backtesting the strategy, and cannot…
How to use code to precisely adjust the 'backtesting system default settings'"
In the parameter testing of strategies, backtesting in different time periods, backtesting on multiple underlying objects, etc., the parameters need to be adjusted repeatedly when backtesting the strategy, and cannot be recorded, so they need to be reset the next time backtesting. In order to facilitate parameter adjustment, the platform has added a new function - precise adjustment of "backtest system default settings using code"".
Parameters
| Name | Default | What it controls |
|---|---|---|
| number | 9999 | Numeric type |
| bool | true | Boolean Type |
| string | Hello World! | String type |
| comboBox | 0 | Dropdown menu: combo1 | combo2 | combo3 |
Source JavaScript
/*backtest
start: 2017-03-01
end: 2017-03-02
period: 15
mode: 1
*/
/*defaults
number : 0
bool: false
string: Hello BotVS!
comboBox : 2
*/
function main(){
while(true){
LogStatus("Test default parameters!");
Sleep(1000);
}
}Published by 发明者量化-小小梦 on the FMZ strategy square · last modified 2021-07-02. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Test-Default-Parameter-Group-Function.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.