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">
|
<script lang="ts">
|
||||||
import { Component, Vue } from 'vue-property-decorator';
|
import { Component, Vue } from 'vue-property-decorator';
|
||||||
import { namespace } from 'vuex-class';
|
import { namespace } from 'vuex-class';
|
||||||
import { PerformanceEntry } from '@/types';
|
import { BotState, PerformanceEntry } from '@/types';
|
||||||
|
import { formatPrice } from '@/shared/formatters';
|
||||||
|
|
||||||
const ftbot = namespace('ftbot');
|
const ftbot = namespace('ftbot');
|
||||||
|
|
||||||
|
@ -18,10 +19,19 @@ const ftbot = namespace('ftbot');
|
||||||
export default class Performance extends Vue {
|
export default class Performance extends Vue {
|
||||||
@ftbot.State performanceStats!: PerformanceEntry[];
|
@ftbot.State performanceStats!: PerformanceEntry[];
|
||||||
|
|
||||||
private tableFields = [
|
@ftbot.State botState?: BotState;
|
||||||
{ key: 'pair', label: 'Pair' },
|
|
||||||
{ key: 'profit', label: 'Profit' },
|
get tableFields() {
|
||||||
{ key: 'count', label: 'Count' },
|
return [
|
||||||
];
|
{ key: 'pair', label: 'Pair' },
|
||||||
|
{ key: 'profit', label: 'Profit %' },
|
||||||
|
{
|
||||||
|
key: 'profit_abs',
|
||||||
|
label: `Profit ${this.botState?.stake_currency}`,
|
||||||
|
formatter: (v: number) => formatPrice(v, 5),
|
||||||
|
},
|
||||||
|
{ key: 'count', label: 'Count' },
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -7,6 +7,8 @@ export interface PerformanceEntry {
|
||||||
count: number;
|
count: number;
|
||||||
pair: string;
|
pair: string;
|
||||||
profit: number;
|
profit: number;
|
||||||
|
// TODO: profit_abs is mandatory after 2021.5
|
||||||
|
profit_abs?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Logs {
|
export interface Logs {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user