mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 21:15:15 +00:00
Extract backtestResultEntry
This commit is contained in:
parent
85f137c179
commit
1d20828f83
|
@ -11,18 +11,7 @@
|
|||
@click="setBacktestResult(key)"
|
||||
>
|
||||
<template v-if="!result.metadata.editing">
|
||||
<div class="d-flex flex-column me-2 text-start">
|
||||
<div class="fw-bold">
|
||||
{{ result.metadata.strategyName }} - {{ result.strategy.timeframe }}
|
||||
</div>
|
||||
<div class="text-small">
|
||||
TradeCount: {{ result.strategy.total_trades }} - Profit:
|
||||
{{ formatPercent(result.strategy.profit_total) }}
|
||||
</div>
|
||||
<div v-if="canUseModify" class="text-small" style="white-space: pre-wrap">
|
||||
{{ result.metadata.notes }}
|
||||
</div>
|
||||
</div>
|
||||
<BacktestResultSelectEntry :backtest-result="result" />
|
||||
<div class="d-flex">
|
||||
<b-button
|
||||
v-if="canUseModify"
|
||||
|
@ -59,6 +48,7 @@
|
|||
<script setup lang="ts">
|
||||
import { formatPercent } from '@/shared/formatters';
|
||||
import { BacktestResultInMemory, BacktestResultUpdate } from '@/types';
|
||||
import BacktestResultSelectEntry from '@/components/ftbot/BacktestResultSelectEntry.vue';
|
||||
|
||||
defineProps({
|
||||
backtestHistory: {
|
||||
|
|
30
src/components/ftbot/BacktestResultSelectEntry.vue
Normal file
30
src/components/ftbot/BacktestResultSelectEntry.vue
Normal file
|
@ -0,0 +1,30 @@
|
|||
<template>
|
||||
<div class="d-flex flex-column me-2 text-start">
|
||||
<div class="fw-bold">
|
||||
{{ backtestResult.metadata.strategyName }} - {{ backtestResult.strategy.timeframe }}
|
||||
</div>
|
||||
<div class="text-small">
|
||||
TradeCount: {{ backtestResult.strategy.total_trades }} - Profit:
|
||||
{{ formatPercent(backtestResult.strategy.profit_total) }}
|
||||
</div>
|
||||
<div v-if="canUseModify" class="text-small" style="white-space: pre-wrap">
|
||||
{{ backtestResult.metadata.notes }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { formatPercent } from '@/shared/formatters';
|
||||
import { BacktestResultInMemory } from '@/types';
|
||||
|
||||
defineProps({
|
||||
backtestResult: {
|
||||
required: true,
|
||||
type: Object as () => BacktestResultInMemory,
|
||||
},
|
||||
selectedBacktestResultKey: { required: false, default: '', type: String },
|
||||
canUseModify: { required: false, default: false, type: Boolean },
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
Loading…
Reference in New Issue
Block a user