From 102ad903f262d4de3e055a33255ff89acc811dee Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 8 Jul 2019 19:53:44 +0200 Subject: [PATCH] Last Minute Fix --- Commons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commons.js b/Commons.js index abdaf0911..ec4aaea2c 100644 --- a/Commons.js +++ b/Commons.js @@ -372,7 +372,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { /* We skip the candle at the head of the market because i has not closed yet. */ let candlesPerDay = ONE_DAY_IN_MILISECONDS / timePeriod if (i === candles.length - 1) { - if ((candles.length < candlesPerDay) || (candles.length > candlesPerDay && i < candlesPerDay * 2) ) { + if ((candles.length < candlesPerDay) || (candles.length > candlesPerDay && candles.length < candlesPerDay * 2) ) { /*We are at the head of the market, thus we skip the last candle because it has not close yet. */ continue; /* Note here that in the last candle of the first day or the second day it will use an incomplete candle and partially calculated indicators.