Allow protections to be set in the strategy

This commit is contained in:
Matthias
2021-01-06 16:37:09 +01:00
parent 6ca2b2d52d
commit c9e477214f
4 changed files with 52 additions and 2 deletions

View File

@@ -73,6 +73,7 @@ class StrategyResolver(IResolver):
("order_time_in_force", None, None),
("stake_currency", None, None),
("stake_amount", None, None),
("protections", None, None),
("startup_candle_count", None, None),
("unfilledtimeout", None, None),
("use_sell_signal", True, 'ask_strategy'),

View File

@@ -119,6 +119,9 @@ class IStrategy(ABC):
# Count of candles the strategy requires before producing valid signals
startup_candle_count: int = 0
# Protections
protections: List
# Class level variables (intentional) containing
# the dataprovider (dp) (access to other candles, historic data, ...)
# and wallets - access to the current balance.