Open strategies and trades

This commit is contained in:
Luis Fernando Molina committed 2019-11-26 18:34:48 +01:00
1 parent ad61de8292
commit eb61498176
2 files changed
+19 -14

No files matched your search

+7 -3
View File
@@ -536,7 +536,7 @@
let imageSize = 20;
let imageToDraw = strategyImages[record.number];
if (record.status === 1) {
/* Draw the line that represents the duration of closed strategy */
browserCanvasContext.beginPath();
@@ -549,9 +549,13 @@
browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.MANGANESE_PURPLE + ', 1)';
browserCanvasContext.lineWidth = 1
browserCanvasContext.setLineDash([0, 0])
if (record.status === 1) {
browserCanvasContext.setLineDash([0, 0])
} else {
browserCanvasContext.setLineDash([2, 4])
}
browserCanvasContext.stroke()
}
drawStick(recordPoint1, recordPoint3);
+12 -11
View File
@@ -515,23 +515,24 @@
let line1 = '';
let line2 = '';
switch (record.exitType) {
case 1: {
line1 = 'Exit: STOP';
break;
}
case 2: {
line1 = 'Exit: TP';
break;
if (record.status === 1) {
switch (record.exitType) {
case 1: {
line1 = 'Exit: STOP';
break;
}
case 2: {
line1 = 'Exit: TP';
break;
}
}
} else {
line1 = 'Open Position';
}
if (record.lastTradeROI < 0) {
line2 = 'ROI:' + (record.lastTradeROI).toFixed(2) + ' %';
} else {
line2 = 'ROI:' + (record.lastTradeROI).toFixed(2) + ' %';
}