This commit is contained in:
Yazeed Al Oyoun 2020-03-11 16:54:27 +01:00
parent d239e99904
commit a85d17327b
1 changed files with 1 additions and 3 deletions

View File

@ -390,15 +390,13 @@ class FreqtradeBot:
"""
logger.debug(f"create_trade for pair {pair}")
dataframe = self.dataprovider.ohlcv(pair, self.strategy.ticker_interval)
latest = dataframe.iloc[-1]
# Check if dataframe is out of date
if self.strategy.is_pair_locked(pair):
logger.info(f"Pair {pair} is currently locked.")
return False
# running get_signal on historical data fetched
dataframe = self.dataprovider.ohlcv(pair, self.strategy.ticker_interval)
(buy, sell) = self.strategy.get_signal(pair, self.strategy.ticker_interval, dataframe)
if buy and not sell: