Update example method signature.

This commit is contained in:
Reigo Reinmets 2022-01-12 05:09:52 +02:00
parent db3483c827
commit af3d220ffc

View File

@ -618,18 +618,19 @@ class DigDeeperStrategy(IStrategy):
# This also applies to fixed stakes # This also applies to fixed stakes
return proposed_stake / self.max_dca_multiplier return proposed_stake / self.max_dca_multiplier
def adjust_trade_position(self, pair: str, trade: Trade, def adjust_trade_position(self, trade: Trade, current_time: datetime,
current_time: datetime, current_rate: float, current_profit: float, current_rate: float, current_profit: float, min_stake: float,
**kwargs) -> Optional[float]: max_stake: float, **kwargs):
""" """
Custom trade adjustment logic, returning the stake amount that a trade should be increased. Custom trade adjustment logic, returning the stake amount that a trade should be increased.
This means extra buy orders with additional fees. This means extra buy orders with additional fees.
:param pair: Pair that's currently analyzed
:param trade: trade object. :param trade: trade object.
:param current_time: datetime object, containing the current datetime :param current_time: datetime object, containing the current datetime
:param current_rate: Current buy rate. :param current_rate: Current buy rate.
:param current_profit: Current profit (as ratio), calculated based on current_rate. :param current_profit: Current profit (as ratio), calculated based on current_rate.
:param min_stake: Minimal stake size allowed by exchange.
:param max_stake: Balance available for trading.
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy. :param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return float: Stake amount to adjust your trade :return float: Stake amount to adjust your trade
""" """