diff --git a/src/components/ftbot/BacktestResultView.vue b/src/components/ftbot/BacktestResultView.vue
index 909b88a0..9be9e6dc 100644
--- a/src/components/ftbot/BacktestResultView.vue
+++ b/src/components/ftbot/BacktestResultView.vue
@@ -4,11 +4,25 @@
BacktestResult for {{ strategy }}
-
Backtest days {{ backtestResult.backtest_days }}
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
@@ -18,7 +32,7 @@ import TradeList from '@/components/ftbot/TradeList.vue';
import { Component, Vue, Prop } from 'vue-property-decorator';
import { StrategyBacktestResult } from '@/types';
-import { timestampms } from '@/shared/formatters';
+import { timestampms, formatPercent } from '@/shared/formatters';
@Component({
components: { TradeList },
@@ -52,6 +66,43 @@ export default class BacktestResultView extends Vue {
];
}
+ get perPairFields() {
+ return [
+ { key: 'key', label: 'Pair' },
+ { key: 'trades', label: 'Buys' },
+ { key: 'profit_mean', label: 'Avg Profit %', formatter: (value) => formatPercent(value, 2) },
+ { key: 'profit_sum', label: 'Cum Profit %', formatter: (value) => formatPercent(value, 2) },
+ { key: 'profit_total_abs', label: `Tot Profit ${this.backtestResult.stake_currency}` },
+ {
+ key: 'profit_total_pct',
+ label: 'Tot Profit %',
+ formatter: (value) => formatPercent(value, 2),
+ },
+ { key: 'duration_avg', label: 'Avg Duration' },
+ { key: 'wins', label: 'Wins' },
+ { key: 'draws', label: 'Draws' },
+ { key: 'losses', label: 'Losses' },
+ ];
+ }
+
+ get perSellReason() {
+ return [
+ { key: 'sell_reason', label: 'Sell Reason' },
+ { key: 'trades', label: 'Buys' },
+ { key: 'profit_mean', label: 'Avg Profit %', formatter: (value) => formatPercent(value, 2) },
+ { key: 'profit_sum', label: 'Cum Profit %', formatter: (value) => formatPercent(value, 2) },
+ { key: 'profit_total_abs', label: `Tot Profit ${this.backtestResult.stake_currency}` },
+ {
+ key: 'profit_total_pct',
+ label: 'Tot Profit %',
+ formatter: (value) => formatPercent(value, 2),
+ },
+ { key: 'wins', label: 'Wins' },
+ { key: 'draws', label: 'Draws' },
+ { key: 'losses', label: 'Losses' },
+ ];
+ }
+
backtestResultFields: Array> = [
{ key: 'metric', label: 'Metric' },
{ key: 'value', label: 'Value' },
diff --git a/src/types/backtest.ts b/src/types/backtest.ts
index 2eb621ba..33847da5 100644
--- a/src/types/backtest.ts
+++ b/src/types/backtest.ts
@@ -16,6 +16,7 @@ export interface PairResults {
profit_sum_pct: number;
profit_total_abs: number;
profit_total_pct: number;
+ profit_total: number;
trades: number;
wins: number;
}
@@ -56,6 +57,8 @@ export interface StrategyBacktestResult {
results_per_pair: Array;
sell_reason_summary: Array;
stake_amount: number;
+ stake_currency: string;
+ max_open_trades: number;
total_trades: number;
trades_per_day: number;
winner_holding_avg: number;
diff --git a/src/views/Backtesting.vue b/src/views/Backtesting.vue
index eb9b37de..df02509a 100644
--- a/src/views/Backtesting.vue
+++ b/src/views/Backtesting.vue
@@ -1,7 +1,18 @@