Skip to content

Platform Services ​

Three services expose script execution to clients:

ServiceTransportPurpose
ValidatorHTTP or WebSocket RPCCompile and validate scripts on a synthetic candle snapshot
BacktestingHTTP or WebSocket RPCRun strategies and indicators over historical candles
IndiChartdxLink WebSocket channelStream live candles and indicator outputs to chart clients

How they fit together ​

text
                    ┌─────────────────┐
                    │  dxScript code  │
                    └────────┬────────┘
                             │
         ┌───────────────────┼───────────────────┐
         ▼                   ▼                   ▼
  ┌──────────────┐   ┌──────────────┐   ┌──────────────┐
  │  Validator   │   │ Backtesting  │   │  IndiChart   │
  │  (metadata)  │   │  (history)   │   │  (realtime)  │
  └──────────────┘   └──────────────┘   └──────────────┘

Use the validator when you need to check that a script compiles, discover its declared inputs and outputs, or obtain first-bar calculation samples without loading market data.

Use backtesting when you need a full historical run: candles for a date range, per-bar indicator outputs, and strategy trade reports with performance analytics.

Use IndiChart when you need a live chart feed: candle snapshots and updates aligned with indicator calculation results over a dxLink WebSocket session.

Choosing a service ​

AspectValidatorBacktestingIndiChart
Market dataSynthetic snapshotHistorical candlesLive feed subscription
Calculation windowFirst bar samples onlyFull loaded windowStreaming per subscription
Strategy reportsPerformance summary onlyYesNo
TransportHTTP / WebSocket RPCHTTP / WebSocket RPCWebSocket channel
Best forCompile checks, input discoveryHistorical strategy evaluationLive charts and realtime preview

Pick one service per task — they are complementary, not interchangeable. Validate before publishing, backtest when you need history and trade analytics, and subscribe through IndiChart when the UI needs a live stream.

Language support ​

All services accept dxScript source with lang set to dxscript-js.

Strategy scripts (strategy() in the init section) are always supported by backtesting. The validator accepts them unless strategy support is disabled on the deployment. IndiChart compiles indicator scripts only.