From f1ededf0ebd14dd2d2de440fbc4f6e3232f7a57f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 17 Feb 2019 15:40:08 +0100 Subject: [PATCH] Fix typo in test-strategy, add volume > 0 check to buy/sell check --- user_data/strategies/test_strategy.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/user_data/strategies/test_strategy.py b/user_data/strategies/test_strategy.py index c4ea59e45..128f39486 100644 --- a/user_data/strategies/test_strategy.py +++ b/user_data/strategies/test_strategy.py @@ -55,7 +55,7 @@ class TestStrategy(IStrategy): # Experimental settings (configuration will overide these if set) use_sell_signal = False - use_profit_only = False + sell_profit_only = False ignore_roi_if_buy_signal = False # Optional order type mapping @@ -266,7 +266,8 @@ class TestStrategy(IStrategy): ( (dataframe['adx'] > 30) & (dataframe['tema'] <= dataframe['bb_middleband']) & - (dataframe['tema'] > dataframe['tema'].shift(1)) + (dataframe['tema'] > dataframe['tema'].shift(1)) & + (dataframe['volume'] > 1) # Make sure Volume is not 0 ), 'buy'] = 1 @@ -283,7 +284,8 @@ class TestStrategy(IStrategy): ( (dataframe['adx'] > 70) & (dataframe['tema'] > dataframe['bb_middleband']) & - (dataframe['tema'] < dataframe['tema'].shift(1)) + (dataframe['tema'] < dataframe['tema'].shift(1)) & + (dataframe['volume'] > 1) # Make sure Volume is not 0 ), 'sell'] = 1 return dataframe