frequi_origin/src/components/ftbot/TradeDetail.vue

55 lines
1.9 KiB
Vue
Raw Normal View History

2020-06-02 11:05:16 +00:00
<template>
2020-06-04 17:56:19 +00:00
<b-card header="Trade detail">
<ValuePair description="TradeId">{{ trade.trade_id }}</ValuePair>
<ValuePair description="Pair">{{ trade.pair }}</ValuePair>
<ValuePair description="Stoploss">
2020-08-17 17:55:43 +00:00
{{ formatPercent(trade.stop_loss_ratio) }} |
{{ formatPrice(trade.stop_loss) }}
</ValuePair>
<ValuePair description="Initial Stoploss">
2020-08-17 17:55:43 +00:00
{{ formatPercent(trade.initial_stop_loss_ratio) }} |
{{ formatPrice(trade.initial_stop_loss) }}
</ValuePair>
<ValuePair description="Current stoploss dist">
2020-06-07 14:52:12 +00:00
{{ formatPercent(trade.stoploss_current_dist_ratio) }} |
{{ formatPrice(trade.stoploss_current_dist) }}
</ValuePair>
<ValuePair description="Open Rate">{{ trade.open_rate }}</ValuePair>
2020-06-05 17:44:44 +00:00
<ValuePair description="Close Rate" v-if="!trade.is_open">{{ trade.close_rate }}</ValuePair>
<ValuePair description="Min Rate">{{ trade.min_rate }}</ValuePair>
<ValuePair description="Max Rate">{{ trade.max_rate }}</ValuePair>
2020-06-07 14:53:06 +00:00
<ValuePair description="Open date">{{ timestampms(trade.open_timestamp) }}</ValuePair>
2020-06-05 17:44:44 +00:00
<ValuePair description="Close date" v-if="trade.close_timestamp">
2020-06-07 14:53:06 +00:00
{{ timestampms(trade.close_timestamp) }}
2020-06-05 17:44:44 +00:00
</ValuePair>
<ValuePair description="Stoploss last updated">
2020-06-07 14:53:06 +00:00
{{ timestampms(trade.stoploss_last_update_timestamp) }}
</ValuePair>
2020-06-05 17:44:44 +00:00
<ValuePair description="Current profit" v-if="trade.current_profit_abs">
2020-08-17 17:55:43 +00:00
{{ trade.current_profit_abs }} ({{ formatPercent(trade.current_profit) }})
2020-06-05 17:44:44 +00:00
</ValuePair>
2020-06-04 17:56:19 +00:00
</b-card>
2020-06-02 11:05:16 +00:00
</template>
2020-08-09 13:07:09 +00:00
<script lang="ts">
2020-06-05 09:24:44 +00:00
import { formatPercent, formatPrice, timestampms } from '@/shared/formatters';
import ValuePair from '@/components/ftbot/ValuePair.vue';
2020-06-02 11:05:16 +00:00
export default {
name: 'TradeDetail',
props: {
trade: {
type: Object,
required: true,
},
},
components: { ValuePair },
2020-06-02 11:05:16 +00:00
methods: {
formatPercent,
2020-06-04 17:56:19 +00:00
formatPrice,
2020-06-05 09:24:44 +00:00
timestampms,
2020-06-02 11:05:16 +00:00
},
};
</script>
<style scoped></style>