added minimum win rate to config

This commit is contained in:
misagh 2018-11-03 14:31:34 +01:00
parent f6498bf5f7
commit b6d4e11e88
4 changed files with 23 additions and 16 deletions

View File

@ -55,19 +55,18 @@
}, },
"edge": { "edge": {
"enabled": false, "enabled": false,
"process_throttle_secs": 1800, "process_throttle_secs": 3600,
"calculate_since_number_of_days": 14, "calculate_since_number_of_days": 2,
"total_capital_in_stake_currency": 0.5, "total_capital_in_stake_currency": 0.5,
"allowed_risk": 0.01, "allowed_risk": 0.01,
"stoploss_range_min": -0.01, "stoploss_range_min": -0.01,
"stoploss_range_max": -0.1, "stoploss_range_max": -0.1,
"stoploss_range_step": -0.001, "stoploss_range_step": -0.01,
"maximum_winrate": 0.80, "minimum_winrate": 0.60,
"minimum_expectancy": 0.20, "minimum_expectancy": 0.20,
"min_trade_number": 15, "min_trade_number": 10,
"max_trade_duration_minute": 1440, "max_trade_duration_minute": 1440,
"remove_pumps": true, "remove_pumps": false
"minimum_delta": 1
}, },
"telegram": { "telegram": {
"enabled": true, "enabled": true,

View File

@ -61,18 +61,18 @@
}, },
"edge": { "edge": {
"enabled": false, "enabled": false,
"process_throttle_secs": 1800, "process_throttle_secs": 3600,
"calculate_since_number_of_days": 14, "calculate_since_number_of_days": 2,
"total_capital_in_stake_currency": 0.5, "total_capital_in_stake_currency": 0.5,
"allowed_risk": 0.01, "allowed_risk": 0.01,
"stoploss_range_min": -0.01, "stoploss_range_min": -0.01,
"stoploss_range_max": -0.1, "stoploss_range_max": -0.1,
"stoploss_range_step": -0.01, "stoploss_range_step": -0.01,
"maximum_winrate": 0.80, "minimum_winrate": 0.60,
"minimum_expectancy": 0.20, "minimum_expectancy": 0.20,
"min_trade_number": 15, "min_trade_number": 10,
"max_trade_duration_minute": 1440, "max_trade_duration_minute": 1440,
"remove_pumps": true "remove_pumps": false
}, },
"experimental": { "experimental": {
"use_sell_signal": false, "use_sell_signal": false,

View File

@ -182,7 +182,7 @@ CONF_SCHEMA = {
"stoploss_range_min": {'type': 'number'}, "stoploss_range_min": {'type': 'number'},
"stoploss_range_max": {'type': 'number'}, "stoploss_range_max": {'type': 'number'},
"stoploss_range_step": {'type': 'number'}, "stoploss_range_step": {'type': 'number'},
"maximum_winrate": {'type': 'number'}, "minimum_winrate": {'type': 'number'},
"minimum_expectancy": {'type': 'number'}, "minimum_expectancy": {'type': 'number'},
"min_trade_number": {'type': 'number'}, "min_trade_number": {'type': 'number'},
"max_trade_duration_minute": {'type': 'integer'}, "max_trade_duration_minute": {'type': 'integer'},

View File

@ -145,10 +145,18 @@ class Edge():
def filter(self, pairs) -> list: def filter(self, pairs) -> list:
# Filtering pairs acccording to the expectancy # Filtering pairs acccording to the expectancy
filtered_expectancy: list = [] filtered_expectancy: list = []
# [pair, stoploss, winrate, risk reward ratio, required risk reward, expectancy]
filtered_expectancy = [ filtered_expectancy = [
x[0] for x in self._cached_pairs if x[5] > float( x[0] for x in self._cached_pairs if (
(x[5] > float(
self.edge_config.get( self.edge_config.get(
'minimum_expectancy', 0.2))] 'minimum_expectancy',
0.2))) & (
x[2] > float(
self.edge_config.get(
'minimum_winrate',
0.60))))]
# Only return pairs which are included in "pairs" argument list # Only return pairs which are included in "pairs" argument list
final = [x for x in filtered_expectancy if x in pairs] final = [x for x in filtered_expectancy if x in pairs]