diff --git a/SensorBotProcessMainLoop.js b/SensorBotProcessMainLoop.js index 9f97243d3..4238fe306 100644 --- a/SensorBotProcessMainLoop.js +++ b/SensorBotProcessMainLoop.js @@ -56,9 +56,7 @@ return; } USER_BOT_MODULE = {} - if (bot.process === "Hole-Fixing") { - //USER_BOT_MODULE.newUserBot = require(process.env.BOTS_PATH + '/aamasters/AAMasters/bots/AACharly-Sensor-Bot/Hole-Fixing/User.Bot').newUserBot - } + try { USER_BOT_MODULE.newUserBot = eval(text); // TODO This needs to be changed function } catch (err) { diff --git a/TradingBot.js b/TradingBot.js index ee6647948..5399f3c34 100644 --- a/TradingBot.js +++ b/TradingBot.js @@ -103,7 +103,7 @@ } } - /* From here we have more or less the same we used to have at JASON */ + const TRADING_SIMULATION = require('./TradingSimulation.js'); let tradingSimulation = TRADING_SIMULATION.newTradingSimulation(bot, logger, UTILITIES); @@ -461,9 +461,6 @@ } - /* Emit event that signals that simulation files were updated */ - global.SYSTEM_EVENT_HANDLER.raiseEvent('Jason-Multi-Period', 'Simulation Files Updated') - callBackFunction(global.DEFAULT_OK_RESPONSE); } @@ -929,9 +926,6 @@ } - /* Emit event that signals that simulation files were updated */ - global.SYSTEM_EVENT_HANDLER.raiseEvent('Jason-Multi-Period', 'Simulation Files Updated') - callBackFunction(global.DEFAULT_OK_RESPONSE); } diff --git a/TradingBotProcessMainLoop.js b/TradingBotProcessMainLoop.js index 57eee04e8..fa1168f52 100644 --- a/TradingBotProcessMainLoop.js +++ b/TradingBotProcessMainLoop.js @@ -69,7 +69,6 @@ } USER_BOT_MODULE = {} - //USER_BOT_MODULE.newUserBot = require(process.env.BOTS_PATH + '/aamasters/AAMasters/bots/AAJason-Trading-Engine-Bot/Multi-Period/User.Bot').newUserBot // Use this for a better debugging experience. You need to bring this js module to this folder in order to work. USER_BOT_MODULE.newUserBot = eval(text); // Use this for production filePath = bot.dataMine + "/" + "bots" + "/" + bot.repo; @@ -86,7 +85,6 @@ } USER_BOT_COMMONS = {} - //USER_BOT_COMMONS.newCommons = require(process.env.BOTS_PATH + '/aamasters/AAMasters/bots/AAJason-Trading-Engine-Bot/Commons').newCommons // Use this for a better debugging experience. You need to bring this js module to this folder in order to work. USER_BOT_COMMONS.newCommons = eval(text); // Use this for production session.initialize(onSessionInitialized) diff --git a/TradingSimulation.js b/TradingSimulation.js index 06c48ab4a..a0a46252a 100644 --- a/TradingSimulation.js +++ b/TradingSimulation.js @@ -570,7 +570,7 @@ let processingDate = loopingDay.getUTCFullYear() + '-' + utilities.pad(loopingDay.getUTCMonth() + 1, 2) + '-' + utilities.pad(loopingDay.getUTCDate(), 2); if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] runSimulation -> loop -> Simulation " + bot.sessionKey + " Loop # " + currentCandleIndex + " @ " + processingDate) } - console.log("Jason -> " + MODULE_NAME + " -> runSimulation -> loop -> Simulation " + bot.sessionKey + " Loop # " + currentCandleIndex + " @ " + processingDate) + console.log("Trading-Engine -> " + MODULE_NAME + " -> runSimulation -> loop -> Simulation " + bot.sessionKey + " Loop # " + currentCandleIndex + " @ " + processingDate) bot.sessionHeartBeat(processingDate) // tell the world we are alive and doing well }