1

I have a data source for candlestick data that is tick-based which means sometimes the timestamp of a bar can be the same. When trying to add the tick-based chart data to the candlestickSeries when one of the tick candles has a timestamp that's the same as another I receive a Value is null exception and the data doesn't render on the chart. After looking into the lightweight-chart repo for this specific issue it is caused by there being duplicate timestamps. This issue can also be caused by timestamps not being in order. I haven't been able to find anything in the lightweight chart documentation to show how to add candlestick data that isn't dependent on time which would allow charting tick candles or renko candles. I also found an issue in the repo with a comment from one of the maintainers saying that they do not intend to add support for renko bars. Has anyone found a workaround for this?

NomNomCameron
  • 419
  • 5
  • 14
  • Did you find the solution for this? I'm facing the same issue. – JITENDER SINGH VIRK Jul 05 '22 at 17:42
  • 1
    @JITENDERSINGHVIRK I ended up coming up with a hack that uses a unique timestamp for each bar - starting at something like 01-01-2020 and then incrementing each bar's timestamp by 1 day. This ensures that each timestamp is different and will render on the chart. To still be able to see the timestamp of each bar when you hover over them I manually create an overlay to fetch the correct timestamp and display it - the lightweight charts demo page shows how to tap into the mouseover event to add the overlay – NomNomCameron Jul 06 '22 at 20:27

0 Answers0