frequi_origin/src/components/ftbot/TradeDetail.vue

52 lines
1.7 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">
{{ formatPercent(trade.stop_loss_pct / 100) }} |
{{ formatPrice(trade.stop_loss) }}
</ValuePair>
<ValuePair description="Initial Stoploss">
{{ formatPercent(trade.initial_stop_loss_pct / 100) }} |
{{ formatPrice(trade.initial_stop_loss) }}
</ValuePair>
<ValuePair description="Current stoploss dist">
{{ formatPercent(trade.current_stoploss_dist_ratio) }} |
{{ formatPrice(trade.current_stoploss_dist) }}
</ValuePair>
<ValuePair description="Open Rate">{{ trade.open_rate }}</ValuePair>
<ValuePair description="Close Rate">{{ trade.close_rate }}</ValuePair>
<ValuePair description="Min Rate">{{ trade.min_rate }}</ValuePair>
<ValuePair description="Max Rate">{{ trade.max_rate }}</ValuePair>
<ValuePair description="Open date">{{ trade.open_timestamp }}</ValuePair>
<ValuePair description="Close date">{{ trade.close_timestamp }}</ValuePair>
<ValuePair description="Stoploss last updated">
{{ trade.stoploss_last_update_timestamp }}
</ValuePair>
<ValuePair description="Current profit">{{ trade.current_profit_abs }}</ValuePair>
2020-06-04 17:56:19 +00:00
</b-card>
2020-06-02 11:05:16 +00:00
</template>
<script>
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>