TradingView-API icon indicating copy to clipboard operation
TradingView-API copied to clipboard

Replay mode works only on 1D or larger timeframes

Open aqasemi opened this issue 3 years ago • 0 comments

Hello, Mathieu. I've been experimenting with your library, and it looks very promising! I faced a bug when I try to use other timeframes in replay mode. Replay mode works fine when using 1D, 1W, 1M ...etc timeframes. Yet, when I tried to use smaller timeframes, like, 60 or 240 it only gives the first period then stops.

To Reproduce

chart.setMarket('BINANCE:ETHUSDT', {
  timeframe: '60',
  replay: Math.round(Date.now() / 1000) - 86400 * 7
  range: 1,
});

Output

Next -> 1666947600 0
Critical error: no_point_or_series {"command":"step","args":{"length":1}}
Series error: Upstream error, errmsg: session rs_92hLiYo95R42 was not created in time
Upstream error, errmsg: session rs_92hLiYo95R42 was not created in time undefined

Screenshots these are screenshots from my browser's inspector. The first one is 1D timeframe. The second is '60' (1 Hour) timeframe. There is almost no difference at all, it's weird why I'm getting an error message. Anyways, I think they might be of some help. image image

Environment:

  • OS: Windows 10
  • Node version: v14.17.4
  • TrandingView Subscription: Pro.

aqasemi avatar Oct 31 '22 09:10 aqasemi