diff --git a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js index 0e82a6356..60c293b6a 100644 --- a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js +++ b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js @@ -8,9 +8,9 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { return thisObject function referenceDetachNode(node) { - cleanAttachNodePath(node) - completeDetachment(node) - + cleanAttachNodePath(node) + completeDetachment(node) + } function referenceAttachNode(node, attachToNode) { @@ -20,18 +20,19 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { // Store the path to the reference parent to make restoring it possible if the reference parent is updated and given a new id function storeAttachNodePath(node, attachToNode) { + if (node.payload === undefined) { return } let attachNodePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(attachToNode) // Remove unused node id, and project tag from stored path - for (let i = 0; i < attachNodePath.length; i++ ) { - attachNodePath[i].splice(2,2) + for (let i = 0; i < attachNodePath.length; i++) { + attachNodePath[i].splice(2, 2) } - + // Save attach path to active payload node.payload.referenceParentCombinedNodePath = attachNodePath } // Clear the path to reference parent when the reference is cleared - function cleanAttachNodePath(node){ + function cleanAttachNodePath(node) { if (node.payload !== undefined) { node.payload.referenceParentCombinedNodePath = undefined if (node.savedPayload !== undefined) { diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index c15a8f1dd..82866429e 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1,4 +1,156 @@ [ + { + "name": "Algorithmic-Trading", + "propertyName": "algorithmicTrading", + "UI": { + "functionLibraries": [ + { + "name": "Trading Session Functions", + "propertyName": "tradingSessionFunctions", + "functionName": "newAlgorithmicTradingFunctionLibraryTradingSessionFunctions" + } + ] + }, + "TS": { + "botModules": [ + { + "name": "Single Market Trading Bot", + "propertyName": "singleMarketTradingBot", + "functionName": "newAlgorithmicTradingBotModulesSingleMarketTradingBot", + "fileName": "SingleMarketTradingBot.js", + "folderName": "Trading-Bot", + "botType": "Trading Bot" + }, + { + "name": "Trading Session", + "propertyName": "tradingSession", + "functionName": "newAlgorithmicTradingBotModulesTradingSession", + "fileName": "TradingSession.js", + "folderName": "Trading-Bot" + }, + { + "name": "Trading Process", + "propertyName": "tradingProcess", + "functionName": "newAlgorithmicTradingBotModulesTradingProcess", + "fileName": "TradingProcess.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Engine", + "propertyName": "tradingEngine", + "functionName": "newAlgorithmicTradingBotModulesTradingEngine", + "fileName": "TradingEngine.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Output", + "propertyName": "tradingOutput", + "functionName": "newAlgorithmicTradingBotModulesTradingOutput", + "fileName": "TradingOutput.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Simulation", + "propertyName": "tradingSimulation", + "functionName": "newAlgorithmicTradingBotModulesTradingSimulation", + "fileName": "TradingSimulation.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Episode", + "propertyName": "tradingEpisode", + "functionName": "newAlgorithmicTradingBotModulesTradingEpisode", + "fileName": "TradingEpisode.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Records", + "propertyName": "tradingRecords", + "functionName": "newAlgorithmicTradingBotModulesTradingRecords", + "fileName": "TradingRecords.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading System", + "propertyName": "tradingSystem", + "functionName": "newAlgorithmicTradingBotModulesTradingSystem", + "fileName": "TradingSystem.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Stages", + "propertyName": "tradingStages", + "functionName": "newAlgorithmicTradingBotModulesTradingStages", + "fileName": "TradingStages.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Strategy", + "propertyName": "tradingStrategy", + "functionName": "newAlgorithmicTradingBotModulesTradingStrategy", + "fileName": "TradingStrategy.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Execution", + "propertyName": "tradingExecution", + "functionName": "newAlgorithmicTradingBotModulesTradingExecution", + "fileName": "TradingExecution.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Position", + "propertyName": "tradingPosition", + "functionName": "newAlgorithmicTradingBotModulesTradingPosition", + "fileName": "TradingPosition.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Snapshots", + "propertyName": "snapshots", + "functionName": "newAlgorithmicTradingBotModulesSnapshots", + "fileName": "Snapshots.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Trading Orders", + "propertyName": "tradingOrders", + "functionName": "newAlgorithmicTradingBotModulesTradingOrders", + "fileName": "TradingOrders.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Orders Simulations", + "propertyName": "ordersSimulations", + "functionName": "newAlgorithmicTradingBotModulesOrdersSimulations", + "fileName": "OrdersSimulations.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Orders Calculations", + "propertyName": "ordersCalculations", + "functionName": "newAlgorithmicTradingBotModulesOrdersCalculations", + "fileName": "OrdersCalculations.js", + "folderName": "Trading-Bot/Low-Frequency-Trading" + }, + { + "name": "Exchange API", + "propertyName": "exchangeAPI", + "functionName": "newAlgorithmicTradingBotModulesExchangeAPI", + "fileName": "ExchangeAPI.js", + "folderName": "Trading-Bot/Low-Frequency-Trading/APIs" + } + ] + }, + "plugins": [ + "Trading Mines", + "Trading Systems", + "Trading Engines" + ], + "tasks": [ + "Trading Tasks" + ] + }, { "name": "Foundations", "propertyName": "foundations", @@ -799,158 +951,6 @@ "Data Tasks" ] }, - { - "name": "Algorithmic-Trading", - "propertyName": "algorithmicTrading", - "UI": { - "functionLibraries": [ - { - "name": "Trading Session Functions", - "propertyName": "tradingSessionFunctions", - "functionName": "newAlgorithmicTradingFunctionLibraryTradingSessionFunctions" - } - ] - }, - "TS": { - "botModules": [ - { - "name": "Single Market Trading Bot", - "propertyName": "singleMarketTradingBot", - "functionName": "newAlgorithmicTradingBotModulesSingleMarketTradingBot", - "fileName": "SingleMarketTradingBot.js", - "folderName": "Trading-Bot", - "botType": "Trading Bot" - }, - { - "name": "Trading Session", - "propertyName": "tradingSession", - "functionName": "newAlgorithmicTradingBotModulesTradingSession", - "fileName": "TradingSession.js", - "folderName": "Trading-Bot" - }, - { - "name": "Trading Process", - "propertyName": "tradingProcess", - "functionName": "newAlgorithmicTradingBotModulesTradingProcess", - "fileName": "TradingProcess.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Engine", - "propertyName": "tradingEngine", - "functionName": "newAlgorithmicTradingBotModulesTradingEngine", - "fileName": "TradingEngine.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Output", - "propertyName": "tradingOutput", - "functionName": "newAlgorithmicTradingBotModulesTradingOutput", - "fileName": "TradingOutput.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Simulation", - "propertyName": "tradingSimulation", - "functionName": "newAlgorithmicTradingBotModulesTradingSimulation", - "fileName": "TradingSimulation.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Episode", - "propertyName": "tradingEpisode", - "functionName": "newAlgorithmicTradingBotModulesTradingEpisode", - "fileName": "TradingEpisode.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Records", - "propertyName": "tradingRecords", - "functionName": "newAlgorithmicTradingBotModulesTradingRecords", - "fileName": "TradingRecords.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading System", - "propertyName": "tradingSystem", - "functionName": "newAlgorithmicTradingBotModulesTradingSystem", - "fileName": "TradingSystem.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Stages", - "propertyName": "tradingStages", - "functionName": "newAlgorithmicTradingBotModulesTradingStages", - "fileName": "TradingStages.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Strategy", - "propertyName": "tradingStrategy", - "functionName": "newAlgorithmicTradingBotModulesTradingStrategy", - "fileName": "TradingStrategy.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Execution", - "propertyName": "tradingExecution", - "functionName": "newAlgorithmicTradingBotModulesTradingExecution", - "fileName": "TradingExecution.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Position", - "propertyName": "tradingPosition", - "functionName": "newAlgorithmicTradingBotModulesTradingPosition", - "fileName": "TradingPosition.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Snapshots", - "propertyName": "snapshots", - "functionName": "newAlgorithmicTradingBotModulesSnapshots", - "fileName": "Snapshots.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Trading Orders", - "propertyName": "tradingOrders", - "functionName": "newAlgorithmicTradingBotModulesTradingOrders", - "fileName": "TradingOrders.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Orders Simulations", - "propertyName": "ordersSimulations", - "functionName": "newAlgorithmicTradingBotModulesOrdersSimulations", - "fileName": "OrdersSimulations.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Orders Calculations", - "propertyName": "ordersCalculations", - "functionName": "newAlgorithmicTradingBotModulesOrdersCalculations", - "fileName": "OrdersCalculations.js", - "folderName": "Trading-Bot/Low-Frequency-Trading" - }, - { - "name": "Exchange API", - "propertyName": "exchangeAPI", - "functionName": "newAlgorithmicTradingBotModulesExchangeAPI", - "fileName": "ExchangeAPI.js", - "folderName": "Trading-Bot/Low-Frequency-Trading/APIs" - } - ] - }, - "plugins": [ - "Trading Mines", - "Trading Systems", - "Trading Engines" - ], - "tasks": [ - "Trading Tasks" - ] - }, { "name": "Community-Plugins", "propertyName": "communityPlugins",