Bug Fixes and Default Definition Concept Completely erradicated
This commit is contained in:
1 parent
835cb1c4e1
commit
90cc2a0690
5 files changed
+157
-102
No files matched your search
@@ -15,6 +15,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
code.id = node.id
|
||||
}
|
||||
return code
|
||||
}
|
||||
case 'Condition':
|
||||
@@ -25,6 +28,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: getProtocolNode(node.code, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
condition.id = node.id
|
||||
}
|
||||
return condition
|
||||
}
|
||||
case 'Situation': {
|
||||
@@ -39,6 +45,9 @@ function newProtocolNode () {
|
||||
let condition = getProtocolNode(node.conditions[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
situation.conditions.push(condition)
|
||||
}
|
||||
if (includeIds) {
|
||||
situation.id = node.id
|
||||
}
|
||||
return situation
|
||||
}
|
||||
case 'Formula':
|
||||
@@ -49,6 +58,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
formula.id = node.id
|
||||
}
|
||||
return formula
|
||||
}
|
||||
case 'Next Phase Event':
|
||||
@@ -63,6 +75,9 @@ function newProtocolNode () {
|
||||
let situation = getProtocolNode(node.situations[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
event.situations.push(situation)
|
||||
}
|
||||
if (includeIds) {
|
||||
event.id = node.id
|
||||
}
|
||||
return event
|
||||
}
|
||||
case 'Phase': {
|
||||
@@ -73,6 +88,9 @@ function newProtocolNode () {
|
||||
formula: getProtocolNode(node.formula, removePersonalData, parseJSONStrings, includeIds),
|
||||
nextPhaseEvent: getProtocolNode(node.nextPhaseEvent, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
phase.id = node.id
|
||||
}
|
||||
return phase
|
||||
}
|
||||
case 'Stop': {
|
||||
@@ -87,6 +105,9 @@ function newProtocolNode () {
|
||||
let phase = getProtocolNode(node.phases[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
stop.phases.push(phase)
|
||||
}
|
||||
if (includeIds) {
|
||||
stop.id = node.id
|
||||
}
|
||||
return stop
|
||||
}
|
||||
case 'Take Profit': {
|
||||
@@ -101,6 +122,9 @@ function newProtocolNode () {
|
||||
let phase = getProtocolNode(node.phases[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
takeProfit.phases.push(phase)
|
||||
}
|
||||
if (includeIds) {
|
||||
takeProfit.id = node.id
|
||||
}
|
||||
return takeProfit
|
||||
}
|
||||
case 'Take Position Event': {
|
||||
@@ -115,6 +139,9 @@ function newProtocolNode () {
|
||||
let situation = getProtocolNode(node.situations[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
event.situations.push(situation)
|
||||
}
|
||||
if (includeIds) {
|
||||
event.id = node.id
|
||||
}
|
||||
return event
|
||||
}
|
||||
case 'Trigger On Event': {
|
||||
@@ -129,6 +156,9 @@ function newProtocolNode () {
|
||||
let situation = getProtocolNode(node.situations[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
event.situations.push(situation)
|
||||
}
|
||||
if (includeIds) {
|
||||
event.id = node.id
|
||||
}
|
||||
return event
|
||||
}
|
||||
case 'Trigger Off Event': {
|
||||
@@ -143,6 +173,9 @@ function newProtocolNode () {
|
||||
let situation = getProtocolNode(node.situations[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
event.situations.push(situation)
|
||||
}
|
||||
if (includeIds) {
|
||||
event.id = node.id
|
||||
}
|
||||
return event
|
||||
}
|
||||
case 'Initial Definition': {
|
||||
@@ -155,6 +188,9 @@ function newProtocolNode () {
|
||||
positionSize: getProtocolNode(node.positionSize, removePersonalData, parseJSONStrings, includeIds),
|
||||
positionRate: getProtocolNode(node.positionRate, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Open Execution': {
|
||||
@@ -163,6 +199,9 @@ function newProtocolNode () {
|
||||
subType: node.subType,
|
||||
name: node.name
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Close Execution': {
|
||||
@@ -171,6 +210,9 @@ function newProtocolNode () {
|
||||
subType: node.subType,
|
||||
name: node.name
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Position Size': {
|
||||
@@ -180,6 +222,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
formula: getProtocolNode(node.formula, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Position Rate': {
|
||||
@@ -189,6 +234,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
formula: getProtocolNode(node.formula, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Trigger Stage': {
|
||||
@@ -200,6 +248,9 @@ function newProtocolNode () {
|
||||
triggerOff: getProtocolNode(node.triggerOff, removePersonalData, parseJSONStrings, includeIds),
|
||||
takePosition: getProtocolNode(node.takePosition, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
stage.id = node.id
|
||||
}
|
||||
return stage
|
||||
}
|
||||
case 'Open Stage': {
|
||||
@@ -210,6 +261,9 @@ function newProtocolNode () {
|
||||
initialDefinition: getProtocolNode(node.initialDefinition, removePersonalData, parseJSONStrings, includeIds),
|
||||
openExecution: getProtocolNode(node.openExecution, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
stage.id = node.id
|
||||
}
|
||||
return stage
|
||||
}
|
||||
case 'Manage Stage': {
|
||||
@@ -220,6 +274,9 @@ function newProtocolNode () {
|
||||
stopLoss: getProtocolNode(node.stopLoss, removePersonalData, parseJSONStrings, includeIds),
|
||||
takeProfit: getProtocolNode(node.takeProfit, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
stage.id = node.id
|
||||
}
|
||||
return stage
|
||||
}
|
||||
case 'Close Stage': {
|
||||
@@ -229,6 +286,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
closeExecution: getProtocolNode(node.closeExecution, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
stage.id = node.id
|
||||
}
|
||||
return stage
|
||||
}
|
||||
case 'Strategy': {
|
||||
@@ -241,6 +301,9 @@ function newProtocolNode () {
|
||||
manageStage: getProtocolNode(node.manageStage, removePersonalData, parseJSONStrings, includeIds),
|
||||
closeStage: getProtocolNode(node.closeStage, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
strategy.id = node.id
|
||||
}
|
||||
return strategy
|
||||
}
|
||||
case 'Base Asset': {
|
||||
@@ -250,6 +313,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Time Range': {
|
||||
@@ -259,6 +325,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Time Period': {
|
||||
@@ -268,6 +337,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Slippage': {
|
||||
@@ -277,6 +349,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Fee Structure': {
|
||||
@@ -286,6 +361,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Parameters': {
|
||||
@@ -299,6 +377,9 @@ function newProtocolNode () {
|
||||
slippage: getProtocolNode(node.slippage, removePersonalData, parseJSONStrings, includeIds),
|
||||
feeStructure: getProtocolNode(node.feeStructure, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Trading System': {
|
||||
@@ -314,6 +395,9 @@ function newProtocolNode () {
|
||||
let strategy = getProtocolNode(node.strategies[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
tradingSystem.strategies.push(strategy)
|
||||
}
|
||||
if (includeIds) {
|
||||
tradingSystem.id = node.id
|
||||
}
|
||||
return tradingSystem
|
||||
}
|
||||
case 'Personal Data': {
|
||||
@@ -329,6 +413,9 @@ function newProtocolNode () {
|
||||
let exchangeAccount = getProtocolNode(node.exchangeAccounts[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
personalData.exchangeAccounts.push(exchangeAccount)
|
||||
}
|
||||
if (includeIds) {
|
||||
personalData.id = node.id
|
||||
}
|
||||
return personalData
|
||||
}
|
||||
case 'Exchange Account': {
|
||||
@@ -349,6 +436,9 @@ function newProtocolNode () {
|
||||
let key = getProtocolNode(node.keys[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
exchangeAccount.keys.push(key)
|
||||
}
|
||||
if (includeIds) {
|
||||
exchangeAccount.id = node.id
|
||||
}
|
||||
return exchangeAccount
|
||||
}
|
||||
case 'Exchange Account Asset': {
|
||||
@@ -358,6 +448,9 @@ function newProtocolNode () {
|
||||
subType: node.subType,
|
||||
name: node.name
|
||||
}
|
||||
if (includeIds) {
|
||||
asset.id = node.id
|
||||
}
|
||||
return asset
|
||||
}
|
||||
case 'Exchange Account Key': {
|
||||
@@ -368,6 +461,9 @@ function newProtocolNode () {
|
||||
name: node.name,
|
||||
code: node.code
|
||||
}
|
||||
if (includeIds) {
|
||||
key.id = node.id
|
||||
}
|
||||
return key
|
||||
}
|
||||
case 'Task Manager': {
|
||||
@@ -382,6 +478,9 @@ function newProtocolNode () {
|
||||
let task = getProtocolNode(node.tasks[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
taskManager.tasks.push(task)
|
||||
}
|
||||
if (includeIds) {
|
||||
taskManager.id = node.id
|
||||
}
|
||||
return taskManager
|
||||
}
|
||||
case 'Task': {
|
||||
@@ -394,6 +493,9 @@ function newProtocolNode () {
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Sensor': {
|
||||
@@ -408,6 +510,9 @@ function newProtocolNode () {
|
||||
let process = getProtocolNode(node.processes[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
bot.processes.push(process)
|
||||
}
|
||||
if (includeIds) {
|
||||
bot.id = node.id
|
||||
}
|
||||
return bot
|
||||
}
|
||||
case 'Indicator': {
|
||||
@@ -422,6 +527,9 @@ function newProtocolNode () {
|
||||
let process = getProtocolNode(node.processes[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
bot.processes.push(process)
|
||||
}
|
||||
if (includeIds) {
|
||||
bot.id = node.id
|
||||
}
|
||||
return bot
|
||||
}
|
||||
case 'Trading Engine': {
|
||||
@@ -436,6 +544,9 @@ function newProtocolNode () {
|
||||
let process = getProtocolNode(node.processes[m], removePersonalData, parseJSONStrings, includeIds)
|
||||
bot.processes.push(process)
|
||||
}
|
||||
if (includeIds) {
|
||||
bot.id = node.id
|
||||
}
|
||||
return bot
|
||||
}
|
||||
case 'Process': {
|
||||
@@ -504,6 +615,9 @@ function newProtocolNode () {
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
|
||||
@@ -520,6 +634,9 @@ function newProtocolNode () {
|
||||
object.taskManagers.push(taskManager)
|
||||
}
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Network': {
|
||||
@@ -535,6 +652,9 @@ function newProtocolNode () {
|
||||
object.networkNodes.push(networkNode)
|
||||
}
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
case 'Definition': {
|
||||
@@ -546,6 +666,9 @@ function newProtocolNode () {
|
||||
personalData: getProtocolNode(node.personalData, removePersonalData, parseJSONStrings, includeIds),
|
||||
network: getProtocolNode(node.network, removePersonalData, parseJSONStrings, includeIds)
|
||||
}
|
||||
if (includeIds) {
|
||||
object.id = node.id
|
||||
}
|
||||
return object
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user