Appearance
Validator Service
The validator compiles a dxScript source file, runs the script once, and returns declared metadata plus optional first-bar calculation samples.
It is designed for fast feedback during authoring, CI checks, and codegen pipelines — not for chart rendering or historical simulation.
What it does
- Compile the script with the dxScript engine.
- Execute the script on a generated synthetic candle window.
- Return declared inputs, outputs, splines, shapes, color layers, timings, and first-bar samples, or a structured
ScriptErroron failure.
On success, error is absent. On failure, error is set. Partial metadata (inputs discovered before a runtime failure) may still be present.
Typical use cases
- Verify that generated or edited scripts compile before publishing.
- Discover
input()parameters for a UI configuration form. - List declared
output(),spline(),shape(),bgColor(), andbarColor()layers for chart integration. - Obtain first-bar samples to sanity-check calculation output.
- Confirm that a strategy compiles and runs before backtesting it.
Strategy scripts
For a strategy script, validation returns the indicator metadata plus the run's performance summary over the snapshot. It does not return the equity curve, fills, trades or orders. The candles are generated, so the summary shows that the strategy compiled and ran — it is not a backtest. Use Backtesting for a run over real market data.
API
See Validate RPC for the HTTP endpoint, request body, and response schema.