hackingthemarkets / gridbot-websockets

build a gridbot using real-time market data over websockets
95 stars 66 forks source link

getting error updating the realtime candle #1

Open pelife opened 2 years ago

pelife commented 2 years ago

sometimes I am getting this error while I tries to update realtine candle:

this gridbot.js line 147 is this:

candleSeries.update(currentBar);

lightweight-charts.standalone.production.js:7 Uncaught Error: Cannot update oldest data, last time=1648128180, new time=1648128120 at t.hM (lightweight-charts.standalone.production.js:7:142348) at t.dM (lightweight-charts.standalone.production.js:7:155747) at i.t.update (lightweight-charts.standalone.production.js:7:145777) at WebSocket.socket.onmessage (gridbot.js:147:26) t.hM @ lightweight-charts.standalone.production.js:7 t.dM @ lightweight-charts.standalone.production.js:7 t.update @ lightweight-charts.standalone.production.js:7 socket.onmessage @ gridbot.js:147

ghacosta commented 2 years ago

Yeap, I'm getting same error but it is not consistent, it is not happening everytime.

jakelowen commented 2 years ago

Same. Seems related to https://github.com/tradingview/lightweight-charts/issues/592

kandarpgautam commented 4 months ago

I am getting the same issue. How I expect it to work is, that if I have the same time for a bar that was previously rendered, then the new data should update the old bar.