mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Sort by close_date, then by trade_id
This commit is contained in:
parent
9765f25f55
commit
af2825738d
|
@ -82,7 +82,14 @@ export default {
|
|||
},
|
||||
[BotStoreGetters.closedTrades](state: FtbotStateType) {
|
||||
// Sort by trade_id desc
|
||||
return state.trades.filter((item) => !item.is_open).sort((a, b) => b.trade_id - a.trade_id);
|
||||
return state.trades
|
||||
.filter((item) => !item.is_open)
|
||||
.sort((a, b) =>
|
||||
// Sort by close timestamp, then by tradeid
|
||||
b.close_timestamp && a.close_timestamp
|
||||
? b.close_timestamp - a.close_timestamp
|
||||
: b.trade_id - a.trade_id,
|
||||
);
|
||||
},
|
||||
[BotStoreGetters.timeframe](state: FtbotStateType): string {
|
||||
return state.botState?.timeframe || '';
|
||||
|
|
Loading…
Reference in New Issue
Block a user