Add volume > 0 check

This commit is contained in:
Matthias
2020-08-02 11:01:27 +02:00
parent 533a9ee907
commit 6312732255
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -52,7 +52,8 @@ class MACDStrategy_hyperopt(IHyperOpt):
dataframe.loc[
(
(dataframe['macd'] > dataframe['macdsignal']) &
(dataframe['cci'] <= params['buy-cci-value'])
(dataframe['cci'] <= params['buy-cci-value']) &
(dataframe['volume'] > 0) # Make sure Volume is not 0
),
'buy'] = 1