Some code improvements. Still some bugs.

This commit is contained in:
Reigo Reinmets
2021-12-09 14:47:44 +02:00
parent 88792852e4
commit fde6779873
3 changed files with 56 additions and 74 deletions

View File

@@ -383,8 +383,8 @@ class IStrategy(ABC, HyperStrategyMixin):
def adjust_trade_position(self, pair: str, trade: Trade,
current_time: datetime, adjust_trade_position: float,
current_rate: float, current_profit: float, **kwargs) -> float:
current_time: datetime, current_rate: float, current_profit: float,
**kwargs) -> Optional[float]:
"""
Custom trade adjustment logic, returning the amount that a trade shold be either increased or decreased.
@@ -400,7 +400,7 @@ class IStrategy(ABC, HyperStrategyMixin):
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return float: Amount to adjust your trade (buy more or sell some)
"""
return 0.0
return None
def informative_pairs(self) -> ListPairsWithTimeframes:
"""