Open strategies and trades
This commit is contained in:
1 parent
ad61de8292
commit
eb61498176
2 files changed
+19
-14
No files matched your search
+7
-3
@@ -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);
|
||||
|
||||
@@ -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) + ' %';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user