[SQUASH] Fix informatives for each pair not being created because dataprovider was not available.

Fix not being able to have informative dataframe of a pair in whitelist.
This commit is contained in:
Rokas Kupstys
2021-09-07 15:40:53 +03:00
parent f2a1d9d2fc
commit dfa61b7ad2
7 changed files with 47 additions and 33 deletions

View File

@@ -154,11 +154,12 @@ class Backtesting:
self.strategy: IStrategy = strategy
strategy.dp = self.dataprovider
# Attach Wallets to Strategy baseclass
IStrategy.wallets = self.wallets
strategy.wallets = self.wallets
# Set stoploss_on_exchange to false for backtesting,
# since a "perfect" stoploss-sell is assumed anyway
# And the regular "stoploss" function would not apply to that case
self.strategy.order_types['stoploss_on_exchange'] = False
strategy._initialize()
def _load_protections(self, strategy: IStrategy):
if self.config.get('enable_protections', False):