Indicator Refactoring

This commit is contained in:
Luis Fernando Molina committed 2019-10-27 11:10:58 +01:00
1 parent 21e3de95ab
commit 0fd53d7cef
12 files changed
+21 -21

No files matched your search

+3 -3
View File
@@ -299,7 +299,7 @@ function newUiObject () {
compatibleType = '->' + 'Task' + '->'
compatibleSubType = undefined
break
case 'Indicator':
case 'Indicator Bot Instance':
compatibleType = '->' + 'Task' + '->'
compatibleSubType = undefined
break
@@ -314,7 +314,7 @@ function newUiObject () {
break
}
case 'Indicator Process': {
compatibleType = '->' + 'Indicator' + '->'
compatibleType = '->' + 'Indicator Bot Instance' + '->'
break
}
case 'Trading Engine Process': {
@@ -424,7 +424,7 @@ function newUiObject () {
/* Discard objects with busy coonection ports */
if (thisObject.payload.node.type === 'Task' && nearbyNode.task !== undefined) { continue }
if (thisObject.payload.node.type === 'Sensor Bot Instance' && nearbyNode.bot !== undefined) { continue }
if (thisObject.payload.node.type === 'Indicator' && nearbyNode.bot !== undefined) { continue }
if (thisObject.payload.node.type === 'Indicator Bot Instance' && nearbyNode.bot !== undefined) { continue }
if (thisObject.payload.node.type === 'Trading Engine' && nearbyNode.bot !== undefined) { continue }
if (thisObject.payload.node.type === 'Process' && nearbyNode.process !== undefined) { continue }
if (thisObject.payload.node.type === 'Trading System' && nearbyNode.tradingSystem !== undefined) { continue }
+3 -3
View File
@@ -788,7 +788,7 @@ function newUiObjectConstructor () {
actionFunction: payload.onMenuItemClick,
label: 'Add Indicator',
visible: true,
relatedUiObject: 'Indicator',
relatedUiObject: 'Indicator Bot Instance',
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
@@ -907,7 +907,7 @@ function newUiObjectConstructor () {
)
break
}
case 'Indicator': {
case 'Indicator Bot Instance': {
uiObject.codeEditor = newCodeEditor()
uiObject.codeEditor.isVisibleFunction = uiObject.isVisibleFunction
uiObject.codeEditor.initialize()
@@ -3238,7 +3238,7 @@ function newUiObjectConstructor () {
level_3()
break
}
case 'Indicator': {
case 'Indicator Bot Instance': {
level_3()
break
}
+1 -1
View File
@@ -86,7 +86,7 @@ function newUiObjectTitle () {
thisObject.allwaysVisible = true
break
}
case 'Indicator': {
case 'Indicator Bot Instance': {
thisObject.allwaysVisible = true
break
}
+1 -1
View File
@@ -71,7 +71,7 @@ function newProductsPanel () {
for (let j = 0; j < devTeam.bots.length; j++) {
let bot = devTeam.bots[j]
if (bot.type !== 'Indicator') { continue }
if (bot.type !== 'Indicator Bot Instance') { continue }
if (bot.products !== undefined) {
for (let k = 0; k < bot.products.length; k++) {
+1 -1
View File
@@ -50,7 +50,7 @@ function newStrategySpace () {
['Task Manager', 'task'],
['Task', 'timeline'],
['Sensor Bot Instance', 'bot-sensor'],
['Indicator', 'bot-indicator'],
['Indicator Bot Instance', 'bot-indicator'],
['Trading Engine', 'trading-engine'],
['Process', 'process'],
['Backtesting Session', 'session-backtesting'],
@@ -140,7 +140,7 @@ function newAttachDetach () {
completeDetachment(node, rootNodes)
return
}
case 'Indicator': {
case 'Indicator Bot Instance': {
node.payload.parentNode.bot = undefined
completeDetachment(node, rootNodes)
return
@@ -430,7 +430,7 @@ function newAttachDetach () {
completeAttachment(node, rootNodes)
}
break
case 'Indicator': {
case 'Indicator Bot Instance': {
node.payload.parentNode = attachToNode
node.payload.chainParent = attachToNode
node.payload.parentNode.bot = node
@@ -41,7 +41,7 @@ function newNodeChildren () {
case 'Sensor Bot Instance': {
return countChildrenSensor(parentNode, childNode)
}
case 'Indicator': {
case 'Indicator Bot Instance': {
return countChildrenIndicator(parentNode, childNode)
}
case 'Trading Engine': {
@@ -105,7 +105,7 @@ function newNodeDeleter () {
deleteBot(rootNode, rootNodes)
break
}
case 'Indicator': {
case 'Indicator Bot Instance': {
deleteBot(rootNode, rootNodes)
break
}
@@ -560,7 +560,7 @@ function newOnFocus () {
return
}
}
case 'Indicator': {
case 'Indicator Bot Instance': {
let child
for (let m = 0; m < node.processes.length; m++) {
child = getNodeThatIsOnFocus(node.processes[m])
@@ -473,8 +473,8 @@ function newPartsFromNodes () {
}
return
}
case 'Indicator': {
createPart('Indicator', node.name, node, parentNode, chainParent, 'Indicator')
case 'Indicator Bot Instance': {
createPart('Indicator Bot Instance', node.name, node, parentNode, chainParent, 'Indicator Bot Instance')
for (let m = 0; m < node.processes.length; m++) {
let process = node.processes[m]
createPartFromNode(process, node, node)
@@ -496,7 +496,7 @@ function newPartsFromNodes () {
node.subType = 'Sensor Process'
break
}
case 'Indicator': {
case 'Indicator Bot Instance': {
node.subType = 'Indicator Process'
break
}
@@ -690,7 +690,7 @@ function newPartsFromNodes () {
processes: [],
code: '{}'
}
createPart('Indicator', '', node.bot, node, node)
createPart('Indicator Bot Instance', '', node.bot, node, node)
}
return node.bot
}
@@ -718,7 +718,7 @@ function newPartsFromNodes () {
process.name = 'Sensor Process'
break
}
case 'Indicator': {
case 'Indicator Bot Instance': {
process.subType = 'Indicator Process'
process.name = 'Indicator Process'
break
@@ -798,7 +798,7 @@ function newProtocolNode () {
}
return object
}
case 'Indicator': {
case 'Indicator Bot Instance': {
let object = {
type: node.type,
subType: node.subType,
@@ -561,7 +561,7 @@ function newShortcutKeys () {
return
}
}
case 'Indicator': {
case 'Indicator Bot Instance': {
let child
for (let m = 0; m < node.processes.length; m++) {
child = getNodeByShortcutKey(node.processes[m], searchingKey)