From 6c369a3192183365b5375ed2b83cfe8592f410ba Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 14 May 2021 16:12:32 +0200 Subject: [PATCH 1/2] BIG FIX: Undefined indicators discovered at BB Top Bounce --- .../Trading-Bot/Low-Frequency-Trading/TradingSimulation.js | 4 ++-- .../TS/Function-Libraries/DataDependenciesFunctions.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js index 690538e92..99b0d2776 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js @@ -302,7 +302,7 @@ exports.newSuperalgosBotModulesTradingSimulation = function (processIndex) { if (sessionParameters.heartbeats.config.date === true || sessionParameters.heartbeats.config.candleIndex === true) { /* We will produce a simulation level heartbeat in order to inform the user this is running. */ - heartBeatDate = new Date(Math.trunc(tradingEngine.tradingCurrent.tradingEpisode.candle.begin.value / TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS) * TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS) + heartBeatDate = new Date(Math.trunc(tradingEngine.tradingCurrent.tradingEpisode.candle.begin.value / TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS) * TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS + TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS) let fromDate = new Date(sessionParameters.timeRange.config.initialDatetime) let lastDate = new Date(sessionParameters.timeRange.config.finalDatetime) @@ -374,7 +374,7 @@ exports.newSuperalgosBotModulesTradingSimulation = function (processIndex) { let dataDependencies = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray(TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') dataDependencies = TS.projects.superalgos.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies) - /* Finding the Current Element on Market Files */ + /* Finding the Current Element on Daily Files */ if (TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_PROCESSING_DAILY_FILES) { for (let j = 0; j < TS.projects.superalgos.globals.timeFrames.dailyFilePeriods().length; j++) { let mapKey = TS.projects.superalgos.globals.timeFrames.dailyFilePeriods()[j][1] diff --git a/Projects/Superalgos/TS/Function-Libraries/DataDependenciesFunctions.js b/Projects/Superalgos/TS/Function-Libraries/DataDependenciesFunctions.js index 54d8915c9..6278e37f1 100644 --- a/Projects/Superalgos/TS/Function-Libraries/DataDependenciesFunctions.js +++ b/Projects/Superalgos/TS/Function-Libraries/DataDependenciesFunctions.js @@ -215,7 +215,7 @@ exports.newSuperalgosFunctionLibrariesDataDependenciesFunctions = function () { -1 because we need the previous closed element */ - if (end - timeFrame * 4 < initialDatetime - 1) { continue } + if (end + timeFrame * 4 < initialDatetime - 1) { continue } if (begin > finalDatetime) { continue } result.push(dataRecord) } From fb0566afe330967c1a7e9f383a31a8523324b99f Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 14 May 2021 16:19:59 +0200 Subject: [PATCH 2/2] BUG FIX: Suggestion of Deep Scan --- Projects/Superalgos/UI/Function-Libraries/ChainAttachDetach.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/Superalgos/UI/Function-Libraries/ChainAttachDetach.js b/Projects/Superalgos/UI/Function-Libraries/ChainAttachDetach.js index 3ab54eabe..d995126c6 100644 --- a/Projects/Superalgos/UI/Function-Libraries/ChainAttachDetach.js +++ b/Projects/Superalgos/UI/Function-Libraries/ChainAttachDetach.js @@ -53,6 +53,7 @@ function newSuperalgosFunctionLibraryChainAttachDetach() { let arrayItem = nodePropertyArray[j] if (arrayItem.id === node.id) { nodePropertyArray.splice(j, 1) + j-- } } }