From d821678c9ca5408949df185979acc51770c7c869 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 29 Jun 2019 00:15:47 +0200 Subject: [PATCH] Some Logs to trace BUG that records empty array files --- Commons.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Commons.js b/Commons.js index c9f62e8fe..575452cd3 100644 --- a/Commons.js +++ b/Commons.js @@ -73,7 +73,8 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { /* Initial Default Values */ - let initialDate = startDate; + let initialDate = startDate; + if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] runSimulation -> initialDate = " + initialDate); } const DEFAULT_BASE_ASSET_BALANCE = 1 const DEFAULT_BASE_ASSET_MINIMUN_BALANCE = 0.5 @@ -334,6 +335,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { } /* Main Simulation Loop: We go thourgh all the candles at this time period. */ + if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] runSimulation -> Main Simulation Loop -> candles.length = " + candles.length); } for (let i = 0; i < candles.length; i++) { @@ -1596,6 +1598,8 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { } } + if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] runSimulation -> callback -> recordsArray.length = " + recordsArray.length); } + callback(tradingSystem); function getElement(pArray, begin, end) {