From d5f7c564993b846055aee3f47bfc966ad2e6e398 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 10 Aug 2019 18:40:36 +0200 Subject: [PATCH 1/7] key name and secret, BUG Fixed with titles --- FloatingSpace/StrategyPartTitle.js | 2 +- StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FloatingSpace/StrategyPartTitle.js b/FloatingSpace/StrategyPartTitle.js index a47ec5402..7a79eaf73 100644 --- a/FloatingSpace/StrategyPartTitle.js +++ b/FloatingSpace/StrategyPartTitle.js @@ -153,7 +153,7 @@ function newStrategyPartTitle () { } function getContainer (point) { - if (CURRENT_TOP_MARGIN === 0) { return } // Fullscreen mode does not allow INPUT elements + if (AT_FULL_SCREEN_MODE === true) { return } // Fullscreen mode does not allow INPUT elements let container diff --git a/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js b/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js index b37cdf60a..5aa38b5ff 100644 --- a/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js +++ b/StrategySpace/Workspace/FunctionLibraries/PartsFromNodes.js @@ -356,7 +356,7 @@ function newPartsFromNodes () { let exchangeAccount = parentNode let key = { name: 'New Key', - code: 'Paste your exchange API secret key here. Secret keys are filtered out and NOT exported when using the SHARE menu option on any object at your workspace. Secret keys ARE downloaded when using the download button.' + code: 'Paste your exchange API secret key here and the put the key name as this key object title. Secret keys are filtered out and NOT exported when using the SHARE menu option on any object at your workspace. Secret keys ARE downloaded when using the download button.' } exchangeAccount.keys.push(key) createPart('Exchange Account Key', key.name, key, exchangeAccount, exchangeAccount, 'Account Key') From 1205ef191559c9cb4d894bd8467a17f015f2e538 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 10 Aug 2019 19:14:45 +0200 Subject: [PATCH 2/7] Restarting Clone Executor --- CockpitSpace/RestartSimulation.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CockpitSpace/RestartSimulation.js b/CockpitSpace/RestartSimulation.js index 4d5787271..cadf976f1 100644 --- a/CockpitSpace/RestartSimulation.js +++ b/CockpitSpace/RestartSimulation.js @@ -1,6 +1,8 @@ function newRestartSimulation () { const MODULE_NAME = 'Restart Simulation' + const logger = newWebDebugLog() + logger.fileName = MODULE_NAME let thisObject = { visible: true, @@ -113,7 +115,16 @@ function newRestartSimulation () { thisObject.status = 'Saving' let result = await canvas.strategySpace.strategizerGateway.saveToStrategyzer(simulationParams) if (result === true) { - if (window.canvasApp.executingAt !== 'Local') { + if (window.canvasApp.executingAt === 'Local') { + callServer('', 'RestartCloneExecutor', onSaved) + function onSaved (err) { + if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result) { + logger.write('[INFO] Restart Simulation -> Clone Executor Restarted') + } else { + logger.write('[ERROR] Restart Simulation -> Can not restart Clone Executor. err = ' + err.messsage) + } + } + } else { thisObject.status = 'Restarting' await graphQlRestartSimulation(simulationParams) } From 5253ffb98f4a1a85c33fc94876448a6e06b1cf3d Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 10 Aug 2019 19:45:01 +0200 Subject: [PATCH 3/7] Adjusting Delays for refreshing --- CockpitSpace/RestartSimulation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CockpitSpace/RestartSimulation.js b/CockpitSpace/RestartSimulation.js index cadf976f1..5a6a21a6d 100644 --- a/CockpitSpace/RestartSimulation.js +++ b/CockpitSpace/RestartSimulation.js @@ -129,7 +129,7 @@ function newRestartSimulation () { await graphQlRestartSimulation(simulationParams) } thisObject.status = 'Calculating' - counterTillNextState = 50 + counterTillNextState = 500 } else { thisObject.status = 'Error' counterTillNextState = 500 @@ -181,7 +181,7 @@ function newRestartSimulation () { break case 'Calculating': thisObject.status = 'Refreshing' - counterTillNextState = 15 + counterTillNextState = 150 break case 'Refreshing': thisObject.status = 'Reviewing' @@ -191,7 +191,7 @@ function newRestartSimulation () { break case 'Reviewing': thisObject.status = '2nd Refresh' - counterTillNextState = 25 + counterTillNextState = 250 break case '2nd Refresh': thisObject.status = 'Ready' From e45da4b7f0c6f5012d4087e8cce041ce92624ee0 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 13 Aug 2019 11:47:07 +0200 Subject: [PATCH 4/7] Remove this that prevents to save the definition --- StrategySpace/StrategizerGateway.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/StrategySpace/StrategizerGateway.js b/StrategySpace/StrategizerGateway.js index 431129be8..1fb458ec8 100644 --- a/StrategySpace/StrategizerGateway.js +++ b/StrategySpace/StrategizerGateway.js @@ -114,12 +114,6 @@ function newStrategizerGateway () { return } - let idAtStrategizer = window.localStorage.getItem(CANVAS_APP_NAME + '.' + MODULE_NAME + '.' + user.alias) - if (idAtStrategizer === undefined || idAtStrategizer === null) { - logger.write('[ERROR] saveToStrategyzer -> Can not save when idAtStrategizer is null or undefined.') - return - } - if (window.canvasApp.executingAt === 'Local') { tradingSystem.simulationParams = simulationParams callServer(JSON.stringify(tradingSystem), 'SaveDefinition', onSaved) From 6555e4fc97502f407fd2313e41a29aad171e2688 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 14 Aug 2019 13:32:19 +0200 Subject: [PATCH 5/7] label change --- CockpitSpace/RestartSimulation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CockpitSpace/RestartSimulation.js b/CockpitSpace/RestartSimulation.js index 5a6a21a6d..0b584dff5 100644 --- a/CockpitSpace/RestartSimulation.js +++ b/CockpitSpace/RestartSimulation.js @@ -289,7 +289,7 @@ function newRestartSimulation () { switch (thisObject.status) { case 'Ready': - label = 'RUN SIMULATION' + label = 'RESTART BOTS' break case 'Saving': label = 'SAVING STRATEGIES CHANGES...' From 2ed4f274a651d667da6215fe72a4241f924439ab Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 14 Aug 2019 13:59:00 +0200 Subject: [PATCH 6/7] New Icons added --- FloatingSpace/StrategyPartConstructor.js | 106 +++++++++++------------ Spaces/StrategySpace.js | 16 ++-- 2 files changed, 63 insertions(+), 59 deletions(-) diff --git a/FloatingSpace/StrategyPartConstructor.js b/FloatingSpace/StrategyPartConstructor.js index 92288655f..b27385f91 100644 --- a/FloatingSpace/StrategyPartConstructor.js +++ b/FloatingSpace/StrategyPartConstructor.js @@ -202,8 +202,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -222,7 +222,7 @@ function newStrategyPartConstructor () { label: 'Run', visible: false, iconPathOn: 'paper-plane', - iconPathOff: 'share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -294,8 +294,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -493,8 +493,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -540,8 +540,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -587,8 +587,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -634,8 +634,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -681,8 +681,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -741,8 +741,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -788,8 +788,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -835,8 +835,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -882,8 +882,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -929,8 +929,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -976,8 +976,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1023,8 +1023,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1070,8 +1070,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1117,8 +1117,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1151,8 +1151,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1185,8 +1185,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1232,8 +1232,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1279,8 +1279,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1339,8 +1339,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1393,8 +1393,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1440,8 +1440,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1487,8 +1487,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1534,8 +1534,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, @@ -1588,8 +1588,8 @@ function newStrategyPartConstructor () { actionFunction: payload.onMenuItemClick, label: 'Share', visible: false, - iconPathOn: 'share', - iconPathOff: 'share', + iconPathOn: 'menu-share', + iconPathOff: 'menu-share', rawRadius: 8, targetRadius: 0, currentRadius: 0, diff --git a/Spaces/StrategySpace.js b/Spaces/StrategySpace.js index c7650827d..8da55526c 100644 --- a/Spaces/StrategySpace.js +++ b/Spaces/StrategySpace.js @@ -49,15 +49,15 @@ function newStrategySpace () { ['Parameters', 'settings'], ['Base Asset', 'sitemap'], ['Strategy', 'quality'], - ['Trigger Stage', 'chronometer'], + ['Trigger Stage', 'stage-trigger'], ['Open Stage', 'stage-open'], ['Manage Stage', 'video-player'], ['Close Stage', 'stage-close'], ['Position Size', 'responsive'], ['Position Rate', 'promotion'], - ['Trigger On Event', 'startup'], - ['Trigger Off Event', 'support'], - ['Take Position Event', 'compass'], + ['Trigger On Event', 'stage-trigger-trigger-on'], + ['Trigger Off Event', 'stage-trigger-trigger-off'], + ['Take Position Event', 'stage-trigger-take-position'], ['Initial Definition', 'task'], ['Open Execution', 'piggy-bank'], ['Close Execution', 'piggy-bank'], @@ -139,10 +139,14 @@ function newStrategySpace () { 'menu-tree-minus', 'menu-tree-plus', 'menu-backup', - 'share', + 'menu-share', 'stop', 'stage-open', - 'stage-close' + 'stage-close', + 'stage-trigger', + 'stage-trigger-trigger-on', + 'stage-trigger-trigger-off', + 'stage-trigger-take-position' ] for (let i = 0; i < iconsNames.length; i++) { From 39b40d8753c317988a4d1369d140e6cd88d8d80c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 14 Aug 2019 14:12:37 +0200 Subject: [PATCH 7/7] more icons --- FloatingSpace/StrategyPartConstructor.js | 4 ++-- Spaces/StrategySpace.js | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/FloatingSpace/StrategyPartConstructor.js b/FloatingSpace/StrategyPartConstructor.js index b27385f91..6c13dd5ce 100644 --- a/FloatingSpace/StrategyPartConstructor.js +++ b/FloatingSpace/StrategyPartConstructor.js @@ -108,8 +108,8 @@ function newStrategyPartConstructor () { currentStatus: true, label: undefined, visible: false, - iconPathOn: 'compass', - iconPathOff: 'compass-bw', + iconPathOn: 'menu-tensor-fixed-angles', + iconPathOff: 'menu-tensor-free-angles', rawRadius: 8, targetRadius: 0, currentRadius: 0, diff --git a/Spaces/StrategySpace.js b/Spaces/StrategySpace.js index 8da55526c..b5c0fbfde 100644 --- a/Spaces/StrategySpace.js +++ b/Spaces/StrategySpace.js @@ -53,8 +53,8 @@ function newStrategySpace () { ['Open Stage', 'stage-open'], ['Manage Stage', 'video-player'], ['Close Stage', 'stage-close'], - ['Position Size', 'responsive'], - ['Position Rate', 'promotion'], + ['Position Size', 'stage-open-position-size'], + ['Position Rate', 'stage-open-postion-rate'], ['Trigger On Event', 'stage-trigger-trigger-on'], ['Trigger Off Event', 'stage-trigger-trigger-off'], ['Take Position Event', 'stage-trigger-take-position'], @@ -62,7 +62,7 @@ function newStrategySpace () { ['Open Execution', 'piggy-bank'], ['Close Execution', 'piggy-bank'], ['Stop', 'stop'], - ['Take Profit', 'competition'], + ['Take Profit', 'stage-open-take-profit'], ['Phase', 'placeholder'], ['Formula', 'pipette'], ['Next Phase Event', 'schedule'], @@ -91,7 +91,6 @@ function newStrategySpace () { 'chat', 'chronometer', 'compass', - 'compass-bw', 'competition', 'content', 'design-tool', @@ -146,7 +145,12 @@ function newStrategySpace () { 'stage-trigger', 'stage-trigger-trigger-on', 'stage-trigger-trigger-off', - 'stage-trigger-take-position' + 'stage-trigger-take-position', + 'menu-tensor-fixed-angles', + 'menu-tensor-free-angles', + 'stage-open-position-size', + 'stage-open-take-profit', + 'stage-open-postion-rate' ] for (let i = 0; i < iconsNames.length; i++) {