Debugging Complete
This commit is contained in:
1 parent
7b972f65c1
commit
e19c880a8e
3 files changed
+25
-8
No files matched your search
Binary file not shown.
@@ -395,10 +395,21 @@ Read the trades from Charly's Output and pack them into daily files with candles
|
||||
|
||||
statusReport = JSON.parse(text);
|
||||
|
||||
lastCandleFile = new Date(statusReport.lastFile.year + "-" + statusReport.lastFile.month + "-" + statusReport.lastFile.days + " " + "00:00" + GMT_SECONDS);
|
||||
lastCandleClose = statusReport.candleClose;
|
||||
if (statusReport.monthCompleted === true) {
|
||||
|
||||
buildCandles();
|
||||
const logText = "[INFO] 'getStatusReport' - The current year / month is already complete for market " + market.assetA + '_' + market.assetB + " . Skipping it. ";
|
||||
logger.write(logText);
|
||||
|
||||
closeAndOpenMarket();
|
||||
|
||||
} else {
|
||||
|
||||
lastCandleFile = new Date(statusReport.lastFile.year + "-" + statusReport.lastFile.month + "-" + statusReport.lastFile.days + " " + "00:00" + GMT_SECONDS);
|
||||
lastCandleClose = statusReport.candleClose;
|
||||
|
||||
buildCandles();
|
||||
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
|
||||
@@ -435,7 +446,7 @@ Read the trades from Charly's Output and pack them into daily files with candles
|
||||
|
||||
*/
|
||||
|
||||
if ((year === firstTradeFile.getUTCFullYear() && month === firstTradeFile.getUTCMonth() + 1)) {
|
||||
if ((year === firstTradeFile.getUTCFullYear() && parseInt(month) === firstTradeFile.getUTCMonth() + 1)) {
|
||||
|
||||
/*
|
||||
|
||||
@@ -447,7 +458,7 @@ Read the trades from Charly's Output and pack them into daily files with candles
|
||||
logger.write(logText);
|
||||
console.log(logText);
|
||||
|
||||
lastCandleFile = new Date(firstTradeFile.getUTCFullYear() + "-" + (firstTradeFile.getUTCMonth() + 1) + "-" + firstTradeFile.getUTCDay() + " " + "00:00" + GMT_SECONDS);
|
||||
lastCandleFile = new Date(firstTradeFile.getUTCFullYear() + "-" + (firstTradeFile.getUTCMonth() + 1) + "-" + firstTradeFile.getUTCDate() + " " + "00:00" + GMT_SECONDS);
|
||||
lastCandleFile = new Date(lastCandleFile.valueOf() - ONE_DAY_IN_MILISECONDS);
|
||||
|
||||
lastCandleClose = 0;
|
||||
@@ -543,6 +554,12 @@ Read the trades from Charly's Output and pack them into daily files with candles
|
||||
|
||||
let date = new Date(lastCandleFile.valueOf() - 60 * 1000);
|
||||
|
||||
if (date.valueOf() < firstTradeFile.valueOf()) { // At the special case where we are at the begining of the market, this might be true.
|
||||
|
||||
date = new Date(firstTradeFile.valueOf() - 60 * 1000);
|
||||
|
||||
}
|
||||
|
||||
let candles = [];
|
||||
let volumes = [];
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ const ROOT_DIR = '../';
|
||||
|
||||
const MODULE_NAME = "run";
|
||||
|
||||
const START_ONE_MIN_DAILY_CANDLES_VOLUMES = false;
|
||||
const START_ONE_MIN_DAILY_CANDLES_VOLUMES_AT_ONE_MONTH = true;
|
||||
const START_ONE_MIN_DAILY_CANDLES_VOLUMES = true;
|
||||
const START_ONE_MIN_DAILY_CANDLES_VOLUMES_AT_ONE_MONTH = false;
|
||||
|
||||
const ONE_MIN_DAILY_CANDLES_MODULE = require('./One Min Daily Candles Volumes');
|
||||
|
||||
@@ -76,7 +76,7 @@ try {
|
||||
|
||||
const newPloniexHoleFixing = ONE_MIN_DAILY_CANDLES_MODULE.newPloniexHoleFixing(bot);
|
||||
|
||||
let month = 6;
|
||||
let month = 2;
|
||||
let year = 2015;
|
||||
|
||||
newPloniexHoleFixing.initialize(year, month, onInitializeReady);
|
||||
|
||||
Reference in new issue
Block a user