diff --git a/DesignSpace/Workspace/FunctionLibraries/ChartingSpaceFunctions.js b/DesignSpace/Workspace/FunctionLibraries/ChartingSpaceFunctions.js index f2394e699..fda297ad3 100644 --- a/DesignSpace/Workspace/FunctionLibraries/ChartingSpaceFunctions.js +++ b/DesignSpace/Workspace/FunctionLibraries/ChartingSpaceFunctions.js @@ -77,7 +77,7 @@ function newChartingSpaceFunctions() { if (networkNode === undefined) { return } let backtestingSessionsArray = nodeBranchToArray(networkNode, 'Backtesting Session') - let fordwardTestingSessionsArray = nodeBranchToArray(networkNode, 'Fordward Testing Session') + let fordwardTestingSessionsArray = nodeBranchToArray(networkNode, 'Forward Testing Session') let paperTradingSessionsArray = nodeBranchToArray(networkNode, 'Paper Trading Session') let liveTradingSessionsArray = nodeBranchToArray(networkNode, 'Live Trading Session') @@ -89,11 +89,13 @@ function newChartingSpaceFunctions() { function scanSessionArray(sessionsArray) { for (let i = 0; i < sessionsArray.length; i++) { let session = sessionsArray[i] + let market = findNodeInNodeMesh(session, 'Market Trading Tasks', undefined, true, false, true, false) + if (market.payload.referenceParent === undefined) { continue } if (isMissingChildren(node, session, true) === true) { let mineProducts let timeMachine = functionLibraryUiObjectsFromNodes.addUIObject(node, 'Time Machine') timeMachine.payload.referenceParent = session - timeMachine.name = session.name + timeMachine.name = session.name + ' ' + session.type timeMachine.payload.floatingObject.collapseToggle() /* @@ -102,6 +104,12 @@ function newChartingSpaceFunctions() { mineProducts = nodeBranchToArray(networkNode, 'Data Mine Products') for (let j = 0; j < mineProducts.length; j++) { let mineProduct = mineProducts[j] + /* + We need to filter out the ones that do not belong to the market where + the session is running at. + */ + if (mineProduct.payload.parentNode.payload.referenceParent === undefined) { continue } + if (mineProduct.payload.parentNode.payload.referenceParent.id !== market.payload.referenceParent.id) { continue } let timelineChart = functionLibraryUiObjectsFromNodes.addUIObject(timeMachine, 'Timeline Chart') timelineChart.name = mineProduct.name @@ -122,7 +130,6 @@ function newChartingSpaceFunctions() { that are not the one we are interested in, we do the following: */ if (mineProduct.payload.parentNode === undefined) { continue } - if (mineProduct.payload.parentNode.payload.referenceParent === undefined) { continue } if (mineProduct.payload.parentNode.payload.parentNode.payload.referenceParent === undefined) { continue } if (mineProduct.payload.parentNode.payload.parentNode.payload.referenceParent.id !== session.id) { continue } /* diff --git a/DesignSpace/Workspace/FunctionLibraries/DataStorageFunctions.js b/DesignSpace/Workspace/FunctionLibraries/DataStorageFunctions.js index 29f5dafd9..b3ca80693 100644 --- a/DesignSpace/Workspace/FunctionLibraries/DataStorageFunctions.js +++ b/DesignSpace/Workspace/FunctionLibraries/DataStorageFunctions.js @@ -87,7 +87,7 @@ function newDataStorageFunctions() { if (networkNode === undefined) { return } let backtestingSessionsArray = nodeBranchToArray(networkNode, 'Backtesting Session') - let fordwardTestingSessionsArray = nodeBranchToArray(networkNode, 'Fordward Testing Session') + let fordwardTestingSessionsArray = nodeBranchToArray(networkNode, 'Forward Testing Session') let paperTradingSessionsArray = nodeBranchToArray(networkNode, 'Paper Trading Session') let liveTradingSessionsArray = nodeBranchToArray(networkNode, 'Live Trading Session') @@ -101,15 +101,14 @@ function newDataStorageFunctions() { let session = sessionsArray[i] if (isMissingChildren(node, session, true) === true) { let sessionReference = functionLibraryUiObjectsFromNodes.addUIObject(node, 'Session Reference') - sessionReference.payload.referenceParent = session + sessionReference.payload.referenceParent = session /* Now I will connect the Session Reference child that is auto created with the market where the Session was found. */ let marketTradingTasks = findNodeInNodeMesh(session, 'Market Trading Tasks', undefined, true, false, true, false) sessionReference.singleMarketTradingData.payload.referenceParent = marketTradingTasks.payload.referenceParent - timelineChart.payload.floatingObject.collapseToggle() - timelineChart.singleMarketTradingData.payload.floatingObject.collapseToggle() + marketTradingTasks.payload.floatingObject.collapseToggle() } } } diff --git a/DesignSpace/Workspace/FunctionLibraries/SessionFunctions.js b/DesignSpace/Workspace/FunctionLibraries/SessionFunctions.js index a80f00fcb..7a92aa824 100644 --- a/DesignSpace/Workspace/FunctionLibraries/SessionFunctions.js +++ b/DesignSpace/Workspace/FunctionLibraries/SessionFunctions.js @@ -86,7 +86,7 @@ function newSessionFunctions() { let tradingEngine = functionLibraryProtocolNode.getProtocolNode(node.tradingEngineReference.payload.referenceParent, false, true, true, false, false, lightingPath) lightingPath = '' + - 'Backtesting Session->Paper Trading Session->Fordward Testing Session->Live Trading Session->' + + 'Backtesting Session->Paper Trading Session->Forward Testing Session->Live Trading Session->' + 'Parameters->' + 'Session Base Asset->Session Quoted Asset->Time Range->Time Frame->Slippage->Fee Structure->Snapshots->Heartbeats->User Defined Parameters->' + 'Exchange Account Asset->Asset->' + diff --git a/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js b/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js index 8267b6f3a..89a39afc2 100644 --- a/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js +++ b/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js @@ -62,7 +62,7 @@ function newTaskFunctions() { 'Exchange Data Tasks->Exchange Trading Tasks->' + 'Market->Exchange Markets->Crypto Exchange->' + 'Market Base Asset->Market Quoted Asset->Asset->' + - 'Backtesting Session->Live Trading Session->Paper Trading Session->Fordward Testing Session->' + + 'Backtesting Session->Live Trading Session->Paper Trading Session->Forward Testing Session->' + 'Process Definition->' + 'Process Output->' + 'Output Dataset Folder->Output Dataset Folder->Output Dataset Folder->Output Dataset Folder->Output Dataset Folder->' + diff --git a/DesignSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js b/DesignSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js index 417c88a7e..2a7e86a28 100644 --- a/DesignSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js +++ b/DesignSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js @@ -696,7 +696,7 @@ function newUiObjectsFromNodes() { /* Check if there are sessions to run */ if (userAddingNew === false && node.savedPayload !== undefined) { - if (uiObjectType === 'Live Trading Session' || uiObjectType === 'Fordward Testing Session' || uiObjectType === 'Backtesting Session' || uiObjectType === 'Paper Trading Session') { + if (uiObjectType === 'Live Trading Session' || uiObjectType === 'Forward Testing Session' || uiObjectType === 'Backtesting Session' || uiObjectType === 'Paper Trading Session') { if (node.savedPayload.uiObject.isRunning === true) { if (node.payload.parentNode !== undefined) { if (sessionsToRun !== undefined) { // it might be undefined when you are spawning a session that was running while backed up diff --git a/FloatingSpace/UiObjectTitle.js b/FloatingSpace/UiObjectTitle.js index 2e387ef81..c1438e11e 100644 --- a/FloatingSpace/UiObjectTitle.js +++ b/FloatingSpace/UiObjectTitle.js @@ -116,6 +116,14 @@ function newUiObjectTitle() { } break } + case 'Use Reference Parent Type': { + let nodeToUse = thisObject.payload.node.payload.referenceParent + if (nodeToUse !== undefined && nodeToUse.payload !== undefined) { + thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.type + thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.type + } + break + } case 'Use Reference Grandparent': { let nodeToUse = thisObject.payload.node.payload.referenceParent if (nodeToUse !== undefined && nodeToUse.payload !== undefined) { diff --git a/Panels/Layer.js b/Panels/Layer.js index f791c5658..fb78668a3 100644 --- a/Panels/Layer.js +++ b/Panels/Layer.js @@ -165,7 +165,7 @@ function newLayer() { 'Single Market Data->Single Market Trading Data->Exchange Data Products->' + 'Session Reference->Session Independent Data->Session Based Data->Exchange Sessions->Session Based Data->Data Storage->Network Node->' + 'Data Storage->Network Node->' + - 'Backtesting Session->Paper Trading Session->Fordward Testing Session->Live Trading Session->' + + 'Backtesting Session->Paper Trading Session->Forward Testing Session->Live Trading Session->' + 'Trading System Reference->Trading Engine Reference->Trading System->Trading Engine->' + 'Market->Market Base Asset->Asset->' + 'Market Quoted Asset->Asset->' + diff --git a/Utilities/Branches.js b/Utilities/Branches.js index 60cf93758..b67bb9438 100644 --- a/Utilities/Branches.js +++ b/Utilities/Branches.js @@ -21,12 +21,14 @@ function nodeBranchToArray(node, nodeType) { } if (nodeDefinition.properties === undefined) { return } + let lastNodePropertyName for (let i = 0; i < nodeDefinition.properties.length; i++) { let property = nodeDefinition.properties[i] - + if (lastNodePropertyName === property.name) {continue} // Some nodes have a single property por multiple child node types. We need to check repeated properties only once so as no to duplicate results. switch (property.type) { case 'node': { scanNodeBranch(startingNode[property.name]) + lastNodePropertyName = property.name } break case 'array': {