mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
parent
ad56392d97
commit
85a0531e00
|
@ -88,9 +88,14 @@ const tableItems = computed<TableItem[]>(() => {
|
||||||
Object.entries(botStore.allProfit).forEach(([k, v]: [k: string, v: ProfitInterface]) => {
|
Object.entries(botStore.allProfit).forEach(([k, v]: [k: string, v: ProfitInterface]) => {
|
||||||
const allStakes = botStore.allOpenTrades[k].reduce((a, b) => a + b.stake_amount, 0);
|
const allStakes = botStore.allOpenTrades[k].reduce((a, b) => a + b.stake_amount, 0);
|
||||||
const profitOpenRatio =
|
const profitOpenRatio =
|
||||||
botStore.allOpenTrades[k].reduce((a, b) => a + b.profit_ratio * b.stake_amount, 0) /
|
botStore.allOpenTrades[k].reduce(
|
||||||
allStakes;
|
(a, b) => a + (b.total_profit_ratio ?? b.profit_ratio) * b.stake_amount,
|
||||||
const profitOpen = botStore.allOpenTrades[k].reduce((a, b) => a + (b.profit_abs ?? 0), 0);
|
0,
|
||||||
|
) / allStakes;
|
||||||
|
const profitOpen = botStore.allOpenTrades[k].reduce(
|
||||||
|
(a, b) => a + (b.total_profit_abs ?? b.profit_abs ?? 0),
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
|
||||||
// TODO: handle one inactive bot ...
|
// TODO: handle one inactive bot ...
|
||||||
val.push({
|
val.push({
|
||||||
|
@ -111,7 +116,7 @@ const tableItems = computed<TableItem[]>(() => {
|
||||||
});
|
});
|
||||||
if (v.profit_closed_coin !== undefined) {
|
if (v.profit_closed_coin !== undefined) {
|
||||||
summary.profitClosed += v.profit_closed_coin;
|
summary.profitClosed += v.profit_closed_coin;
|
||||||
summary.profitOpen += v.profit_all_coin;
|
summary.profitOpen += profitOpen;
|
||||||
summary.wins += v.winning_trades;
|
summary.wins += v.winning_trades;
|
||||||
summary.losses += v.losing_trades;
|
summary.losses += v.losing_trades;
|
||||||
// summary.decimals = this.allBotState[k]?.stake_currency_decimals || summary.decimals;
|
// summary.decimals = this.allBotState[k]?.stake_currency_decimals || summary.decimals;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user