Add default volume > 0 filter

This commit is contained in:
Matthias
2020-03-10 16:05:33 +01:00
parent 84f0bb9a5d
commit 2b1c146940
4 changed files with 21 additions and 0 deletions

View File

@@ -159,6 +159,9 @@ So let's write the buy strategy using these values:
dataframe['macd'], dataframe['macdsignal']
))
# Check that volume is not 0
conditions.append(dataframe['volume'] > 0)
if conditions:
dataframe.loc[
reduce(lambda x, y: x & y, conditions),