Simulation cycle complete

This commit is contained in:
Luis Fernando Molina committed 2020-06-12 11:19:40 +02:00
1 parent aabf49dccb
commit c3a5a051e4
4 files changed
+10 -13

No files matched your search

+5 -3
View File
@@ -607,7 +607,6 @@
if (currentTimeFrame > global.dailyFilePeriods[0][0]) {
writeMarketStatusReport(onMarketStatusReport)
} else {
writeDataRanges(currentTimeFrameLabel, onWritten);
}
@@ -645,6 +644,9 @@
callBackFunction(global.DEFAULT_OK_RESPONSE);
return;
}
if (bot.SESSION.type === 'Backtesting Session') {
bot.STOP_SESSION = true
}
callBackFunction(global.DEFAULT_OK_RESPONSE);
}
}
@@ -709,7 +711,7 @@
}
function writeDailyStatusReport(lastFileDate, callBack) {
let reportKey = bot.dataMine + "-" + bot.codeName + "-" + "Multi-Period" + "-" + "dataSet.V1";
let reportKey = bot.dataMine + "-" + bot.codeName + "-" + bot.processNode.referenceParent.config.codeName + "-" + "dataSet.V1";
let thisReport = statusDependencies.statusReports.get(reportKey);
thisReport.file.lastExecution = bot.currentDaytime;
@@ -721,7 +723,7 @@
}
function writeMarketStatusReport(callBack) {
let reportKey = bot.dataMine + "-" + bot.codeName + "-" + "Multi-Period" + "-" + "dataSet.V1";
let reportKey = bot.dataMine + "-" + bot.codeName + "-" + bot.processNode.referenceParent.config.codeName + "-" + "dataSet.V1";
let thisReport = statusDependencies.statusReports.get(reportKey);
thisReport.file.lastExecution = bot.processDatetime;
+1 -6
View File
@@ -88,8 +88,6 @@ exports.newTradingSimulation = function newTradingSimulation(bot, logger, UTILIT
initializeLoop()
function initializeLoop() {
if (FULL_LOG === true) { logger.write(MODULE_NAME, '[INFO] runSimulation -> initializeLoop -> Entering function.') }
if (bot.RESUME === true && tradingEngine.last.candle !== undefined) {
/* Estimate the Initial Candle based on the last candle saved at tradingEngine */
let firstBegin = candles[0].begin
@@ -266,8 +264,6 @@ exports.newTradingSimulation = function newTradingSimulation(bot, logger, UTILIT
}
function afterLoop() {
if (FULL_LOG === true) { logger.write(MODULE_NAME, '[INFO] runSimulation -> afterLoop -> Entering function.') }
tradingEngineModule.finalize()
tradingExecutionModule.finalize()
tradingSystemModule.finalize()
@@ -275,8 +271,7 @@ exports.newTradingSimulation = function newTradingSimulation(bot, logger, UTILIT
snapshotsModule.finalize()
announcementsModule.finalize()
callback(tradingSystem, snapshots.headers, snapshots.triggerOn, snapshots.takePosition)
callback()
}
function heartBeat() {
+3 -3
View File
@@ -44,9 +44,6 @@ exports.newTradingSystem = function newTradingSystem(bot, logger) {
function finalize() {
chart = undefined
tradingSystem = undefined
tradingEngine = undefined
conditions = undefined
tradingSystem.highlights = undefined
tradingSystem.conditionsErrors = undefined
@@ -54,6 +51,9 @@ exports.newTradingSystem = function newTradingSystem(bot, logger) {
formulas = undefined
tradingSystem.formulasValues = undefined
tradingSystem.formulasErrors = undefined
tradingSystem = undefined
tradingEngine = undefined
}
function setChart(pChart) {
+1 -1
View File
@@ -252,7 +252,7 @@
let processConfig = global.TASK_NODE.bot.processes[processIndex].referenceParent.config
if (processConfig.framework !== undefined) {
if (processConfig.framework.name === "Multi-Period-Daily" || processConfig.framework.name === "Multi-Period-Market" || processConfig.framework.name === "Multi-Period") {
if (processConfig.framework.name === "Multi-Period-Daily" || processConfig.framework.name === "Multi-Period-Market" || processConfig.framework.name === "Low-Frequency-Trading-Process") {
if (processConfig.framework.startDate !== undefined) {
processConfig.framework.startDate.resumeExecution = true;
if (processConfig.startMode.noTime !== undefined) {