From 5102e4774d92e6f128422e181a26d1ef6aa4886b Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 30 Mar 2024 12:05:30 +0100 Subject: [PATCH] Add enter tag breakdown to backtest output --- .../ftbot/BacktestResultAnalysis.vue | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/components/ftbot/BacktestResultAnalysis.vue b/src/components/ftbot/BacktestResultAnalysis.vue index 008542b0..bb94554c 100644 --- a/src/components/ftbot/BacktestResultAnalysis.vue +++ b/src/components/ftbot/BacktestResultAnalysis.vue @@ -24,6 +24,10 @@ + + + + @@ -81,6 +85,10 @@ const exitReasonSummary = computed( props.backtestResult.sell_reason_summary) as unknown as TableItem[], ); +const enterTagSummary = computed( + () => props.backtestResult.results_per_enter_tag as unknown as TableItem[], +); + const perPairFields = computed(() => { return [ { key: 'key', label: 'Pair' }, @@ -132,6 +140,31 @@ const perExitReason = computed(() => { { key: 'losses', label: 'Losses' }, ]; }); +const perTagReason = computed(() => { + return [ + { key: 'key', label: 'Tag', formatter: (value) => value || 'OTHER' }, + { key: 'trades', label: 'Buys' }, + { + key: 'profit_mean', + label: 'Avg Profit %', + formatter: (value) => formatPercent(value, 2), + }, + { + key: 'profit_total_abs', + label: `Tot Profit ${props.backtestResult.stake_currency}`, + + formatter: (value) => formatPrice(value, props.backtestResult.stake_currency_decimals), + }, + { + key: 'profit_total', + label: 'Tot Profit %', + formatter: (value) => formatPercent(value, 2), + }, + { key: 'wins', label: 'Wins' }, + { key: 'draws', label: 'Draws' }, + { key: 'losses', label: 'Losses' }, + ]; +}); const backtestResultFields: TableField[] = [ { key: 'metric', label: 'Metric' }, { key: 'value', label: 'Value' },