Improve trade-detail view

This commit is contained in:
Matthias 2020-06-07 16:52:12 +02:00
parent e8a5a2deed
commit e0cee7e731
2 changed files with 7 additions and 4 deletions

View File

@ -11,8 +11,8 @@
{{ formatPrice(trade.initial_stop_loss) }}
</ValuePair>
<ValuePair description="Current stoploss dist">
{{ formatPercent(trade.current_stoploss_dist_ratio) }} |
{{ formatPrice(trade.current_stoploss_dist) }}
{{ formatPercent(trade.stoploss_current_dist_ratio) }} |
{{ formatPrice(trade.stoploss_current_dist) }}
</ValuePair>
<ValuePair description="Open Rate">{{ trade.open_rate }}</ValuePair>
<ValuePair description="Close Rate" v-if="!trade.is_open">{{ trade.close_rate }}</ValuePair>

View File

@ -104,8 +104,11 @@ export default {
console.log(item);
},
showDetails(trade) {
console.log(trade);
this.setDetailTrade(this.detailTradeId ? null : trade);
if (this.detailTradeId === trade.trade_id) {
this.setDetailTrade(null);
} else {
this.setDetailTrade(trade);
}
},
},
};