mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Extract backtestResultEntry
This commit is contained in:
parent
85f137c179
commit
1d20828f83
|
@ -11,18 +11,7 @@
|
||||||
@click="setBacktestResult(key)"
|
@click="setBacktestResult(key)"
|
||||||
>
|
>
|
||||||
<template v-if="!result.metadata.editing">
|
<template v-if="!result.metadata.editing">
|
||||||
<div class="d-flex flex-column me-2 text-start">
|
<BacktestResultSelectEntry :backtest-result="result" />
|
||||||
<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>
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<b-button
|
<b-button
|
||||||
v-if="canUseModify"
|
v-if="canUseModify"
|
||||||
|
@ -59,6 +48,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { formatPercent } from '@/shared/formatters';
|
import { formatPercent } from '@/shared/formatters';
|
||||||
import { BacktestResultInMemory, BacktestResultUpdate } from '@/types';
|
import { BacktestResultInMemory, BacktestResultUpdate } from '@/types';
|
||||||
|
import BacktestResultSelectEntry from '@/components/ftbot/BacktestResultSelectEntry.vue';
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
backtestHistory: {
|
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