diff --git a/docs/strategy-advanced.md b/docs/strategy-advanced.md index 8d241cc86..dcb8018f9 100644 --- a/docs/strategy-advanced.md +++ b/docs/strategy-advanced.md @@ -33,7 +33,7 @@ class Awesomestrategy(IStrategy): 'sell': 60 * 25 } - def check_buy_timeout(self, pair: str, trade: Trade, order: dict, **kwargs) -> bool: + def check_buy_timeout(self, pair: str, trade: 'Trade', order: dict, **kwargs) -> bool: if trade.open_rate > 100 and trade.open_date < datetime.utcnow() - timedelta(minutes=5): return True elif trade.open_rate > 10 and trade.open_date < datetime.utcnow() - timedelta(minutes=3): @@ -43,7 +43,7 @@ class Awesomestrategy(IStrategy): return False - def check_sell_timeout(self, pair: str, trade: Trade, order: dict, **kwargs) -> bool: + def check_sell_timeout(self, pair: str, trade: 'Trade', order: dict, **kwargs) -> bool: if trade.open_rate > 100 and trade.open_date < datetime.utcnow() - timedelta(minutes=5): return True elif trade.open_rate > 10 and trade.open_date < datetime.utcnow() - timedelta(minutes=3): diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 95dbbb99f..a5945ae1f 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -149,7 +149,7 @@ class IStrategy(ABC): :return: DataFrame with sell column """ - def check_buy_timeout(self, pair: str, trade: Trade, order: Dict, **kwargs) -> bool: + def check_buy_timeout(self, pair: str, trade: Trade, order: dict, **kwargs) -> bool: """ Check buy timeout function callback. This method can be used to override the buy-timeout. @@ -167,7 +167,7 @@ class IStrategy(ABC): """ return False - def check_sell_timeout(self, pair: str, trade: Trade, order: Dict, **kwargs) -> bool: + def check_sell_timeout(self, pair: str, trade: Trade, order: dict, **kwargs) -> bool: """ Check sell timeout function callback. This method can be used to override the sell-timeout. diff --git a/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 b/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 index 20144125c..0ca35e117 100644 --- a/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 +++ b/freqtrade/templates/subtemplates/strategy_methods_advanced.j2 @@ -1,5 +1,5 @@ -def check_buy_timeout(self, pair: str, trade: 'Trade', order: Dict, **kwargs) -> bool: +def check_buy_timeout(self, pair: str, trade: 'Trade', order: dict, **kwargs) -> bool: """ Check buy timeout function callback. This method can be used to override the buy-timeout. @@ -19,7 +19,7 @@ def check_buy_timeout(self, pair: str, trade: 'Trade', order: Dict, **kwargs) -> """ return False -def check_sell_timeout(self, pair: str, trade: 'Trade', order: Dict, **kwargs) -> bool: +def check_sell_timeout(self, pair: str, trade: 'Trade', order: dict, **kwargs) -> bool: """ Check sell timeout function callback. This method can be used to override the sell-timeout.