mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-14 04:03:51 +00:00
Fix indexer error
This commit is contained in:
parent
4d3ad448c3
commit
6e9ae9b2f8
|
@ -38,8 +38,6 @@ export default class CumProfitChart extends Vue {
|
||||||
|
|
||||||
get cumulativeData() {
|
get cumulativeData() {
|
||||||
const res: CumProfitData[] = [];
|
const res: CumProfitData[] = [];
|
||||||
// const closedTrades = [...this.trades]; // .filter((t) => t.close_timestamp);
|
|
||||||
|
|
||||||
const closedTrades = this.trades
|
const closedTrades = this.trades
|
||||||
.slice()
|
.slice()
|
||||||
.sort((a, b) => (a.close_timestamp > b.close_timestamp ? 1 : -1));
|
.sort((a, b) => (a.close_timestamp > b.close_timestamp ? 1 : -1));
|
||||||
|
@ -48,7 +46,7 @@ export default class CumProfitChart extends Vue {
|
||||||
const trade = closedTrades[i];
|
const trade = closedTrades[i];
|
||||||
if (trade.close_timestamp && trade[this.profitColumn]) {
|
if (trade.close_timestamp && trade[this.profitColumn]) {
|
||||||
profit += trade[this.profitColumn];
|
profit += trade[this.profitColumn];
|
||||||
res.push({ date: trade.close_timestamp, profit, raising: trade[this.profitColumn] > 0 });
|
res.push({ date: trade.close_timestamp, profit });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
export interface CumProfitData {
|
export interface CumProfitData {
|
||||||
date: number;
|
[date: string]: number;
|
||||||
profit: number;
|
profit: number;
|
||||||
raising: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user