From 91b9969f6884d7ac5549f3e33c5d488458eae180 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 20 Apr 2021 17:34:57 +0200 Subject: [PATCH] API Data Fetcher added to UI code --- .../UI/Function-Libraries/TaskFunctions.js | 26 ++++++++++++++++--- .../Superalgos/UI/Spaces/Panel-Space/Layer.js | 5 +++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Projects/Superalgos/UI/Function-Libraries/TaskFunctions.js b/Projects/Superalgos/UI/Function-Libraries/TaskFunctions.js index 020b4c14c..c0b97c51d 100644 --- a/Projects/Superalgos/UI/Function-Libraries/TaskFunctions.js +++ b/Projects/Superalgos/UI/Function-Libraries/TaskFunctions.js @@ -109,10 +109,12 @@ function newSuperalgosFunctionLibraryTaskFunctions() { let taskLightingPath = '->Task->' + 'Sensor Bot Instance->' + + 'API Data Fetcher Bot Instance->' 'Indicator Bot Instance->Time Frames Filter->' + 'Trading Bot Instance->' + 'Learning Bot Instance->' + - 'Sensor Process Instance->Indicator Process Instance->Trading Process Instance->Learning Process Instance->' + + 'Sensor Process Instance->API Data Fetcher Process Instance->Indicator Process Instance->Trading Process Instance->Learning Process Instance->' + + 'API Map Reference->' + 'Execution Started Event->' + 'Key Reference->Exchange Account Key->' + 'Task Manager->' + @@ -144,10 +146,11 @@ function newSuperalgosFunctionLibraryTaskFunctions() { 'Execution Finished Event->' + 'Execution Started Event->Execution Finished Event->Process Definition->' + 'Sensor Bot->' + - 'Product Definition Folder->Product Definition Folder->Product Definition Folder->Product Definition Folder->Product Definition Folder->' + + 'API Data Fetcher Bot->' + 'Indicator Bot->' + 'Trading Bot->' + 'Learning Bot->' + + 'Product Definition Folder->Product Definition Folder->Product Definition Folder->Product Definition Folder->Product Definition Folder->' + 'Data Mine->Trading Mine->Learning Mine->' let taskDefinition = UI.projects.superalgos.functionLibraries.protocolNode.getProtocolNode(node, false, true, true, false, false, taskLightingPath) @@ -169,9 +172,10 @@ function newSuperalgosFunctionLibraryTaskFunctions() { 'Market Data Tasks->Market Trading Tasks->Market Learning Tasks->Market->' + 'Data Mine Tasks->Trading Mine Tasks->Learning Mine Tasks->' + 'Task Manager->Task->' + - 'Indicator Bot Instance->Sensor Bot Instance->Trading Bot Instance->Learning Bot Instance->' + - 'Indicator Process Instance->Sensor Process Instance->Trading Process Instance->Learning Process Instance->' + + 'Indicator Bot Instance->Sensor Bot Instance->API Data Fetcher Bot Instance->Trading Bot Instance->Learning Bot Instance->' + + 'Indicator Process Instance->Sensor Process Instance->API Data Fetcher Process Instance->Trading Process Instance->Learning Process Instance->' + 'Paper Trading Session->Forward Testing Session->Backtesting Session->Live Trading Session->Back Learning Session->Live Learning Session->' + + 'API Map Reference->' + 'Market->' + 'Process Definition->' @@ -765,6 +769,15 @@ function newSuperalgosFunctionLibraryTaskFunctions() { addProcessInstance(task, bot, botInstance) break } + case 'API Data Fetcher Bot': { + let task = addTask(taskManager) + + botInstance = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(task, 'API Data Fetcher Instance') + botInstance.name = bot.name + + addProcessInstance(task, bot, botInstance) + break + } case 'Indicator Bot': { let task = addTask(taskManager) @@ -829,6 +842,11 @@ function newSuperalgosFunctionLibraryTaskFunctions() { processInstance.payload.referenceParent = process break } + case 'API Data Fetcher Bot': { + processInstance = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(botInstance, 'API Data Fetcher Process Instance') + processInstance.payload.referenceParent = process + break + } case 'Indicator Bot': { processInstance = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(botInstance, 'Indicator Process Instance') processInstance.payload.referenceParent = process diff --git a/Projects/Superalgos/UI/Spaces/Panel-Space/Layer.js b/Projects/Superalgos/UI/Spaces/Panel-Space/Layer.js index f65b00e89..7f5426ce9 100644 --- a/Projects/Superalgos/UI/Spaces/Panel-Space/Layer.js +++ b/Projects/Superalgos/UI/Spaces/Panel-Space/Layer.js @@ -177,7 +177,7 @@ function newLayer() { 'Exchange Markets->Crypto Exchange->' + 'Product Definition->' + 'Product Definition Folder->Product Definition Folder->Product Definition Folder->Product Definition Folder->Product Definition Folder->' + - 'Sensor Bot->Indicator Bot->Trading Bot->Learning Bot->' + + 'Sensor Bot->API Data Fetcher Bot->Indicator Bot->Trading Bot->Learning Bot->' + 'Data Mine->Trading Mine->Learning Mine->' + 'Dataset Definition->' + 'Record Definition->Record Property->Record Formula->' + @@ -226,6 +226,9 @@ function newLayer() { } thisObject.bot = UI.projects.superalgos.utilities.meshes.findNodeInNodeMesh(thisObject.definition, 'Sensor Bot', undefined, false, true, true, true) + if (thisObject.bot === undefined) { + thisObject.bot = UI.projects.superalgos.utilities.meshes.findNodeInNodeMesh(thisObject.definition, 'API Data Fetcher Bot', undefined, false, true, true, true) + } if (thisObject.bot === undefined) { thisObject.bot = UI.projects.superalgos.utilities.meshes.findNodeInNodeMesh(thisObject.definition, 'Indicator Bot', undefined, false, true, true, true) }