From 616fe08bcea0dae438906aaff60434749ff4e375 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Oct 2019 11:29:25 +0200 Subject: [PATCH] Add subtract_start to timerange object --- freqtrade/configuration/timerange.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/freqtrade/configuration/timerange.py b/freqtrade/configuration/timerange.py index fc759ab6e..527402af7 100644 --- a/freqtrade/configuration/timerange.py +++ b/freqtrade/configuration/timerange.py @@ -27,6 +27,10 @@ class TimeRange: return (self.starttype == other.starttype and self.stoptype == other.stoptype and self.startts == other.startts and self.stopts == other.stopts) + def subtract_start(self, seconds) -> None: + if self.startts: + self.startts = self.startts - seconds + @staticmethod def parse_timerange(text: Optional[str]): """