From fca11160e443470aea767bb4e7d43c021fd5d149 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 Aug 2020 17:18:57 +0200 Subject: [PATCH] Improve docstring of is_pair_locked --- freqtrade/strategy/interface.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 9673b0c68..69d9333e2 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -301,6 +301,11 @@ class IStrategy(ABC): def is_pair_locked(self, pair: str, candle_date: datetime = None) -> bool: """ Checks if a pair is currently locked + The 2nd, optional parameter ensures that locks are applied until the new candle arrives, + and not stop at 14:00:00 - while the next candle arrives at 14:00:02 leaving a gap + of 2 seconds for a buy to happen on an old signal. + :param: pair: "Pair to check" + :param candle_date: Date of the last candle. Optional, defaults to current date """ if pair not in self._pair_locked_until: return False