You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Charting Library calls this function when it wants to receive real-time updates for a symbol. * The Library assumes that you will call the callback provided by the onTick parameter every time you want to update the most recent bar or to add a new one. * * @param symbolInfo A SymbolInfo object * @param resolution Resolution of the symbol * @param onTick Callback function returning a Bar object * @param listenerGuid * @param onResetCacheNeededCallback Function to be executed when bar data has changed / subscribeBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, onTick: SubscribeBarsCallback, listenerGuid: string, onResetCacheNeededCallback: () => void): void; /*
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.
0
/** * Charting Library calls this function when it wants to receive real-time updates for a symbol. * The Library assumes that you will call the callback provided by the onTick parameter every time you want to update the most recent bar or to add a new one. * * @param symbolInfo A SymbolInfo object * @param resolution Resolution of the symbol * @param onTick Callback function returning a Bar object * @param listenerGuid * @param onResetCacheNeededCallback Function to be executed when bar data has changed / subscribeBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, onTick: SubscribeBarsCallback, listenerGuid: string, onResetCacheNeededCallback: () => void): void; /*
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/)
i want to subscribeBar is called and realtime update last bar in the first load in datafeed api
The text was updated successfully, but these errors were encountered: