Compare, spread and ratio
Code
Read the docs →import { Chart } from '@tradecanvas/chart'
const chart = new Chart(el, { theme: 'dark' })
chart.setData(bars)
// Other symbols on the same chart: id, label, their bars, a colour
chart.addCompareSymbol('MSFT', 'MSFT', msftBars, '#3b82f6')
chart.addCompareSymbol('NVDA', 'NVDA', nvdaBars, '#22c55e')
chart.setCompareMode('percent') // or 'absolute'
// As new bars arrive
chart.updateCompareData('MSFT', msftBars)● Simulated market data, generated in your browser
A complete screen out of the box: order ticket, orders and positions on the chart, stop-loss and take-profit you drag, watchlists, alerts and bar replay.
API: addCompareSymbol



