fix for #1948
This commit is contained in:
		| @@ -357,13 +357,13 @@ class IStrategy(ABC): | |||||||
|         # Check if time matches and current rate is above threshold |         # Check if time matches and current rate is above threshold | ||||||
|         trade_dur = (current_time.timestamp() - trade.open_date.timestamp()) / 60 |         trade_dur = (current_time.timestamp() - trade.open_date.timestamp()) / 60 | ||||||
|  |  | ||||||
|         # Get highest entry in ROI dict where key >= trade-duration |         # Get highest entry in ROI dict where key <= trade-duration | ||||||
|         roi_entry = max(list(filter(lambda x: trade_dur >= x, self.minimal_roi.keys()))) |         roi_list = list(filter(lambda x: x <= trade_dur, self.minimal_roi.keys())) | ||||||
|  |         if not roi_list: | ||||||
|  |             return False | ||||||
|  |         roi_entry = max(roi_list) | ||||||
|         threshold = self.minimal_roi[roi_entry] |         threshold = self.minimal_roi[roi_entry] | ||||||
|         if current_profit > threshold: |         return current_profit > threshold | ||||||
|             return True |  | ||||||
|  |  | ||||||
|         return False |  | ||||||
|  |  | ||||||
|     def tickerdata_to_dataframe(self, tickerdata: Dict[str, List]) -> Dict[str, DataFrame]: |     def tickerdata_to_dataframe(self, tickerdata: Dict[str, List]) -> Dict[str, DataFrame]: | ||||||
|         """ |         """ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user