percentage implemented
This commit is contained in:
1 parent
4e786510e9
commit
e51a74befc
2 files changed
+23
-5
No files matched your search
@@ -229,7 +229,8 @@ Read the candles and volumes from Exchange Raw Data and produce a file for each
|
||||
function buildCandles() {
|
||||
|
||||
try {
|
||||
|
||||
let fromDate = new Date(contextVariables.lastCandleFile.valueOf())
|
||||
let lastDate = new Date()
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> buildCandles -> Entering function."); }
|
||||
|
||||
let outputCandles;
|
||||
@@ -255,6 +256,11 @@ Read the candles and volumes from Exchange Raw Data and produce a file for each
|
||||
return;
|
||||
}
|
||||
|
||||
/* Telling the world we are alive and doing well */
|
||||
let currentDateString = contextVariables.lastCandleFile.getUTCFullYear() + '-' + utilities.pad(contextVariables.lastCandleFile.getUTCMonth() + 1, 2) + '-' + utilities.pad(contextVariables.lastCandleFile.getUTCDate(), 2);
|
||||
let currentDate = new Date(contextVariables.lastCandleFile)
|
||||
bot.processHeartBeat(currentDateString, global.getPercentage(fromDate, currentDate, lastDate))
|
||||
|
||||
/*
|
||||
|
||||
We prepere the arrays that will accumulate all the information for each output file.
|
||||
@@ -784,7 +790,9 @@ Read the candles and volumes from Exchange Raw Data and produce a file for each
|
||||
thisReport.file.beginingOfMarket = beginingOfMarket.toUTCString()
|
||||
thisReport.save(callBack);
|
||||
|
||||
logger.newInternalLoop(bot.codeName, bot.process, lastFileDate);
|
||||
if (global.areEqualDates(lastFileDate, new Date()) === false) {
|
||||
logger.newInternalLoop(bot.codeName, bot.process, lastFileDate);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
logger.write(MODULE_NAME, "[ERROR] start -> writeStatusReport -> err = " + err.stack);
|
||||
|
||||
@@ -378,6 +378,9 @@
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> buildCandles -> Entering function."); }
|
||||
|
||||
let fromDate = new Date(contextVariables.lastCandleFile.valueOf())
|
||||
let lastDate = new Date()
|
||||
|
||||
/*
|
||||
Firstly we prepere the arrays that will accumulate all the information for each output file.
|
||||
*/
|
||||
@@ -404,9 +407,7 @@
|
||||
contextVariables.lastCandleFile = new Date(contextVariables.lastCandleFile.valueOf() + ONE_DAY_IN_MILISECONDS);
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> buildCandles -> advanceTime -> New processing time @ " + contextVariables.lastCandleFile.getUTCFullYear() + "/" + (contextVariables.lastCandleFile.getUTCMonth() + 1) + "/" + contextVariables.lastCandleFile.getUTCDate() + "."); }
|
||||
|
||||
logger.newInternalLoop(bot.codeName, bot.process, contextVariables.lastCandleFile);
|
||||
|
||||
|
||||
/* Validation that we are not going past the head of the market. */
|
||||
|
||||
if (contextVariables.lastCandleFile.valueOf() > contextVariables.maxCandleFile.valueOf()) {
|
||||
@@ -417,6 +418,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (global.areEqualDates(contextVariables.lastCandleFile, new Date()) === false) {
|
||||
logger.newInternalLoop(bot.codeName, bot.process, contextVariables.lastCandleFile);
|
||||
}
|
||||
|
||||
/* Telling the world we are alive and doing well */
|
||||
let currentDateString = contextVariables.lastCandleFile.getUTCFullYear() + '-' + utilities.pad(contextVariables.lastCandleFile.getUTCMonth() + 1, 2) + '-' + utilities.pad(contextVariables.lastCandleFile.getUTCDate(), 2);
|
||||
let currentDate = new Date(contextVariables.lastCandleFile)
|
||||
bot.processHeartBeat(currentDateString, global.getPercentage(fromDate, currentDate, lastDate))
|
||||
|
||||
periodsLoop();
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user