Add default volume > 0 filter
This commit is contained in:
@@ -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),
|
||||
|
Reference in New Issue
Block a user