Support multis-strategy backtests with protections

This commit is contained in:
Matthias
2020-11-25 09:53:13 +01:00
parent a3f9cd2c26
commit 75a5161650
5 changed files with 64 additions and 4 deletions

View File

@@ -21,6 +21,14 @@ class PairLocks():
timeframe: str = ''
@staticmethod
def reset_locks() -> None:
"""
Resets all locks. Only active for backtesting mode.
"""
if not PairLocks.use_db:
PairLocks.locks = []
@staticmethod
def lock_pair(pair: str, until: datetime, reason: str = None, *, now: datetime = None) -> None:
"""