removed short_trades, updated schema, tests
This commit is contained in:
@@ -95,7 +95,6 @@ class Profit(BaseModel):
|
||||
avg_duration: str
|
||||
best_pair: str
|
||||
best_rate: float
|
||||
short_trades: int
|
||||
winning_trades: int
|
||||
losing_trades: int
|
||||
|
||||
|
@@ -358,7 +358,6 @@ class RPC:
|
||||
durations = []
|
||||
winning_trades = 0
|
||||
losing_trades = 0
|
||||
short_trades = 0
|
||||
|
||||
for trade in trades:
|
||||
current_rate: float = 0.0
|
||||
@@ -391,9 +390,6 @@ class RPC:
|
||||
)
|
||||
profit_all_ratio.append(profit_ratio)
|
||||
|
||||
if trade.is_short:
|
||||
short_trades += 1
|
||||
|
||||
best_pair = Trade.get_best_pair(start_date)
|
||||
|
||||
# Prepare data to display
|
||||
@@ -453,7 +449,6 @@ class RPC:
|
||||
'avg_duration': str(timedelta(seconds=sum(durations) / num)).split('.')[0],
|
||||
'best_pair': best_pair[0] if best_pair else '',
|
||||
'best_rate': round(best_pair[1] * 100, 2) if best_pair else 0,
|
||||
'short_trades': short_trades,
|
||||
'winning_trades': winning_trades,
|
||||
'losing_trades': losing_trades,
|
||||
}
|
||||
|
Reference in New Issue
Block a user