mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Add absolute profit for PerformanceReport
This commit is contained in:
parent
cda58dff6e
commit
d1c66b633b
|
@ -10,7 +10,8 @@
|
|||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { namespace } from 'vuex-class';
|
||||
import { PerformanceEntry } from '@/types';
|
||||
import { BotState, PerformanceEntry } from '@/types';
|
||||
import { formatPrice } from '@/shared/formatters';
|
||||
|
||||
const ftbot = namespace('ftbot');
|
||||
|
||||
|
@ -18,10 +19,19 @@ const ftbot = namespace('ftbot');
|
|||
export default class Performance extends Vue {
|
||||
@ftbot.State performanceStats!: PerformanceEntry[];
|
||||
|
||||
private tableFields = [
|
||||
@ftbot.State botState?: BotState;
|
||||
|
||||
get tableFields() {
|
||||
return [
|
||||
{ key: 'pair', label: 'Pair' },
|
||||
{ key: 'profit', label: 'Profit' },
|
||||
{ key: 'profit', label: 'Profit %' },
|
||||
{
|
||||
key: 'profit_abs',
|
||||
label: `Profit ${this.botState?.stake_currency}`,
|
||||
formatter: (v: number) => formatPrice(v, 5),
|
||||
},
|
||||
{ key: 'count', label: 'Count' },
|
||||
];
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -7,6 +7,8 @@ export interface PerformanceEntry {
|
|||
count: number;
|
||||
pair: string;
|
||||
profit: number;
|
||||
// TODO: profit_abs is mandatory after 2021.5
|
||||
profit_abs?: number;
|
||||
}
|
||||
|
||||
export interface Logs {
|
||||
|
|
Loading…
Reference in New Issue
Block a user