diff --git a/src/components/charts/HourlyChart.vue b/src/components/charts/HourlyChart.vue
index 1fa5b0dc..9feb0070 100644
--- a/src/components/charts/HourlyChart.vue
+++ b/src/components/charts/HourlyChart.vue
@@ -44,7 +44,7 @@ export default class HourlyChart extends Vue {
if (trade.close_timestamp) {
const hour = timestampHour(trade.close_timestamp);
- res[hour].profit += trade.close_profit;
+ res[hour].profit += trade.profit_ratio;
res[hour].count += 1;
}
}
diff --git a/src/components/ftbot/PairSummary.vue b/src/components/ftbot/PairSummary.vue
index b9dd616a..08987fb6 100644
--- a/src/components/ftbot/PairSummary.vue
+++ b/src/components/ftbot/PairSummary.vue
@@ -14,15 +14,11 @@
🔒
{{
- comb.trade && comb.trade.current_profit ? formatPercent(comb.trade.current_profit) : ''
+ comb.trade && comb.trade.profit_ratio ? formatPercent(comb.trade.profit_ratio) : ''
}}
@@ -77,8 +73,8 @@ export default class PairSummary extends Vue {
lockReason = `${timestampms(locks.lock_end_timestamp)} - ${locks.reason}`;
}
let profitString = '';
- if (trade && trade.current_profit) {
- profitString = `Current profit: ${formatPercent(trade.current_profit)}
+ if (trade && trade.profit_ratio) {
+ profitString = `Current profit: ${formatPercent(trade.profit_ratio)}
Open since: ${timestampms(trade.open_timestamp)}`;
}
comb.push({ pair, trade, locks, lockReason, profitString });
diff --git a/src/components/ftbot/ProfitSymbol.vue b/src/components/ftbot/ProfitSymbol.vue
index 3bed069d..31516d89 100644
--- a/src/components/ftbot/ProfitSymbol.vue
+++ b/src/components/ftbot/ProfitSymbol.vue
@@ -13,7 +13,7 @@ export default class ProfitSymbol extends Vue {
@Prop({ required: true }) trade!: Trade;
get isProfitable() {
- const res = (this.trade.close_profit ?? 0) > 0 || (this.trade.current_profit ?? 0) > 0;
+ const res = (this.trade.profit_ratio ?? 0) > 0;
return res;
}
}
diff --git a/src/types/trades.ts b/src/types/trades.ts
index 437bb8a3..e1e9688d 100644
--- a/src/types/trades.ts
+++ b/src/types/trades.ts
@@ -16,8 +16,6 @@ export interface Trade {
close_date?: string;
close_timestamp?: number;
close_rate?: number;
- close_profit?: number;
- close_profit_abs?: number;
fee_close?: number;
fee_close_cost?: number;
fee_close_currency?: string;
@@ -29,12 +27,6 @@ export interface Trade {
profit_pct: number;
/** Current absolute profit */
profit_abs: number;
- /** Deprecated */
- current_profit?: number;
- /** Deprecated */
- current_profit_abs?: number;
- /** Deprecated */
- current_profit_pct?: number;
sell_reason?: string;
min_rate?: number;
@@ -64,10 +56,7 @@ export interface ClosedTrade extends Trade {
close_date: string;
close_timestamp: number;
close_rate: number;
- /** Deprecated */
- close_profit: number;
- /** Deprecated */
- close_profit_abs: number;
+
fee_close: number;
fee_close_cost?: number;
fee_close_currency?: string;
diff --git a/tests/unit/ProfitSymbol.spec.ts b/tests/unit/ProfitSymbol.spec.ts
index 6129b42b..854de718 100644
--- a/tests/unit/ProfitSymbol.spec.ts
+++ b/tests/unit/ProfitSymbol.spec.ts
@@ -11,8 +11,6 @@ describe('ProfitSymbol.vue', () => {
});
it('calculates isProfitable with negative profit', () => {
const trade = {
- close_profit: -0.5,
- current_profit: -0.5,
profit_ratio: -0.5,
};
cmp.setProps({ trade });
@@ -32,8 +30,6 @@ describe('ProfitSymbol.vue', () => {
it('renders triangle down when profit is negative', async () => {
const trade = {
- close_profit: -0.5,
- current_profit: -0.5,
profit_ratio: -0.5,
};
cmp.setProps({ trade });
@@ -44,8 +40,6 @@ describe('ProfitSymbol.vue', () => {
it('renders triangle up when profit is positive', async () => {
const trade = {
- close_profit: 0.5,
- current_profit: 0.5,
profit_ratio: 0.5,
};
cmp.setProps({ trade });