Trading System can be deleted
This commit is contained in:
1 parent
d7bed2430b
commit
8b741aeddc
4 files changed
+43
-6
No files matched your search
@@ -20,6 +20,7 @@ function newStrategyPart () {
|
||||
isRunning: undefined,
|
||||
run: run,
|
||||
setRunningStatus: setRunningStatus,
|
||||
setNotRunningStatus: setNotRunningStatus,
|
||||
getReadyToAttach: getReadyToAttach,
|
||||
showAvailabilityToAttach: showAvailabilityToAttach,
|
||||
highlight: highlight,
|
||||
@@ -378,16 +379,21 @@ function newStrategyPart () {
|
||||
}
|
||||
|
||||
function run () {
|
||||
canvas.strategySpace.workspace.tradingSystem = thisObject.payload.node
|
||||
canvas.cockpitSpace.restartSimulation.restart()
|
||||
setRunningStatus()
|
||||
canvas.cockpitSpace.restartSimulation.restart()
|
||||
}
|
||||
|
||||
function setRunningStatus () {
|
||||
canvas.strategySpace.workspace.tradingSystem = thisObject.payload.node
|
||||
thisObject.isRunning = true
|
||||
runningCounter = 30
|
||||
}
|
||||
|
||||
function setNotRunningStatus () {
|
||||
canvas.strategySpace.workspace.tradingSystem = undefined
|
||||
thisObject.isRunning = false
|
||||
}
|
||||
|
||||
function iconPhysics () {
|
||||
icon = canvas.strategySpace.iconByPartType.get(thisObject.payload.node.type)
|
||||
executingIcon = canvas.strategySpace.iconCollection.get('attractive')
|
||||
|
||||
@@ -100,7 +100,7 @@ function newStrategyPartConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -60
|
||||
angle: -80
|
||||
},
|
||||
{
|
||||
action: 'Save Trading System',
|
||||
@@ -115,7 +115,19 @@ function newStrategyPartConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: -20
|
||||
angle: -40
|
||||
},
|
||||
{
|
||||
action: 'Delete Trading System',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Delete Trading System',
|
||||
visible: false,
|
||||
iconPathOn: 'trash',
|
||||
iconPathOff: 'trash',
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 0
|
||||
},
|
||||
{
|
||||
action: 'New Strategy',
|
||||
@@ -128,7 +140,7 @@ function newStrategyPartConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 20
|
||||
angle: 40
|
||||
},
|
||||
{
|
||||
action: 'Download',
|
||||
@@ -140,7 +152,7 @@ function newStrategyPartConstructor () {
|
||||
rawRadius: 8,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
angle: 60
|
||||
angle: 80
|
||||
}]
|
||||
break
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user