3 files changed
+10
-2
No files matched your search
@@ -125,12 +125,13 @@ function newRestartSimulation () {
|
||||
}
|
||||
|
||||
function turnOffProductCards () {
|
||||
let productCardsToTurnOff = ['Trading-Simulation', 'Simulation-Conditions', 'Simulation-Strategies', 'Simulation-Trades']
|
||||
for (let i = 0; i < canvas.panelsSpace.panels.length; i++) {
|
||||
let panel = canvas.panelsSpace.panels[i]
|
||||
if (panel.name === 'Products Panel') {
|
||||
for (j = 0; j < panel.productCards.length; j++) {
|
||||
let productCard = panel.productCards[j]
|
||||
if (productCard.product.relatedToTradingEngine === true && productCard.status !== PRODUCT_CARD_STATUS.OFF) {
|
||||
if (productCard.product.codeName in (productCardsToTurnOff) && productCard.status !== PRODUCT_CARD_STATUS.OFF) {
|
||||
productCard.turnOff()
|
||||
productCardsToTurnOn.push(productCard)
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ function newStrategyPartConstructor () {
|
||||
{
|
||||
action: 'Delete Parameters',
|
||||
actionFunction: payload.onMenuItemClick,
|
||||
label: 'Delete Trading System',
|
||||
label: 'Delete Parameters',
|
||||
visible: false,
|
||||
iconPathOn: 'trash',
|
||||
iconPathOff: 'trash',
|
||||
|
||||
@@ -44,6 +44,10 @@ function newNodeDeleter () {
|
||||
deleteStrategy(node.strategies[0], rootNodes)
|
||||
}
|
||||
|
||||
if (node.parameters !== undefined) {
|
||||
deleteParameters(node.parameters, rootNodes)
|
||||
}
|
||||
|
||||
completeDeletion(node, rootNodes)
|
||||
destroyPart(node)
|
||||
cleanNode(node)
|
||||
@@ -121,6 +125,9 @@ function newNodeDeleter () {
|
||||
if (node.takePosition !== undefined) {
|
||||
deleteEvent(node.takePosition, rootNodes)
|
||||
}
|
||||
if (node.positionSize !== undefined) {
|
||||
deletePositionSize(node.positionSize, rootNodes)
|
||||
}
|
||||
destroyPart(node)
|
||||
cleanNode(node)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user