mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2026-01-07 07:24:25 +01:00
(fix) correct accuracy
This commit is contained in:
@@ -246,8 +246,8 @@ class SingleMarketStrategyData:
|
||||
|
||||
@property
|
||||
def accuracy(self):
|
||||
total_wins = len(self.trade_fill["net_realized_pnl"] >= 0)
|
||||
total_losses = len(self.trade_fill["net_realized_pnl"] < 0)
|
||||
total_wins = (self.trade_fill["net_realized_pnl"] >= 0).sum()
|
||||
total_losses = (self.trade_fill["net_realized_pnl"] < 0).sum()
|
||||
return total_wins / (total_wins + total_losses)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user