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