Added min_stake, max_stake. Removed pair as its included in trade.

This commit is contained in:
Reigo Reinmets
2022-01-08 17:20:02 +02:00
parent 813a2cd23b
commit 0bca07a32a
7 changed files with 69 additions and 29 deletions

View File

@@ -162,12 +162,12 @@ class StrategyTestV2(IStrategy):
'sell'] = 1
return dataframe
def adjust_trade_position(self, pair: str, trade: Trade, current_time: datetime,
current_rate: float, current_profit: float, **kwargs):
def adjust_trade_position(self, trade: Trade, current_time: datetime, current_rate: float,
current_profit: float, min_stake: float, max_stake: float, **kwargs):
if current_profit < -0.0075:
try:
return self.wallets.get_trade_stake_amount(pair, None)
return self.wallets.get_trade_stake_amount(trade.pair, None)
except DependencyException:
pass