diff --git a/TaskServer/DataDependencies.js b/TaskServer/DataDependencies.js index fecaf9905..2cf89a20a 100644 --- a/TaskServer/DataDependencies.js +++ b/TaskServer/DataDependencies.js @@ -48,9 +48,9 @@ } /* Session based dependency filters */ - if (bot.DEPENDENCY_FILTER !== undefined) { - for (let i = 0; i < bot.DEPENDENCY_FILTER.length; i++) { - let key = bot.DEPENDENCY_FILTER[i] + if (TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).DEPENDENCY_FILTER !== undefined) { + for (let i = 0; i < TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).DEPENDENCY_FILTER.length; i++) { + let key = TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).DEPENDENCY_FILTER[i] filter.set(key, true) } } diff --git a/TaskServer/LearningSession.js b/TaskServer/LearningSession.js index 2bbab338f..b3e7610d1 100644 --- a/TaskServer/LearningSession.js +++ b/TaskServer/LearningSession.js @@ -82,7 +82,7 @@ exports.newLearningSession = function (processIndex, bot, parentLogger) { TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_SYSTEM_NODE = JSON.parse(message.event.tradingSystem) TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_ENGINE_NODE = JSON.parse(message.event.tradingEngine) bot.LEARNING_SESSION = JSON.parse(message.event.session) - bot.DEPENDENCY_FILTER = JSON.parse(message.event.dependencyFilter) + TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).DEPENDENCY_FILTER = JSON.parse(message.event.dependencyFilter) bot.RESUME = false bot.FIRST_EXECUTION = true bot.LEARNING_SESSION.stop = stopSession // stop function diff --git a/TaskServer/TradingSession.js b/TaskServer/TradingSession.js index 244f660e3..0947026b7 100644 --- a/TaskServer/TradingSession.js +++ b/TaskServer/TradingSession.js @@ -86,7 +86,7 @@ TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_SYSTEM_NODE = JSON.parse(message.event.tradingSystem) TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_ENGINE_NODE = JSON.parse(message.event.tradingEngine) TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).SESSION_NODE = JSON.parse(message.event.session) - bot.DEPENDENCY_FILTER = JSON.parse(message.event.dependencyFilter) + TS.projects.superalgos.globals.processConstants.CONSTANTS_BY_PROCESS_INDEX_MAP.get(processIndex).DEPENDENCY_FILTER = JSON.parse(message.event.dependencyFilter) bot.RESUME = false bot.FIRST_EXECUTION = true