From ad92b95295401e2bec9433fd93896de609f7de5c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 2 Oct 2019 11:57:30 +0200 Subject: [PATCH] Process Subtype Implemented --- .../FunctionLibraries/PartsFromNodes.js | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js b/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js index 9d0759dd8..3fb2f8db8 100644 --- a/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js +++ b/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js @@ -407,6 +407,22 @@ function newPartsFromNodes () { return } case 'Process': { + if (parentNode !== undefined) { + switch (parentNode.type) { + case 'Sensor': { + node.subType = 'Sensor Process' + break + } + case 'Indicator': { + node.subType = 'Indicator Process' + break + } + case 'Trading Engine': { + node.subType = 'Trading Engine Process' + break + } + } + } createPart('Process', node.name, node, parentNode, chainParent, 'Process') return } @@ -495,6 +511,21 @@ function newPartsFromNodes () { name: 'New Process', code: '// Write the configuration here.' } + + switch (node.type) { + case 'Sensor': { + process.subType = 'Sensor Process' + break + } + case 'Indicator': { + process.subType = 'Indicator Process' + break + } + case 'Trading Engine': { + process.subType = 'Trading Engine Process' + break + } + } node.processes.push(process) createPart('Process', process.name, process, node, node, 'Process')