From d880b21bf5bbc95fb17159362d5b914c05adbeba Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Apr 2018 10:21:19 +0200 Subject: [PATCH] Refactoring --- .vs/Plotters-Candles-Volumes/v15/.suo | Bin 31744 -> 31744 bytes Candles.js | 10 +++++----- Volumes.js | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.vs/Plotters-Candles-Volumes/v15/.suo b/.vs/Plotters-Candles-Volumes/v15/.suo index 0313fa06217e092966ff594768cb5f100acb3eaa..40ebb8cacb6c7dd49f4d9f1269d3bfbe42d407be 100644 GIT binary patch delta 383 zcmZqp!PxMFae{#?0}Kc-Ft7pHOhEka|Ns9WVaCY^S>!h+OkteFl*8Ka%lvHg=0dh` z#!2!ztf@fheUpDOD>F(06$wu^U=dLj0*XliF;Mq^kP*m01Srk}#1fM;S;7U4p{hVC zOn_`Fpc&$uUvNk;Zeok!oE*cuWRgJ1<`SU*Mi!7ppoN>i2!?QM_7K^@xJl*&JBJ+9 zfXRaLDwDs6hj0iZ32ZJ=>0{i?q`}9uSwQ0h<02ELMLKMg^jvtDfr{jj6izPDyTYM> zBB0;1NQP;WhQMY4g%6CIEbfXt+Y%15A?(<8(Ibgk53YcCzEld!i#>cAoLQxPQBG@P_YoqwM z2dpeKHWn6|u}W>P{s3X?Ekz+ViD%rv=D;^+zHh!W-^_jn_A_wmuaTvE>5`<;R`6^t zmlLXjFKYSy`~_I@hIZ-wy)%wm@-JAz5BbSKo}7nFqNA(Mt4$Lz@Kb4k5}I?PUo{#l zNOR;(RrxLkL>a_IQYEgb6VM~F&gPl3m*fDUkI>KS?QTffW{T14&~d|A;anhjksv0s zXQP{zo`5Ob*7sl%KWL5PwkxXElEbQN}=hZr7C zAjcexCiuO+zx Q$yI}UR{p^Ef_DM)3zCSgH~;_u diff --git a/Candles.js b/Candles.js index af40ef873..8dac50c49 100644 --- a/Candles.js +++ b/Candles.js @@ -35,7 +35,7 @@ let marketFile; // This is the current Market File being plotted. let fileCursor; // This is the current File Cursor being used to retrieve Daily Files. - let fileCache; // This object will provide the different Market Files at different Time Periods. + let marketFiles; // This object will provide the different Market Files at different Time Periods. let fileCursorCache; // This object will provide the different File Cursors at different Time Periods. /* these are module specific variables: */ @@ -48,7 +48,7 @@ /* Store the information received. */ - fileCache = pStorage.fileCache[0]; + marketFiles = pStorage.marketFiles[0]; fileCursorCache = pStorage.fileCursorCache[0]; datetime = pDatetime; @@ -56,13 +56,13 @@ /* We need a Market File in order to calculate the Y scale, since this scale depends on actual data. */ - marketFile = fileCache.getFile(ONE_DAY_IN_MILISECONDS); // This file is the one processed faster. + marketFile = marketFiles.getFile(ONE_DAY_IN_MILISECONDS); // This file is the one processed faster. recalculateScale(); /* Now we set the right files according to current Period. */ - marketFile = fileCache.getFile(pTimePeriod); + marketFile = marketFiles.getFile(pTimePeriod); fileCursor = fileCursorCache.getFileCursor(pTimePeriod); /* Listen to the necesary events. */ @@ -105,7 +105,7 @@ if (timePeriod >= _1_HOUR_IN_MILISECONDS) { - let newMarketFile = fileCache.getFile(pTimePeriod); + let newMarketFile = marketFiles.getFile(pTimePeriod); if (newMarketFile !== undefined) { diff --git a/Volumes.js b/Volumes.js index 7fa151653..3ffbd6399 100644 --- a/Volumes.js +++ b/Volumes.js @@ -31,7 +31,7 @@ let marketFile; // This is the current Market File being plotted. let fileCursor; // This is the current File Cursor being used to retrieve Daily Files. - let fileCache; // This object will provide the different Market Files at different Time Periods. + let marketFiles; // This object will provide the different Market Files at different Time Periods. let fileCursorCache; // This object will provide the different File Cursors at different Time Periods. let scaleFile; // This file is used to calculate the scale. @@ -46,7 +46,7 @@ /* Store the information received. */ - fileCache = pStorage.fileCache[0]; + marketFiles = pStorage.marketFiles[0]; fileCursorCache = pStorage.fileCursorCache[0]; datetime = pDatetime; @@ -54,11 +54,11 @@ /* We need a Market File in order to calculate the Y scale, since this scale depends on actual data. */ - scaleFile = fileCache.getFile(ONE_DAY_IN_MILISECONDS); // This file is the one processed faster. + scaleFile = marketFiles.getFile(ONE_DAY_IN_MILISECONDS); // This file is the one processed faster. /* Now we set the right files according to current Period. */ - marketFile = fileCache.getFile(pTimePeriod); + marketFile = marketFiles.getFile(pTimePeriod); fileCursor = fileCursorCache.getFileCursor(pTimePeriod); /* Listen to the necesary events. */ @@ -103,7 +103,7 @@ if (timePeriod >= _1_HOUR_IN_MILISECONDS) { - let newMarketFile = fileCache.getFile(pTimePeriod); + let newMarketFile = marketFiles.getFile(pTimePeriod); if (newMarketFile !== undefined) {