Remove unnecessary check and condition
This commit is contained in:
parent
1ffee96bad
commit
01a68e1060
@ -828,14 +828,6 @@ class LocalTrade():
|
|||||||
return float(f"{profit_ratio:.8f}")
|
return float(f"{profit_ratio:.8f}")
|
||||||
|
|
||||||
def recalc_trade_from_orders(self):
|
def recalc_trade_from_orders(self):
|
||||||
# We need at least 2 entry orders for averaging amounts and rates.
|
|
||||||
# TODO: this condition could probably be removed
|
|
||||||
if len(self.select_filled_orders(self.entry_side)) < 2:
|
|
||||||
self.stake_amount = self.amount * self.open_rate / self.leverage
|
|
||||||
|
|
||||||
# Just in case, still recalc open trade value
|
|
||||||
self.recalc_open_trade_value()
|
|
||||||
return
|
|
||||||
|
|
||||||
total_amount = 0.0
|
total_amount = 0.0
|
||||||
total_stake = 0.0
|
total_stake = 0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user