Exciting Update: Version 1.0.1 is now available, introducing high-performance technical indicators and custom drawing tools. Read more
Version: 1.0.0

Custom symbol details

This guide explains how to configure the custom symbol resolver in BacktestX Chart to dynamically adjust price scale, sessions, and timeframes for your trading instruments.

Overview

The symbol resolver script custom-symbol-details.js determines the properties of each symbol when loaded by the chart. This includes the asset type, trading hours, decimal precision, and supported timeframes.

Adding Symbols

To add new symbols, open custom-symbol-details.js and define a list of symbols for your category. For example, to add Forex currency pairs:

const FOREX_SYMBOLS = ["EURUSD", "GBPUSD", "USDJPY"];

if (FOREX_SYMBOLS.includes(logicSymbol)) {
  type = "forex";
  session = "24x5"; // 24 hours, 5 days a week
  pricescale = 100000; // 5 decimal places
}

Decimal Precision (pricescale)

The pricescale property determines the number of decimal places shown on the price scale and tooltips:

  • 100: 2 decimal places (e.g. 59310.00) - standard for Crypto like BTCUSD.
  • 10000: 4 decimal places (e.g. 1.2345) - standard for Forex major pairs.
  • 100000: 5 decimal places (e.g. 1.23456) - standard for high-precision Forex.