From 5a19be9b7d1adc56fa2ed7372d951bcc9a13f9d5 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 20 Feb 2018 11:09:38 +0100 Subject: [PATCH] newMarketFile --- .vs/AAOlivia-Plotter/v15/.suo | Bin 17920 -> 17920 bytes Candlestick.js | 15 ++++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.vs/AAOlivia-Plotter/v15/.suo b/.vs/AAOlivia-Plotter/v15/.suo index a608fad024f54419aa02c1a462fe12343fe64d75..266555c3ef5a0bbda595de04404a82fa59ad188a 100644 GIT binary patch delta 225 zcmZqZVQlDO+>pb>`k@f${Xe-;N@a41ZqFhirbPlwn>1V)H@k?o2y%!c z$#4Fm7Qi&wMYLh_5ltVq%>rUOm=>QfVBCB{au4fd1rwXi2P_j=B~^hsV88^(&;nu} UAZDH{=-9UTfPEq}K_w1M03%;K4*&oF delta 263 zcmZqZVQlDO+>pb>dLcWiT6c3H(|tw}aRvqkF(4KJVhJGr_y7O@%_%G#OsokT*WCpw zVq4D0$qtm@0AlXViX7_f9GpNVP}%>C9`1iK)MskMpoj$1OO4~Mm+!k diff --git a/Candlestick.js b/Candlestick.js index 4064865a5..6e193c766 100644 --- a/Candlestick.js +++ b/Candlestick.js @@ -46,9 +46,11 @@ function onFileReady() { - marketFile = fileCache.getMarketFile(pTimePeriod); + let newMarketFile = fileCache.getMarketFile(pTimePeriod); - if (marketFile !== undefined) { // if the file ready is the one we need then it will continue here. + if (newMarketFile !== undefined && marketFile === undefined) { // if the file ready is the one we need then it and we dont have it yet, then we will continue here. + + marketFile = newMarketFile; recalculateScale(); @@ -123,8 +125,9 @@ marketFile = newMarketFile; + recalculateCandles(); + } - } else { @@ -134,12 +137,10 @@ fileCursor = newFileCursor; + recalculateCandles(); + } - } - - recalculateCandles(); - } function setDatetime(newDatetime) {