diff --git a/.vs/AAOlivia-Plotter/v15/.suo b/.vs/AAOlivia-Plotter/v15/.suo index dae2004e8..eb0b90762 100644 Binary files a/.vs/AAOlivia-Plotter/v15/.suo and b/.vs/AAOlivia-Plotter/v15/.suo differ diff --git a/Candlestick.js b/Candlestick.js index 9d6fa8b91..e45fca047 100644 --- a/Candlestick.js +++ b/Candlestick.js @@ -38,6 +38,7 @@ function initialize(pExchange, pMarket, pDatetime, pTimePeriod, chartLayersPanel, callBackFunction) { let cursorCacheInProgress = false; + let finaleStepsInProgress = false; datetime = pDatetime; timePeriod = pTimePeriod; @@ -82,20 +83,25 @@ if (dailyFile !== undefined) { - fileCursor = newFileCursor; + if (finaleStepsInProgress === false) { - recalculateScale(); // With any of the market files we can calculate the scale. + finaleStepsInProgress = true; - layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.OLIVIA_CANDLES); + fileCursor = newFileCursor; - recalculateCandles(); - postitionViewPort(); + recalculateScale(); // With any of the market files we can calculate the scale. - viewPort.eventHandler.listenToEvent("Zoom Changed", onZoomChanged); - canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished); + layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.OLIVIA_CANDLES); - callBackFunction(); + recalculateCandles(); + postitionViewPort(); + viewPort.eventHandler.listenToEvent("Zoom Changed", onZoomChanged); + canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished); + + callBackFunction(); + + } } }