Small stylistic fixes
This commit is contained in:
parent
6018a05343
commit
b2e9295d7f
@ -274,7 +274,6 @@ class Backtesting:
|
||||
return None
|
||||
min_stake_amount = self.exchange.get_min_pair_stake_amount(pair, row[OPEN_IDX], -0.05)
|
||||
if stake_amount and (not min_stake_amount or stake_amount > min_stake_amount):
|
||||
# print(f"{pair}, {stake_amount}")
|
||||
# Enter trade
|
||||
trade = LocalTrade(
|
||||
pair=pair,
|
||||
|
@ -652,9 +652,8 @@ class LocalTrade():
|
||||
in stake currency
|
||||
"""
|
||||
if Trade.use_db:
|
||||
total_open_stake_amount = Trade.session.query(func.sum(Trade.stake_amount))\
|
||||
.filter(Trade.is_open.is_(True))\
|
||||
.scalar()
|
||||
total_open_stake_amount = Trade.session.query(
|
||||
func.sum(Trade.stake_amount)).filter(Trade.is_open.is_(True)).scalar()
|
||||
else:
|
||||
total_open_stake_amount = sum(
|
||||
t.stake_amount for t in Trade.get_trades_proxy(is_open=True))
|
||||
@ -719,6 +718,8 @@ class Trade(_DECL_BASE, LocalTrade):
|
||||
"""
|
||||
Trade database model.
|
||||
Also handles updating and querying trades
|
||||
|
||||
Note: Fields must be aligned with LocalTrade class
|
||||
"""
|
||||
__tablename__ = 'trades'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user