Add base_stake_amount_ratio config param to support unlimited stakes.
This commit is contained in:
@@ -184,6 +184,17 @@ class Wallets:
|
||||
return 0
|
||||
|
||||
possible_stake = (available_amount + val_tied_up) / self._config['max_open_trades']
|
||||
|
||||
# Position Adjustment dynamic base order size
|
||||
try:
|
||||
if self._config.get('position_adjustment_enable', False):
|
||||
base_stake_amount_ratio = self._config.get('base_stake_amount_ratio', 1.0)
|
||||
if base_stake_amount_ratio > 0.0:
|
||||
possible_stake = possible_stake * base_stake_amount_ratio
|
||||
except Exception as e:
|
||||
logger.warning("Invalid base_stake_amount_ratio", e)
|
||||
return 0
|
||||
|
||||
# Theoretical amount can be above available amount - therefore limit to available amount!
|
||||
return min(possible_stake, available_amount)
|
||||
|
||||
|
Reference in New Issue
Block a user