From 4158dcb39f937513369f7049f39632f63287c6c4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 20 Feb 2018 17:10:54 +0100 Subject: [PATCH] setTimePeriod --- Candlestick.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Candlestick.js b/Candlestick.js index c8f86ed7f..81ad5c9cd 100644 --- a/Candlestick.js +++ b/Candlestick.js @@ -185,6 +185,13 @@ } } + + if (timePeriod === _1_HOUR_IN_MILISECONDS) { + + fileCursorCache.setDatetime(datetime); + + } + } function setDatetime(newDatetime) { @@ -198,15 +205,10 @@ if (currentDate !== newDate) { - if (timePeriod < _1_HOUR_IN_MILISECONDS) { + if (timePeriod <= _1_HOUR_IN_MILISECONDS) { fileCursorCache.setDatetime(newDatetime); - /* - recalculateCandles(); - - console.log("setDatetime"); - */ } } }