Show relative profit ratio for total / realized profits

This commit is contained in:
Matthias 2023-03-06 18:23:38 +01:00
parent 9ed40e99be
commit 90855b881f
2 changed files with 6 additions and 1 deletions

View File

@ -35,7 +35,9 @@ const profitRatio = computed<number | undefined>(() => {
case 'default':
return props.trade.profit_ratio;
case 'total':
return undefined;
return props.trade.total_profit_ratio;
case 'realized':
return props.trade.realized_profit_ratio;
default:
return undefined;
}

View File

@ -73,6 +73,8 @@ interface TradeBase {
profit_abs?: number;
/** Absolute, realized profit */
realized_profit?: number;
/** Relative, realized profit */
realized_profit_ratio?: number;
exit_reason?: string;
exit_order_status?: string;
@ -111,6 +113,7 @@ export interface Trade extends TradeBase {
total_profit_abs?: number;
total_profit_fiat?: number;
total_profit_ratio?: number;
}
export interface ClosedTrade extends TradeBase {