Introducing v1.0.1 BacktestX Chart. Learn More

Strategy Tester

The charting library natively supports evaluating algorithmic scripts and rendering a comprehensive Strategy Tester UI to backtest their performance directly within the terminal canvas.

Live Strategy Backtesting

When an algorithmic script is attached to the chart and executes strategy.entry() or strategy.close() functions, the charting engine will automatically spawn a Strategy Tester panel anchored to the bottom of the viewport.

This panel provides live, millisecond-accurate metrics simulating the performance of the algorithm across the chart's historical bars, dynamically recalculating in real-time as the market ticks or when the user changes the timeframe interval.

Performance Metrics

  • Net Profit The absolute sum of P&L from all closed trades. Automatically formatted to support extreme precision for micro-assets like meme coins.
  • Win Rate The percentage of trades that closed with a positive net profit.
  • Max Drawdown The maximum observed loss from a peak to a trough of the algorithm's simulated equity curve.

Trade Ledger

The Strategy Tester also renders a scrollable ledger containing every single executed trade in chronological order. Each row displays:

  • Trade Identifier and Type (Long/Short)
  • Entry Date/Time and Entry Price
  • Exit Date/Time and Exit Price
  • Absolute Profit/Loss for that specific trade