Bug fixes
This commit is contained in:
1 parent
e23c5fb3aa
commit
89f6926027
8 files changed
+28
-12
No files matched your search
@@ -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 }
|
||||
/*
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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->' +
|
||||
|
||||
@@ -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->' +
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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->' +
|
||||
|
||||
@@ -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': {
|
||||
|
||||
Reference in new issue
Block a user