diff --git a/Projects/Superalgos/Function-Libraries/ActionSwitch.js b/Projects/Superalgos/Function-Libraries/ActionSwitch.js index 5395d3242..5e57b5fb6 100644 --- a/Projects/Superalgos/Function-Libraries/ActionSwitch.js +++ b/Projects/Superalgos/Function-Libraries/ActionSwitch.js @@ -19,7 +19,8 @@ function newSuperalgosActionSwitch() { let functionLibraryDependenciesFilter = newDependenciesFilter() let functionLibraryNodePath = newNodePath() let functionLibraryTaskFunctions = newTaskFunctions() - let functionLibrarySessionFunctions = newSessionFunctions() + let functionLibraryTradingSessionFunctions = newTradingSessionFunctions() + let functionLibraryLearningSessionFunctions = newLearningSessionFunctions() let functionLibraryCryptoEcosystemFunctions = newCryptoEcosystemFunctions() let functionLibraryMineFunctions = newMineFunctions() let functionLibraryDataStorageFunctions = newDataStorageFunctions() @@ -42,7 +43,8 @@ function newSuperalgosActionSwitch() { functionLibraryDependenciesFilter = undefined functionLibraryNodePath = undefined functionLibraryTaskFunctions = undefined - functionLibrarySessionFunctions = undefined + functionLibraryTradingSessionFunctions = undefined + functionLibraryLearningSessionFunctions = undefined functionLibraryCryptoEcosystemFunctions = undefined functionLibraryMineFunctions = undefined functionLibraryDataStorageFunctions = undefined @@ -84,8 +86,12 @@ function newSuperalgosActionSwitch() { functionLibraryUiObjectsFromNodes.syncronizeTasksFoundAtWorkspaceWithBackEnd(functionLibraryTaskFunctions) } break - case 'Syncronize Sessions': { - functionLibraryUiObjectsFromNodes.syncronizeSessionsFoundAtWorkspaceWithBackEnd(functionLibrarySessionFunctions) + case 'Syncronize Trading Sessions': { + functionLibraryUiObjectsFromNodes.syncronizeTradingSessionsFoundAtWorkspaceWithBackEnd(functionLibraryTradingSessionFunctions) + } + break + case 'Syncronize Learning Sessions': { + functionLibraryUiObjectsFromNodes.syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd(functionLibraryLearningSessionFunctions) } break case 'Play Tutorials': { @@ -521,19 +527,34 @@ function newSuperalgosActionSwitch() { functionLibraryWebhookFunctions.sendTestMessage(action.node, action.callBackFunction) } break - case 'Run Session': + case 'Run Trading Session': { - functionLibrarySessionFunctions.runSession(action.node, functionLibraryProtocolNode, functionLibraryDependenciesFilter, false, action.callBackFunction) + functionLibraryTradingSessionFunctions.runSession(action.node, functionLibraryProtocolNode, functionLibraryDependenciesFilter, false, action.callBackFunction) } break - case 'Resume Session': + case 'Resume Trading Session': { - functionLibrarySessionFunctions.runSession(action.node, functionLibraryProtocolNode, functionLibraryDependenciesFilter, true, action.callBackFunction) + functionLibraryTradingSessionFunctions.runSession(action.node, functionLibraryProtocolNode, functionLibraryDependenciesFilter, true, action.callBackFunction) } break - case 'Stop Session': + case 'Stop Trading Session': { - functionLibrarySessionFunctions.stopSession(action.node, functionLibraryProtocolNode, action.callBackFunction) + functionLibraryTradingSessionFunctions.stopSession(action.node, functionLibraryProtocolNode, action.callBackFunction) + } + break + case 'Run Learning Session': + { + functionLibraryLearningSessionFunctions.runSession(action.node, functionLibraryProtocolNode, functionLibraryDependenciesFilter, false, action.callBackFunction) + } + break + case 'Resume Learning Session': + { + functionLibraryLearningSessionFunctions.runSession(action.node, functionLibraryProtocolNode, functionLibraryDependenciesFilter, true, action.callBackFunction) + } + break + case 'Stop Learning Session': + { + functionLibraryLearningSessionFunctions.stopSession(action.node, functionLibraryProtocolNode, action.callBackFunction) } break case 'Run Super Action': diff --git a/Projects/Superalgos/Function-Libraries/CryptoEcosystemFunctions.js b/Projects/Superalgos/Function-Libraries/CryptoEcosystemFunctions.js index 7a1ed6a61..33f78d3a9 100644 --- a/Projects/Superalgos/Function-Libraries/CryptoEcosystemFunctions.js +++ b/Projects/Superalgos/Function-Libraries/CryptoEcosystemFunctions.js @@ -299,7 +299,7 @@ function newCryptoEcosystemFunctions() { UI.projects.superalgos.utilities.menu.menuClickOfNodeArray(marketLearningTask.learningMineTasks, 'Add All Tasks', true) /* This will be needed at the charting space, for creating Dashboards */ - let learningSessionsArray = UI.projects.superalgos.utilities.branches.nodeBranchToArray(marketTradingTask, 'Learning Session') + let learningSessionsArray = UI.projects.superalgos.utilities.branches.nodeBranchToArray(marketLearningTask, 'Learning Session') learningSessionsCreatedArray = learningSessionsCreatedArray.concat(learningSessionsArray) } @@ -384,7 +384,7 @@ function newCryptoEcosystemFunctions() { for (let i = 0; i < learningSessionsCreatedArray.length; i++) { let session = learningSessionsCreatedArray[i] if (UI.projects.superalgos.utilities.children.isMissingChildren(marketLearningProducts, session, true) === true) { - functionLibraryDataStorageFunctions.createSessionReference(marketLearningProducts, session, functionLibraryUiObjectsFromNodes) + functionLibraryDataStorageFunctions.createSessionReference(marketLearningProducts, session, 'Trading Session Reference', functionLibraryUiObjectsFromNodes) } } /* @@ -418,7 +418,7 @@ function newCryptoEcosystemFunctions() { for (let i = 0; i < tradingSessionsCreatedArray.length; i++) { let session = tradingSessionsCreatedArray[i] if (UI.projects.superalgos.utilities.children.isMissingChildren(marketTradingProducts, session, true) === true) { - functionLibraryDataStorageFunctions.createSessionReference(marketTradingProducts, session, functionLibraryUiObjectsFromNodes) + functionLibraryDataStorageFunctions.createSessionReference(marketTradingProducts, session, 'Trading Session Reference', functionLibraryUiObjectsFromNodes) } } /* diff --git a/Projects/Superalgos/Function-Libraries/LearningSessionFunctions.js b/Projects/Superalgos/Function-Libraries/LearningSessionFunctions.js new file mode 100644 index 000000000..0ec13a2cd --- /dev/null +++ b/Projects/Superalgos/Function-Libraries/LearningSessionFunctions.js @@ -0,0 +1,235 @@ +function newLearningSessionFunctions() { + thisObject = { + syncronizeSessionWithBackEnd: syncronizeSessionWithBackEnd, + runSession: runSession, + stopSession: stopSession + } + + return thisObject + + function syncronizeSessionWithBackEnd(node) { + let networkNode = validations(node) + if (networkNode === undefined) { + /* Nodes that do not belong to a network can not get ready. */ + return + } + + let eventsServerClient = UI.projects.superalgos.spaces.designSpace.workspace.eventsServerClients.get(networkNode.id) + + /* First we setup everything so as to listen to the response from the Task Server */ + let eventSubscriptionIdOnStatus + let key = node.name + '-' + node.type + '-' + node.id + eventsServerClient.listenToEvent(key, 'Status Response', undefined, node.id, onResponse, onStatus) + + function onResponse(message) { + eventSubscriptionIdOnStatus = message.eventSubscriptionId + } + + function onStatus(message) { + eventsServerClient.stopListening(key, eventSubscriptionIdOnStatus, node.id) + if (message.event.status === 'Session Runnning' ) { + node.payload.uiObject.menu.internalClick('Run Learning Session') + } + } + + /* Second we ask the Task Server if this Session is Running. */ + eventsServerClient.raiseEvent(key, 'Session Status') + } + + function runSession(node, functionLibraryProtocolNode, functionLibraryDependenciesFilter, resume, callBackFunction) { + let networkNode = validations(node) + if (networkNode === undefined) { + /* This means that the validations failed. */ + callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE) + return + } + + let eventsServerClient = UI.projects.superalgos.spaces.designSpace.workspace.eventsServerClients.get(networkNode.id) + + node.payload.uiObject.run(eventsServerClient, callBackFunction) + + let key = node.name + '-' + node.type + '-' + node.id + + let lightingPath = '' + + 'Trading System->' + + 'Dynamic Indicators->Indicator Function->Formula->' + + 'Trading Strategy->' + + 'Trigger Stage->Trigger On Event->Trigger Off Event->Take Position Event->' + + 'Announcement->Announcement Formula->' + + 'Open Stage->' + + 'Manage Stage->' + + 'Managed Stop Loss->Managed Take Profit->' + + 'Phase->Formula->Next Phase Event->Move To Phase Event->Phase->' + + 'Situation->Condition->Javascript Code->' + + 'Close Stage->' + + 'Initial Targets->Target Size In Base Asset->Target Size In Quoted Asset->Target Rate->Formula->' + + 'Announcement->Announcement Formula->' + + 'Open Execution->Close Execution->' + + 'Execution Algorithm->Market Buy Order->Market Sell Order->Limit Buy Order->Limit Sell Order->' + + 'Order Rate->Formula->' + + 'Create Order Event->Cancel Order Event->' + + 'Size In Base Asset->Size In Quoted Asset->Position Rate->Formula->' + + 'Situation->Condition->Javascript Code->' + + 'Market Order->Limit Order->' + + 'Simulated Exchange Events->Simulated Partial Fill->Simulated Actual Rate->Simulated Fees Paid->Formula->' + + let tradingSystem = functionLibraryProtocolNode.getProtocolNode(node.tradingSystemReference.payload.referenceParent, false, true, true, false, false, lightingPath) + + lightingPath = '' + + 'Trading Engine->' + + 'Dynamic Indicators->Indicator Function->' + + 'Current->Last->Previous->' + + 'Episode->' + + 'Episode Base Asset->Episode Quoted Asset->Episode Counters->Episode Statistics->' + + 'Strategies->Positions->Orders->Hits->Fails->' + + 'Profit Loss->Hit Ratio->Hit Fail->Days->ROI->Annualized Rate Of Return->User Defined Statistic->' + + 'Candle->Cycle->' + + 'Begin->End->Last Begin->Last End->Open->Close->Min->Max->Index->' + + 'Distance To Event->' + + 'Head Of The Market->Process Date->' + + 'Trigger On->Trigger Off->Take Position->Close Position->Next Phase->Move To Phase->Create Order->Cancel Order->Close Order->' + + 'Strategy->' + + 'Strategy Counters->' + + 'Position->' + + 'Entry Target Rate->Exit Target Rate->' + + 'Stop Loss->Stop Loss Phase->Stop Loss Position->Begin->End->Initial Value->Final Value->' + + 'Take Profit->Take Profit Phase->Take Profit Position->Begin->End->Initial Value->Final Value->' + + 'Position Counters->' + + 'Position Statistics->Days->User Defined Statistic->' + + 'Position Base Asset->Position Quoted Asset->Entry Target Size->Exit Target Size->' + + 'Profit Loss->ROI->Hit Fail->' + + 'Exchange Orders->Market Buy Orders->Market Sell Orders->Limit Buy Orders->Limit Sell Orders->' + + 'Market Order->Limit Order->' + + 'Exchange Id->Rate->Order Name->Algorithm Name->Lock->' + + 'Order Counters->' + + 'Order Base Asset->Order Quoted Asset->' + + 'Actual Size->Size->Size Filled->Amount Received->Fees Paid->Fees To Be Paid->' + + 'Order Statistics->Percentage Filled->Actual Rate->Days->User Defined Statistic->' + + 'Strategy Trigger Stage->Strategy Open Stage->Strategy Manage Stage->Strategy Close Stage->' + + 'Begin->End->Exit Type->Status->Begin Rate->End Rate->Stage Base Asset->Stage Quoted Asset->Size Placed->Target Size->Size Filled->Fees Paid->Stage Defined In->' + + 'Serial Number->Identifier->Begin->End->Begin Rate->End Rate->Strategy Name->Status->Exit Type->' + + 'Balance->Begin Balance->End Balance->' + + 'Index->Situation Name->Formula->Periods->' + + let tradingEngine = functionLibraryProtocolNode.getProtocolNode(node.tradingEngineReference.payload.referenceParent, false, true, true, false, false, lightingPath) + + lightingPath = '' + + 'Learning Session->' + + 'Parameters->' + + 'Session Base Asset->Session Quoted Asset->Time Range->Time Frame->Slippage->Fee Structure->Snapshots->Heartbeats->User Defined Parameters->' + + 'Exchange Account Asset->Asset->' + + 'Social Bots->Telegram Bot->' + + let session = functionLibraryProtocolNode.getProtocolNode(node, false, true, true, false, false, lightingPath) + + let dependencyFilter = functionLibraryDependenciesFilter.createFilter(node.tradingSystemReference.payload.referenceParent) + + /* Raise event to run the session */ + let event = { + session: JSON.stringify(session), + tradingSystem: JSON.stringify(tradingSystem), + tradingEngine: JSON.stringify(tradingEngine), + dependencyFilter: JSON.stringify(dependencyFilter), + resume: resume + } + + if (resume !== true) { + eventsServerClient.raiseEvent(key, 'Run Learning Session', event) + } else { + eventsServerClient.raiseEvent(key, 'Resume Learning Session', event) + } + + if (node.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode === undefined) { + callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE) + return + } + } + + function stopSession(node, functionLibraryProtocolNode, callBackFunction) { + let networkNode = validations(node) + if (networkNode === undefined) { + /* This means that the validations failed. */ + callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE) + return + } + + let eventsServerClient = UI.projects.superalgos.spaces.designSpace.workspace.eventsServerClients.get(networkNode.id) + + let key = node.name + '-' + node.type + '-' + node.id + eventsServerClient.raiseEvent(key, 'Stop Learning Session') + + node.payload.uiObject.stop(callBackFunction) + } + + function validations(node) { + if (node.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs a Process Instance parent to be able to run.') + return + } + + if (node.payload.parentNode.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs to be inside a Process Instance node.') + return + } + + if (node.payload.parentNode.payload.parentNode.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs to be inside a Task.') + return + } + + if (node.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs to be inside a Task Manager.') + return + } + + let taskManager = node.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode + + if (taskManager.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs to be inside Mine Tasks.') + return + } + + if (taskManager.payload.parentNode.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs to be inside Market Tasks.') + return + } + + if (taskManager.payload.parentNode.payload.parentNode.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs to be inside Exchange Tasks.') + return + } + + if (taskManager.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs to be inside a Testing or Production Environment.') + return + } + + if (taskManager.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode === undefined) { + node.payload.uiObject.setErrorMessage('Session needs to be inside a Network Node.') + return + } + + let networkNode = taskManager.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode + + if (node.tradingSystemReference === undefined) { + node.payload.uiObject.setErrorMessage('Session needs a child Trading System Reference.') + return + } + + if (node.tradingEngineReference === undefined) { + node.payload.uiObject.setErrorMessage('Session needs a child Trading Engine Reference.') + return + } + + if (node.tradingSystemReference.payload.referenceParent === undefined) { + node.payload.uiObject.setErrorMessage('Trading System Reference needs to reference a Trading System.') + return + } + + if (node.tradingEngineReference.payload.referenceParent === undefined) { + node.payload.uiObject.setErrorMessage('Trading Engine Reference needs to reference a Trading Engine.') + return + } + return networkNode + } +} diff --git a/Projects/Superalgos/Function-Libraries/SessionFunctions.js b/Projects/Superalgos/Function-Libraries/TradingSessionFunctions.js similarity index 96% rename from Projects/Superalgos/Function-Libraries/SessionFunctions.js rename to Projects/Superalgos/Function-Libraries/TradingSessionFunctions.js index 41210ca41..4fb279fa7 100644 --- a/Projects/Superalgos/Function-Libraries/SessionFunctions.js +++ b/Projects/Superalgos/Function-Libraries/TradingSessionFunctions.js @@ -1,4 +1,4 @@ -function newSessionFunctions() { +function newTradingSessionFunctions() { thisObject = { syncronizeSessionWithBackEnd: syncronizeSessionWithBackEnd, runSession: runSession, @@ -28,7 +28,7 @@ function newSessionFunctions() { function onStatus(message) { eventsServerClient.stopListening(key, eventSubscriptionIdOnStatus, node.id) if (message.event.status === 'Session Runnning' ) { - node.payload.uiObject.menu.internalClick('Run Session') + node.payload.uiObject.menu.internalClick('Run Trading Session') } } @@ -114,7 +114,7 @@ function newSessionFunctions() { let tradingEngine = functionLibraryProtocolNode.getProtocolNode(node.tradingEngineReference.payload.referenceParent, false, true, true, false, false, lightingPath) lightingPath = '' + - 'Backtesting Session->Paper Trading Session->Forward Testing Session->Live Trading Session->Learning 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->' + @@ -134,9 +134,9 @@ function newSessionFunctions() { } if (resume !== true) { - eventsServerClient.raiseEvent(key, 'Run Session', event) + eventsServerClient.raiseEvent(key, 'Run Trading Session', event) } else { - eventsServerClient.raiseEvent(key, 'Resume Session', event) + eventsServerClient.raiseEvent(key, 'Resume Trading Session', event) } if (node.payload.parentNode.payload.parentNode.payload.parentNode.payload.parentNode === undefined) { @@ -156,7 +156,7 @@ function newSessionFunctions() { let eventsServerClient = UI.projects.superalgos.spaces.designSpace.workspace.eventsServerClients.get(networkNode.id) let key = node.name + '-' + node.type + '-' + node.id - eventsServerClient.raiseEvent(key, 'Stop Session') + eventsServerClient.raiseEvent(key, 'Stop Trading Session') node.payload.uiObject.stop(callBackFunction) } diff --git a/Projects/Superalgos/Function-Libraries/UiObjectsFromNodes.js b/Projects/Superalgos/Function-Libraries/UiObjectsFromNodes.js index b2ec8564d..1221d315b 100644 --- a/Projects/Superalgos/Function-Libraries/UiObjectsFromNodes.js +++ b/Projects/Superalgos/Function-Libraries/UiObjectsFromNodes.js @@ -1,7 +1,8 @@ function newUiObjectsFromNodes() { thisObject = { syncronizeTasksFoundAtWorkspaceWithBackEnd: syncronizeTasksFoundAtWorkspaceWithBackEnd, - syncronizeSessionsFoundAtWorkspaceWithBackEnd: syncronizeSessionsFoundAtWorkspaceWithBackEnd, + syncronizeTradingSessionsFoundAtWorkspaceWithBackEnd: syncronizeTradingSessionsFoundAtWorkspaceWithBackEnd, + syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd: syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd, playTutorials: playTutorials, recreateWorkspace: recreateWorkspace, getNodeById: getNodeById, @@ -14,7 +15,8 @@ function newUiObjectsFromNodes() { let mapOfReferenceChildren = new Map() let mapOfNodes let tasksFoundAtWorkspace - let sessionsFoundAtWorkspace + let tradingSessionsFoundAtWorkspace + let learningSessionsFoundAtWorkspace let tutorialsToPlay return thisObject @@ -26,7 +28,8 @@ function newUiObjectsFromNodes() { function recreateWorkspace(node, callBackFunction) { mapOfNodes = new Map() tasksFoundAtWorkspace = [] - sessionsFoundAtWorkspace = [] + tradingSessionsFoundAtWorkspace = [] + learningSessionsFoundAtWorkspace = [] tutorialsToPlay = [] removeNullRootNodes() @@ -163,12 +166,20 @@ function newUiObjectsFromNodes() { tasksFoundAtWorkspace = undefined } - function syncronizeSessionsFoundAtWorkspaceWithBackEnd(functionLibrarySessionFunctions) { - for (let i = 0; i < sessionsFoundAtWorkspace.length; i++) { - let node = sessionsFoundAtWorkspace[i] + function syncronizeTradingSessionsFoundAtWorkspaceWithBackEnd(functionLibrarySessionFunctions) { + for (let i = 0; i < tradingSessionsFoundAtWorkspace.length; i++) { + let node = tradingSessionsFoundAtWorkspace[i] functionLibrarySessionFunctions.syncronizeSessionWithBackEnd(node) } - sessionsFoundAtWorkspace = undefined + tradingSessionsFoundAtWorkspace = undefined + } + + function syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd(functionLibrarySessionFunctions) { + for (let i = 0; i < learningSessionsFoundAtWorkspace.length; i++) { + let node = learningSessionsFoundAtWorkspace[i] + functionLibrarySessionFunctions.syncronizeSessionWithBackEnd(node) + } + learningSessionsFoundAtWorkspace = undefined } function playTutorials() { @@ -642,9 +653,14 @@ function newUiObjectsFromNodes() { /* Check if there are sessions to run */ if (userAddingNew === false && node.savedPayload !== undefined) { - if (uiObjectType === 'Live Trading Session' || uiObjectType === 'Forward Testing Session' || uiObjectType === 'Backtesting Session' || uiObjectType === 'Paper Trading Session' || uiObjectType === 'Learning Session') { - if (sessionsFoundAtWorkspace !== undefined) { // it might be undefined when you are spawning a session that was running while backed up - sessionsFoundAtWorkspace.push(node) + if (uiObjectType === 'Live Trading Session' || uiObjectType === 'Forward Testing Session' || uiObjectType === 'Backtesting Session' || uiObjectType === 'Paper Trading Session') { + if (tradingSessionsFoundAtWorkspace !== undefined) { // it might be undefined when you are spawning a session that was running while backed up + tradingSessionsFoundAtWorkspace.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) } } } diff --git a/Projects/Superalgos/Schemas/AppSchema.json b/Projects/Superalgos/Schemas/AppSchema.json index a33ad6633..29d5b5e3a 100644 --- a/Projects/Superalgos/Schemas/AppSchema.json +++ b/Projects/Superalgos/Schemas/AppSchema.json @@ -2490,12 +2490,12 @@ "type": "Backtesting Session", "menuItems": [ { - "action": "Run Session", + "action": "Run Trading Session", "label": "Run", "workingLabel": "Run Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Ran", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Trading Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -2506,12 +2506,12 @@ "actionFunction": "payload.executeAction" }, { - "action": "Resume Session", + "action": "Resume Trading Session", "label": "Resume", "workingLabel": "Resume Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Resumed", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Trading Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -9665,12 +9665,12 @@ "type": "Paper Trading Session", "menuItems": [ { - "action": "Run Session", + "action": "Run Trading Session", "label": "Run", "workingLabel": "Run Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Run", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Trading Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -9681,12 +9681,12 @@ "actionFunction": "payload.executeAction" }, { - "action": "Resume Session", + "action": "Resume Trading Session", "label": "Resume", "workingLabel": "Resume Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Resumed", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Trading Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -9766,12 +9766,12 @@ "type": "Forward Testing Session", "menuItems": [ { - "action": "Run Session", + "action": "Run Trading Session", "label": "Run", "workingLabel": "Run Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Run", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Trading Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -9782,12 +9782,12 @@ "actionFunction": "payload.executeAction" }, { - "action": "Resume Session", + "action": "Resume Trading Session", "label": "Resume", "workingLabel": "Resume Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Resumed", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Trading Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -9893,12 +9893,12 @@ "type": "Live Trading Session", "menuItems": [ { - "action": "Run Session", + "action": "Run Trading Session", "label": "Run", "workingLabel": "Run Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Run", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Trading Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -9909,12 +9909,12 @@ "actionFunction": "payload.executeAction" }, { - "action": "Resume Session", + "action": "Resume Trading Session", "label": "Resume", "workingLabel": "Resume Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Resumed", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Trading Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -9994,12 +9994,12 @@ "type": "Learning Session", "menuItems": [ { - "action": "Run Session", + "action": "Run Learning Session", "label": "Run", "workingLabel": "Run Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Run", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Learning Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", @@ -10010,12 +10010,12 @@ "actionFunction": "payload.executeAction" }, { - "action": "Resume Session", + "action": "Resume Learning Session", "label": "Resume", "workingLabel": "Resume Request Sent", "workDoneLabel": "Session Running", "workFailedLabel": "Session Cannot be Resumed", - "secondaryAction": "Stop Session", + "secondaryAction": "Stop Learning Session", "secondaryLabel": "Stop", "secondaryWorkingLabel": "Stopping...", "secondaryWorkDoneLabel": "Session Stopped", diff --git a/Projects/Superalgos/Spaces/Design-Space/Workspace.js b/Projects/Superalgos/Spaces/Design-Space/Workspace.js index c601edb2e..e40b8c9cc 100644 --- a/Projects/Superalgos/Spaces/Design-Space/Workspace.js +++ b/Projects/Superalgos/Spaces/Design-Space/Workspace.js @@ -114,7 +114,8 @@ function newWorkspace() { function runTasksAndSessions() { executeAction({ name: 'Syncronize Tasks', project: 'Superalgos' }) - executeAction({ name: 'Syncronize Sessions', project: 'Superalgos' }) + executeAction({ name: 'Syncronize Trading Sessions', project: 'Superalgos' }) + executeAction({ name: 'Syncronize Learning Sessions', project: 'Superalgos' }) executeAction({ name: 'Play Tutorials', project: 'Superalgos' }) }