From f1ededf0ebd14dd2d2de440fbc4f6e3232f7a57f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 17 Feb 2019 15:40:08 +0100 Subject: [PATCH 1/4] 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 From 9fad83bd15a5ab6cd96a3d3f7bfb9f292fccce37 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 17 Feb 2019 15:55:47 +0100 Subject: [PATCH 2/4] Fix 1 to 0 --- user_data/strategies/test_strategy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_data/strategies/test_strategy.py b/user_data/strategies/test_strategy.py index 128f39486..3cb78842f 100644 --- a/user_data/strategies/test_strategy.py +++ b/user_data/strategies/test_strategy.py @@ -267,7 +267,7 @@ class TestStrategy(IStrategy): (dataframe['adx'] > 30) & (dataframe['tema'] <= dataframe['bb_middleband']) & (dataframe['tema'] > dataframe['tema'].shift(1)) & - (dataframe['volume'] > 1) # Make sure Volume is not 0 + (dataframe['volume'] > 0) # Make sure Volume is not 0 ), 'buy'] = 1 @@ -285,7 +285,7 @@ class TestStrategy(IStrategy): (dataframe['adx'] > 70) & (dataframe['tema'] > dataframe['bb_middleband']) & (dataframe['tema'] < dataframe['tema'].shift(1)) & - (dataframe['volume'] > 1) # Make sure Volume is not 0 + (dataframe['volume'] > 0) # Make sure Volume is not 0 ), 'sell'] = 1 return dataframe From f63fdf411d7178b05c7d35caad9376f60fb78f49 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Feb 2019 13:30:10 +0100 Subject: [PATCH 3/4] Update ccxt from 1.18.245 to 1.18.247 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index be655167d..c9cedcb0c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -ccxt==1.18.245 +ccxt==1.18.247 SQLAlchemy==1.2.18 python-telegram-bot==11.1.0 arrow==0.13.1 From f9d68d919c47693bce824464bdf475d4db861d44 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Tue, 19 Feb 2019 11:45:19 +0300 Subject: [PATCH 4/4] move default amount_reserve_percent value into constants --- freqtrade/constants.py | 1 + freqtrade/freqtradebot.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/freqtrade/constants.py b/freqtrade/constants.py index 8fbcdfed7..6c71ddf7b 100644 --- a/freqtrade/constants.py +++ b/freqtrade/constants.py @@ -13,6 +13,7 @@ DEFAULT_HYPEROPT = 'DefaultHyperOpts' DEFAULT_DB_PROD_URL = 'sqlite:///tradesv3.sqlite' DEFAULT_DB_DRYRUN_URL = 'sqlite://' UNLIMITED_STAKE_AMOUNT = 'unlimited' +DEFAULT_AMOUNT_RESERVE_PERCENT = 0.05 REQUIRED_ORDERTIF = ['buy', 'sell'] REQUIRED_ORDERTYPES = ['buy', 'sell', 'stoploss', 'stoploss_on_exchange'] ORDERTYPE_POSSIBILITIES = ['limit', 'market'] diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 3dea34df1..f67be724c 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -291,7 +291,8 @@ class FreqtradeBot(object): return None # reserve some percent defined in config (5% default) + stoploss - amount_reserve_percent = 1.0 - self.config.get('amount_reserve_percent', 0.05) + amount_reserve_percent = 1.0 - self.config.get('amount_reserve_percent', + constants.DEFAULT_AMOUNT_RESERVE_PERCENT) if self.strategy.stoploss is not None: amount_reserve_percent += self.strategy.stoploss # it should not be more than 50%