2020-06-02 11:05:16 +00:00
|
|
|
<template>
|
2020-09-01 05:51:03 +00:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-5">
|
|
|
|
<h5 class="detail-header">General</h5>
|
2020-08-19 05:31:00 +00:00
|
|
|
<ValuePair description="TradeId">{{ trade.trade_id }}</ValuePair>
|
|
|
|
<ValuePair description="Pair">{{ trade.pair }}</ValuePair>
|
|
|
|
<ValuePair description="Open date">{{ timestampms(trade.open_timestamp) }}</ValuePair>
|
|
|
|
<ValuePair description="Open Rate">{{ trade.open_rate }}</ValuePair>
|
2020-08-31 15:43:44 +00:00
|
|
|
<ValuePair v-if="!trade.is_open" description="Close Rate">{{ trade.close_rate }}</ValuePair>
|
2020-08-19 05:31:00 +00:00
|
|
|
<ValuePair description="Min Rate">{{ trade.min_rate }}</ValuePair>
|
|
|
|
<ValuePair description="Max Rate">{{ trade.max_rate }}</ValuePair>
|
2020-08-31 15:43:44 +00:00
|
|
|
<ValuePair v-if="trade.close_timestamp" description="Close date">{{
|
2020-08-19 05:31:00 +00:00
|
|
|
timestampms(trade.close_timestamp)
|
|
|
|
}}</ValuePair>
|
2020-09-01 05:51:03 +00:00
|
|
|
<ValuePair v-if="trade.current_profit_pct" description="Current Profit">
|
|
|
|
{{ formatPercent(trade.current_profit_pct) }} | {{ trade.current_profit_abs }}
|
2020-08-19 05:31:00 +00:00
|
|
|
</ValuePair>
|
2020-08-31 15:43:44 +00:00
|
|
|
<ValuePair v-if="trade.close_profit" description="Close % profit">
|
2020-09-01 05:51:03 +00:00
|
|
|
{{ formatPercent(trade.close_profit) }} | {{ trade.close_profit_abs }}
|
2020-08-29 15:39:41 +00:00
|
|
|
</ValuePair>
|
2020-09-01 05:51:03 +00:00
|
|
|
<ValuePair v-if="trade.close_profit_abs" description="Close profit"> </ValuePair>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-7">
|
|
|
|
<h5 class="detail-header">Stoploss</h5>
|
2020-08-19 05:31:00 +00:00
|
|
|
<ValuePair description="Stoploss">
|
|
|
|
{{ formatPercent(trade.stop_loss_pct / 100) }} |
|
2020-09-01 05:55:52 +00:00
|
|
|
{{ formatPrice(trade.stop_loss_abs) }}
|
2020-08-19 05:31:00 +00:00
|
|
|
</ValuePair>
|
|
|
|
<ValuePair description="Initial Stoploss">
|
|
|
|
{{ formatPercent(trade.initial_stop_loss_pct / 100) }} |
|
|
|
|
{{ formatPrice(trade.initial_stop_loss) }}
|
|
|
|
</ValuePair>
|
2020-08-29 09:18:43 +00:00
|
|
|
<ValuePair v-if="trade.is_open" description="Current stoploss dist">
|
2020-08-19 05:31:00 +00:00
|
|
|
{{ formatPercent(trade.stoploss_current_dist_ratio) }} |
|
|
|
|
{{ formatPrice(trade.stoploss_current_dist) }}
|
|
|
|
</ValuePair>
|
|
|
|
<ValuePair description="Stoploss last updated">
|
|
|
|
{{ timestampms(trade.stoploss_last_update_timestamp) }}
|
|
|
|
</ValuePair>
|
2020-09-01 05:51:03 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-19 05:31:00 +00:00
|
|
|
</div>
|
2020-06-02 11:05:16 +00:00
|
|
|
</template>
|
|
|
|
|
2020-08-09 13:07:09 +00:00
|
|
|
<script lang="ts">
|
2020-08-29 15:44:08 +00:00
|
|
|
import { Component, Vue, Prop } from 'vue-property-decorator';
|
2020-06-05 09:24:44 +00:00
|
|
|
import { formatPercent, formatPrice, timestampms } from '@/shared/formatters';
|
2020-06-05 17:34:50 +00:00
|
|
|
import ValuePair from '@/components/ftbot/ValuePair.vue';
|
2020-08-29 15:44:08 +00:00
|
|
|
import { Trade } from '@/types';
|
2020-06-02 11:05:16 +00:00
|
|
|
|
2020-08-29 15:44:08 +00:00
|
|
|
@Component({
|
2020-06-05 17:34:50 +00:00
|
|
|
components: { ValuePair },
|
2020-08-29 15:44:08 +00:00
|
|
|
})
|
|
|
|
export default class TradeDetail extends Vue {
|
|
|
|
@Prop({ type: Object, required: true }) trade!: Trade;
|
|
|
|
|
|
|
|
timestampms = timestampms;
|
|
|
|
|
|
|
|
formatPercent = formatPercent;
|
|
|
|
|
|
|
|
formatPrice = formatPrice;
|
|
|
|
}
|
2020-06-02 11:05:16 +00:00
|
|
|
</script>
|
2020-08-19 05:31:00 +00:00
|
|
|
<style scoped>
|
|
|
|
.detail-header {
|
|
|
|
border-bottom: 1px solid;
|
|
|
|
padding-bottom: 5px;
|
|
|
|
width: 100%;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
</style>
|