mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-13 11:43:52 +00:00
25 lines
535 B
Vue
25 lines
535 B
Vue
|
<template>
|
||
|
<span>{{ isProfitable ? '🔴' : '🟢' }}</span>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { Component, Vue, Prop } from 'vue-property-decorator';
|
||
|
import { Trade } from '@/types';
|
||
|
|
||
|
//
|
||
|
|
||
|
@Component({})
|
||
|
export default class ProfitSymbol extends Vue {
|
||
|
@Prop({ required: true }) trade!: Trade;
|
||
|
|
||
|
get isProfitable() {
|
||
|
console.log(this.trade);
|
||
|
const res = (this.trade.close_profit ?? 1) < 0 || (this.trade.current_profit ?? 1) < 0;
|
||
|
console.log(res);
|
||
|
return res;
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped></style>
|