Fix bug in example.
This commit is contained in:
parent
2e13893341
commit
64558e60d3
@ -274,7 +274,9 @@ class DigDeeperStrategy(IStrategy):
|
|||||||
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
|
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
|
||||||
|
|
||||||
# Only buy when not actively falling price.
|
# Only buy when not actively falling price.
|
||||||
if dataframe['close'] < dataframe['close'].shift(1):
|
last_candle = dataframe.iloc[-1].squeeze()
|
||||||
|
previous_candle = dataframe.iloc[-2].squeeze()
|
||||||
|
if last_candle.close < previous_candle.close:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
count_of_buys = 0
|
count_of_buys = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user