charting-library-tutorial icon indicating copy to clipboard operation
charting-library-tutorial copied to clipboard

Automatic switching of resolution for 1 day, although in the widget config it costs 5 minutes by default

Open gomel-tdl1 opened this issue 4 years ago • 3 comments

image image I indicated in onReads supported resolution 5 minutes and 1 day. in the widget settings by default I set 5 minutes, but the schedule itself sets 1 day and 1D resolution comes to the getBars. image

gomel-tdl1 avatar Aug 18 '21 10:08 gomel-tdl1

Please check this field https://github.com/tradingview/charting-library-tutorial/blob/85ba9f0eab6543840646f07e1de49df7482a6ea0/src/datafeed.js#L114

timocov avatar Aug 18 '21 13:08 timocov

change has_intraday: true, and var data=""; if (resolution === '1D') data = await makeApiRequest(data/histoday?${query}); else if (resolution >= 60 ) data = await makeApiRequest(data/histohour?${query}); else data = await makeApiRequest(data/histominute?${query});

usdhunter avatar Apr 16 '22 20:04 usdhunter