0bps

Strategy vault / Other

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…

JavaScriptOther
Author
发明者量化-小小梦
Complexity
Starter · 20 lines
Parameters
4
Backtest bar
15m · intraday

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

NameDefaultWhat it controls
number9999Numeric type
booltrueBoolean Type
stringHello World!String type
comboBox0Dropdown 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.

in Claude Code, Cursor, Codex & 4 more
/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
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. 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.

Related specs

esc

Try , , or .

↑↓ move↵ open