mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
return stake amount of strategy if edge doesn’t have any
This commit is contained in:
parent
a61daed8e9
commit
7767470af8
|
@ -161,6 +161,11 @@ class Edge():
|
|||
return True
|
||||
|
||||
def stake_amount(self, pair: str, free_capital: float, total_capital: float) -> float:
|
||||
if pair not in self._cached_pairs:
|
||||
logger.warning("cannot find %s in calculated pairs, "
|
||||
"stake_amount of strategy is used instead.", pair)
|
||||
return self.strategy.stake_amount
|
||||
|
||||
stoploss = self._cached_pairs[pair].stoploss
|
||||
available_capital = total_capital * self._capital_percentage
|
||||
allowed_capital_at_risk = round(available_capital * self._allowed_risk, 15)
|
||||
|
|
Loading…
Reference in New Issue
Block a user