Improve NAN Handling in RPC
This commit is contained in:
parent
de690b0a69
commit
cc885e25ac
@ -179,8 +179,10 @@ class RPC:
|
|||||||
else:
|
else:
|
||||||
current_rate = trade.close_rate
|
current_rate = trade.close_rate
|
||||||
if len(trade.select_filled_orders(trade.entry_side)) > 0:
|
if len(trade.select_filled_orders(trade.entry_side)) > 0:
|
||||||
current_profit = trade.calc_profit_ratio(current_rate)
|
current_profit = trade.calc_profit_ratio(
|
||||||
current_profit_abs = trade.calc_profit(current_rate)
|
current_rate) if not isnan(current_rate) else NAN
|
||||||
|
current_profit_abs = trade.calc_profit(
|
||||||
|
current_rate) if not isnan(current_rate) else NAN
|
||||||
current_profit_fiat: Optional[float] = None
|
current_profit_fiat: Optional[float] = None
|
||||||
# Calculate fiat profit
|
# Calculate fiat profit
|
||||||
if self._fiat_converter:
|
if self._fiat_converter:
|
||||||
|
Loading…
Reference in New Issue
Block a user