From d093b10b84bc39d1fb2f5a1c2fb0778178564216 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 25 Jan 2020 12:49:09 +0100 Subject: [PATCH] adaptations for charly historic trades --- MultiPeriodDaily.js | 4 ++-- Root.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MultiPeriodDaily.js b/MultiPeriodDaily.js index ad50e23ca..505dd2247 100644 --- a/MultiPeriodDaily.js +++ b/MultiPeriodDaily.js @@ -143,7 +143,7 @@ thisReport = statusReport.file; - if (thisReport.lastFile === undefined) { + if (thisReport.beginingOfMarket === undefined) { logger.write(MODULE_NAME, "[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey); logger.write(MODULE_NAME, "[HINT] start -> getContextVariables -> It is too early too run this process since the trade history of the market is not there yet."); @@ -156,7 +156,7 @@ return; } - contextVariables.dateBeginOfMarket = new Date(thisReport.lastFile.year + "-" + thisReport.lastFile.month + "-" + thisReport.lastFile.days + " " + thisReport.lastFile.hours + ":" + thisReport.lastFile.minutes + GMT_SECONDS); + contextVariables.dateBeginOfMarket = new Date(thisReport.beginingOfMarket.year + "-" + thisReport.beginingOfMarket.month + "-" + thisReport.beginingOfMarket.days + " " + thisReport.beginingOfMarket.hours + ":" + thisReport.beginingOfMarket.minutes + GMT_SECONDS); } diff --git a/Root.js b/Root.js index 14535c574..9118749f1 100644 --- a/Root.js +++ b/Root.js @@ -209,6 +209,7 @@ /* Simplifying the access to basic info */ botConfig.dataMine = global.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.parentNode.code.codeName botConfig.exchange = global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.parentNode.parentNode.code.codeName + botConfig.exchangeNode = global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.parentNode.parentNode botConfig.market = { baseAsset: global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.baseAsset.referenceParent.code.codeName, quotedAsset: global.TASK_NODE.bot.processes[processIndex].marketReference.referenceParent.quotedAsset.referenceParent.code.codeName