Fix dashboard profit calculation

closes #565
This commit is contained in:
Matthias 2021-11-04 20:34:16 +01:00
parent 4853e19899
commit 8f1e6f874a
2 changed files with 13 additions and 1 deletions

View File

@ -93,7 +93,7 @@ export default class BotComparisonList extends Vue {
botId: this.allAvailableBots[k].botName,
trades: `${this.allOpenTradeCount[k]} / ${this.allBotState[k]?.max_open_trades || 'N/A'}`,
profitClosed: v.profit_closed_coin,
profitClosedRatio: v.profit_closed_ratio_sum || 0,
profitClosedRatio: v.profit_closed_ratio || 0,
stakeCurrency: this.allBotState[k]?.stake_currency || '',
profitOpenRatio,
profitOpen,

View File

@ -2,14 +2,26 @@ export interface ProfitInterface {
profit_closed_coin: number;
profit_closed_percent_mean: number;
profit_closed_ratio_mean: number;
/** Deprecated, (wrong calculation) do not use */
profit_closed_percent_sum: number;
/** Deprecated, (wrong calculation) do not use */
profit_closed_ratio_sum: number;
profit_closed_fiat: number;
/** Closed profit ratio - calculated against starting balance */
profit_closed_ratio: number;
/** Closed profit percent - calculated against starting balance */
profit_closed_percent: number;
profit_all_coin: number;
profit_all_percent_mean: number;
profit_all_ratio_mean: number;
/** Deprecated, (wrong calculation) do not use */
profit_all_percent_sum: number;
/** Deprecated, (wrong calculation) do not use */
profit_all_ratio_sum: number;
/** all profit ratio - calculated against starting balance */
profit_all_ratio: number;
/** all profit percent - calculated against starting balance */
profit_all_percent: number;
profit_all_fiat: number;
trade_count: number;
closed_trade_count: number;