mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 01:01:56 +00:00
backtest-report: show order tag in the mark
Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
parent
10d5a8a4f2
commit
dec02296a3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user