backtest-report: show order tag in the mark

Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
c9s 2022-06-27 19:53:43 +08:00
parent 10d5a8a4f2
commit dec02296a3
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -181,6 +181,11 @@ const ordersToMarkers = (interval: string, orders: Array<Order> | void): Array<M
}
}
let text = '' + order.price
if (order.tag) {
text += " #" + order.tag;
}
switch (order.side) {
case "BUY":
markers.push({
@ -188,8 +193,7 @@ const ordersToMarkers = (interval: string, orders: Array<Order> | void): Array<M
position: 'belowBar',
color: '#239D10',
shape: 'arrowUp',
text: '' + order.price
//text: 'B',
text: text,
});
break;
case "SELL":
@ -198,8 +202,7 @@ const ordersToMarkers = (interval: string, orders: Array<Order> | void): Array<M
position: 'aboveBar',
color: '#e91e63',
shape: 'arrowDown',
text: '' + order.price
//text: 'S',
text: text,
});
break;
}