Add long/short indicator on tradesLog

This commit is contained in:
Matthias 2022-04-07 07:04:58 +02:00
parent 5828981646
commit bf759428a4

View File

@ -70,6 +70,7 @@ export default class TradesLogChart extends Vue {
trade.pair, trade.pair,
trade.botName, trade.botName,
timestampms(trade.close_timestamp), timestampms(trade.close_timestamp),
trade.is_short === undefined || !trade.is_short ? 'Long' : 'Short',
]; ];
res.push(entry); res.push(entry);
} }
@ -93,10 +94,8 @@ export default class TradesLogChart extends Vue {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
formatter: (params) => { formatter: (params) => {
if (params[0].data[3]) { const botName = params[0].data[3] ? ` | ${params[0].data[3]}` : '';
return `${params[0].data[2]} | ${params[0].data[3]}<br>${params[0].data[4]}<br>Profit ${params[0].data[1]} %`; return `${params[0].data[2]} | ${params[0].data[5]} ${botName}<br>${params[0].data[4]}<br>Profit ${params[0].data[1]} %`;
}
return `${params[0].data[2]}<br>${params[0].data[4]}<br>Profit ${params[0].data[1]} %`;
}, },
axisPointer: { axisPointer: {
type: 'line', type: 'line',