From 65a5cb9ec295a578b95619fe91e48bc7d4ce9fc6 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 9 Feb 2018 14:50:33 +0100 Subject: [PATCH] Error handling added --- .vs/AABruce/v15/.suo | Bin 23040 -> 25088 bytes One-Min-Daily-Candles/Interval.js | 532 +++++++++--------- One-Min-Daily-Candles/run.js | 12 +- .../AABruce.njsproj.FileListAbsolute.txt | 3 + 4 files changed, 290 insertions(+), 257 deletions(-) create mode 100644 obj/Debug/AABruce.njsproj.FileListAbsolute.txt diff --git a/.vs/AABruce/v15/.suo b/.vs/AABruce/v15/.suo index c1a4d67328fbef37ab4319115a5320125c7f9767..10aa7ac233e7ff3aad9d384c6f9876fed125ccc9 100644 GIT binary patch delta 2150 zcmchYUrbw79LLYOT>f3!QN{u-P}X83kxq>Vq(el)mV)$KH;B->5IV^vqydC%N}<9{x0i`V&nm{(|r2--QPJq zzu!6Mdu}tI%gi_Oy6#oPgXR!Ig)6~*(=<6+0=7m!lVq08+ut~D|McdMvYI;@Xhm6( zFHu1;rH=|FZEicF8nA&Xa0u`;6|j{wpf=jV@ajPaSRXxI(+L{^bpQj+`&*-@WLCLy zXlG>lE@$$fBjco%vK2W;g)&n%QlZ?Vx)H|jX|_V0YJ%SgngM5X!n%ML_&^Krg8*m) ztsn|QpdADO=PtIc2hXTwSY|c7l9$Cxsm2ogq-qYjqJ>mWMK`p-u9Meh9H%j61Uvrp60pDRGeb`i`m(umC(nE!MQ#Mn< zIj-{2(0VLX#!9)N(u(W7Y*VH!C0-U+#aT?gAQs^-iY55-NP1Z$!Lo=6U4+S}xMT+n z)}Ej#chX3@b5izEp?SN4H^JH!o}0C`tQhxP-^xG5Pu?xt zaa#R6Q?aS^R#O-wZM7VIc-gG(eRBVTUwAQ)?c=bIGIto2^19g`EO*`Bb>k3q(p%ls z)mknkj`K(rBGv~fX(!;NjQF6|C{k>J!FeWZ~5g9T}|0RXy+C3?$vUny-?I33WIoS>#D0d@f_~$)BgrjoZ=cF?&<*Idsr8i{B==T(Ey}#RD zTrLI*xhtPv10E?z22bp&Co1|adG!nWK5~@K>bZTyVXQ@L^5{i=k65iE{}}v!`206m z4C}}AW7qU}@6ZsG8SNSF>E*v5L5_~&73a4#_VG5Lw$ikeD8C3_G( z2`1l5E*=yQdJt{XlN5}!2M>h^3gREK;16(}m$p#7dGO$a&wH~o^S--p-mJMs<}y7p za5UixNdZYxB}pRYr)}H3^z6m*D}qfkzSl3;-#mZvk^CI!>_$zl(HU5>O#xVr#E_5O z8slZ$jEC952rU=Jw79aLpBm+2UrKlv%N1(MGu~V0XN72leL__2iK;zOXG9s^*n(-7 z5*=b&X9k%tBZNb|Mwu9cd%h^K?geUU1{5uToNolzG(#B`(UvxX6<-LSv?5#_O#72C z-DYDt-Sph1)2MptbP5*FCsFm*Jw@K6Fk<|zV4x=$*e2Ltry?w#_q3}!ZH4@(4%Ep9 zYrrNitWZS}M?+&OsfyxFN~neJFAc8}R^@D;xR*(M3qQd7d;tZ01t0Q-_L^=G?SnPg zbp<(r?{7muD9y?3?~$Mbif$km%b}Clh4pB0VE_OC diff --git a/One-Min-Daily-Candles/Interval.js b/One-Min-Daily-Candles/Interval.js index ca5f0b32e..29fd1dcab 100644 --- a/One-Min-Daily-Candles/Interval.js +++ b/One-Min-Daily-Candles/Interval.js @@ -288,7 +288,7 @@ Read the trades from Charly's Output and pack them into daily files with candles */ - reportFilePath = EXCHANGE_NAME + "/Processes/" + "Hiistoric-Trades"; + reportFilePath = EXCHANGE_NAME + "/Processes/" + "Historic-Trades"; charlyAzureFileStorage.getTextFile(reportFilePath, fileName, onStatusReportReceived, true); @@ -325,7 +325,7 @@ Read the trades from Charly's Output and pack them into daily files with candles reportFilePath = EXCHANGE_NAME + "/Processes/" + "Hole-Fixing" + "/" + year + "/" + month; - cahrlyAzureFileStorage.getTextFile(reportFilePath, fileName, onStatusReportReceived, true); + charlyAzureFileStorage.getTextFile(reportFilePath, fileName, onStatusReportReceived, true); function onStatusReportReceived(text) { @@ -426,84 +426,94 @@ Read the trades from Charly's Output and pack them into daily files with candles function findLastCandleCloseValue() { - /* + try { - We will search and find for the last trade before the begining of the current candle and that will give us the last close value. - Before going backwards, we need to be sure we are not at the begining of the market. + /* - */ - - if ((year === firstTradeFile.getUTCFullYear() && month === firstTradeFile.getUTCMonth() + 1)) { - - /* - - We are at the begining of the market, so we will set everyting to build the first candle. + We will search and find for the last trade before the begining of the current candle and that will give us the last close value. + Before going backwards, we need to be sure we are not at the begining of the market. */ - lastCandleFile = new Date(firstTradeFile.getUTCFullYear() + "-" + (firstTradeFile.getUTCMonth() + 1) + "-" + firstTradeFile.getUTCDay() + " " + "00:00" + GMT_SECONDS); - lastCandleFile = new Date(lastCandleFile.valueOf() - ONE_DAY_IN_MILISECONDS); + if ((year === firstTradeFile.getUTCFullYear() && month === firstTradeFile.getUTCMonth() + 1)) { - lastCandleClose = 0; + /* - buildCandles(); + We are at the begining of the market, so we will set everyting to build the first candle. - } else { + */ - /* + lastCandleFile = new Date(firstTradeFile.getUTCFullYear() + "-" + (firstTradeFile.getUTCMonth() + 1) + "-" + firstTradeFile.getUTCDay() + " " + "00:00" + GMT_SECONDS); + lastCandleFile = new Date(lastCandleFile.valueOf() - ONE_DAY_IN_MILISECONDS); - We are not at the begining of the market, so we need scan backwards the trade files until we find a non empty one and get the last trade. + lastCandleClose = 0; - */ + buildCandles(); - let date = new Date(processDate.valueOf()); + } else { - function loopStart() { + /* - date = new Date(date.valueOf() - 60 * 1000); + We are not at the begining of the market, so we need scan backwards the trade files until we find a non empty one and get the last trade. - let dateForPath = date.getUTCFullYear() + '/' + utilities.pad(date.getUTCMonth() + 1, 2) + '/' + utilities.pad(date.getUTCDate(), 2) + '/' + utilities.pad(date.getUTCHours(), 2) + '/' + utilities.pad(date.getUTCMinutes(), 2); - let fileName = market.assetA + '_' + market.assetB + ".json" - let filePath = EXCHANGE_NAME + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPath; + */ - charlyAzureFileStorage.getTextFile(filePath, fileName, onFileReceived, true); + let date = new Date(processDate.valueOf()); - function onFileReceived(text) { + loopStart(); - let tradesFile; + function loopStart() { - try { + date = new Date(date.valueOf() - 60 * 1000); - tradesFile = JSON.parse(text); + let dateForPath = date.getUTCFullYear() + '/' + utilities.pad(date.getUTCMonth() + 1, 2) + '/' + utilities.pad(date.getUTCDate(), 2) + '/' + utilities.pad(date.getUTCHours(), 2) + '/' + utilities.pad(date.getUTCMinutes(), 2); + let fileName = market.assetA + '_' + market.assetB + ".json" + let filePath = EXCHANGE_NAME + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPath; - if (tradesFile.length > 0) { + charlyAzureFileStorage.getTextFile(filePath, fileName, onFileReceived, true); - lastCandleClose = tradesFile[tradesFile.length - 1][2]; // Position 2 is the rate at which the trade was executed. + function onFileReceived(text) { - const logText = "[INFO] 'findLastCandleCloseValue' - Trades found at " + filePath + " for market " + market.assetA + '_' + market.assetB + " . lastCandleClose = " + lastCandleClose; + let tradesFile; + + try { + + tradesFile = JSON.parse(text); + + if (tradesFile.length > 0) { + + lastCandleClose = tradesFile[tradesFile.length - 1][2]; // Position 2 is the rate at which the trade was executed. + + const logText = "[INFO] 'findLastCandleCloseValue' - Trades found at " + filePath + " for market " + market.assetA + '_' + market.assetB + " . lastCandleClose = " + lastCandleClose; + logger.write(logText); + + buildCandles(); + + } else { + + const logText = "[INFO] 'findLastCandleCloseValue' - No trades found at " + filePath + " for market " + market.assetA + '_' + market.assetB + " ."; + logger.write(logText); + + loopStart(); + + } + + } catch (err) { + + const logText = "[ERR] 'findLastCandleCloseValue' - Empty or corrupt trade file found at " + filePath + " for market " + market.assetA + '_' + market.assetB + " . Skipping this Market. "; logger.write(logText); - buildCandles(); - - } else { - - const logText = "[INFO] 'findLastCandleCloseValue' - No trades found at " + filePath + " for market " + market.assetA + '_' + market.assetB + " ."; - logger.write(logText); - - loopStart(); - + closeAndOpenMarket(); } - - } catch (err) { - - const logText = "[ERR] 'findLastCandleCloseValue' - Empty or corrupt trade file found at " + filePath + " for market " + market.assetA + '_' + market.assetB + " . Skipping this Market. "; - logger.write(logText); - - closeAndOpenMarket(); } } } } + catch (err) { + const logText = "[ERROR] 'findLastCandleCloseValue' - ERROR : " + err.message; + logger.write(logText); + closeMarket(); + } } function buildCandles() { @@ -516,170 +526,181 @@ Read the trades from Charly's Output and pack them into daily files with candles */ - nextCandleFile(); + try { - function nextCandleFile() { - lastCandleFile = new Date(lastCandleFile.valueOf() + ONE_DAY_IN_MILISECONDS); + nextCandleFile(); - let date = new Date(lastCandleFile.valueOf() - 60 * 1000); + function nextCandleFile() { - let candles = []; - let volumes = []; + lastCandleFile = new Date(lastCandleFile.valueOf() + ONE_DAY_IN_MILISECONDS); - nextDate(); + let date = new Date(lastCandleFile.valueOf() - 60 * 1000); - function nextDate() { + let candles = []; + let volumes = []; - date = new Date(date.valueOf() + 60 * 1000); + nextDate(); - /* Check if we are outside the current Day / File */ + function nextDate() { - if (date.getUTCDate() !== lastCandleFile.getUTCDate()) { + date = new Date(date.valueOf() + 60 * 1000); - writeFiles(lastCandleFile, candles, volumes, true, onFilesWritten); + /* Check if we are outside the current Day / File */ - return; + if (date.getUTCDate() !== lastCandleFile.getUTCDate()) { - function onFilesWritten() { + writeFiles(lastCandleFile, candles, volumes, true, onFilesWritten); - nextCandleFile(); + return; - } + function onFilesWritten() { - } - - /* Check if we are outside the currrent Month */ - - if (date.getUTCMont() + 1 !== month) { - - writeStatusReport(lastCandleFile, lastCandleClose, true, onStatusReportWritten); - - return; - - function onStatusReportWritten() { - - const logText = "[ERR] 'buildCandles' - Finishing processing the whole month for market " + market.assetA + '_' + market.assetB + " . Skipping this Market. "; - logger.write(logText); - - closeAndOpenMarket(); - - } - } - - /* Check if we have past the most recent hole fixed file */ - - if (date.valueOf() > lastFileWithoutHoles.valueOf()) { - - writeFiles(lastCandleFile, candles, volumes, false, onFilesWritten); - - return; - - function onFilesWritten() { - - nextIntervalExecution = true; - - const logText = "[ERR] 'buildCandles' - Head of the market reached for market " + market.assetA + '_' + market.assetB + " . "; - logger.write(logText); - - closeAndOpenMarket(); - - } - } - } - - function readTrades() { - - let dateForPath = date.getUTCFullYear() + '/' + utilities.pad(date.getUTCMonth() + 1, 2) + '/' + utilities.pad(date.getUTCDate(), 2) + '/' + utilities.pad(date.getUTCHours(), 2) + '/' + utilities.pad(date.getUTCMinutes(), 2); - let fileName = market.assetA + '_' + market.assetB + ".json" - let filePath = EXCHANGE_NAME + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPath; - - charlyAzureFileStorage.getTextFile(filePath, fileName, onFileReceived, true); - - function onFileReceived(text) { - - let tradesFile; - - try { - - let candle = { - open: lastCandleClose, - close: lastCandleClose, - min: lastCandleClose, - max: lastCandleClose, - begin: date.valueOf(), - end: date.valueOf() + 60 * 1000 - 1 - }; - - let volume = { - begin: date.valueOf(), - end: date.valueOf() + 60 * 1000 - 1, - buy: 0, - sell: 0 - }; - - tradesFile = JSON.parse(text); - - if (tradesFile.length > 0) { - - /* Candle open and close Calculations */ - - candle.open = tradesFile[0][2]; - candle.close = tradesFile[tradesFile.length - 1][2]; - - lastCandleClose = candle.close; + nextCandleFile(); } - for (let i = 0; i < tradesFile.length; i++) { + } - const trade = { - id: tradesFile[i][0], - type: tradesFile[i][1], - rate: tradesFile[i][2], - amountA: tradesFile[i][3], - amountB: tradesFile[i][4], - seconds: tradesFile[i][5] + /* Check if we are outside the currrent Month */ + + if (date.getUTCMonth() + 1 !== month) { + + writeStatusReport(lastCandleFile, lastCandleClose, true, onStatusReportWritten); + + return; + + function onStatusReportWritten() { + + const logText = "[ERR] 'buildCandles' - Finishing processing the whole month for market " + market.assetA + '_' + market.assetB + " . Skipping this Market. "; + logger.write(logText); + + closeAndOpenMarket(); + + } + } + + /* Check if we have past the most recent hole fixed file */ + + if (date.valueOf() > lastFileWithoutHoles.valueOf()) { + + writeFiles(lastCandleFile, candles, volumes, false, onFilesWritten); + + return; + + function onFilesWritten() { + + nextIntervalExecution = true; + + const logText = "[ERR] 'buildCandles' - Head of the market reached for market " + market.assetA + '_' + market.assetB + " . "; + logger.write(logText); + + closeAndOpenMarket(); + + } + } + } + + function readTrades() { + + let dateForPath = date.getUTCFullYear() + '/' + utilities.pad(date.getUTCMonth() + 1, 2) + '/' + utilities.pad(date.getUTCDate(), 2) + '/' + utilities.pad(date.getUTCHours(), 2) + '/' + utilities.pad(date.getUTCMinutes(), 2); + let fileName = market.assetA + '_' + market.assetB + ".json" + let filePath = EXCHANGE_NAME + "/Output/" + TRADES_FOLDER_NAME + '/' + dateForPath; + + charlyAzureFileStorage.getTextFile(filePath, fileName, onFileReceived, true); + + function onFileReceived(text) { + + let tradesFile; + + try { + + let candle = { + open: lastCandleClose, + close: lastCandleClose, + min: lastCandleClose, + max: lastCandleClose, + begin: date.valueOf(), + end: date.valueOf() + 60 * 1000 - 1 }; - /* Candle min and max Calculations */ + let volume = { + begin: date.valueOf(), + end: date.valueOf() + 60 * 1000 - 1, + buy: 0, + sell: 0 + }; - if (trade.rate < candle.min) { + tradesFile = JSON.parse(text); - candle.min = trade.rate; + if (tradesFile.length > 0) { + + /* Candle open and close Calculations */ + + candle.open = tradesFile[0][2]; + candle.close = tradesFile[tradesFile.length - 1][2]; + + lastCandleClose = candle.close; } - if (trade.rate > candle.max) { + for (let i = 0; i < tradesFile.length; i++) { - candle.max = trade.rate; + const trade = { + id: tradesFile[i][0], + type: tradesFile[i][1], + rate: tradesFile[i][2], + amountA: tradesFile[i][3], + amountB: tradesFile[i][4], + seconds: tradesFile[i][5] + }; + + /* Candle min and max Calculations */ + + if (trade.rate < candle.min) { + + candle.min = trade.rate; + + } + + if (trade.rate > candle.max) { + + candle.max = trade.rate; + + } + + /* Volume Calculations */ + + if (trade.type === "sell") { + volume.sell = volume.sell + trade.amountA; + } else { + volume.buy = volume.buy + trade.amountA; + } } - /* Volume Calculations */ + candles.push(candle); - if (trade.type === "sell") { - volume.sell = volume.sell + trade.amountA; - } else { - volume.buy = volume.buy + trade.amountA; - } + volumes.push(volume); + } catch (err) { + + const logText = "[ERR] 'buildCandles' - Empty or corrupt trade file found at " + filePath + " for market " + market.assetA + '_' + market.assetB + " . Skipping this Market. "; + logger.write(logText); + + closeAndOpenMarket(); } - - candles.push(candle); - - volumes.push(volume); - - } catch (err) { - - const logText = "[ERR] 'buildCandles' - Empty or corrupt trade file found at " + filePath + " for market " + market.assetA + '_' + market.assetB + " . Skipping this Market. "; - logger.write(logText); - - closeAndOpenMarket(); } } } + } + + catch (err) { + const logText = "[ERROR] 'buildCandles' - ERROR : " + err.message; + logger.write(logText); + closeMarket(); } + } function writeFiles(date, candles, volumes, isFileComplete, callBack) { @@ -690,115 +711,124 @@ Read the trades from Charly's Output and pack them into daily files with candles */ - writeCandles(); + try { - function writeCandles() { + writeCandles(); - let separator = ""; - let fileRecordCounter = 0; + function writeCandles() { - let fileContent = ""; + let separator = ""; + let fileRecordCounter = 0; - for (i = 0; i < candles.length; i++) { + let fileContent = ""; - let candle = candles[i]; + for (i = 0; i < candles.length; i++) { - fileContent = fileContent + separator + '[' + candles[i].min + "," + candles[i].max + "," + candles[i].open + "," + candles[i].close + "," + candles[i].begin + "," + candles[i].end + "]"; + let candle = candles[i]; - if (separator === "") { separator = ","; } + fileContent = fileContent + separator + '[' + candles[i].min + "," + candles[i].max + "," + candles[i].open + "," + candles[i].close + "," + candles[i].begin + "," + candles[i].end + "]"; - fileRecordCounter++; + if (separator === "") { separator = ","; } + + fileRecordCounter++; + + } + + fileContent = "[" + fileContent + "]"; + + let fileName = '' + market.assetA + '_' + market.assetB + '.json'; + + let dateForPath = date.getUTCFullYear() + '/' + utilities.pad(date.getUTCMonth() + 1, 2) + '/' + utilities.pad(date.getUTCDate(), 2); + + let filePath = EXCHANGE_NAME + "/Output/" + CANDLES_FOLDER_NAME + '/' + CANDLES_ONE_MIN + '/' + dateForPath; + + utilities.createFolderIfNeeded(filePath, azureFileStorage, onFolderCreated); + + function onFolderCreated() { + + azureFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + + function onFileCreated() { + + const logText = "[WARN] Finished with File @ " + market.assetA + "_" + market.assetB + ", " + fileRecordCounter + " records inserted into " + filePath + "/" + fileName + ""; + console.log(logText); + logger.write(logText); + + writeVolumes(); + } + } } - fileContent = "[" + fileContent + "]"; + function writeVolumes() { - let fileName = '' + market.assetA + '_' + market.assetB + '.json'; + let separator = ""; + let fileRecordCounter = 0; - let dateForPath = date.getUTCFullYear() + '/' + utilities.pad(date.getUTCMonth() + 1, 2) + '/' + utilities.pad(date.getUTCDate(), 2); + let fileContent = ""; - let filePath = EXCHANGE_NAME + "/Output/" + CANDLES_FOLDER_NAME + '/' + CANDLES_ONE_MIN + '/' + dateForPath; + for (i = 0; i < volumes.length; i++) { - utilities.createFolderIfNeeded(filePath, azureFileStorage, onFolderCreated); + let candle = volumes[i]; - function onFolderCreated() { + fileContent = fileContent + separator + '[' + volumes[i].buy + "," + volumes[i].sell + "," + volumes[i].begin + "," + volumes[i].end + "]"; - azureFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + if (separator === "") { separator = ","; } - function onFileCreated() { + fileRecordCounter++; - const logText = "[WARN] Finished with File @ " + market.assetA + "_" + market.assetB + ", " + fileRecordCounter + " records inserted into " + filePath + "/" + fileName + ""; - console.log(logText); - logger.write(logText); + } - writeVolumes(); + fileContent = "[" + fileContent + "]"; + + let fileName = '' + market.assetA + '_' + market.assetB + '.json'; + + let dateForPath = date.getUTCFullYear() + '/' + utilities.pad(date.getUTCMonth() + 1, 2) + '/' + utilities.pad(date.getUTCDate(), 2); + + let filePath = EXCHANGE_NAME + "/Output/" + VOLUMES_FOLDER_NAME + '/' + VOLUMES_ONE_MIN + '/' + dateForPath; + + utilities.createFolderIfNeeded(filePath, azureFileStorage, onFolderCreated); + + function onFolderCreated() { + + azureFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); + + function onFileCreated() { + + const logText = "[WARN] Finished with File @ " + market.assetA + "_" + market.assetB + ", " + fileRecordCounter + " records inserted into " + filePath + "/" + fileName + ""; + console.log(logText); + logger.write(logText); + + writeReport(); + } } } - } + function writeReport() { - function writeVolumes() { + if (isFileComplete === true) { - let separator = ""; - let fileRecordCounter = 0; + writeStatusReport(date, lastCandleClose, false, onStatusReportWritten); - let fileContent = ""; + function onStatusReportWritten() { - for (i = 0; i < volumes.length; i++) { + callBack(); - let candle = volumes[i]; + } - fileContent = fileContent + separator + '[' + volumes[i].buy + "," + volumes[i].sell + "," + volumes[i].begin + "," + volumes[i].end + "]"; - - if (separator === "") { separator = ","; } - - fileRecordCounter++; - - } - - fileContent = "[" + fileContent + "]"; - - let fileName = '' + market.assetA + '_' + market.assetB + '.json'; - - let dateForPath = date.getUTCFullYear() + '/' + utilities.pad(date.getUTCMonth() + 1, 2) + '/' + utilities.pad(date.getUTCDate(), 2); - - let filePath = EXCHANGE_NAME + "/Output/" + VOLUMES_FOLDER_NAME + '/' + VOLUMES_ONE_MIN + '/' + dateForPath; - - utilities.createFolderIfNeeded(filePath, azureFileStorage, onFolderCreated); - - function onFolderCreated() { - - azureFileStorage.createTextFile(filePath, fileName, fileContent + '\n', onFileCreated); - - function onFileCreated() { - - const logText = "[WARN] Finished with File @ " + market.assetA + "_" + market.assetB + ", " + fileRecordCounter + " records inserted into " + filePath + "/" + fileName + ""; - console.log(logText); - logger.write(logText); - - writeReport(); - } - } - } - - function writeReport() { - - if (isFileComplete === true) { - - writeStatusReport(date, lastCandleClose, false, onStatusReportWritten); - - function onStatusReportWritten() { + } else { callBack(); } - - } else { - - callBack(); - } } + + catch (err) { + const logText = "[ERROR] 'writeFiles' - ERROR : " + err.message; + logger.write(logText); + closeMarket(); + } } function writeStatusReport(lastFileDate, candleClose, isMonthComplete, callBack) { diff --git a/One-Min-Daily-Candles/run.js b/One-Min-Daily-Candles/run.js index 6709c1210..b0e3ca445 100644 --- a/One-Min-Daily-Candles/run.js +++ b/One-Min-Daily-Candles/run.js @@ -11,8 +11,8 @@ const ROOT_DIR = '../'; const MODULE_NAME = "run"; -const START_ONE_MIN_DAILY_CANDLES = true; -const START_ONE_MIN_DAILY_CANDLES_AT_ONE_MONTH = false; +const START_ONE_MIN_DAILY_CANDLES_VOLUMES = false; +const START_ONE_MIN_DAILY_CANDLES_VOLUMES_AT_ONE_MONTH = true; const ONE_MIN_DAILY_CANDLES_MODULE = require('./One Min Daily Candles Volumes'); @@ -37,7 +37,7 @@ process.on('exit', function (code) { try { - if (START_ONE_MIN_DAILY_CANDLES === true) { + if (START_ONE_MIN_DAILY_CANDLES_VOLUMES === true) { for (let year = 2018; year > 2014; year--) { @@ -68,7 +68,7 @@ try { } - if (START_ONE_MIN_DAILY_CANDLES_AT_ONE_MONTH === true) { + if (START_ONE_MIN_DAILY_CANDLES_VOLUMES_AT_ONE_MONTH === true) { startProcess(); @@ -76,8 +76,8 @@ try { const newPloniexHoleFixing = ONE_MIN_DAILY_CANDLES_MODULE.newPloniexHoleFixing(bot); - let month = 2; - let year = 2015; + let month = 6; + let year = 2016; newPloniexHoleFixing.initialize(year, month, onInitializeReady); diff --git a/obj/Debug/AABruce.njsproj.FileListAbsolute.txt b/obj/Debug/AABruce.njsproj.FileListAbsolute.txt new file mode 100644 index 000000000..fbbf72da3 --- /dev/null +++ b/obj/Debug/AABruce.njsproj.FileListAbsolute.txt @@ -0,0 +1,3 @@ +C:\Users\Luis\source\repos\AABruce\obj\Debug\AABruce.njsprojResolveAssemblyReference.cache +C:\Users\Luis\source\repos\AABruce\obj\Debug\AABruce.njsproj.CoreCompileInputs.cache +C:\Users\Luis\source\repos\AABruce\bin\Microsoft.NodejsTools.WebRole.dll