diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 2aa0170c3..68df5b2fa 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -575,6 +575,13 @@ "functionName": "newSuperalgosBotModulesTradingOutput", "fileName": "TradingOutput.js", "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Simulation", + "propertyName": "tradingSimulation", + "functionName": "newSuperalgosBotModulesTradingSimulation", + "fileName": "TradingSimulation.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" } ] }, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOutput.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOutput.js index 90ee0e79d..0612f4d61 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOutput.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOutput.js @@ -37,8 +37,7 @@ exports.newSuperalgosBotModulesTradingOutput = function (processIndex, tradingEn } /* Preparing everything for the Simulation */ - const TRADING_SIMULATION = require('./TradingSimulation.js') - let tradingSimulation = TRADING_SIMULATION.newTradingSimulation(processIndex, tradingEngineModule) + let tradingSimulationModuleObject = TS.projects.superalgos.botModules.tradingSimulation.newSuperalgosBotModulesTradingSimulation(processIndex, tradingEngineModule) let outputDatasets = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray(TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') let outputDatasetsMap = new Map() @@ -73,13 +72,13 @@ exports.newSuperalgosBotModulesTradingOutput = function (processIndex, tradingEn } } - await tradingSimulation.runSimulation( + await tradingSimulationModuleObject.runSimulation( chart, outputDatasetsMap, writeFiles ) - tradingSimulation.finalize() + tradingSimulationModuleObject.finalize() return async function initializeOutputs() { diff --git a/TaskServer/LowFrequencyTrading/TradingSimulation.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js similarity index 99% rename from TaskServer/LowFrequencyTrading/TradingSimulation.js rename to Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js index 8e0a8010a..e92dd1620 100644 --- a/TaskServer/LowFrequencyTrading/TradingSimulation.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js @@ -1,4 +1,4 @@ -exports.newTradingSimulation = function (processIndex, tradingEngineModule) { +exports.newSuperalgosBotModulesTradingSimulation = function (processIndex, tradingEngineModule) { /* This Module represents the trading simulacion. Escentially a loop through a set of candles and the execution at each loop cycle of the Trading System Protocol.