Update types for Exit renaming

This commit is contained in:
Matthias 2022-04-06 20:38:38 +02:00
parent e8d334ceb1
commit 173896137b
3 changed files with 24 additions and 9 deletions

View File

@ -30,7 +30,7 @@
hover
stacked="sm"
:items="backtestResult.sell_reason_summary"
:fields="perSellReason"
:fields="perExitReason"
>
</b-table>
</b-card>
@ -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' },

View File

@ -93,9 +93,13 @@ export interface StrategyBacktestResult {
trailing_only_offset_is_reached: boolean;
use_custom_stoploss: boolean;
minimal_roi: Record<string, number>;
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 ...

View File

@ -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;