Lots Schema Stuff; Added to Network; More Functions refactoring

This commit is contained in:
Philip Love committed 2021-11-04 03:04:09 -04:00
1 parent 1460e36146
commit f6928ce39a
30 files changed
+1114 -35

No files matched your search

+11 -2
View File
@@ -46,10 +46,12 @@ Projects/Foundations/UI/Function-Libraries/
ActionSwitch.js:
cp case statements run-all, stop-all, add-missing, references, products, etc.
Line 506 && 512 may not need to have been cloned but I did for now - regarding live and paper trading.
ChartingSpaceFunctions.js: Needs Completion to include Portfolio at Charting Space.
'Market Trading|Portfolio Tasks' -> 'nodeType' as param. <= If error arises note that it was not configured this way by Luis when adding the Learning Mine. This is a File that could be heavily re-factored && optimized.
ProductFunctions.js:
Skipping:
Projects/Foundatoins/UI/Function-Libraries/ChartingSpaceFunctions.js
Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js: Needs Completion
Projects/Foundations/UI/Function-Libraries/CryptoEcosystemFunctions.js
Projects/Foundations/UI/Function-Libraries/
@@ -72,7 +74,14 @@ Projects/Foundations/UI/Spaces/
/Panel-Space/Layer.js: Line 173 Only 'Live Portfolio Session'
Projects/Visual-Scripting/UI/Function-Libraries/
<<<<<<< Updated upstream
ActionsSwitch.js: *** NOTE: Not sure how to handle line 14 at the current moment. ***
UiObjectsFromNodes.js: only if(uiObjectType === 'Live Portfolio Session')
=======
ActionsSwitch.js:
NodePath.js*** NOTE: Not sure how to handle line 14 at the current moment. ***
UIObjectsFromNodes.js: Line 977 'Live Portfolio Session' only.
>>>>>>> Stashed changes
Skipping:
Projects/Foundations/UI/Spaces/Floating-Space/ConditionEditor.js
@@ -23,7 +23,7 @@
"addLeftIcons": true,
"level": 3,
"attachingRules": {
"compatibleTypes": "->Trading System->"
"compatibleTypes": "->Trading System->Portfolio System->"
},
"propertyNameAtParent": "dynamicIndicators",
"childrenNodesProperties": [
@@ -0,0 +1,75 @@
{
"type": "Exchange Portfolio Tasks",
"menuItems": [
{
"action": "Run All Market Portfolio Tasks",
"label": "Run All Market Portfolio Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Run",
"workDoneLabel": "Run Request Sent",
"iconPathOn": "run",
"iconPathOff": "run",
"actionFunction": "payload.executeAction"
},
{
"action": "Stop All Market Portfolio Tasks",
"label": "Stop All Market Portfolio Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Stop",
"workDoneLabel": "Stop Request Sent",
"iconPathOn": "stop",
"iconPathOff": "stop",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Market Portfolio Tasks",
"relatedUiObject": "Market Portfolio Tasks",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add Missing Market Portfolio Tasks",
"label": "Add Missing Markets",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Market Portfolio Tasks",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 2,
"referencingRules": {
"compatibleTypes": "->Crypto Exchange->"
},
"attachingRules": {
"compatibleTypes": "->Project Portfolio Tasks->"
},
"alternativeIcons": "Use Reference Parent",
"title": [
"Use Reference Parent"
],
"isTitleAllwaysVisible": true,
"propertyNameAtParent": "exchangePortfolioTasks",
"childrenNodesProperties": [
{
"name": "marketPortfolioTasks",
"type": "array",
"childType": "Market Portfolio Tasks",
"monitorChildrenRunning": true
}
]
}
@@ -28,7 +28,7 @@
},
"level": 3,
"attachingRules": {
"compatibleTypes": "->Trading Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->"
},
"propertyNameAtParent": "feeStructure"
}
@@ -28,7 +28,7 @@
},
"level": 3,
"attachingRules": {
"compatibleTypes": "->Trading Parameters->Learning Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->Learning Parameters->"
},
"propertyNameAtParent": "heartbeats"
}
@@ -49,6 +49,16 @@
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "productionPortfolioTasks",
"label": "Add Production Portfolio Tasks",
"relatedUiObject": "Production Portfolio Tasks",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
@@ -107,6 +117,12 @@
"childType": "Production Trading Tasks",
"autoAdd": true
},
{
"name": "productionPortfolioTasks",
"type": "node",
"childType": "Production Portfolio Tasks",
"autoAdd": true
},
{
"name": "dataStorage",
"type": "node",
@@ -0,0 +1,115 @@
{
"type": "Live Portfolio Session",
"menuItems": [
{
"action": "Run Portfolio Session",
"label": "Run",
"workingLabel": "Run Request Sent",
"workDoneLabel": "Session Running",
"workFailedLabel": "Session Cannot be Run",
"secondaryAction": "Stop Portfolio Session",
"secondaryLabel": "Stop",
"secondaryWorkingLabel": "Stopping...",
"secondaryWorkDoneLabel": "Session Stopped",
"secondaryWorkFailedLabel": "Session Cannot be Stopped",
"secondaryIcon": "stop",
"iconPathOn": "run",
"iconPathOff": "run",
"actionFunction": "payload.executeAction",
"actionProject": "Portfolio-Management"
},
{
"action": "Resume Portfolio Session",
"label": "Resume",
"workingLabel": "Resume Request Sent",
"workDoneLabel": "Session Running",
"workFailedLabel": "Session Cannot be Resumed",
"secondaryAction": "Stop Portfolio Session",
"secondaryLabel": "Stop",
"secondaryWorkingLabel": "Stopping...",
"secondaryWorkDoneLabel": "Session Stopped",
"secondaryWorkFailedLabel": "Session Cannot be Stopped",
"secondaryIcon": "stop",
"iconPathOn": "resume",
"iconPathOff": "resume",
"actionFunction": "payload.executeAction",
"actionProject": "Portfolio-Management"
},
{
"action": "Configure",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration",
"dontShowAtFullscreen": true,
"actionFunction": "uiObject.configEditor.activate"
},
{
"action": "Add UI Object",
"label": "Add Social Bots",
"relatedUiObject": "Social Bots",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Social-Bots",
"actionProject": "Visual-Scripting"
},
{
"action": "Add Missing Children",
"label": "Add Missing Children",
"relatedUiObject": "Portfolio Parameters",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
"addLeftIcons": true,
"editors": {
"config": true
},
"initialValues": {
"config": "{ \n\"folderName\": \"Your-Session-Folder-Name\"\n}"
},
"level": 2,
"referencingRules": {
"compatibleTypes": "->Portfolio System->"
},
"attachingRules": {
"compatibleTypes": "->Portfolio Process Instance->"
},
"childrenNodesProperties": [
{
"name": "portfolioParameters",
"type": "node",
"childType": "Portfolio Parameters",
"autoAdd": true
},
{
"name": "portfolioSystemReference",
"type": "node",
"childType": "Portfolio System Reference",
"autoAdd": true
},
{
"name": "portfolioEngineReference",
"type": "node",
"childType": "Portfolio Engine Reference",
"autoAdd": true
},
{
"name": "socialBots",
"type": "node",
"childType": "Social Bots",
"project": "Social-Bots"
}
],
"propertyNameAtParent": "session"
}
@@ -0,0 +1,76 @@
{
"type": "Market Portfolio Tasks",
"menuItems": [
{
"action": "Run All Portfolio Mine Tasks",
"label": "Run All Portfolio Mine Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Run",
"workDoneLabel": "Run Request Sent",
"iconPathOn": "run",
"iconPathOff": "run",
"actionFunction": "payload.executeAction"
},
{
"action": "Stop All Portfolio Mine Tasks",
"label": "Stop All Portfolio Mine Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Stop",
"workDoneLabel": "Stop Request Sent",
"iconPathOn": "stop",
"iconPathOff": "stop",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Portfolio Mine Tasks",
"relatedUiObject": "Portfolio Mine Tasks",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add Missing Portfolio Mine Tasks",
"label": "Add Missing Portfolio Mine Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Portfolio Mine Tasks",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 2,
"referencingRules": {
"compatibleTypes": "->Market->"
},
"attachingRules": {
"compatibleTypes": "->Exchange Portfolio Tasks->"
},
"alternativeIcons": "Use Reference Parent",
"title": [
"Use Reference Parent Parent Parent",
"Use Reference Parent"
],
"isTitleAllwaysVisible": true,
"propertyNameAtParent": "marketPortfolioTasks",
"childrenNodesProperties": [
{
"name": "portfolioMineTasks",
"type": "array",
"childType": "Portfolio Mine Tasks",
"monitorChildrenRunning": true
}
]
}
@@ -0,0 +1,37 @@
{
"type": "Portfolio Bot Instance",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add Process Instance",
"relatedUiObject": "Portfolio Process Instance",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 3,
"attachingRules": {
"compatibleTypes": "->Task->"
},
"childrenNodesProperties": [
{
"name": "processes",
"type": "array",
"childType": "Portfolio Process Instance",
"autoAdd": false
}
],
"propertyNameAtParent": "bot"
}
@@ -0,0 +1,27 @@
{
"type": "Portfolio Engine Reference",
"menuItems": [
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"title": [
"Use Reference Parent"
],
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Live Portfolio Session->"
},
"referencingRules": {
"compatibleTypes": "->Portfolio Engine->"
},
"propertyNameAtParent": "portfolioEngineReference"
}
@@ -0,0 +1,75 @@
{
"type": "Portfolio Mine Tasks",
"menuItems": [
{
"action": "Run All Task Managers",
"label": "Run All Task Managers",
"askConfirmation": true,
"confirmationLabel": "Confirm to Run",
"workDoneLabel": "Run Request Sent",
"iconPathOn": "run",
"iconPathOff": "run",
"actionFunction": "payload.executeAction"
},
{
"action": "Stop All Task Managers",
"label": "Stop All Task Managers",
"askConfirmation": true,
"confirmationLabel": "Confirm to Stop",
"workDoneLabel": "Stop Request Sent",
"iconPathOn": "stop",
"iconPathOff": "stop",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Task Manager",
"relatedUiObject": "Task Manager",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add All Tasks",
"label": "Add All Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Task",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 2,
"referencingRules": {
"compatibleTypes": "->Portfolio Mine->"
},
"attachingRules": {
"compatibleTypes": "->Market Portfolio Tasks->"
},
"alternativeIcons": "Use Reference Parent",
"title": [
"Use Reference Parent"
],
"isTitleAllwaysVisible": true,
"propertyNameAtParent": "portfolioMineTasks",
"childrenNodesProperties": [
{
"name": "taskManagers",
"type": "array",
"childType": "Task Manager",
"monitorChildrenRunning": true
}
]
}
@@ -0,0 +1,85 @@
{
"type": "Portfolio Parameters",
"menuItems": [
{
"action": "Add Missing Children",
"label": "Add Missing Parameters",
"relatedUiObject": "Portfolio Parameters",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Live Portfolio Session->"
},
"childrenNodesProperties": [
{
"name": "sessionBaseAsset",
"type": "node",
"childType": "Session Base Asset",
"autoAdd": true
},
{
"name": "sessionQuotedAsset",
"type": "node",
"childType": "Session Quoted Asset",
"autoAdd": true
},
{
"name": "timeRange",
"type": "node",
"childType": "Time Range",
"autoAdd": true
},
{
"name": "timeFrame",
"type": "node",
"childType": "Time Frame",
"autoAdd": true
},
{
"name": "slippage",
"type": "node",
"childType": "Slippage",
"autoAdd": true
},
{
"name": "feeStructure",
"type": "node",
"childType": "Fee Structure",
"autoAdd": true
},
{
"name": "snapshots",
"type": "node",
"childType": "Snapshots",
"autoAdd": true
},
{
"name": "heartbeats",
"type": "node",
"childType": "Heartbeats",
"autoAdd": true
},
{
"name": "userDefinedParameters",
"type": "node",
"childType": "User Defined Parameters",
"autoAdd": true
}
],
"propertyNameAtParent": "portfolioParameters"
}
@@ -0,0 +1,62 @@
{
"type": "Portfolio Process Instance",
"menuItems": [
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "session",
"label": "Add Live Portfolio Session",
"relatedUiObject": "Live Portfolio Session",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "executionStartedEvent",
"label": "Add Execution Started Event",
"relatedUiObject": "Execution Started Event",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"isTitleAllwaysVisible": true,
"title": [
"Use Reference Parent Parent",
"Use Reference Parent"
],
"addLeftIcons": true,
"level": 2,
"referencingRules": {
"compatibleTypes": "->Process Definition->"
},
"attachingRules": {
"compatibleTypes": "->Portfolio Bot Instance->"
},
"childrenNodesProperties": [
{
"name": "session",
"type": "node",
"childType": "Live Portfolio Session"
},
{
"name": "executionStartedEvent",
"type": "node",
"childType": "Execution Started Event",
"autoAdd": false
}
],
"propertyNameAtParent": "processes"
}
@@ -0,0 +1,27 @@
{
"type": "Portfolio System Reference",
"menuItems": [
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"title": [
"Use Reference Parent"
],
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Live Portfolio Session->"
},
"referencingRules": {
"compatibleTypes": "->Portfolio System->"
},
"propertyNameAtParent": "portfolioSystemReference"
}
@@ -0,0 +1,67 @@
{
"type": "Production Portfolio Tasks",
"menuItems": [
{
"action": "Run All Project Portfolio Tasks",
"label": "Run All Project Portfolio Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Run",
"workDoneLabel": "Run Request Sent",
"iconPathOn": "run",
"iconPathOff": "run",
"actionFunction": "payload.executeAction"
},
{
"action": "Stop All Project Portfolio Tasks",
"label": "Stop All Project Portfolio Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Stop",
"workDoneLabel": "Stop Request Sent",
"iconPathOn": "stop",
"iconPathOff": "stop",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Project Portfolio Tasks",
"relatedUiObject": "Project Portfolio Tasks",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add Missing Project Portfolio Tasks",
"label": "Add Missing Projects",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Project Portfolio Tasks",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"addLeftIcons": true,
"level": 0,
"attachingRules": {
"compatibleTypes": "->LAN Network Node->"
},
"propertyNameAtParent": "productionPortfolioTasks",
"childrenNodesProperties": [
{
"name": "projectPortfolioTasks",
"type": "array",
"childType": "Project Portfolio Tasks",
"monitorChildrenRunning": true
}
]
}
@@ -0,0 +1,75 @@
{
"type": "Project Portfolio Tasks",
"menuItems": [
{
"action": "Run All Exchange Portfolio Tasks",
"label": "Run All Exchange Portfolio Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Run",
"workDoneLabel": "Run Request Sent",
"iconPathOn": "run",
"iconPathOff": "run",
"actionFunction": "payload.executeAction"
},
{
"action": "Stop All Exchange Portfolio Tasks",
"label": "Stop All Exchange Portfolio Tasks",
"askConfirmation": true,
"confirmationLabel": "Confirm to Stop",
"workDoneLabel": "Stop Request Sent",
"iconPathOn": "stop",
"iconPathOff": "stop",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Exchange Portfolio Tasks",
"relatedUiObject": "Exchange Portfolio Tasks",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add Missing Exchange Portfolio Tasks",
"label": "Add Missing Exchanges",
"askConfirmation": true,
"confirmationLabel": "Confirm to Proceed",
"workDoneLabel": "Done",
"relatedUiObject": "Exchange Portfolio Tasks",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"title": [
"Use Reference Parent"
],
"alternativeIcons": "Use Reference Parent Parent",
"addLeftIcons": true,
"level": 2,
"referencingRules": {
"compatibleTypes": "->Project Definition->"
},
"attachingRules": {
"compatibleTypes": "->Testing Portfolio Tasks->Production Portfolio Tasks->"
},
"propertyNameAtParent": "projectPortfolioTasks",
"childrenNodesProperties": [
{
"name": "exchangePortfolioTasks",
"type": "array",
"childType": "Exchange Portfolio Tasks",
"monitorChildrenRunning": true
}
],
"icon": "bitcoin"
}
@@ -32,7 +32,7 @@
"compatibleTypes": "->Exchange Account Asset->"
},
"attachingRules": {
"compatibleTypes": "->Trading Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->"
},
"alternativeIcons": "Use Reference Grandparent",
"title": [
@@ -32,7 +32,7 @@
"compatibleTypes": "->Exchange Account Asset->"
},
"attachingRules": {
"compatibleTypes": "->Trading Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->"
},
"alternativeIcons": "Use Reference Grandparent",
"title": [
@@ -28,7 +28,7 @@
},
"level": 3,
"attachingRules": {
"compatibleTypes": "->Trading Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->"
},
"propertyNameAtParent": "slippage"
}
@@ -28,7 +28,7 @@
},
"level": 3,
"attachingRules": {
"compatibleTypes": "->Trading Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->"
},
"propertyNameAtParent": "snapshots"
}
@@ -43,7 +43,7 @@
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Data Mine Tasks->Trading Mine Tasks->Learning Mine Tasks->"
"compatibleTypes": "->Data Mine Tasks->Trading Mine Tasks->Portfolio Mine Tasks->Learning Mine Tasks->"
},
"childrenNodesProperties": [
{
@@ -67,6 +67,16 @@
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "bot",
"label": "Add Portfolio Bot Instance",
"relatedUiObject": "Portfolio Bot Instance",
"actionFunction": "payload.executeAction",
"actionProject": "Visual-Scripting",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
@@ -110,6 +120,11 @@
"type": "node",
"childType": "Trading Bot Instance"
},
{
"name": "bot",
"type": "node",
"childType": "Portfolio Bot Instance"
},
{
"name": "bot",
"type": "node",
@@ -28,7 +28,7 @@
},
"level": 3,
"attachingRules": {
"compatibleTypes": "->Trading Parameters->Learning Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->Learning Parameters->"
},
"propertyNameAtParent": "timeFrame"
}
@@ -28,7 +28,7 @@
},
"level": 3,
"attachingRules": {
"compatibleTypes": "->Trading Parameters->Learning Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->Learning Parameters->"
},
"propertyNameAtParent": "timeRange"
}
@@ -28,7 +28,7 @@
},
"level": 3,
"attachingRules": {
"compatibleTypes": "->Trading Parameters->Learning Parameters->"
"compatibleTypes": "->Trading Parameters->Portfolio Parameters->Learning Parameters->"
},
"propertyNameAtParent": "userDefinedParameters"
}
@@ -113,7 +113,7 @@
if (checkThisDataBranch(lanNetworkNode.dataTasks) === true) { return }
if (checkThisTradingBranch(lanNetworkNode.testingTradingTasks) === true) { return }
if (checkThisTradingBranch(lanNetworkNode.productionTradingTasks) === true) { return }
if (checkThisPortfolioBranch(lanNetworkNode.portfolioTasks) === true) { return }
if (checkThisPortfolioBranch(lanNetworkNode.productionPortfolioTasks) === true) { return }
if (checkThisLearningBranch(lanNetworkNode.learningTasks) === true) { return }
function checkThisDataBranch(branch) {
@@ -231,8 +231,8 @@
let marketTasks = exchangeTasks.marketPortfolioTasks[p]
if (marketTasks.referenceParent === undefined) { continue }
if (marketTasks.referenceParent.id !== TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.id) { continue }
for (let q = 0; q < marketTasks.PortfolioMineTasks.length; q++) {
let mineTasks = marketTasks.PortfolioMineTasks[q]
for (let q = 0; q < marketTasks.portfolioMineTasks.length; q++) {
let mineTasks = marketTasks.portfolioMineTasks[q]
for (let k = 0; k < mineTasks.taskManagers.length; k++) {
let taskManager = mineTasks.taskManagers[k]
for (let m = 0; m < taskManager.tasks.length; m++) {
@@ -111,23 +111,25 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
let fordwardTestingSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Forward Testing Session')
let paperTradingSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Paper Trading Session')
let liveTradingSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Live Trading Session')
let livePortfolioSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Live Portfolio Session')
let backLearningSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Back Learning Session')
let liveLearningSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Live Learning Session')
scanSessionArray(backtestingSessionsArray)
scanSessionArray(fordwardTestingSessionsArray)
scanSessionArray(paperTradingSessionsArray)
scanSessionArray(liveTradingSessionsArray)
scanSessionArray(backLearningSessionsArray)
scanSessionArray(liveLearningSessionsArray)
scanSessionArray(backtestingSessionsArray, 'Market Trading Tasks')
scanSessionArray(fordwardTestingSessionsArray, 'Market Trading Tasks')
scanSessionArray(paperTradingSessionsArray, 'Market Trading Tasks')
scanSessionArray(liveTradingSessionsArray, 'Market Trading Tasks')
scanSessionArray(livePortfolioSessionsArray, 'Market Portfolio Tasks')
scanSessionArray(backLearningSessionsArray, 'Market Trading Tasks')
scanSessionArray(liveLearningSessionsArray, 'Market Trading Tasks')
function scanSessionArray(sessionsArray) {
function scanSessionArray(sessionsArray, nodeType) {
for (let i = 0; i < sessionsArray.length; i++) {
let session = sessionsArray[i]
let environment = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(session, node.payload.referenceParent.type, undefined, true, false, true, false)
if (environment === undefined) { continue }
if (environment.id !== node.payload.referenceParent.id) { continue }
let market = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(session, 'Market Trading Tasks', undefined, true, false, true, false)
let market = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(session, nodeType, undefined, true, false, true, false)
if (market.payload.referenceParent === undefined) { continue }
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, session, true) === true) {
createTimeMachine(node, session, market.payload.referenceParent, lanNetworkNode, rootNodes)
@@ -148,9 +150,10 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
timeMachine.timeFrameScale.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
timeMachine.timeScale.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
timeMachine.rateScale.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
/*
We will create 3 Time Line Charts for the Trading Mine Products
*/
* We will create 3 Time Line Charts for the Trading Mine Products:
*/
mineProducts = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Trading Mine Products')
for (let j = 0; j < mineProducts.length; j++) {
let mineProduct = mineProducts[j]
@@ -160,13 +163,13 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
*/
if (mineProduct.payload.parentNode === undefined) { continue }
if (mineProduct.payload.parentNode.payload.referenceParent.id !== session.id) { continue }
/*
At the current version of Superalgos, beta 6, there is only one Trading Mine,
with only one bot, and it has so many data products that we want to put them
in 3 different timeline charts. So we will create 3 charts, connect them,
and delete from each one 1/3 of the layers. We do all that next:
*/
for (let k = 0; k < 3; k++) {
let timelineChart = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(timeMachine, 'Timeline Chart')
@@ -207,9 +210,68 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
}
}
}
/*
We will create 3 Time Line Charts for the Learning Mine Products
*/
* We will create 3 Time Line Charts for the Portfolio Mine Products:
*/
mineProducts = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Portfolio Mine Products')
for (let j = 0; j < mineProducts.length; j++) {
let mineProduct = mineProducts[j]
/*
The mine products found so far, belongs to any session. To filter all the sessions
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.id !== session.id) { continue }
/*
For the legacy reasons stated above @Trading Mine Products we will create 3 charts, connect them,
and delete from each one 1/3 of the layers. We do all that next:
*/
for (let k = 0; k < 3; k++) {
let timelineChart = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(timeMachine, 'Timeline Chart')
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(timelineChart.layerManager, mineProduct)
timelineChart.payload.floatingObject.collapseToggle()
timelineChart.layerManager.payload.floatingObject.collapseToggle()
timelineChart.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
timelineChart.layerManager.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let menu = timelineChart.layerManager.payload.uiObject.menu
menu.internalClick('Add All Mine Layers')
menu.internalClick('Add All Mine Layers')
switch (k) {
case 0: {
timelineChart.name = 'Portfolio Engine'
deleteNodeByName('Portfolio System')
deleteNodeByName('Simulation Objects')
break
}
case 1: {
timelineChart.name = 'Portfolio System'
deleteNodeByName('Portfolio Engine')
deleteNodeByName('Simulation Objects')
break
}
case 2: {
timelineChart.name = 'Simulation Objects'
deleteNodeByName('Portfolio Engine')
deleteNodeByName('Portfolio System')
break
}
}
function deleteNodeByName(nodeName) {
let nodeToDelete = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(timelineChart.layerManager, undefined, nodeName, true, true, false, false)
if (nodeToDelete === undefined) { return }
UI.projects.visualScripting.functionLibraries.nodeDeleter.deleteUIObject(nodeToDelete, rootNodes)
}
}
}
/*
* We will create 3 Time Line Charts for the Learning Mine Products:
*/
mineProducts = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(lanNetworkNode, 'Learning Mine Products')
for (let j = 0; j < mineProducts.length; j++) {
let mineProduct = mineProducts[j]
@@ -219,13 +281,13 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
*/
if (mineProduct.payload.parentNode === undefined) { continue }
if (mineProduct.payload.parentNode.payload.referenceParent.id !== session.id) { continue }
/*
At the current version of Superalgos, beta 6, there is only one Learning Mine,
with only one bot, and it has so many data products that we want to put them
in 3 different timeline charts. So we will create 3 charts, connect them,
and delete from each one 1/3 of the layers. We do all that next:
*/
for (let k = 0; k < 3; k++) {
let timelineChart = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(timeMachine, 'Timeline Chart')
@@ -319,6 +381,7 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
function scanNetworkNode(lanNetworkNode) {
let testingTradingTasks = UI.projects.visualScripting.utilities.branches.findInBranch(lanNetworkNode, 'Testing Trading Tasks', node, true)
let productionTradingTasks = UI.projects.visualScripting.utilities.branches.findInBranch(lanNetworkNode, 'Production Trading Tasks', node, true)
let productionPortfolioTasks = UI.projects.visualScripting.utilities.branches.findInBranch(lanNetworkNode, 'Production Portfolio Tasks', node, true)
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, testingTradingTasks, true) === true) {
let dashboard = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Dashboard')
@@ -331,6 +394,12 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dashboard, productionTradingTasks)
dashboard.name = productionTradingTasks.type + ' ' + lanNetworkNode.name
}
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, productionPortfolioTasks, true) === true) {
let dashboard = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Dashboard')
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dashboard, productionPortfolioTasks)
dashboard.name = productionPortfolioTasks.type + ' ' + lanNetworkNode.name
}
}
}
}
@@ -256,15 +256,18 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
function installInNetworkNode(lanNetworkNode) {
let tradingSessionsCreatedArray = []
let portfolioSessionsCreatedArray = []
let learningSessionsCreatedArray = []
installDataTasksTasks()
installLearningTasksTasks()
isntallTradingTasksTasks()
installTradingTasksTasks()
installPortfolioTasksTasks()
installDataMinesData()
installLearningMinesData()
installTradingMineData()
installPortfolioMineData()
function installDataTasksTasks() {
/*
@@ -343,7 +346,7 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
}
}
function isntallTradingTasksTasks() {
function installTradingTasksTasks() {
/*
Next we complete the missing stuff at Testing Trading Tasks
*/
@@ -400,6 +403,64 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
}
}
function installPortfolioTasksTasks() {
/*
Next we complete the missing stuff at Testing Portfolio Tasks
*/
//installEnvironment('Testing Portfolio Tasks')
/*
Next we complete the missing stuff at Production Portfolio Tasks
*/
installEnvironment('Production Portfolio Tasks')
function installEnvironment(environmentType) {
/*
Now we install the environment at the current Network Node
*/
let portfolioTasks = UI.projects.visualScripting.utilities.branches.findInBranch(lanNetworkNode, environmentType, node, true)
if (portfolioTasks === undefined) {
portfolioTasks = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(lanNetworkNode, environmentType)
}
/*
We will make ourselves sure that the Project Portfolio Tasks nodes are there.
*/
portfolioTasks.payload.uiObject.menu.internalClick('Add Missing Project Portfolio Tasks')
portfolioTasks.payload.uiObject.menu.internalClick('Add Missing Project Portfolio Tasks')
for (let i = 0; i < portfolioTasks.projectPortfolioTasks.length; i++) {
let projectPortfolioTasks = portfolioTasks.projectPortfolioTasks[i]
projectPortfolioTasks.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_90
if (projectPortfolioTasks.project === "Foundations") {
installTheRestOfTheBranch(projectPortfolioTasks)
}
}
function installTheRestOfTheBranch(projectPortfolioTasks) {
let exchangePortfolioTasks = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectPortfolioTasks, 'Exchange Portfolio Tasks', cryptoExchange)
exchangePortfolioTasks.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let marketPortfolioTask = UI.projects.visualScripting.utilities.nodeChildren.findAndRecreateChildWithReference(exchangePortfolioTasks, 'Market Portfolio Tasks', market, rootNodes)
UI.projects.foundations.utilities.menu.menuClick(marketPortfolioTask, 'Add Missing Portfolio Mine Tasks', true)
UI.projects.foundations.utilities.menu.menuClickOfNodeArray(marketPortfolioTask.portfolioMineTasks, 'Add All Tasks', true)
/* This will be needed at the charting space, for creating Dashboards */
//let backtestingSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(marketPortfolioTask, 'Backtesting Session')
let livePortfolioSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(marketPortfolioTask, 'Live Portfolio Session')
//let paperPortfolioSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(marketPortfolioTask, 'Paper Portfolio Session')
//let forwardSessionsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(marketPortfolioTask, 'Forward Testing Session')
let allSessionsArray = livePortfolioSessionsArray;
/*backtestingSessionsArray
.concat(livePortfolioSessionsArray)
.concat(paperPortfolioSessionsArray)
.concat(forwardSessionsArray)*/
portfolioSessionsCreatedArray = portfolioSessionsCreatedArray.concat(allSessionsArray)
dashboardsArray.push({ environmentNode: portfolioTasks, lanNetworkNode: lanNetworkNode, sessionsArray: allSessionsArray })
}
}
}
function installDataMinesData() {
/*
Here we complete the missing stuff at Data Mines Data
@@ -548,6 +609,61 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
}
}
}
function installPortfolioMineData() {
/*
Here we complete the missing stuff at Data Mines Data
*/
let dataStorage = UI.projects.visualScripting.utilities.branches.findInBranch(lanNetworkNode, 'Data Storage', node, true)
if (dataStorage === undefined) {
dataStorage = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(lanNetworkNode, 'Data Storage')
}
let portfolioMinesData = UI.projects.visualScripting.utilities.branches.findInBranch(dataStorage, 'Portfolio Mines Data', node, true)
if (portfolioMinesData === undefined) {
portfolioMinesData = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(dataStorage, 'Portfolio Mines Data')
}
portfolioMinesData.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_90
/*
We will make ourselves sure that the Project Portfolio Products nodes are there.
*/
portfolioMinesData.payload.uiObject.menu.internalClick('Add Missing Project Portfolio Products')
portfolioMinesData.payload.uiObject.menu.internalClick('Add Missing Project Portfolio Products')
for (let i = 0; i < portfolioMinesData.projectPortfolioProducts.length; i++) {
let projectPortfolioProducts = portfolioMinesData.projectPortfolioProducts[i]
projectPortfolioProducts.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_45
if (projectPortfolioProducts.project === "Foundations") {
installTheRestOfTheBranch(projectPortfolioProducts)
}
}
function installTheRestOfTheBranch(projectPortfolioProducts) {
let exchangePortfolioProducts = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectPortfolioProducts, 'Exchange Portfolio Products', cryptoExchange)
exchangePortfolioProducts.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let marketPortfolioProducts = UI.projects.visualScripting.utilities.nodeChildren.findAndRecreateChildWithReference(exchangePortfolioProducts, 'Market Portfolio Products', market, rootNodes)
marketPortfolioProducts.payload.floatingObject.collapseToggle()
/*
Create the new session references.
*/
for (let i = 0; i < portfolioSessionsCreatedArray.length; i++) {
let session = portfolioSessionsCreatedArray[i]
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(marketPortfolioProducts, session, true) === true) {
UI.projects.foundations.functionLibraries.dataStorageFunctions.createSessionReference(marketPortfolioProducts, session, 'Portfolio Session Reference')
}
}
/*
Create everything inside the session references.
*/
for (let j = 0; j < marketPortfolioProducts.portfolioSessionReferences.length; j++) {
let sessionReference = marketPortfolioProducts.portfolioSessionReferences[j]
UI.projects.foundations.utilities.menu.menuClick(sessionReference, 'Add All Portfolio Mine Products', true)
UI.projects.foundations.utilities.menu.menuClickOfNodeArray(sessionReference.portfolioMineProducts, 'Add All Data Products', true)
sessionReference.payload.floatingObject.collapseToggle()
}
}
}
}
}
@@ -605,6 +721,14 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
if (marketTradingTasks.payload.referenceParent.id === market.id) {
UI.projects.visualScripting.functionLibraries.nodeDeleter.deleteUIObject(timeMachine, rootNodes)
}
let marketPortfolioTasks = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(session, 'Market Portfolio Tasks', undefined, true, false, true, false)
if (marketPortfolioTasks === undefined) { continue }
if (marketPortfolioTasks.payload === undefined) { continue }
if (marketPortfolioTasks.payload.referenceParent === undefined) { continue }
if (marketPortfolioTasks.payload.referenceParent.id === market.id) {
UI.projects.visualScripting.functionLibraries.nodeDeleter.deleteUIObject(timeMachine, rootNodes)
}
}
/*
We create a time machine for each session added during the previous processing.
@@ -651,6 +775,14 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
if (marketTradingTasks.payload.referenceParent.id === market.id) {
UI.projects.visualScripting.functionLibraries.nodeDeleter.deleteUIObject(timeMachine, rootNodes)
}
let marketPortfolioTasks = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(session, 'Market Portfolio Tasks', undefined, true, false, true, false)
if (marketPortfolioTasks === undefined) { continue }
if (marketPortfolioTasks.payload === undefined) { continue }
if (marketPortfolioTasks.payload.referenceParent === undefined) { continue }
if (marketPortfolioTasks.payload.referenceParent.id === market.id) {
UI.projects.visualScripting.functionLibraries.nodeDeleter.deleteUIObject(timeMachine, rootNodes)
}
}
/* Delete all Dashboards that does not have time machines inside. */
@@ -688,16 +820,20 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
let marketDataTasksArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(network, 'Market Data Tasks')
let marketTradingTasksArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(network, 'Market Trading Tasks')
let marketPortfolioTasksArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(network, 'Market Portfolio Tasks')
let marketLearningTasksArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(network, 'Market Learning Tasks')
let marketDataProductsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(network, 'Market Data Products')
let marketTradingProductsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(network, 'Market Trading Products')
let marketPortfolioProductsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(network, 'Market Portfolio Products')
let marketLearningProductsArray = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(network, 'Market Learning Products')
uninstalMarketArray(marketDataTasksArray)
uninstalMarketArray(marketTradingTasksArray)
uninstalMarketArray(marketPortfolioTasksArray)
uninstalMarketArray(marketLearningTasksArray)
uninstalMarketArray(marketDataProductsArray)
uninstalMarketArray(marketTradingProductsArray)
uninstalMarketArray(marketPortfolioProductsArray)
uninstalMarketArray(marketLearningProductsArray)
function uninstalMarketArray(marketArray) {
@@ -39,6 +39,13 @@ function newFoundationsFunctionLibraryProductFunctions() {
}
}
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode.type === 'Portfolio Mine') {
installInPortfolioMine(rootNode)
}
}
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode.type === 'LAN Network') {
@@ -255,6 +262,72 @@ function newFoundationsFunctionLibraryProductFunctions() {
}
function installInPortfolioMine(portfolioMine) {
let savePlugin = false
for (let j = 0; j < portfolioMine.portfolioBots.length; j++) {
let portfolioBotNode = portfolioMine.portfolioBots[j]
for (let k = 0; k < portfolioBotNode.processes.length; k++) {
let process = portfolioBotNode.processes[k]
/**
* In case the data mine is not referenced at all, we must add it
*/
let dataMineDependency = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(process.processDependencies, 'Data Mine Data Dependencies', productDataMineParent)
let botDataDependencies = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(dataMineDependency, undefined, productIndicatorBot.name, false, true, false, false)
/**
* If Bot Data Dependency exists add Data Dependencies
* Otherwise create the Bot Data Dependency and add Data Dependencies to newly created Bot Data
*/
if (botDataDependencies !== undefined) {
addAllDataDependenciesIfNotExists(botDataDependencies)
} else {
let newBotDataDependencies = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(dataMineDependency, 'Bot Data Dependencies')
newBotDataDependencies.name = productIndicatorBot.name
addAllDataDependenciesIfNotExists(newBotDataDependencies)
}
function addAllDataDependenciesIfNotExists(botDataDependencies) {
for (let l = 0; l < product.datasets.length; l++) {
let dataset = product.datasets[l]
// Explicit check is needed so we know if we have to save the plugin or not
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(botDataDependencies, dataset, true) === true) {
savePlugin = true
let dataDependency = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(botDataDependencies, 'Data Dependency')
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dataDependency, dataset)
}
}
}
}
}
/**
* There is no reason to save the plugin if no modifications have been made to the hierarchy
* We will save the plugin only if we get to the point were we have to add the data dependencies
*
*/
if (savePlugin) {
for (let i = 0; i < rootNodes.length; i++) {
let rootNode = rootNodes[i]
if (rootNode.type === 'Plugins') {
let portfolioMinePlugin = UI.projects.visualScripting.utilities.meshes.findNodeInNodeMesh(rootNode, 'Plugin Portfolio Mines', undefined, false, true, false, false)
for (let j = 0; j < portfolioMinePlugin.pluginFiles.length; j++) {
let pluginFile = portfolioMinePlugin.pluginFiles[j]
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.savePlugin(pluginFile)
}
}
}
}
}
/**
* This function will install the product into existing Charting Space
* It is mandatory to have at least a dashboard which contains at least one time machine
@@ -2,6 +2,7 @@ function newVisualScritingFunctionLibraryUiObjectsFromNodes() {
let thisObject = {
syncronizeTasksFoundAtWorkspaceWithBackEnd: syncronizeTasksFoundAtWorkspaceWithBackEnd,
syncronizeTradingSessionsFoundAtWorkspaceWithBackEnd: syncronizeTradingSessionsFoundAtWorkspaceWithBackEnd,
syncronizePortfolioSessionsFoundAtWorkspaceWithBackEnd: syncronizePortfolioSessionsFoundAtWorkspaceWithBackEnd,
syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd: syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd,
playTutorials: playTutorials,
recreateWorkspace: recreateWorkspace,
@@ -16,6 +17,7 @@ function newVisualScritingFunctionLibraryUiObjectsFromNodes() {
let mapOfNodes
let tasksFoundAtWorkspace
let tradingSessionsFoundAtWorkspace
let portfolioSessionsFoundAtWorkspace
let learningSessionsFoundAtWorkspace
let tutorialsToPlay
@@ -29,6 +31,7 @@ function newVisualScritingFunctionLibraryUiObjectsFromNodes() {
mapOfNodes = new Map()
tasksFoundAtWorkspace = []
tradingSessionsFoundAtWorkspace = []
portfolioSessionsFoundAtWorkspace = []
learningSessionsFoundAtWorkspace = []
tutorialsToPlay = []
@@ -84,6 +87,18 @@ function newVisualScritingFunctionLibraryUiObjectsFromNodes() {
totalPlugin = totalPlugin + project.pluginTradingEngines.pluginFiles.length
pluginAllTheseFiles(project.pluginTradingEngines.pluginFiles, 'Trading-Engines')
}
if (project.pluginPortfolioMines !== undefined) {
totalPlugin = totalPlugin + project.pluginPortfolioMines.pluginFiles.length
pluginAllTheseFiles(project.pluginPortfolioMines.pluginFiles, 'Portfolio-Mines')
}
if (project.pluginPortfolioSystems !== undefined) {
totalPlugin = totalPlugin + project.pluginPortfolioSystems.pluginFiles.length
pluginAllTheseFiles(project.pluginPortfolioSystems.pluginFiles, 'Portfolio-Systems')
}
if (project.pluginPortfolioEngines !== undefined) {
totalPlugin = totalPlugin + project.pluginPortfolioEngines.pluginFiles.length
pluginAllTheseFiles(project.pluginPortfolioEngines.pluginFiles, 'Portfolio-Engines')
}
if (project.pluginLearningMines !== undefined) {
totalPlugin = totalPlugin + project.pluginLearningMines.pluginFiles.length
pluginAllTheseFiles(project.pluginLearningMines.pluginFiles, 'Learning-Mines')
@@ -278,6 +293,14 @@ function newVisualScritingFunctionLibraryUiObjectsFromNodes() {
tradingSessionsFoundAtWorkspace = undefined
}
function syncronizePortfolioSessionsFoundAtWorkspaceWithBackEnd() {
for (let i = 0; i < portfolioSessionsFoundAtWorkspace.length; i++) {
let node = portfolioSessionsFoundAtWorkspace[i]
UI.projects.algorithmicPortfolio.functionLibraries.portfolioSessionFunctions.syncronizeSessionWithBackEnd(node)
}
portfolioSessionsFoundAtWorkspace = undefined
}
function syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd() {
for (let i = 0; i < learningSessionsFoundAtWorkspace.length; i++) {
let node = learningSessionsFoundAtWorkspace[i]
@@ -465,6 +488,15 @@ function newVisualScritingFunctionLibraryUiObjectsFromNodes() {
node.project = "Algorithmic-Trading"
}
if (
node.type === 'Portfolio Engine' ||
node.type === 'Portfolio Mine' ||
node.type === 'Portfolio System' ||
node.type === 'Portfolio Bot'
) {
node.project = "Portfolio-Management"
}
if (
node.type === 'Learning Engine' ||
node.type === 'Learning Mine' ||
@@ -477,9 +509,12 @@ function newVisualScritingFunctionLibraryUiObjectsFromNodes() {
if (
node.type === 'Plugins' ||
node.type === 'Plugin Tutorials' ||
node.type === 'Plugin Trading Systems' ||
node.type === 'Plugin Trading Mines' ||
node.type === 'Plugin Trading Engines' ||
node.type === 'Plugin Trading Systems' ||
node.type === 'Plugin Trading Mines' ||
node.type === 'Plugin Trading Engines' ||
node.type === 'Plugin Portfolio Systems' ||
node.type === 'Plugin Portfolio Mines' ||
node.type === 'Plugin Portfolio Engines' ||
node.type === 'Plugin Project' ||
node.type === 'Plugin Learning Systems' ||
node.type === 'Plugin Learning Mines' ||
@@ -939,6 +974,11 @@ function newVisualScritingFunctionLibraryUiObjectsFromNodes() {
tradingSessionsFoundAtWorkspace.push(node)
}
}
if (uiObjectType === 'Live Portfolio Session') {
if (portfolioSessionsFoundAtWorkspace !== undefined) { // it might be undefined when you are spawning a session that was running while backed up
portfolioSessionsFoundAtWorkspace.push(node)
}
}
if (uiObjectType === 'Learning Session') {
if (learningSessionsFoundAtWorkspace !== undefined) { // it might be undefined when you are spawning a session that was running while backed up
learningSessionsFoundAtWorkspace.push(node)