mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-22 11:05:17 +00:00
Add daily % metric to daily stats
This commit is contained in:
parent
d7896604d8
commit
f83524a8ba
|
@ -22,7 +22,7 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent, computed, onMounted } from '@vue/composition-api';
|
||||
import DailyChart from '@/components/charts/DailyChart.vue';
|
||||
import { formatPrice } from '@/shared/formatters';
|
||||
import { formatPercent, formatPrice } from '@/shared/formatters';
|
||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -42,6 +42,9 @@ export default defineComponent({
|
|||
formatter: (value) => formatPrice(value, 2),
|
||||
},
|
||||
{ key: 'trade_count', label: 'Trades' },
|
||||
botStore.activeBot.botApiVersion >= 2.16
|
||||
? { key: 'rel_profit', label: 'Profit%', formatter: (value) => formatPercent(value, 2) }
|
||||
: null,
|
||||
];
|
||||
});
|
||||
onMounted(() => {
|
||||
|
|
|
@ -4,9 +4,12 @@ export interface DailyPayload {
|
|||
|
||||
export interface DailyRecord {
|
||||
/** Date in the format yyyy-mm-dd */
|
||||
[key: string]: string | number;
|
||||
[key: string]: string | number | undefined;
|
||||
date: string;
|
||||
abs_profit: number;
|
||||
/** added in 2.16*/
|
||||
rel_profit?: number;
|
||||
starting_balance_profit?: number;
|
||||
fiat_value: number;
|
||||
trade_count: number;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user