charting-library-tutorial
charting-library-tutorial copied to clipboard
Add support intraday resolutions
Greetings,
thank you team for this great tutorial. I managed to switch the timeframe to 1 minute chart successfully, but getBars method is calling only once. Currently only the last bar is receiving the updates, and new bars are not generated. What needs to be done in order to call getBars every 60 seconds ?
can you provide steps to reproduce please?
will provide info later today. sorry for the delay.
onReady method added support for 1,5,15 minutes.
....
const configurationData = {
supported_resolutions: ['1D', '1W', '1M'],
exchanges: [
....
Turned intraday to true, in order to enable above resolutions
....
has_intraday: false,
....
inside getBars method, changed
const data = await makeApiRequest(
data/histoday?${query});
to
const data = await makeApiRequest(
data/histominute?${query});
Basically nothing else was changed from the tutorial steps. The end result is perfectly working 1-5-15 minute TV chart, data is collected successfully. Once TV chart is ready and all bars are drawn, all next changes are drawn only on the last candle, no new candles are drawn. No matter which resolution is used 1-5-15.
Will be happy to understand how i can make it working on 1-5-15 minutes chart.
Another interesting problem is, if we have two separate servers where this tutorial is loaded, if we open them in two separate browser tab, only one of them is working because of 'CORS'. But this is another issue.
Regards,
UP @timocov
Sorry for late reply.
Can you prepare a repro for that and steps for reproduce after that changes please? A repo or a git diff with changes so I can apply them and see what's going on?
Another interesting problem is, if we have two separate servers where this tutorial is loaded, if we open them in two separate browser tab, only one of them is working because of 'CORS'. But this is another issue.
Not sure how 2 tabs are related to the CORS problem.
No problem for the late reply, i suppose all of us are busy enough already.
Will be hard to upload the project to repo since already deleted the project due to debug process stuck. I believe will be much easier, if you are able to share some guidance how to convert your tutorial to 1-5-15 minutes chart configuration.
Regards,
Ok, I marked it as feature request to add intraday resolutions.
Highly appreciate it. Any expected ETA on it ?
Regards,
UP @timocov
No, we don't have any ETA for that. If somebody wants to fix it - PRs are welcomed.
Some guiding lines will be appreciated ...
: D ETAs are for professional companies, after you checked out their guides, you know they are not
one year later no resolution ? is that hard to be introduced a way how to add intraday resolutions ?
Hello, For those having same issues, I will try to answer as far as I know. You can't reach all resolutions because you are getting data by using cryptocompare websocket, you can see this in streaming.js where the line "wss://streamer.cryptocompare.com", you need to pay for all resolutions, but cryptocompare is not only option to get data from, for example i am getting minute resolution data from binance websocket for free.