Replies: 2 comments 1 reply
-
You can use the fake replay mode like this, or like that: const TradingView = require('@mathieuc/tradingview');
const client = new Client();
const chart = new client.Session.Chart();
chart.setMarket('BINANCE:BTCEUR', {
timeframe: '240',
range: -10,
to: 1600000000,
});
chart.onUpdate(() => {
const periods = chart.periods
.filter((p) => p.time > 1600012800)
.map((p) => p.time);
console.log(periods[0], periods[0] - periods[1]);
});
setInterval(() => {
if (!chart.infos.full_name) return;
chart.fetchMore(-1);
}, 1000); I'm working on the real replay mode. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I pushed a beta implementation of the real replay mode. You can see an example here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible get indicatosr data in the past as if I was using Replay ?
Beta Was this translation helpful? Give feedback.
All reactions