fix remaining amount check
This commit is contained in:
parent
a77e3ea378
commit
e3a57ec3be
3
.gitignore
vendored
3
.gitignore
vendored
@ -15,6 +15,9 @@ freqtrade/rpc/api_server/ui/*
|
||||
# Macos related
|
||||
.DS_Store
|
||||
|
||||
# git files after merging
|
||||
*.orig
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
@ -549,7 +549,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
# We should decrease our position
|
||||
# Strategy should return value as Decimal for accuracy.
|
||||
amount = abs(float(Decimal(stake_amount) / Decimal(current_exit_rate)))
|
||||
if trade.amount - amount < min_exit_stake:
|
||||
if (trade.amount - amount) * current_exit_rate < min_exit_stake:
|
||||
logger.info('Remaining amount would be too small')
|
||||
return
|
||||
if amount > trade.amount:
|
||||
|
Loading…
Reference in New Issue
Block a user