Merge pull request #70 from danielpalstra/reorder_trade_details

Reorder trade details
This commit is contained in:
Matthias 2020-08-19 17:01:27 +02:00 committed by GitHub
commit b79eabd0ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,34 +1,47 @@
<template> <template>
<b-card header="Trade detail"> <div>
<ValuePair description="TradeId">{{ trade.trade_id }}</ValuePair> <b-card header="Trade detail" class="mt-1">
<ValuePair description="Pair">{{ trade.pair }}</ValuePair> <b-card-text>
<ValuePair description="Stoploss"> <ValuePair description="TradeId">{{ trade.trade_id }}</ValuePair>
{{ formatPercent(trade.stop_loss_ratio) }} | <ValuePair description="Pair">{{ trade.pair }}</ValuePair>
{{ formatPrice(trade.stop_loss) }} <ValuePair description="Open date">{{ timestampms(trade.open_timestamp) }}</ValuePair>
</ValuePair> <ValuePair description="Open Rate">{{ trade.open_rate }}</ValuePair>
<ValuePair description="Initial Stoploss"> <ValuePair description="Close Rate" v-if="!trade.is_open">{{ trade.close_rate }}</ValuePair>
{{ formatPercent(trade.initial_stop_loss_ratio) }} | <ValuePair description="Min Rate">{{ trade.min_rate }}</ValuePair>
{{ formatPrice(trade.initial_stop_loss) }} <ValuePair description="Max Rate">{{ trade.max_rate }}</ValuePair>
</ValuePair> <ValuePair description="Close date" v-if="trade.close_timestamp">{{
<ValuePair description="Current stoploss dist"> timestampms(trade.close_timestamp)
{{ formatPercent(trade.stoploss_current_dist_ratio) }} | }}</ValuePair>
{{ formatPrice(trade.stoploss_current_dist) }} </b-card-text>
</ValuePair> <h5 class="detail-header">Profit</h5>
<ValuePair description="Open Rate">{{ trade.open_rate }}</ValuePair> <b-card-text>
<ValuePair description="Close Rate" v-if="!trade.is_open">{{ trade.close_rate }}</ValuePair> <ValuePair description="Current % profit" v-if="trade.current_profit_pct">
<ValuePair description="Min Rate">{{ trade.min_rate }}</ValuePair> {{ trade.current_profit_pct }}%
<ValuePair description="Max Rate">{{ trade.max_rate }}</ValuePair> </ValuePair>
<ValuePair description="Open date">{{ timestampms(trade.open_timestamp) }}</ValuePair> <ValuePair description="Current profit" v-if="trade.current_profit_abs">
<ValuePair description="Close date" v-if="trade.close_timestamp"> {{ trade.current_profit_abs }}
{{ timestampms(trade.close_timestamp) }} </ValuePair>
</ValuePair> </b-card-text>
<ValuePair description="Stoploss last updated"> <h5 class="detail-header">Stoploss</h5>
{{ timestampms(trade.stoploss_last_update_timestamp) }} <b-card-text>
</ValuePair> <ValuePair description="Stoploss">
<ValuePair description="Current profit" v-if="trade.current_profit_abs"> {{ formatPercent(trade.stop_loss_pct / 100) }} |
{{ trade.current_profit_abs }} ({{ formatPercent(trade.current_profit) }}) {{ formatPrice(trade.stop_loss) }}
</ValuePair> </ValuePair>
</b-card> <ValuePair description="Initial Stoploss">
{{ formatPercent(trade.initial_stop_loss_pct / 100) }} |
{{ formatPrice(trade.initial_stop_loss) }}
</ValuePair>
<ValuePair description="Current stoploss dist">
{{ formatPercent(trade.stoploss_current_dist_ratio) }} |
{{ formatPrice(trade.stoploss_current_dist) }}
</ValuePair>
<ValuePair description="Stoploss last updated">
{{ timestampms(trade.stoploss_last_update_timestamp) }}
</ValuePair>
</b-card-text>
</b-card>
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -51,4 +64,11 @@ export default {
}, },
}; };
</script> </script>
<style scoped></style> <style scoped>
.detail-header {
border-bottom: 1px solid;
padding-bottom: 5px;
width: 100%;
display: block;
}
</style>