any indicator on strategies

This commit is contained in:
Luis Fernando Molina committed 2020-03-21 18:05:40 +01:00
1 parent e4cc141436
commit cad01264f3
5 files changed
+43 -12

No files matched your search

+9
View File
@@ -2774,6 +2774,11 @@
"editors": {
"config": true
},
"isTitleAllwaysVisible": true,
"title": [
"Use Reference Parent Parent Parent",
"Use Reference Parent Parent"
],
"level": 3,
"referenceAttachesTo": {
"compatibleTypes": "->Status Report->"
@@ -3060,6 +3065,10 @@
}
],
"isTitleAllwaysVisible": true,
"title": [
"Use Reference Parent Parent",
"Use Reference Parent"
],
"addLeftIcons": true,
"level": 3,
"referenceAttachesTo": {
+1 -1
View File
@@ -321,7 +321,7 @@ function newFloatingObject () {
thisObject.payload.distance = distanceToParent
if (distanceToParent > 2000 || thisObject.isPinned === true) { return } // this is introduced to avoid edges cases when importing workspaces.
if (distanceToParent > 3000 || thisObject.isPinned === true) { return } // this is introduced to avoid edges cases when importing workspaces.
newPosition = {
x: parent.payload.position.x + distanceToParent * Math.cos(toRadians(thisObject.payload.angle)),
+14
View File
@@ -136,6 +136,20 @@ function newUiObjectTitle () {
}
break
}
case 'Use Reference Parent Parent Parent': {
let nodeToUse = thisObject.payload.node.payload.referenceParent
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode.payload.parentNode
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.payload.title
thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.payload.node.name
}
}
}
break
}
default: {
if (titleReference.indexOf('Use Child @') === 0) {
let propertyName = titleReference.substring(titleReference.indexOf('@') + 1, titleReference.length)
@@ -935,9 +935,9 @@
if (condition !== undefined) {
condition.payload.uiObject.setErrorMessage(situation.conditions[m].error)
if (situation.conditions[m].code !== undefined) {
if (condition.code !== undefined) {
condition.code.payload.uiObject.setErrorMessage(situation.conditions[m].code.error)
if (situation.conditions[m].javascriptCode !== undefined) {
if (condition.javascriptCode !== undefined) {
condition.javascriptCode.payload.uiObject.setErrorMessage(situation.conditions[m].javascriptCode.error)
}
}
+16 -8
View File
@@ -658,7 +658,7 @@
let key = j + '-' + 'triggerStage' + '-' + 'triggerOn' + '-' + k + '-' + m;
if (condition.javascriptCode !== undefined) {
newCondition(key, condition.javascriptCode);
newCondition(key, condition.javascriptCode, chart);
}
}
}
@@ -676,7 +676,7 @@
let key = j + '-' + 'triggerStage' + '-' + 'triggerOff' + '-' + k + '-' + m;
if (condition.javascriptCode !== undefined) {
newCondition(key, condition.javascriptCode);
newCondition(key, condition.javascriptCode, chart);
}
}
}
@@ -694,7 +694,7 @@
let key = j + '-' + 'triggerStage' + '-' + 'takePosition' + '-' + k + '-' + m;
if (condition.javascriptCode !== undefined) {
newCondition(key, condition.javascriptCode);
newCondition(key, condition.javascriptCode, chart);
}
}
}
@@ -825,7 +825,7 @@
let key = j + '-' + 'openStage' + '-' + 'initialDefinition' + '-' + 'stopLoss' + '-' + p + '-' + k + '-' + m;
if (condition.javascriptCode !== undefined) {
newCondition(key, condition.javascriptCode);
newCondition(key, condition.javascriptCode, chart);
}
}
}
@@ -891,7 +891,7 @@
let key = j + '-' + 'openStage' + '-' + 'initialDefinition' + '-' + 'takeProfit' + '-' + p + '-' + k + '-' + m;
if (condition.javascriptCode !== undefined) {
newCondition(key, condition.javascriptCode);
newCondition(key, condition.javascriptCode, chart);
}
}
}
@@ -967,7 +967,7 @@
let key = j + '-' + 'manageStage' + '-' + 'stopLoss' + '-' + p + '-' + k + '-' + m;
if (condition.javascriptCode !== undefined) {
newCondition(key, condition.javascriptCode);
newCondition(key, condition.javascriptCode, chart);
}
}
}
@@ -1034,7 +1034,7 @@
let key = j + '-' + 'manageStage' + '-' + 'takeProfit' + '-' + p + '-' + k + '-' + m;
if (condition.javascriptCode !== undefined) {
newCondition(key, condition.javascriptCode);
newCondition(key, condition.javascriptCode, chart);
}
}
}
@@ -1043,7 +1043,7 @@
}
}
function newCondition(key, node) {
function newCondition(key, node, chart) {
let condition;
let error = ''
@@ -1103,6 +1103,14 @@
maximumBalance = bot.VALUES_TO_USE.maximumBalanceB
}
if (minimumBalance === undefined) {
minimumBalance = 0
}
if (maximumBalance === undefined) {
maximumBalance = 10000000000000000
}
if (balance > minimumBalance && balance < maximumBalance) {
/*