From ad9dc349e46fc0cc6438939f944cedc12aef07cc Mon Sep 17 00:00:00 2001 From: Misagh Date: Sat, 15 Jun 2019 12:20:32 +0200 Subject: [PATCH 1/2] edge cli should override stake_amount --- freqtrade/optimize/edge_cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/optimize/edge_cli.py b/freqtrade/optimize/edge_cli.py index 8232c79c9..231493e4d 100644 --- a/freqtrade/optimize/edge_cli.py +++ b/freqtrade/optimize/edge_cli.py @@ -6,6 +6,7 @@ This module contains the edge backtesting interface import logging from typing import Dict, Any from tabulate import tabulate +from freqtrade import constants from freqtrade.edge import Edge from freqtrade.arguments import Arguments @@ -32,6 +33,7 @@ class EdgeCli(object): self.config['exchange']['secret'] = '' self.config['exchange']['password'] = '' self.config['exchange']['uid'] = '' + self.config['stake_amount'] = constants.UNLIMITED_STAKE_AMOUNT self.config['dry_run'] = True self.exchange = Exchange(self.config) self.strategy = StrategyResolver(self.config).strategy From 707118a63684290287fbfc53c6dcfd60e7e7f5e3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 15 Jun 2019 13:04:15 +0200 Subject: [PATCH 2/2] Test stake changed to unlimited --- freqtrade/tests/optimize/test_edge_cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/tests/optimize/test_edge_cli.py b/freqtrade/tests/optimize/test_edge_cli.py index 5d16b0f2d..49d3cdd55 100644 --- a/freqtrade/tests/optimize/test_edge_cli.py +++ b/freqtrade/tests/optimize/test_edge_cli.py @@ -117,8 +117,10 @@ def test_start(mocker, fee, edge_conf, caplog) -> None: def test_edge_init(mocker, edge_conf) -> None: patch_exchange(mocker) + edge_conf['stake_amount'] = 20 edge_cli = EdgeCli(edge_conf) assert edge_cli.config == edge_conf + assert edge_cli.config['stake_amount'] == 'unlimited' assert callable(edge_cli.edge.calculate)