mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-12 19:23:55 +00:00
move default amount_reserve_percent value into constants
This commit is contained in:
parent
6d7834a389
commit
f9d68d919c
|
@ -13,6 +13,7 @@ DEFAULT_HYPEROPT = 'DefaultHyperOpts'
|
||||||
DEFAULT_DB_PROD_URL = 'sqlite:///tradesv3.sqlite'
|
DEFAULT_DB_PROD_URL = 'sqlite:///tradesv3.sqlite'
|
||||||
DEFAULT_DB_DRYRUN_URL = 'sqlite://'
|
DEFAULT_DB_DRYRUN_URL = 'sqlite://'
|
||||||
UNLIMITED_STAKE_AMOUNT = 'unlimited'
|
UNLIMITED_STAKE_AMOUNT = 'unlimited'
|
||||||
|
DEFAULT_AMOUNT_RESERVE_PERCENT = 0.05
|
||||||
REQUIRED_ORDERTIF = ['buy', 'sell']
|
REQUIRED_ORDERTIF = ['buy', 'sell']
|
||||||
REQUIRED_ORDERTYPES = ['buy', 'sell', 'stoploss', 'stoploss_on_exchange']
|
REQUIRED_ORDERTYPES = ['buy', 'sell', 'stoploss', 'stoploss_on_exchange']
|
||||||
ORDERTYPE_POSSIBILITIES = ['limit', 'market']
|
ORDERTYPE_POSSIBILITIES = ['limit', 'market']
|
||||||
|
|
|
@ -291,7 +291,8 @@ class FreqtradeBot(object):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# reserve some percent defined in config (5% default) + stoploss
|
# reserve some percent defined in config (5% default) + stoploss
|
||||||
amount_reserve_percent = 1.0 - self.config.get('amount_reserve_percent', 0.05)
|
amount_reserve_percent = 1.0 - self.config.get('amount_reserve_percent',
|
||||||
|
constants.DEFAULT_AMOUNT_RESERVE_PERCENT)
|
||||||
if self.strategy.stoploss is not None:
|
if self.strategy.stoploss is not None:
|
||||||
amount_reserve_percent += self.strategy.stoploss
|
amount_reserve_percent += self.strategy.stoploss
|
||||||
# it should not be more than 50%
|
# it should not be more than 50%
|
||||||
|
|
Loading…
Reference in New Issue
Block a user