ap((datapoint) => ({
        time: datapoint.time,
        value: (datapoint.close + datapoint.open) / 2,
      }));

      // Add an area series to the chart,
      // Adding this before we add the candlestick chart
      // so that it will appear beneath the candlesticks
      const areaSeries = chart.addSeries(LightweightCharts.AreaSeries, {
        lastValueVisible: false, // hide the last value marker for this series
        crosshairMarkerVisible: false, // hide the crosshair marker for this series
  