Skip to main content

Run on OptAlgo (hosted strategies)

A hosted strategy is your own strategy code that OptAlgo runs for you. It decides at every bar close and trades in a bot in your My Bots, marked Runs on OptAlgo. You do not need TradingView or a server of your own.

It always starts on paper. You take it live in the app when you are ready (Plus and Pro).

Deploy a strategy​

You deploy a strategy from one of its finished backtests, in one of two ways:

  • In the app: open the run on the Backtest page and click Run on OptAlgo.
  • Through your AI app: ask your agent or chat to run the strategy on OptAlgo. It checks the deploy first without creating anything, then deploys it on paper. The connector tool is deploy_strategy; the API is in section 3 of the LLM reference.

OptAlgo first checks the backtest. If something is wrong, the dialog lists every problem and how to fix it. Then you choose:

FieldWhat it sets
NameThe bot's name in My Bots
SymbolsWhich of the backtest's symbols it trades. Fewer symbols than the backtest are judged on their own results
Paper allocationThe paper budget, split equally across the symbols
If the code failsHold positions: open positions keep their stops and nothing new is opened. Close positions: open positions are closed at market

Click Deploy on paper. The first decision comes at the next bar close.

The deploy check​

A backtest can run on OptAlgo only when:

  • its honesty grade is A, B or C;
  • it made money: a run with no edge (a loss, or a Sharpe ratio that is not positive) is refused;
  • its search verdict is not likely overfit, unless an out-of-sample walk-forward research run of the same code passed;
  • it is a plain backtest, not an optimisation run, of your own code;
  • it uses one quote currency, a timeframe of whole minutes and a whole-number leverage from 1 to 125;
  • your plan has a free slot and allows that many symbols.

Spot and perpetual symbols run together only as the legs of one strategy, such as a carry trade.

Slots by plan​

FreePlusPro
Strategies run on OptAlgo at once11020
Symbols per strategy31020
Computing time per day300 s3,000 s10,000 s
Live tradingNo, paper onlyYesYes

Hosted strategies have their own slots: they do not count against your plan's bot limit. On Free, their paper trades count toward the month's paper trade limit. When the day's computing time is used up, the strategy makes no decisions until 00:00 UTC. See Plans and limits.

Watch it​

Open the bot in My Bots. The strategy panel shows:

  • Status: On paper, Live requested, Live, Paused, Winding down, Stopped by errors, Stopped.
  • Decisions: what the strategy decided at each bar and what was sent, with the transaction id of each signal. Bars where nothing happened are hidden unless you show them.
  • The code it runs, as a download with its sha256 hash.

OptAlgo pauses a strategy by itself when:

  • it sends too many orders (the churn guard);
  • the bot's positions differ from the strategy's too often;
  • today's live loss reaches the daily loss limit of the key that deployed it.

It stops deciding after 3 errors in a row or 5 errors in an hour. Open positions keep their stops. The panel says why it stopped.

Compare it with its backtest​

Compare with backtest backtests the exact same code, parameters and symbols over the period the strategy has been running, then matches every entry and exit against the backtest's. It shows how many decisions matched, which ones differ and why, and the slippage of each fill in basis points.

A comparison is charged in backtest units like any backtest; the app shows the estimate first. Opening a comparison of the same period again is free.

Pause, resume or delete​

  • Pause: it stops deciding at the next bar. Open positions stay open with their stops.
  • Resume: it decides again from the next bar close.
  • Delete with no open position: it is removed at once.
  • Delete with open positions: choose to send only exits until every position is closed, or to close the positions at market now.

Go live​

Going live is always your decision, made in the app. An AI agent can only ask: you then see Your agent asked to go live on the bot, with Review and Decline.

  1. Plan and exchange: you need Plus or Pro and a connected exchange with enough free balance for the allocation.
  2. Recommended paper period: 7 days on paper with at least 1 closed trade, or 5 closed paper trades, and no error in the last 24 hours. The bot shows your progress. You can go live earlier, but you must tick a box to accept the risk first.
  3. Confirm: click Go live and check the allocation and leverage. Limits from your agent's key (maximum leverage, daily loss limit) are shown and apply. Every check runs first; if one fails, nothing changes.
  4. Open paper positions are closed, then the bot trades with real money on your exchange.

Spot + perpetual strategies (both legs of one trade) have extra checks before going live: a leverage cap, both the spot and the futures wallet funded, and an exchange API key with Spot & Margin Trading and Futures enabled. OptAlgo never moves money between your wallets. If one leg is left open alone, OptAlgo closes it within seconds. The perpetual leg's margin is watched with alerts only. Live spot + perpetual trading may not be open for your account yet; the app tells you if it is not.

If your plan changes to Free, a live strategy winds down: only exits are sent until its positions are closed.