0bps

Strategy vault / Other

Test Strategy Interface Parameters

This strategy is used to test the interface parameter functions in the Inventor Quantitative Trading Platform strategy design.

JavaScriptOther
Author
发明者量化-小小梦
Complexity
Intermediate · 33 lines
Parameters
14
Backtest bar
1d · swing
Tested on
BTC/USD · futures

This strategy is used to test the interface parameter functions in the Inventor Quantitative Trading Platform strategy design.

Parameters

NameDefaultWhat it controls
pNum1Note for parameter pNum1(? numeric parameter) Description of parameter pNum1
pNum2Remarks for parameter pNum2Description of parameter pNum2
pNum3Remarks for parameter pNum3Description of parameter pNum3
pNum4Remarks for parameter pNum4Description of parameter pNum4
pBool1Note for parameter pBool1(? Boolean parameter) Description of parameter pBool1
pBool2Note for parameter pBool2, used to control whether to display the description of pNum1Parameter pBool2
pStr1Note for parameter pStr1(? string parameter) Description of parameter pStr1
pStr2Remarks for parameter pStr2Description of parameter pStr2
pStr3Remarks for parameter pStr3Description of parameter pStr3
pStr4Remarks for parameter pStr4Description of parameter pStr4
pCombox1Remarks on parameter pCombox1(? Drop-down box type) Description of parameter pCombox1
pCombox2Remark for parameter pCombox2Description for parameter pCombox2
pCombox3Remark for parameter pCombox3Description for parameter pCombox3
pSecretStr1Note for parameter pSecretStr1(?type of encryption string) description of parameter pSecretStr1

Source JavaScript

/*backtest
start: 2023-06-21 00:00:00
end: 2024-06-26 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_OKX","currency":"BTC_USD"}]
*/

function main() {
    Log("---------------------------Start testing numeric parameters---------------------------")
    Log("VariablespNum1:", pNum1, ", Variable value type:", typeof(pNum1))
    Log("VariablespNum2:", pNum2, ", Variable value type:", typeof(pNum2))
    Log("VariablespNum3:", pNum3, ", Variable value type:", typeof(pNum3))
    Log("VariablespNum4:", pNum4, ", Variable value type:", typeof(pNum4))
    
    Log("---------------------------Start testing boolean parameters---------------------------")
    Log("VariablespBool1:", pBool1, ", Variable value type:", typeof(pBool1))
    Log("VariablespBool2:", pBool2, ", Variable value type:", typeof(pBool2))

    Log("---------------------------Start testing string type parameters---------------------------")
    Log("VariablespStr1:", pStr1, ", Variable value type:", typeof(pStr1))
    Log("VariablespStr2:", pStr2, ", Variable value type:", typeof(pStr2))
    Log("VariablespStr3:", pStr3, ", Variable value type:", typeof(pStr3))
    Log("VariablespStr4:", pStr4, ", Variable value type:", typeof(pStr4))

    Log("---------------------------Start testing dropdown type parameters---------------------------")
    Log("VariablespCombox1:", pCombox1, ", Variable value type:", typeof(pCombox1))
    Log("VariablespCombox2:", pCombox2, ", Variable value type:", typeof(pCombox2))
    Log("VariablespCombox3:", pCombox3, ", Variable value type:", typeof(pCombox3))

    Log("---------------------------Start testing encrypted string type parameters---------------------------")
    Log("VariablespSecretStr1:", pSecretStr1, ", Variable value type:", typeof(pSecretStr1))
}

Published by 发明者量化-小小梦 on the FMZ strategy square · last modified 2024-06-27. 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-Strategy-Interface-Parameters.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