Strategy Lab

start_optimization_run

Start an AI optimization run on one of your own strategies — repeatedly mutates the code, backtests each variant, and keeps only the improvements, validated on data no experiment trained on. Pass several pairs to run a multi-pair optimization that tests every candidate on every pair, so the result is not tuned to one chart. Charges your Strategy Lab wallet per experiment (plus a small charge per extra pair); multi-pair runs always show a quote first and are confirmed with its quoteId.

Parameters

NameTypeDescription
strategyIdstringID of your own strategy to optimize
exchangeIdstringAn exchange you own, used to source historical candle data
symbolstringTrading pair to optimize against. Defaults to BTC/USDT when symbols is not given; with symbols, it only picks the primary pair when it is one of symbols, otherwise it is ignored(default: BTC/USDT)
symbolsstring[]Pairs to test on, primary first, on the same exchange account and market type. More than one pair tests every candidate on every pair; capped by your plan (Free 1 / Pro 3 / Trader 4 / Whale 5). Combinable with searchPresets once an admin prices the multi-pair preset search: every candidate is then tested on every pair and the search is priced per pair
timeframestringCandle timeframe, e.g. 1h, 4h, 1d(default: 1h)
maxExperimentsnumberHow many mutate-and-backtest experiments to run (1-30)(default: 20)
scoringProfilestringbalanced, conservative, aggressive, or consistency(default: balanced)
trainSplitnumberFraction of the window used for training vs. out-of-sample validation(default: 0.7)
userGuidancestringFree-text steering for the AI mutations
autoPromotebooleanAuto-promote the result to stable if it clears a strict validation bar(default: false)
acknowledgeCostbooleanConfirm the wallet charge to actually start the run(default: false)
quoteIdstringMulti-pair runs: the quoteId from the cost estimate the user approved, sent with acknowledgeCost true
acknowledgedCostnumberMulti-pair runs: the estimated cost the user approved; used if the quote expired, and the run starts only if the fresh price is not higher

Example Prompts

Try asking your AI assistant any of these:

“Optimize my ETH strategy to reduce drawdown”
“Run 15 experiments on my GhostRider strategy for a better Sharpe ratio”
“Improve my strategy's win rate using AI”

Start Using start_optimization_run

Set up the TradeStaq MCP server in under a minute.