Charting librabry of tradingview not call subscribeBar when the first load, how to realtime update lastBar when first load #130798
Unanswered
vanhauhuynh17
asked this question in
API and Webhooks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am implementing the realtime udpate bar part of tradingview's charting library. I have successfully implemented the realtime update and realized the key is that the subscribeBars function must run and save onSubscribeBarCallBack to update, the library will automatically call the subscribeBar function in datafeed api when the symbol changes. or resolution changes and will now save onSubscribeBarCallBack. This means that when entering the chart page, the library will not call the subscribeBar function, so the first time the chart is loaded, there will be no way to realtime update the last bar. I've searched and read the charting library's documentation over and over again but haven't found anything about this issue, i also try to call subscribeBars manually and not success . Can anyone help me, thank you very much.
Link document about charting librabry: (https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-API/)
Beta Was this translation helpful? Give feedback.
All reactions