diff --git a/src/components/ftbot/BacktestResultView.vue b/src/components/ftbot/BacktestResultView.vue index a1fd7d96..774d0f5a 100644 --- a/src/components/ftbot/BacktestResultView.vue +++ b/src/components/ftbot/BacktestResultView.vue @@ -30,7 +30,7 @@ hover stacked="sm" :items="backtestResult.sell_reason_summary" - :fields="perSellReason" + :fields="perExitReason" > @@ -228,9 +228,18 @@ export default class BacktestResultView extends Vue { }, { setting: 'Custom Stoploss', value: this.backtestResult.use_custom_stoploss }, { setting: 'ROI', value: this.backtestResult.minimal_roi }, - { setting: 'Use Sell Signal', value: this.backtestResult.use_sell_signal }, - { setting: 'Sell profit only', value: this.backtestResult.sell_profit_only }, - { setting: 'Sell profit offset', value: this.backtestResult.sell_profit_offset }, + { + setting: 'Use Exit Signal', + value: this.backtestResult.use_exit_signal || this.backtestResult.use_sell_signal, + }, + { + setting: 'Exit profit only', + value: this.backtestResult.exit_profit_only || this.backtestResult.sell_profit_only, + }, + { + setting: 'Exit profit offset', + value: this.backtestResult.exit_profit_offset || this.backtestResult.sell_profit_offset, + }, { setting: 'Enable protections', value: this.backtestResult.enable_protections }, { setting: 'Starting balance', @@ -274,7 +283,7 @@ export default class BacktestResultView extends Vue { ]; } - get perSellReason() { + get perExitReason() { return [ { key: 'sell_reason', label: 'Exit Reason' }, { key: 'trades', label: 'Buys' }, diff --git a/src/types/backtest.ts b/src/types/backtest.ts index 578c29e1..a1e0da6d 100644 --- a/src/types/backtest.ts +++ b/src/types/backtest.ts @@ -93,9 +93,13 @@ export interface StrategyBacktestResult { trailing_only_offset_is_reached: boolean; use_custom_stoploss: boolean; minimal_roi: Record; - use_sell_signal: boolean; - sell_profit_only: boolean; - sell_profit_offset: number; + + use_sell_signal?: boolean; // Deprecated + sell_profit_only?: boolean; // Deprecated + sell_profit_offset?: number; // Deprecated + use_exit_signal?: boolean; + exit_profit_only?: boolean; + exit_profit_offset?: number; rejected_signals: number; // Daily stats ... diff --git a/src/types/trades.ts b/src/types/trades.ts index 3ec6282b..ffe6323f 100644 --- a/src/types/trades.ts +++ b/src/types/trades.ts @@ -71,7 +71,9 @@ export interface Trade { /** Current absolute profit */ profit_abs: number; - sell_reason?: string; + sell_reason?: string; // Deprecated, replaced by exit reason + exit_reason?: string; + exit_order_status?: string; min_rate?: number; max_rate?: number;