diff --git a/CockpitSpace/RestartSimulation.js b/CockpitSpace/RestartSimulation.js index b73e1a75e..aa2cb36e9 100644 --- a/CockpitSpace/RestartSimulation.js +++ b/CockpitSpace/RestartSimulation.js @@ -78,7 +78,10 @@ function newRestartSimulation () { } function getContainer (point, purpose) { - if (thisObject.visible !== true || (thisObject.status !== 'Ready' && thisObject.status !== 'Calculating') || executionFocusExists === false) { return } + if ( + thisObject.visible !== true || + (thisObject.status !== 'Ready' && thisObject.status !== 'Backtesting' && thisObject.status !== 'Live Trading') || + executionFocusExists === false) { return } if (thisObject.container.frame.isThisPointHere(point, true) === true) { return thisObject.container @@ -125,14 +128,15 @@ function newRestartSimulation () { definition: getDefinition() } systemEventHandler.raiseEvent('Cockpit-Restart-Button', 'Live-Trading Started', event) + thisObject.status = 'Live Trading' } else { let event = { definition: getDefinition() } systemEventHandler.raiseEvent('Cockpit-Restart-Button', 'Backstesting Started', event) + thisObject.status = 'Backtesting' } - thisObject.status = 'Calculating' isRunning = true } } else { @@ -190,9 +194,6 @@ function newRestartSimulation () { break case 'Saving': - break - case 'Calculating': - break case 'Stopping': @@ -269,7 +270,10 @@ function newRestartSimulation () { case 'Saving': params.backgroundColor = UI_COLOR.GREY break - case 'Calculating': + case 'Backtesting': + params.backgroundColor = UI_COLOR.GREEN + break + case 'Live Trading': params.backgroundColor = UI_COLOR.TITANIUM_YELLOW break case 'Stopping': @@ -304,8 +308,11 @@ function newRestartSimulation () { case 'Saving': label = 'SAVING STRATEGIES CHANGES...' break - case 'Calculating': - label = 'STOP CALCULATING' + case 'Backtesting': + label = 'STOP BACKTESTING' + break + case 'Live Trading': + label = 'STOP LIVE TRADING' break case 'Stopping': label = 'STOPPING...'