From 2362091dbb1eea9e9c8001a7ddf741259183e3ea Mon Sep 17 00:00:00 2001 From: Joe Schr Date: Tue, 16 Mar 2021 12:43:47 +0100 Subject: [PATCH] fixup(bb88d64): use get(), won't throw if doesn't exist --- user_data/strategies/fixed_riskreward_loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_data/strategies/fixed_riskreward_loss.py b/user_data/strategies/fixed_riskreward_loss.py index 5fc5f91..efd8327 100644 --- a/user_data/strategies/fixed_riskreward_loss.py +++ b/user_data/strategies/fixed_riskreward_loss.py @@ -45,7 +45,7 @@ class FixedRiskRewardLoss(IStrategy): custom_stoploss using a risk/reward ratio """ result = break_even_sl = takeprofit_sl = -1 - custom_info_pair = self.custom_info[pair] + custom_info_pair = self.custom_info.get(pair) if custom_info_pair is not None: # using current_time/open_date directly via custom_info_pair[trade.open_daten] # would only work in backtesting/hyperopt.