Documentation

dotQuant

Documentation · Section 4 of 6

Strategies: Idea to Live Signals

Write a strategy in plain English, backtest it honestly, run it live on closing bars, and route its signals to a broker or a webhook behind an explicit enable.

How to inspect strategy rules on dotQuant, judge a backtest by costs and drawdowns, and keep research, market data and broker execution apart. Watch on YouTube · Pressing play loads YouTube's player.

Read the guide: From trading idea to testable rules: strategy specs and honest backtesting

Writing a Strategy

Plain-English trading ideas, compiled and testable.

Open a symbol and switch the view toggle to Strategies. Describe a trading idea in plain English — for example: "Buy when the 20-day average crosses above the 50-day average, with a 5% stop loss."

Press Review: dotQuant compiles your prose into a precise, machine-readable strategy spec.

- The compiled spec is yours to inspect — view it pretty-printed, copy it, reuse it.
- The review tells you plainly whether your idea became runnable entry and exit rules.
- If it can't be compiled, you get a clear explanation rather than a silent failure.

Anonymous visitors can review strategies; running backtests requires an account.

Learn: From trading idea to testable rules

Running a Backtest

Test the reviewed strategy on real market data.

After a successful strategy review, set a trade quantity and press Backtest this in the strategy sheet.

- The backtest runs over the visible chart range — change the chart window to test a different period.
- Entry and exit markers are drawn on the price chart and stay visible when the sheet closes.
- Results stream back live; on desktop the strategy sheet docks beside the chart so nothing is covered.

Reading Backtest Results

Honest numbers, not a flattering simulation.

dotQuant's backtester is deliberately conservative:

- Signals fill at the next bar's open — never at the price that generated the signal (no look-ahead).
- Max drawdown is marked to market, measured on every bar, not only on closed trades.
- Open positions are reported as unrealized P/L, separate from realized P/L.
- Trading costs are charged on every fill.
- Stop losses execute during the run, not just in the spec.

The summary card reports realized and unrealized P/L, costs, win rate, max drawdown, and a buy-and-hold comparison over the same window. If an idea only works in a frictionless simulation, you'll see it here first.

Learn: What to check before trusting a backtest

Running a Strategy Live

The chart legend's play button — evaluation on every closing bar.

A backtested strategy can be run live: press the play button in the chart legend. From then on the platform evaluates the strategy whenever the feed closes a bar and records every buy/sell transition as a signal — drawn on the chart and kept in the signal history.

- Signal-only by design: running a strategy never places an order by itself. Where its signals go is a separate, per-destination decision — see Signal Routing below. The legend badge tells you which mode you are in: SIGNAL-ONLY (no enabled broker route) or LIVE (at least one).
- Pause stops evaluation without losing the configuration; play resumes it. The bin removes the strategy from the chart and retires its routes.
- The running state is durable — it survives reloads and lives on your account, not in the browser.

For agents: the same lifecycle is the run-a-strategy-live workflow — configure-algorithm, then run-algorithm / pause-algorithm / remove-algorithm, with decisions readable via the list-algorithm-signals query.

Signal Routing

Fan a strategy's signals out to your broker, your webhooks or your email — behind an explicit enable.

Signal Routing decides where things flow. A route connects ONE source to ONE destination, and every route starts disabled.

Strategies — a running strategy's buy/sell signals:

- Broker route: signals become orders on the named broker connection. You set the route's quantity — the strategy itself has no size, it only says when: every entry buys that much, and an exit sells what the strategy holds on that connection, capped by the account's real position — never a short. Sells are sized against a fresh position read, and a signal with no position to close is recorded as skipped, not traded. A broker route always carries both sides.
- Webhook route: signals are delivered to your own HTTPS endpoint, HMAC-signed with the webhook's secret — for your own automation, journaling, or downstream systems.
- Email route: each signal is emailed to your account email — the only address an email route can use. A notification, never an order.
- A webhook or email route can carry buy and sell, or just one side, and an optional quantity of its own — the size each message tells its reader to act on; leave it empty and the message carries none.

Mandates and portfolios — be told when they act, by email or webhook (never a broker route: they already trade on their own connection). You choose the events:

- Mandate: entry (a buy went out), exit (its sell filled - a sell merely placed is no event yet - or an unfilled entry was closed), skipped (it decided not to act, and why), failed (an order failed).
- Portfolio: awaiting approval (a contribution plan waits for your yes), executed (the approved orders went out), failed (part of a contribution failed at the broker).
- A notification only tells you — approving a contribution stays with you, on the Portfolios page or through your assistant. Add one from the mandate or portfolio card's envelope icon, or from Signal Routing.

When an order fails. An order that a strategy route, a mandate or a portfolio placed for you can be refused by your broker while nobody is watching. It then appears in History (the clock button in the top bar) as Order failed, with your broker's reason and what dotQuant does next on its own — and the History button shows a red dot until you have opened it (a plain dot means new entries, nothing failed). dotQuant never re-sends a refused order by itself: after a failed sell a strategy keeps counting those shares as its own, skips its next buy, and sells them at its next sell signal. Your assistant reads the same list (list-history).

The enable is the gate. Configuring a route never starts it: nothing flows until you explicitly enable the route (broker routes ask for a danger-style confirmation — real orders, capital at risk). Disable pauses the flow keeping the configuration; archive retires it. A re-created route always comes back disabled.

Email limits and unsubscribe. A daily cap per route and per account keeps a busy day from flooding your inbox — an event over the cap is recorded as skipped — daily email limit, never sent later. Every route email carries a one-click unsubscribe link: it disables that one route (nothing else), and you can enable it again any time.

Every delivery's outcome is recorded per route — dispatched, order placed, emailed, skipped, failed — on the signal history, the mandate's actions and the portfolio's proposals, so you can audit exactly what each route did.

For agents: the route-strategy-signals workflow for strategies and route-mandate-and-portfolio-events for mandates and portfolios — configure-signal-route (with SourceType, SourceId and the chosen Events) → enable-signal-route (high-impact, confirm with the user first); routes are listed by list-signal-routes, outcomes on list-algorithm-signals and, as notificationOutcomes, on list-insider-mandate-actions and list-portfolio-proposals.

All of Documentation

BETA