Charting librabry of tradingview not call subscribeBar when the first load, how to realtime update lastBar when first load #130798
Replies: 1 comment
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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