AI Strategy

Describe a trading idea in plain words; get runnable Python you can test and edit.

The AI Strategy tab turns a plain-language description into a complete stlab Python strategy — indicators, entry/exit rules, and risk settings. You don't need to write code, but the output is real code: you can read it, edit it, and hold it to the same honest checks as anything else.

Writing a good prompt

  1. Say what to trade on: the indicator or price behavior ("buy when RSI dips below 30", "golden cross of the 50 and 200 SMA").
  2. Say when to get out: an exit condition, or let it default to stop-loss/take-profit.
  3. Optionally add risk numbers ("risk 2% per trade, stop at 5%") and timeframe context ("daily trend, 4-hour entries").

What you get back

A named strategy with a one-line summary and the full Python source. Unsupported indicators are substituted with the closest supported one — and the substitution is called out in the description, not hidden. Multi-timeframe ideas (a daily filter gating hourly entries) generate real multi-timeframe code.

  1. Run it — backtest against any market and period; the result gets the free Reality check like every run.
  2. Edit it — open in the Editor tab to tweak thresholds or logic by hand (see the Python DSL reference).
  3. Save it — keep it in My Strategies to re-run or publish later (private saves need Pro and up; on Trader, publishing to the Library is the way to keep it).

Quota

AI generations are metered per month by plan: Trader 3 · Pro 20 · Studio 100 · Quant 300. Backtesting the generated strategy uses your normal backtest allowance, not the AI quota.