jonchurch / tradingview-js-api-tutorial

308 stars 181 forks source link

tradingview chart time order violation error #17

Open adibs142 opened 3 years ago

adibs142 commented 3 years ago

I create a chart with TradingView library.this is option that i use to init chart var widget = window.tvWidget = new TradingView.widget({ debug: true, fullscreen: true, symbol: 'WEBT', interval: '60', height: "142px", container_id: "tv_chart_container", datafeed: new Datafeeds.UDFCompatibleDatafeed("/tradingview/udf"), library_path: "/assets/charting_library/", disabled_features: ["use_localstorage_for_settings"], charts_storage_api_version: "1.1", client_id: 'tradingview.dotnet', user_id: 'public_user_id', theme: getParameterByName('theme'), time_frames: [ { text: "60", resolution: "60"}, { text: "1D", resolution: "1D"}, { text: "1W", resolution: "1W"}, ], }); I use UDF to transfer data from server to chart . the UDF return this response : {"s":"ok","t":[1612432588,1612446988],"c":[10000,9999],"o":[21000,9999],"h":[21000,9999],"l":[10000,9999],"v":[76300,19998]} after chart loaded I have a error in console : PutToCacheNewBar: time violation, previous bar time: 2021-02-04T13:56:48.000Z should be less or equal to new time: 2021-02-04T09:56:58.000 time order violation, prev: Thu, 04 Feb 2021 13:56:48 GMT, cur: Thu, 04 Feb 2021 09:56:58 GMT