RoboQuant
RoboQuant engine

RoboQuant Engine

The RoboQuant Engine is the compiled runtime behind strategy authoring, backtesting, optimization, replay, and live trading. A strategy is written once as a .rq source file, compiled into a .rqc artifact, and then run by the same engine in every stage.

The engine workflow

1. Author      Edit one .rq strategy source
2. Compile     Verify it and produce a .rqc artifact
3. Backtest    Run on bars, ticks, or L2 market data
4. Optimize    Search and validate parameter ranges
5. Deploy      Run the same artifact on Demo or Live
6. Monitor     Follow orders, P&L, logs, and status

There is no Pine Script or MQL rewrite between testing and deployment. Parameters can change from run to run, but the executable strategy remains the compiled .rqc artifact produced from your .rq source.

Files and formats

FormatPurposeEdit it?
.rqRoboQuant strategy sourceYes
.rqcCompiled strategy artifact used by Backtest, Optimize, and DeploymentsNo — regenerate it with Compile
.params.pyGenerated parameter metadata for the dashboardNo
.py strategyLegacy interpreted strategyOnly when maintaining an existing legacy strategy
.py indicatorCustom RoboCharts indicatorYes — indicators use a separate sandboxed compute model

New strategies use the compiled .rq format. Existing .py strategies remain readable and backtestable, but the compiled format is the supported authoring path for new work.

Current capability map

CapabilityBacktestOptimizeLive
Single-symbol bar strategiesYesYesYes
Single-symbol tick strategiesYesYesYes
Multi-symbol on_bars strategiesYesYes, bar modeNot yet
Higher-timeframe indicatorsYesYesYes
Market, limit, stop, SL, TP, trailing, OCO, partial exitsYesYesYes
L2 book reads and depth-walked fillsYesNot exposed in the Optimize formNot exposed to compiled live strategies yet
Strategy drawings and logsYes, including replayNot collected during sweepsLogs and status stream live
Engine-enforced prop-firm rulesYesYesDeployment risk limits use live account controls

What runs where

Product areaWhat happens
Strategies → CodeEdit .rq, compile it, and inspect the generated artifact
Strategies → BacktestConfigure data, costs, parameters, and Run or Replay
Strategies → OptimizeSearch parameter ranges with grid or sampler optimizers
Strategies → DeploymentsStart or stop Tradovate sessions and open live monitoring
IndicatorsRun separate vectorized chart indicators; these do not trade
WorkspaceUse a full project workspace when the Code tab is not enough

Execution model

The engine controls market data, time, indicators, account state, and order routing. CME is the only market-data source in both research and live runtimes; broker integrations only route orders and return account state. Strategy code has no direct filesystem or network access. This keeps runs deterministic and makes backtest/live behavior easier to compare.

The runtime also enforces causality:

  • In on_bar, the supplied bar and ctx.bar(0) are the bar that just closed.
  • In on_tick, on_timer, and on_trade, ctx.bar(0) is the forming bar as known at that instant. It never contains the future final close or extremes.
  • Higher-timeframe indicators expose the previous completed higher-timeframe value until the next higher-timeframe bar closes.
  • Tick orders are evaluated without reading future prints.

What to review before deployment

  1. The .rq source compiles successfully and a matching .rqc exists.
  2. Every order builder ends with .send().
  3. Indicator values are guarded during warmup with let Some(value) = ... else { return };.
  4. Tick strategies implement both on_tick and wants_ticks() -> true.
  5. Position sizes are contracts, and the strategy respects the instrument multiplier and tick size.
  6. The backtest uses realistic commissions, slippage, fill data, and an appropriate date range.
  7. Live deployments set order, position, and daily-loss limits appropriate for the connected account.

Documentation map

GuideTopic
Strategies.rq structure, parameters, hooks, and patterns
IndicatorsSeparate custom indicators for RoboCharts
BacktestingFill modes, replay, metrics, and optimization
Live deploymentTradovate Demo/Live sessions and safety controls
Runtime referenceCompiled strategy API tables

The TradingView webhook workflow is still available for older integrations, but it is separate from the RoboQuant Engine. See Pine strategies for that legacy path.

Next steps