Skip to content

Datafeeds

AlgoQuant Studio stores local datafeed and execution broker configurations that the editor, chart view, backtests, and live strategy runs can use.

Open Settings → Data Feed to manage connections.

From this screen you can:

  • add built-in or external datafeeds
  • add execution broker connections
  • give each connection a display name
  • test connection settings
  • select configured feeds from charts, strategy editor runtime settings, and strategy detail market-data settings

Display names are shown in AQS as Display Name (Provider) so you can keep multiple connections to the same provider clear.

To use MetaTrader 5 market data in AQS:

  1. Open Settings → Data Feed.
  2. Select Add Broker → MT5.
  3. Enter an optional display name.
  4. Enter your MT5 account id, server, password, and AQE_MT5_BRIDGE_TOKEN.
  5. Leave Bridge Bind Address empty to use the default 127.0.0.1:18080, or set a different local address if you run multiple bridges.
  6. Set an optional test symbol. If omitted, AQS uses BTCUSD.
  7. Click Test Connection to confirm account access, symbol metadata, and latest quote retrieval.

AQS uses the configured MT5 datafeed for chart candles, current prices in active insight views, and historical data loading where the selected runtime supports it.

To use MT5 for live execution:

  1. Add an MT5 Broker connection from Settings → Data Feed.
  2. Use the same bridge token and bind address as the MT5 datafeed that will provide market data.
  3. In the editor runtime configuration, select the MT5 datafeed and MT5 broker for live mode.
  4. Start with a small test size and verify fills, stops, and open positions in the MT5 terminal.

Backtests can use an MT5 datafeed for historical candles, but backtest execution uses the paper broker. Live execution is where the MT5 broker connection is used.

The AQS settings above assume the AQE MT5 Expert Advisor is already installed and attached to MetaTrader 5 with matching bridge settings.

For the engine-side bridge and Expert Advisor setup, see MT5 Broker and Datafeed.

  • The MT5 terminal is open and signed in.
  • The AQE Expert Advisor is attached to a chart and allowed to run.
  • The AQS token matches the Expert Advisor token.
  • The bridge bind address matches on both sides.
  • The test symbol exists on your broker and uses the exact broker symbol name.
  • If AQS reports that the account already has an execution owner, inspect and stop the existing strategy before starting a replacement. Changing the bridge port does not resolve account ownership.

The Data Feed supplies prices and history; the Execution Broker receives orders. Select both in the Strategy Editor configuration. Backtests use PaperBroker even when the project has an MT5 execution connection selected for live runs.

Changing the market-data selection in a live strategy’s detail view changes the prices AQS displays. It does not change the running AQE strategy’s datafeed or execution connection. Rebuild and redeploy the strategy when its runtime configuration needs to change.

In the current 0.2.0 development version, MT5 can stream sampled bid and ask prices independently of candle updates. Yahoo provides synthetic quotes derived from its latest polled minute candle: bid and ask both equal the close. A synthetic quote is not a tradable spread or a real-time exchange quote.

Check the quote source and timestamp when reviewing an insight. Backtest quotes come from replayed bars, not the current market.

The current engine distinguishes the maximum size of one order, the total allowed quantity for a symbol and the account’s pending-order ceiling. Update the MT5 Expert Advisor with the matching engine version so the broker’s limits are available.

If a submission is refused, inspect the insight history and broker message before reducing the size or rerunning. Paper execution does not reproduce every live broker capacity rule.