Add more tests

This commit is contained in:
Matthias
2020-10-15 08:07:09 +02:00
parent 2b85e7eac3
commit 56975db2ed
6 changed files with 54 additions and 21 deletions

View File

@@ -2,13 +2,15 @@
import logging
from abc import ABC, abstractmethod
from datetime import datetime
from typing import Any, Dict
from typing import Any, Dict, Optional, Tuple
from freqtrade.mixins import LoggingMixin
logger = logging.getLogger(__name__)
ProtectionReturn = Tuple[bool, Optional[datetime], Optional[str]]
class IProtection(LoggingMixin, ABC):
@@ -29,7 +31,7 @@ class IProtection(LoggingMixin, ABC):
"""
@abstractmethod
def global_stop(self, date_now: datetime) -> bool:
def global_stop(self, date_now: datetime) -> ProtectionReturn:
"""
Stops trading (position entering) for all pairs
This must evaluate to true for the whole period of the "cooldown period".