From d95f5ee132d0fbe4d8d068b17ec68c271b9999f7 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 31 May 2018 18:28:16 +0200 Subject: [PATCH] Fire the change datetime event also when LIVE and COMPETITION --- TradingBotProcessMainLoop.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TradingBotProcessMainLoop.js b/TradingBotProcessMainLoop.js index 1ec392661..7373451bd 100644 --- a/TradingBotProcessMainLoop.js +++ b/TradingBotProcessMainLoop.js @@ -150,6 +150,13 @@ localDate.getUTCMinutes(), localDate.getUTCSeconds(), localDate.getUTCMilliseconds())); + + if (UI_COMMANDS.eventHandler !== undefined) { + + UI_COMMANDS.eventHandler.raiseEvent('Bot Execution Changed Datetime', bot.processDatetime); + + } + break; } case 'Backtest': { @@ -240,6 +247,12 @@ localDate.getUTCSeconds(), localDate.getUTCMilliseconds())); + if (UI_COMMANDS.eventHandler !== undefined) { + + UI_COMMANDS.eventHandler.raiseEvent('Bot Execution Changed Datetime', bot.processDatetime); + + } + let beginDatetime = new Date(bot.competition.beginDatetime); if (bot.processDatetime.valueOf() < beginDatetime.valueOf()) {