const lcjsTrader = require('@lightningchart/lcjs-trader')
const lcjs = require('@lightningchart/lcjs')
lcjsTrader.trader(TRADER_LICENSE).then(async (trader) => {
// Create a trading chart. Optionally, various chart settings can be provided.
const tradingChart = trader.tradingChart({ loadFromStorage: false })
// Enable zoom band chart.
tradingChart.showZoomBandChart(true)
// Using custom time range.
const endTime = new Date()
const startTime = new Date()
startTime.setMonth(startTime.getMonth() - 18)
// Reading data from a file.
await fetch(`${document.head.baseURI}examples/assets/0001/Microsoft Corporation (MSFT).csv`).then((res) => res.text()).then((text) => {
tradingChart.loadCsvString(text, 'Microsoft Corporation (MSFT)')
})
tradingChart.setCurrency('USD')
})
Technical Analysis Chart with Zoom Band - Editor
Example showing a Technical Analysis Chart with zoom band feature. Zoom band gives an overview of the whole dataset even when zoomed in. Moving or resizing the zoom band allows panning or zooming the main price chart.