more flake8 complaints

This commit is contained in:
Jean-Baptiste LE STANG 2017-12-30 00:25:23 +01:00
parent 585681c8ae
commit 50089b7f01

View File

@ -76,11 +76,9 @@ def _process(dynamic_whitelist: Optional[int] = 0) -> bool:
stake_amount = float(_CONF['stake_amount'])
if _CONF.get('experimental', {}).get('auto_stake_amount', False):
# Numbers of trading slots available
nb_trades_left = float(_CONF['max_open_trades'] - len (trades))
print("nb_trades_left "+str(nb_trades_left))
# Stake_amount in the conf is being used as the max value authorized
nb_trades_left = float(_CONF['max_open_trades'] - len(trades))
# Stake_amount in the conf is being used as the max value authorized
stake_amount = min(_CONF['stake_amount'], balance / nb_trades_left)
print("stake amount "+str(_CONF['stake_amount'])+" "+str(balance))
# Create entity and execute trade
state_changed = create_trade(stake_amount, balance)
if not state_changed: