diff --git a/FloatingSpace/StrategyPartConstructor.js b/FloatingSpace/StrategyPartConstructor.js index 40f37a09b..92583dfb7 100644 --- a/FloatingSpace/StrategyPartConstructor.js +++ b/FloatingSpace/StrategyPartConstructor.js @@ -81,7 +81,7 @@ function newStrategyPartConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: -60 + angle: -80 }, { action: 'Save Trading System', @@ -96,7 +96,7 @@ function newStrategyPartConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: -20 + angle: -40 }, { action: 'New Strategy', @@ -109,7 +109,7 @@ function newStrategyPartConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: 20 + angle: 0 }, { action: 'Open Settings', @@ -121,7 +121,19 @@ function newStrategyPartConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: 60 + angle: 40 + }, + { + action: 'Download', + actionFunction: payload.onMenuItemClick, + label: 'Download', + visible: false, + iconPathOn: 'upload', + iconPathOff: 'upload', + rawRadius: 8, + targetRadius: 0, + currentRadius: 0, + angle: 80 }] break } @@ -150,7 +162,7 @@ function newStrategyPartConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: -20 + angle: -40 }, { action: 'Open Settings', @@ -162,7 +174,19 @@ function newStrategyPartConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: 20 + angle: 0 + }, + { + action: 'Download', + actionFunction: payload.onMenuItemClick, + label: 'Download', + visible: false, + iconPathOn: 'upload', + iconPathOff: 'upload', + rawRadius: 8, + targetRadius: 0, + currentRadius: 0, + angle: 40 }] break } diff --git a/StrategySpace/Workspace.js b/StrategySpace/Workspace.js index ad4e38160..d0e5dc976 100644 --- a/StrategySpace/Workspace.js +++ b/StrategySpace/Workspace.js @@ -548,6 +548,35 @@ function newWorkspace () { return event break } + case 'Strategy': { + let strategy = { + type: node.type, + subType: node.subType, + name: node.name, + entryPoint: getProtocolNode(node.entryPoint), + exitPoint: getProtocolNode(node.exitPoint), + sellPoint: getProtocolNode(node.sellPoint), + stopLoss: getProtocolNode(node.stopLoss), + buyOrder: getProtocolNode(node.buyOrder) + } + return strategy + break + } + case 'Trading System': { + let tradingSystem = { + type: node.type, + subType: node.subType, + name: node.name, + strategies: [] + } + + for (let m = 0; m < node.strategies.length; m++) { + let strategy = getProtocolNode(node.strategies[m]) + tradingSystem.strategies.push(strategy) + } + return tradingSystem + break + } } } }