End-to-end deploy: generate strategy → train → deploy live.
One of `prompt` (free-form NL), `preset` (curated winning strategy), or
`community_id` (copy a published community strategy) is required. If more
than one is passed, precedence is community_id > preset > prompt.
Args:
prompt: Natural-language strategy description (e.g. "Buy when RSI < 30, sell > 70").
symbol: Currency pair to backtest on. One of: EURUSD, USDJPY, GBPUSD,
USDCHF, USDCAD, AUDUSD, NZDUSD. Default EURUSD.
timeframe: Candle granularity. One of: 1min, 5min, 15min, 1h. Default 15min.
claude_model: Which Claude variant to use for code generation.
"sonnet" (default — best quality, 1/day free) or "haiku" (faster, 3/day free).
Ignored when `preset` is set (no generation needed).
preset: Curated winning-strategy slug. Skips Claude generation entirely
— deploys a pre-saved strategy known to backtest well on the chosen
symbol. Available slugs: ema_cross_fast, momentum, scalper_stack,
sma_only, trend_ema, volatility, bb_squeeze, all_mix, pivot_kid_ema.
Not every slug exists for every symbol — call list_models afterwards
to confirm what deployed.
community_id: Copy-trade a published community strategy. Pass the `id`
of an entry from `browse_community`. Loads that exact strategy code,
skips Claude generation, then trains + deploys it. `symbol`/`timeframe`
still apply to the backtest+deploy.
webhook_url: Optional webhook to receive live signals.
telegram_chat_id: Optional Telegram chat ID for signal delivery.
Returns:
dict with:
- live_url (str): tap-through to the deployed model on the qm dashboard.
- model, stem (str): model identifiers (e.g. "14_EURUSD_15min_Model_24").
- channels (list[str]): delivery channels active (e.g. ["webhook"]).
- train_stats (dict, optional): in-sample backtest metrics from the
training run — keys are some subset of {trades, win_rate,
profit_factor, return, sharpe, max_drawdown}. SHOW THESE IN YOUR
REPLY so the user immediately sees how the model backtested.
- progress (list[str]): per-stage progress log.