Compare commits

..

993 Commits

Author SHA1 Message Date
Matthias
f97e810429 Merge pull request #4127 from freqtrade/new_release
New release 2020.12
2020-12-29 07:07:54 +01:00
Matthias
0925a3cd19 Reinstate header partials 2020-12-28 14:12:39 +01:00
Matthias
a2fdb9d2f6 Move jquery to the bottom 2020-12-28 14:12:39 +01:00
Matthias
f6e56027b1 Reinstate jquery 2020-12-28 14:12:39 +01:00
Matthias
625da69fcb Remove custom header section from docs 2020-12-28 14:12:15 +01:00
Matthias
8366e67fee Remove custom header section from docs 2020-12-28 10:19:50 +01:00
Matthias
f80ffe279b Version bump 2020.12 2020-12-28 09:54:58 +01:00
Matthias
ea22588649 Merge branch 'stable' into new_release 2020-12-28 09:54:46 +01:00
Matthias
8dca3c84f8 Merge pull request #4122 from freqtrade/dependabot/pip/develop/ccxt-1.39.79
Bump ccxt from 1.39.52 to 1.39.79
2020-12-28 09:19:15 +01:00
Matthias
0fc504fc4e Merge pull request #4125 from freqtrade/dependabot/pip/develop/blosc-1.10.1
Bump blosc from 1.9.2 to 1.10.1
2020-12-28 09:18:14 +01:00
Matthias
25b872a9c8 Merge pull request #4123 from freqtrade/dependabot/pip/develop/pymdown-extensions-8.1
Bump pymdown-extensions from 8.0.1 to 8.1
2020-12-28 09:17:09 +01:00
Matthias
a328bf58f4 Merge pull request #4121 from freqtrade/dependabot/pip/develop/mkdocs-material-6.2.3
Bump mkdocs-material from 6.1.7 to 6.2.3
2020-12-28 09:16:46 +01:00
dependabot[bot]
f492609115 Bump blosc from 1.9.2 to 1.10.1
Bumps [blosc](https://github.com/blosc/python-blosc) from 1.9.2 to 1.10.1.
- [Release notes](https://github.com/blosc/python-blosc/releases)
- [Changelog](https://github.com/Blosc/python-blosc/blob/master/RELEASE_NOTES.rst)
- [Commits](https://github.com/blosc/python-blosc/compare/v1.9.2...v1.10.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-28 05:37:17 +00:00
dependabot[bot]
87b896879f Bump ccxt from 1.39.52 to 1.39.79
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.39.52 to 1.39.79.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.39.52...1.39.79)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-28 05:37:13 +00:00
dependabot[bot]
10840ec170 Bump pymdown-extensions from 8.0.1 to 8.1
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 8.0.1 to 8.1.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/8.0.1...8.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-28 05:37:13 +00:00
dependabot[bot]
b3e929d14b Bump mkdocs-material from 6.1.7 to 6.2.3
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.1.7 to 6.2.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.1.7...6.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-28 05:37:11 +00:00
Matthias
8cf3dbb682 Merge pull request #4110 from freqtrade/test/exchange_ccxt
add tests to verify exchange compatibility with ccxt
2020-12-26 16:32:25 +01:00
Matthias
7d2b9447d0 Update slack link 2020-12-26 15:30:55 +01:00
Matthias
4b910426ff Merge pull request #4113 from freqtrade/ref/rpc
Refactor RPC dependency tree
2020-12-25 10:10:50 +01:00
Matthias
a87c273903 Refactor RPC modules so handlers don't inherit RPC directly 2020-12-24 09:09:23 +01:00
Matthias
1508e08ea5 Move fiatconvert init to RPC class 2020-12-24 08:39:00 +01:00
Matthias
48f7997a77 Merge pull request #4112 from freqtrade/tests/telegram
simplify telegram tests
2020-12-24 08:24:11 +01:00
Matthias
5bf739b917 Simplify more telegram tests 2020-12-24 07:39:46 +01:00
Matthias
be4a4be7a3 Further simplify test_telegram 2020-12-24 07:29:26 +01:00
Matthias
4cbbb80bc3 Refactor test_telegram to simplify tests 2020-12-24 07:10:01 +01:00
Matthias
516e56bfaa Move init of _config to apiserver parent 2020-12-23 20:50:32 +01:00
Matthias
0b98f19f2c Merge pull request #4111 from freqtrade/move_pairlist_plugins
Move pairlists to be a plugin submodule
2020-12-23 19:10:08 +01:00
Matthias
f11fd2fee1 Sort imports 2020-12-23 17:00:02 +01:00
Matthias
67193bca3d Move pairlists to be a plugin submodule 2020-12-23 16:54:35 +01:00
Matthias
7cef5ac217 Merge pull request #4092 from MrKrautee/telegram
Telegram: specify custom keyboard in config
2020-12-23 16:25:37 +01:00
Matthias
1713841d0b Initialize markets at startup for ccxt tests 2020-12-23 16:20:25 +01:00
Matthias
721d0fb2a8 Improve wording of developer docs 2020-12-23 16:00:26 +01:00
Christof
74bcd82c3d Exception msg 2020-12-23 16:00:01 +01:00
Matthias
65d91b7cbb Add note on adding new exchange with compat tests 2020-12-23 15:53:41 +01:00
Matthias
5599490aa2 Adjust ohlcv test after rebase 2020-12-23 15:50:24 +01:00
Matthias
b39de171c8 Don't run longrun regularily 2020-12-23 15:46:08 +01:00
Matthias
0981287c62 Improve test syntax for ccxt_compat tests 2020-12-23 15:41:59 +01:00
Matthias
2016eea212 Fix some test-errors in ccxt_compat 2020-12-23 15:41:59 +01:00
Matthias
a6e6ce16b1 Fix test failures 2020-12-23 15:41:59 +01:00
Matthias
b7d4ff9c21 Add test for fetch_ohlcv (against exchange) 2020-12-23 15:41:59 +01:00
Matthias
7833d9935c Add dummy test for fetch_ohlcv 2020-12-23 15:41:59 +01:00
Matthias
79ed89e487 Add test for fee calculation 2020-12-23 15:41:59 +01:00
Matthias
38af1b2a5d Improve compat tests 2020-12-23 15:41:59 +01:00
Matthias
36d60fa8a8 First small compat test 2020-12-23 15:41:59 +01:00
Christof
b1fe5940fa check for Exception and log msgs 2020-12-22 13:01:01 +01:00
Christof
cd1a8e2c42 better error msg 2020-12-22 12:39:27 +01:00
Christof
be28b42bfa Exception for invalid keyboard config 2020-12-22 12:34:21 +01:00
Matthias
4dadfd199d Documentation syntax 2020-12-22 07:36:53 +01:00
Matthias
39579b6e5d Merge pull request #4093 from freqtrade/ohlcv_limit
set ohlcv limit on ccxt calls
2020-12-21 19:34:50 +01:00
Matthias
9d37ac9955 Merge pull request #4094 from MrKrautee/plot_area
Plot area between traces
2020-12-21 19:30:07 +01:00
Matthias
9c0850ff50 Merge pull request #4103 from MrKrautee/tg_docs
added /locks to command list
2020-12-21 10:22:54 +01:00
Christof
78dff3d510 docs: Note syntax 2020-12-21 10:22:24 +01:00
Christof
2787ba0809 added /locks to command list 2020-12-21 10:03:27 +01:00
Christof
277f3ff47b tests: cleaup 2020-12-21 09:52:10 +01:00
Matthias
5bd14bcccf Merge pull request #4100 from freqtrade/dependabot/pip/develop/pytest-mock-3.4.0
Bump pytest-mock from 3.3.1 to 3.4.0
2020-12-21 09:31:44 +01:00
Matthias
bbc049c838 Merge pull request #4102 from freqtrade/dependabot/pip/develop/sqlalchemy-1.3.22
Bump sqlalchemy from 1.3.20 to 1.3.22
2020-12-21 09:31:35 +01:00
dependabot[bot]
d25fe58574 Bump sqlalchemy from 1.3.20 to 1.3.22
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.3.20 to 1.3.22.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 08:19:10 +00:00
dependabot[bot]
8eb0130200 Bump pytest-mock from 3.3.1 to 3.4.0
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.3.1...v3.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 08:18:53 +00:00
Matthias
fae631c026 Merge pull request #4096 from freqtrade/dependabot/pip/develop/pytest-6.2.1
Bump pytest from 6.2.0 to 6.2.1
2020-12-21 07:41:05 +01:00
Matthias
08a1f74748 Merge pull request #4098 from freqtrade/dependabot/pip/develop/flake8-tidy-imports-4.2.1
Bump flake8-tidy-imports from 4.2.0 to 4.2.1
2020-12-21 07:40:46 +01:00
Matthias
537c20ed87 Merge pull request #4097 from freqtrade/dependabot/pip/develop/questionary-1.9.0
Bump questionary from 1.8.1 to 1.9.0
2020-12-21 07:40:20 +01:00
Matthias
3a46f02682 Merge pull request #4101 from freqtrade/dependabot/pip/develop/ccxt-1.39.52
Bump ccxt from 1.39.33 to 1.39.52
2020-12-21 07:39:34 +01:00
Matthias
e587c005de Merge pull request #4099 from freqtrade/dependabot/pip/develop/joblib-1.0.0
Bump joblib from 0.17.0 to 1.0.0
2020-12-21 07:35:09 +01:00
Matthias
bc110cfe8f Merge pull request #4095 from freqtrade/dependabot/pip/develop/requests-2.25.1
Bump requests from 2.25.0 to 2.25.1
2020-12-21 07:34:30 +01:00
dependabot[bot]
3b67863914 Bump ccxt from 1.39.33 to 1.39.52
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.39.33 to 1.39.52.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.39.33...1.39.52)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 05:36:27 +00:00
dependabot[bot]
a2873096c8 Bump flake8-tidy-imports from 4.2.0 to 4.2.1
Bumps [flake8-tidy-imports](https://github.com/adamchainz/flake8-tidy-imports) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/adamchainz/flake8-tidy-imports/releases)
- [Changelog](https://github.com/adamchainz/flake8-tidy-imports/blob/master/HISTORY.rst)
- [Commits](https://github.com/adamchainz/flake8-tidy-imports/compare/4.2.0...4.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 05:36:24 +00:00
dependabot[bot]
5716202e45 Bump joblib from 0.17.0 to 1.0.0
Bumps [joblib](https://github.com/joblib/joblib) from 0.17.0 to 1.0.0.
- [Release notes](https://github.com/joblib/joblib/releases)
- [Changelog](https://github.com/joblib/joblib/blob/master/CHANGES.rst)
- [Commits](https://github.com/joblib/joblib/compare/0.17.0...1.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 05:36:24 +00:00
dependabot[bot]
fe27206926 Bump questionary from 1.8.1 to 1.9.0
Bumps [questionary](https://github.com/tmbo/questionary) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/tmbo/questionary/releases)
- [Commits](https://github.com/tmbo/questionary/compare/1.8.1...1.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 05:36:12 +00:00
dependabot[bot]
a1755364e1 Bump pytest from 6.2.0 to 6.2.1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.0...6.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 05:36:09 +00:00
dependabot[bot]
e7e687c8ec Bump requests from 2.25.0 to 2.25.1
Bumps [requests](https://github.com/psf/requests) from 2.25.0 to 2.25.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.25.0...v2.25.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 05:36:08 +00:00
Christof
5423c21be0 keyboard type 2020-12-20 22:51:40 +01:00
Christof
f39dde121a moved keyboard config validation to __inti__ 2020-12-20 22:36:56 +01:00
Christof
18a24d75ef cleanup 2020-12-20 21:31:01 +01:00
Christof
3cb559994e some more test 2020-12-20 21:31:01 +01:00
Christof
c1b8ad7232 renaming, comments, cleanups 2020-12-20 21:31:01 +01:00
Christof
fabb31e1bc imports order 2020-12-20 21:31:01 +01:00
Christof
f120c8d6c7 documentation 2020-12-20 21:31:01 +01:00
Christof
f24626e139 removed too many blank lines 2020-12-20 21:31:01 +01:00
Christof
43091a26ce simple tests 2020-12-20 21:28:57 +01:00
Christof
8b24878023 plot_config documentation for fill_to, fill_label, fill_color 2020-12-20 21:28:57 +01:00
Christof
5b2902fcbc cleanup 2020-12-20 21:28:57 +01:00
Christof
16baca5eeb fixed: too complex warning 2020-12-20 21:28:57 +01:00
Christof
d901a86165 typo 2020-12-20 21:28:57 +01:00
Christof
75e4758936 changed config params, added fill area in subplots 2020-12-20 21:28:57 +01:00
Christof
cc39cf97dd revert to former create_plotconfig behaviour 2020-12-20 21:28:57 +01:00
Christof
4531c924da PEP8 2020-12-20 21:28:57 +01:00
Christof
fb3d82ccb9 cleanup 2020-12-20 21:28:57 +01:00
Christof
fdd4b40c34 fixed subplots, empty create plot_config if its not given by strategie 2020-12-20 21:28:57 +01:00
Christof
daa1727e2b Exeption for fill_area.traces 2020-12-20 21:28:57 +01:00
Christof
3fdfc06a1e label for fill_area added and documentation updated 2020-12-20 21:28:57 +01:00
Christof
ecadfdd98e fixed:advanced config. added. feature: fill area between traces by advanced configuration. 2020-12-20 21:28:57 +01:00
Christof
6b44545d37 sort order imports 2020-12-20 21:06:45 +01:00
Christof
799e6be2eb fix tests 2020-12-20 21:06:45 +01:00
Christof
621105df9a renaming shortcut_btns to keyboard 2020-12-20 21:06:45 +01:00
Christof
bf92099486 test for custom keyboard 2020-12-20 21:06:45 +01:00
Christof
5b3ffd5141 better log msg, comments 2020-12-20 21:06:45 +01:00
Christof
5e6897b278 documentation for custom keyboard 2020-12-20 21:06:45 +01:00
Christof
e92bcb00f6 telegram: specify custom shortcut bottons (keyboard) in config.json 2020-12-20 21:06:45 +01:00
Matthias
8d3f096a97 AgeFilter does not require tickers 2020-12-20 20:08:54 +01:00
Matthias
d7daa86434 Add bybit subclass 2020-12-20 19:59:46 +01:00
Matthias
bd0af1b300 Fix test warning 2020-12-20 19:38:12 +01:00
Matthias
7d2395ddb7 Add limit parameter to fetch_ohlcv 2020-12-20 19:33:04 +01:00
Matthias
b9f3410d8b Merge pull request #4082 from bigchakalaka/patch-2
Update strategy-customization.md
2020-12-18 06:16:13 +01:00
bigchakalaka
ca9fd08991 Update strategy-customization.md 2020-12-17 21:40:54 +01:00
Matthias
4e7f914e92 Improve test for AgeFilter, fix bug in Agefilter 2020-12-17 13:34:53 +01:00
Matthias
266031a6be Disallow PerformanceFilter for backtesting
closes #4072
2020-12-16 19:24:47 +01:00
Matthias
8441d0f60f Merge pull request #4069 from freqtrade/refactor_ohlcv_download
Refactor pairlist ohlcv download to use async
2020-12-16 19:11:49 +01:00
Matthias
d1fda28d2e Fix typehints 2020-12-15 20:59:58 +01:00
Matthias
011ba1d9ae Adapt tests to use async methods 2020-12-15 20:49:46 +01:00
Matthias
3c85d5201f Use async to get candle data for pairlists 2020-12-15 20:38:26 +01:00
Matthias
f320cb0d7a Merge pull request #4068 from freqtrade/docker_stage_pi
Docker stage pi
2020-12-15 19:10:10 +01:00
Matthias
4c0edd0461 Move dependencies to base image for RPI 2020-12-15 09:28:56 +01:00
Matthias
c8dde63227 Allow test-pairlist to run with verbosity 2020-12-15 09:23:40 +01:00
Matthias
69901c1314 Provide pair to _validate_pairs in pairlists 2020-12-15 09:23:40 +01:00
Matthias
39fec25ae0 add optional Cache arguments to refresh_pairs method 2020-12-15 09:23:27 +01:00
Matthias
dc92808335 Change PI dockerfile to use staged build 2020-12-15 06:44:08 +01:00
Matthias
ca9036ee1d Merge pull request #3840 from freqtrade/dependabot/docker/python-3.9.0-slim-buster
Bump python from 3.8.6-slim-buster to 3.9.1-slim-buster (build actions using 3.9)
2020-12-14 20:44:29 +01:00
Matthias
e240f0b372 Merge branch 'develop' into dependabot/docker/python-3.9.0-slim-buster 2020-12-14 20:18:34 +01:00
Matthias
8366e2fd89 Merge pull request #4064 from freqtrade/dependabot/pip/develop/pytest-6.2.0
Bump pytest from 6.1.2 to 6.2.0
2020-12-14 19:46:13 +01:00
Matthias
9f5c4ead15 Remove support for 3.6 2020-12-14 19:18:54 +01:00
Matthias
66d5271ada Don't build for 3.6 any longer 2020-12-14 19:10:24 +01:00
Matthias
ba869a330f Build 3.6 on github actions too 2020-12-14 19:05:41 +01:00
dependabot[bot]
8965b8a18d Bump pytest from 6.1.2 to 6.2.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.1.2 to 6.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.1.2...6.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 08:27:36 +00:00
Matthias
bf48df92c1 Merge pull request #4059 from freqtrade/dependabot/pip/develop/plotly-4.14.1
Bump plotly from 4.13.0 to 4.14.1
2020-12-14 07:42:24 +01:00
Matthias
e763aa04bd Merge pull request #4062 from freqtrade/dependabot/pip/develop/python-rapidjson-1.0
Bump python-rapidjson from 0.9.4 to 1.0
2020-12-14 07:40:49 +01:00
Matthias
36fba4826f Merge pull request #4058 from freqtrade/dependabot/pip/develop/cachetools-4.2.0
Bump cachetools from 4.1.1 to 4.2.0
2020-12-14 07:40:03 +01:00
Matthias
4813eec308 Merge pull request #4063 from freqtrade/dependabot/pip/develop/ccxt-1.39.33
Bump ccxt from 1.39.10 to 1.39.33
2020-12-14 07:39:30 +01:00
Matthias
aace993842 Merge pull request #4061 from freqtrade/dependabot/pip/develop/pandas-1.1.5
Bump pandas from 1.1.4 to 1.1.5
2020-12-14 07:38:45 +01:00
Matthias
834cf384f6 Merge pull request #4060 from freqtrade/dependabot/pip/develop/flake8-tidy-imports-4.2.0
Bump flake8-tidy-imports from 4.1.0 to 4.2.0
2020-12-14 07:37:00 +01:00
dependabot[bot]
a9b586d338 Bump ccxt from 1.39.10 to 1.39.33
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.39.10 to 1.39.33.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.39.10...1.39.33)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 05:44:16 +00:00
dependabot[bot]
44f295110b Bump python-rapidjson from 0.9.4 to 1.0
Bumps [python-rapidjson](https://github.com/python-rapidjson/python-rapidjson) from 0.9.4 to 1.0.
- [Release notes](https://github.com/python-rapidjson/python-rapidjson/releases)
- [Changelog](https://github.com/python-rapidjson/python-rapidjson/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-rapidjson/python-rapidjson/compare/v0.9.4...v1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 05:43:46 +00:00
dependabot[bot]
bdd895b8da Bump pandas from 1.1.4 to 1.1.5
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.1.4 to 1.1.5.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Changelog](https://github.com/pandas-dev/pandas/blob/master/RELEASE.md)
- [Commits](https://github.com/pandas-dev/pandas/compare/v1.1.4...v1.1.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 05:43:42 +00:00
dependabot[bot]
a3139dd9d4 Bump flake8-tidy-imports from 4.1.0 to 4.2.0
Bumps [flake8-tidy-imports](https://github.com/adamchainz/flake8-tidy-imports) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/adamchainz/flake8-tidy-imports/releases)
- [Changelog](https://github.com/adamchainz/flake8-tidy-imports/blob/master/HISTORY.rst)
- [Commits](https://github.com/adamchainz/flake8-tidy-imports/compare/4.1.0...4.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 05:43:34 +00:00
dependabot[bot]
4cf16fa8d1 Bump plotly from 4.13.0 to 4.14.1
Bumps [plotly](https://github.com/plotly/plotly.py) from 4.13.0 to 4.14.1.
- [Release notes](https://github.com/plotly/plotly.py/releases)
- [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.py/compare/v4.13.0...v4.14.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 05:43:33 +00:00
dependabot[bot]
3bea9255e7 Bump cachetools from 4.1.1 to 4.2.0
Bumps [cachetools](https://github.com/tkem/cachetools) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/tkem/cachetools/releases)
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v4.1.1...v4.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 05:43:33 +00:00
Matthias
dad427461d Downgrade dockerfile to 3.8.6 to avoid image bloat 2020-12-13 13:11:04 +01:00
Matthias
a4bfd0b0aa Split linux and OSX builds into 2 seperate, parallel jobs 2020-12-13 11:25:42 +01:00
Matthias
be555895b2 Merge branch 'develop' into dependabot/docker/python-3.9.0-slim-buster 2020-12-13 11:24:23 +01:00
Matthias
7c6357cc45 Merge pull request #4041 from freqtrade/plugins/protections_backtest
Introduce Protection Plugins
2020-12-13 11:08:24 +01:00
Matthias
657b002a81 Explicitly check for False in fetch_ticker 2020-12-13 10:59:29 +01:00
Matthias
9cd1be8f93 Update usage of open_trade_price to open_trade_value 2020-12-13 10:33:45 +01:00
Matthias
7eab33de08 Merge branch 'develop' into plugins/protections_backtest 2020-12-13 10:31:33 +01:00
Matthias
8a2fbf6592 Small cleanup of protection stuff 2020-12-13 10:16:09 +01:00
Matthias
1436dc58f5 Merge pull request #4057 from freqtrade/avoid_high_fee_wrong_reports
Avoid high fee wrong reports
2020-12-12 20:04:06 +01:00
Matthias
14647fb5f0 Add tests for update fee 2020-12-12 11:49:52 +01:00
Matthias
3ee7fe64ba Clean up some tests 2020-12-12 11:25:56 +01:00
Matthias
181b88dc75 Don't accept too high fees, assuming they are erroneous
Forces fallback to "detection from trades"
2020-12-12 10:52:27 +01:00
Matthias
aa4ac87fd4 Merge pull request #4052 from Samaoo/patch-4
Update backtesting.md
2020-12-12 10:48:23 +01:00
Samaoo
b45c2fb1d0 Update backtesting.md 2020-12-12 10:27:17 +01:00
Matthias
6107878f4e Bump ccxt to 1.39.10
closes #4051
2020-12-12 07:08:29 +01:00
Matthias
aab8e36e78 Merge pull request #4046 from dmmop/patch-1
Update dockerfile to multistage
2020-12-11 09:10:36 +01:00
Matthias
c784e5780e Merge pull request #4054 from freqtrade/models_open_price
Models open price
2020-12-11 06:31:02 +01:00
Matthias
95fd3824da Finish renamal of open_trade_price to open_value 2020-12-10 19:36:52 +01:00
Matthias
201cc67e05 Rename open_trade_price to "open_trade_value" 2020-12-10 19:21:20 +01:00
Matthias
76594d5dde Merge pull request #3799 from imxuwang/issue3783
Introduce Telegram /stats endpoint
2020-12-10 15:41:09 +01:00
Matthias
ca99d484fc Refactor to use list comprehension 2020-12-10 07:39:50 +01:00
Matthias
33f330256b Reorder commands on telegram init 2020-12-09 20:36:30 +01:00
Samaoo
af53dfbfab Update backtesting.md 2020-12-09 15:57:15 +01:00
Samaoo
f5817063b7 Update backtesting.md 2020-12-09 15:53:38 +01:00
David Martinez Martin
25f8e0cc57 Added git packages for future dependencies 2020-12-09 11:28:45 +01:00
David Martinez Martin
5708098256 Move ENV PATH to base image 2020-12-09 10:34:38 +01:00
Matthias
7126aa9514 Merge pull request #4047 from freqtrade/strategy_manatory
Ensure non-defined attributes fail correctly
2020-12-09 10:27:29 +01:00
Matthias
f1af2972e2 Ensure non-defined attributes fail correctly
Remove unnecessary check, as stoploss cannot be none (it's mandatory and
a number)
2020-12-09 07:55:08 +01:00
David Martinez Martin
e6b3e64534 Update dockerfile to multistage
This change reduce the image size from 727Mb to 469Mb.
2020-12-09 03:27:59 +01:00
Matthias
d9a86158f4 Add cmake to support raspberry 64bit installs 2020-12-08 19:46:54 +01:00
Matthias
ad7b29cc1d Merge pull request #4045 from Samaoo/patch-3
Update data-download.md
2020-12-08 19:14:17 +01:00
Samaoo
118a22d010 Update data-download.md 2020-12-08 18:04:26 +01:00
Matthias
9725b8e17c Update Dockerfile 2020-12-08 08:43:22 +01:00
Matthias
f897b683c7 Add seperate page describing plugins 2020-12-07 19:22:14 +01:00
Matthias
82bc6973fe Add last key to config_full 2020-12-07 16:16:33 +01:00
Matthias
c37bc307e2 Small finetunings to documentation 2020-12-07 16:12:03 +01:00
Matthias
b5289d5f0e Update full config with correct protection keys 2020-12-07 16:02:55 +01:00
Matthias
de2cc9708d Fix test leakage 2020-12-07 16:01:29 +01:00
Matthias
f047297995 Improve wording, fix bug 2020-12-07 15:48:06 +01:00
Matthias
3ab5514697 Add API endpoint for /stats 2020-12-07 15:07:08 +01:00
Matthias
81410fb404 Document /stats for telegram 2020-12-07 15:03:16 +01:00
Matthias
e873cafdc4 Beautify code a bit 2020-12-07 14:54:39 +01:00
Matthias
effc96e92b Improve tests for backtest protections 2020-12-07 11:39:01 +01:00
Matthias
5849d07497 Export locks as part of backtesting 2020-12-07 11:39:01 +01:00
Matthias
57a4044eb0 Enhance test verifying that locks are not replaced 2020-12-07 11:39:01 +01:00
Matthias
bb51da8297 Fix slow backtest due to protections 2020-12-07 11:39:01 +01:00
Matthias
75a5161650 Support multis-strategy backtests with protections 2020-12-07 11:39:01 +01:00
Matthias
a3f9cd2c26 Only load protections when necessary 2020-12-07 11:39:01 +01:00
Matthias
946fb09455 Update help command output 2020-12-07 11:39:01 +01:00
Matthias
e2d15f4082 Add parameter to enable protections for backtesting 2020-12-07 11:39:01 +01:00
Matthias
32189d27c8 Disable output from plugins in backtesting 2020-12-07 11:39:01 +01:00
Matthias
9f34aebdaa Allow closing trades without message 2020-12-07 11:39:01 +01:00
Matthias
b606936eb7 Make changes to backtesting to incorporate protections 2020-12-07 11:39:01 +01:00
Matthias
98c88fa58e Prepare protections for backtesting 2020-12-07 11:39:01 +01:00
Matthias
3426e99b8b Improve formatting of protection startup message 2020-12-07 11:37:57 +01:00
Matthias
64d6c7bb65 Update developer docs 2020-12-07 11:17:11 +01:00
Matthias
0e2a43ab4d Add duration_explanation functions 2020-12-07 11:12:09 +01:00
Matthias
c993831a04 Add protections to startup messages 2020-12-07 10:57:01 +01:00
Matthias
d4799e6aa3 Implement *candle definitions 2020-12-07 10:54:26 +01:00
Matthias
a93bb6853b Document *candles settings, implement validations 2020-12-07 10:47:13 +01:00
Matthias
eb952d77be Move lookback_period to parent __init__ 2020-12-07 08:27:14 +01:00
Matthias
f13e9ce5ed Improve docs 2020-12-07 08:23:10 +01:00
Matthias
b36f333b2f Add new protections to full sample, documentation 2020-12-07 08:23:10 +01:00
Matthias
f06b58dc91 Test MaxDrawdown desc 2020-12-07 08:23:10 +01:00
Matthias
089c463cfb Introduce max_drawdown protection 2020-12-07 08:23:10 +01:00
Matthias
9d6f3a89ef Improve docs and fix typos 2020-12-07 08:23:10 +01:00
Matthias
768d7fa196 Readd optional for get_pair_locks - it's necessary 2020-12-07 08:23:10 +01:00
Matthias
9947dcd1da Beta feature warning 2020-12-07 08:23:10 +01:00
Matthias
ad746627b3 Fix lock-loop 2020-12-07 08:23:10 +01:00
Matthias
397a15cb61 Improve protection documentation 2020-12-07 08:23:10 +01:00
Matthias
4351a26b4c Move stop_duration to parent class
avoids reimplementation and enhances standardization
2020-12-07 08:23:10 +01:00
Matthias
12e84bda1e Add developer docs for Protections 2020-12-07 08:23:10 +01:00
Matthias
6d0f16920f Get Longest lock logic 2020-12-07 08:23:10 +01:00
Matthias
dce2364672 Add stoploss per pair support 2020-12-07 08:23:10 +01:00
Matthias
dcdf4a0503 Improve tests 2020-12-07 08:23:10 +01:00
Matthias
32cde1cb7d Improve test for lowprofitpairs 2020-12-07 08:23:10 +01:00
Matthias
8f958ef723 Improve login-mixin structure 2020-12-07 08:23:10 +01:00
Matthias
8d9c66a638 Add LogginMixin to freqtradebot class to avoid over-logging 2020-12-07 08:23:10 +01:00
Matthias
be57ceb252 Remove confusing entry
(in this branch of the if statement, candle_date is empty
2020-12-07 08:23:10 +01:00
Matthias
5e3d2401f5 Only call stop methods when they actually support this method 2020-12-07 08:23:10 +01:00
Matthias
2cd54a5933 Allow disabling output from plugins 2020-12-07 08:23:10 +01:00
Matthias
8ebd6ad200 Rename login-mixin log method 2020-12-07 08:23:10 +01:00
Matthias
2e5b9fd4b2 format profit in low_profit_pairs 2020-12-07 08:23:10 +01:00
Matthias
e29d918ea5 Avoid double-locks also in per pair locks 2020-12-07 08:23:10 +01:00
Matthias
fc97266dd4 Add "now" to lock_pair method 2020-12-07 08:23:10 +01:00
Matthias
59091ef2b7 Add helper method to calculate protection until 2020-12-07 08:23:10 +01:00
Matthias
47cd856fea Include protection documentation 2020-12-07 08:23:10 +01:00
Matthias
5133675988 Apply all stops in the list, even if the first would apply already 2020-12-07 08:23:10 +01:00
Matthias
9484ee6690 Test for low_profit_pairs 2020-12-07 08:23:10 +01:00
Matthias
bb06365c50 Improve protection documentation 2020-12-07 08:23:10 +01:00
Matthias
1f703dc341 Improve protection documentation 2020-12-07 08:23:10 +01:00
Matthias
00d4820bc1 Add low_profit_pairs 2020-12-07 08:23:10 +01:00
Matthias
9f6c2a583f Better wording for config options 2020-12-07 08:23:10 +01:00
Matthias
8dbef6bbea Add test for cooldown period 2020-12-07 08:23:10 +01:00
Matthias
fe0afb9883 Implement calling of per-pair protection 2020-12-07 08:23:10 +01:00
Matthias
2a66c33a4e Add locks per pair 2020-12-07 08:23:10 +01:00
Matthias
ff7ba23477 Simplify enter_positions and add global pairlock check 2020-12-07 08:23:10 +01:00
Matthias
05be33ccd4 Simplify is_pair_locked 2020-12-07 08:23:10 +01:00
Matthias
56975db2ed Add more tests 2020-12-07 08:23:10 +01:00
Matthias
2b85e7eac3 Add initial tests for StoplossGuard protection 2020-12-07 08:23:10 +01:00
Matthias
816703b8e1 Improve protections work 2020-12-07 08:23:10 +01:00
Matthias
f39a534fc0 Implement global stop (First try) 2020-12-07 08:23:10 +01:00
Matthias
246b4a57a4 add small note to pairlist dev docs 2020-12-07 08:23:10 +01:00
Matthias
04878c3ce1 Rename test directory for pairlist 2020-12-07 08:23:10 +01:00
Matthias
3447f1ae53 Implement first stop method 2020-12-07 08:23:10 +01:00
Matthias
a0bd2ce837 Add first version of protection manager 2020-12-07 08:23:10 +01:00
Matthias
b6b9c8e5cc Move "slow-log" to it's own mixin 2020-12-07 08:23:10 +01:00
Matthias
f01d86060a Merge pull request #4040 from freqtrade/dependabot/pip/develop/ccxt-1.38.87
Bump ccxt from 1.38.55 to 1.38.87
2020-12-07 08:12:30 +01:00
Matthias
1fd652d3de Merge pull request #4039 from freqtrade/dependabot/pip/develop/mkdocs-material-6.1.7
Bump mkdocs-material from 6.1.6 to 6.1.7
2020-12-07 08:06:02 +01:00
dependabot[bot]
647e6509a4 Bump ccxt from 1.38.55 to 1.38.87
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.38.55 to 1.38.87.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.38.55...1.38.87)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-07 05:48:43 +00:00
dependabot[bot]
0c0eb8236d Bump mkdocs-material from 6.1.6 to 6.1.7
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.1.6 to 6.1.7.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.1.6...6.1.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-07 05:48:23 +00:00
Matthias
51fbd0698c Move get_logs to be static method 2020-12-06 19:57:48 +01:00
Matthias
245c19f5e9 Add simple test for /stats call 2020-12-05 14:48:56 +01:00
Matthias
aa27c9ace2 Reorder methods in telegram
/stats is closely related to /profit
2020-12-05 14:39:50 +01:00
Matthias
143423145c Refactor most of the logic to rpc.py
this way /stats can be used by other RPC methods too
2020-12-05 14:38:42 +01:00
Matthias
c556d1b37e Make /stats working 2020-12-05 14:06:46 +01:00
Matthias
8f61b68b2a Merge branch 'develop' into pr/imxuwang/3799 2020-12-05 14:06:23 +01:00
Matthias
058d40a72c Fix telegram /daily command without arguments 2020-12-05 08:16:40 +01:00
Matthias
71e46794b4 Add updating documentation
closes #4036
2020-12-04 19:59:26 +01:00
Matthias
f37af9d98a Merge pull request #4033 from Samaoo/patch-2
Put dollar sign after amount in edge.md
2020-12-04 19:50:46 +01:00
Samaoo
7f453033a4 Update edge.md 2020-12-04 16:53:41 +01:00
Matthias
2fbbeb970b Gracefully handle cases where no buy price was found
closes #4030
2020-12-04 07:42:16 +01:00
Matthias
22595e6f92 Merge pull request #3929 from radwayne/roi_trailing_backtest
change backtesting behaviour if roi and trailing-stop happen at the same time
2020-12-03 19:40:46 +01:00
Matthias
01cb676f2c Merge pull request #4015 from freqtrade/dependabot/pip/develop/python-telegram-bot-13.1
Bump python-telegram-bot from 13.0 to 13.1
2020-12-02 19:02:10 +01:00
Matthias
9e063b9fc8 Merge pull request #4026 from Samaoo/patch-1
Update faq.md
2020-12-02 09:05:59 +01:00
Samaoo
9b4a81c0a4 Update faq.md 2020-12-02 08:40:49 +01:00
Matthias
c09c23eab1 Make sure non-int telegram values don't crash the bot 2020-12-02 07:51:59 +01:00
Matthias
d039ce1fb3 Update available columns for hyperopt
closes #4025
2020-12-02 06:46:18 +01:00
Matthias
4f8bc73d1a Merge pull request #4024 from Samaoo/patch-2
Update faq.md
2020-12-02 06:40:02 +01:00
Samaoo
3c4fe66d86 Update faq.md 2020-12-01 21:50:51 +01:00
Samaoo
4bc24ece41 Update faq.md 2020-12-01 21:49:50 +01:00
Samaoo
c1fffb9925 Update faq.md 2020-12-01 21:38:54 +01:00
Matthias
d6cc3d7374 Improve FAQ
related to question in #4023
2020-12-01 19:58:06 +01:00
Matthias
5dfa1807a3 Fix tests after small updates 2020-12-01 19:57:43 +01:00
Matthias
36b7edc342 Update typing errors 2020-12-01 19:57:09 +01:00
Matthias
de0c5f9133 Merge pull request #4022 from freqtrade/pi_setup
improve setup.sh script
2020-12-01 07:03:26 +01:00
Matthias
cec771b593 Ask for plotting dependency installation 2020-12-01 06:48:16 +01:00
Matthias
5f70d1f9a7 Ask for hyperopt installation during setup
closes #2871
2020-12-01 06:48:16 +01:00
Matthias
95b24ba8a9 Update setup.sh with some specifics 2020-12-01 06:48:12 +01:00
Matthias
202ca88e23 Changes to pi steup 2020-11-30 17:37:19 +01:00
dependabot[bot]
14d44b2cd6 Bump python-telegram-bot from 13.0 to 13.1
Bumps [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) from 13.0 to 13.1.
- [Release notes](https://github.com/python-telegram-bot/python-telegram-bot/releases)
- [Changelog](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-telegram-bot/python-telegram-bot/compare/v13.0...v13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 08:02:09 +00:00
Matthias
dda5bcbc8d Merge pull request #4009 from mrsegen/patch-4
[Pairlist] Add PerformanceFilter
2020-11-30 07:48:15 +01:00
Matthias
5da41160bf Merge pull request #4017 from freqtrade/dependabot/pip/develop/ccxt-1.38.55
Bump ccxt from 1.38.13 to 1.38.55
2020-11-30 07:29:14 +01:00
Matthias
a22fd7eb3b Merge pull request #4016 from freqtrade/dependabot/pip/develop/plotly-4.13.0
Bump plotly from 4.12.0 to 4.13.0
2020-11-30 07:29:01 +01:00
dependabot[bot]
275cfb3a9c Bump ccxt from 1.38.13 to 1.38.55
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.38.13 to 1.38.55.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.38.13...1.38.55)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 05:42:12 +00:00
dependabot[bot]
f17c7f0609 Bump plotly from 4.12.0 to 4.13.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/plotly/plotly.py/releases)
- [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.py/compare/v4.12.0...v4.13.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 05:42:00 +00:00
Leif Segen
b7de18608d Trigger CI 2020-11-29 10:30:43 -06:00
Leif Segen
99abe52043 Trigger CI 2020-11-29 10:30:02 -06:00
Leif Segen
5f8e67d2b2 Update docs/includes/pairlists.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-11-29 05:05:54 -06:00
Matthias
18de9cc5e5 Merge pull request #4012 from freqtrade/best_worst_pair
Enhance backtesting summary report
2020-11-29 10:54:09 +01:00
Leif Segen
90070f0dc5 Force test rerun 2020-11-28 17:17:40 -06:00
Leif Segen
1791495475 Trigger another run of tests 2020-11-28 16:50:44 -06:00
Leif Segen
4b6f5b92b5 Remove non-pertinent test case 2020-11-28 12:47:36 -06:00
Leif Segen
e7a035eefe Lint 2020-11-28 12:29:31 -06:00
Leif Segen
d6c9391924 Restoring expectation 2020-11-28 12:18:23 -06:00
Leif Segen
323c0657f8 Sort by profit after sort by count/pair 2020-11-28 12:17:03 -06:00
Leif Segen
6a74c57c3d Pair name-based sorting.
Attempt at more rational string sorting. Change test to show not working as expected.
2020-11-28 11:33:25 -06:00
Matthias
e40d97e05e Small formatting improvements 2020-11-28 17:52:29 +01:00
Matthias
5d3f59df90 Add best / worst trade 2020-11-28 17:45:56 +01:00
Matthias
a00f852cf9 Add best / worst pair to summary statistics 2020-11-28 17:37:10 +01:00
Leif Segen
03c5714399 Use explicit merge without depending on library detail. Add no trades case. 2020-11-28 09:45:17 -06:00
Leif Segen
e1d42ba78c Alphabetize 2020-11-28 09:44:01 -06:00
Matthias
56529180eb Further improve hyperopt docs 2020-11-28 16:42:08 +01:00
Matthias
ff286bd80c Slightly clarify hyperopt docs 2020-11-28 16:32:44 +01:00
Matthias
a47d8dbe56 Small refactor, avoiding duplicate calculation of profits 2020-11-28 11:35:29 +01:00
Matthias
829a47b187 Merge pull request #4006 from freqtrade/remove_deprecated_experimentals
Remove deprecated experimental settings
2020-11-28 10:34:47 +01:00
Matthias
4cb331b5ad Remove non-needed parameters from tests 2020-11-28 10:24:44 +01:00
Matthias
b7703e6428 Merge pull request #4007 from mrsegen/patch-2
Fix link
2020-11-28 10:22:58 +01:00
Leif Segen
37d2e476df isort imports 2020-11-28 01:59:30 -06:00
Leif Segen
f448564073 Lint 2020-11-28 01:49:46 -06:00
Leif Segen
ecce5265f5 Linting 2020-11-28 01:43:19 -06:00
Leif Segen
fefa500963 More lint 2020-11-28 01:34:40 -06:00
Leif Segen
966c6b308f Satisfy linter. 2020-11-28 01:34:18 -06:00
Leif Segen
1f7d681ddb Merge branch 'patch-4' of https://github.com/mrsegen/freqtrade into patch-4 2020-11-28 01:22:15 -06:00
Leif Segen
dbd50fdff6 Document filter. 2020-11-28 01:22:03 -06:00
Leif Segen
cfbd1c4c43 Merge branch 'develop' into patch-4 2020-11-28 01:17:34 -06:00
Leif Segen
662ec32073 Add test cases 2020-11-28 01:15:36 -06:00
Leif Segen
26855800a3 Remove unused seed 2020-11-28 00:39:18 -06:00
Leif Segen
4600bb807c Existing tests pass. 2020-11-28 00:38:06 -06:00
Leif Segen
9538fa1d72 Tweak main parameterized block for PerformanceFilter
Remove randomized exception that was geared toward ShuffleFilter. Remove case involvoing seed, also geared toward ShuffleFilter. Mock get_overall_performance().
2020-11-28 00:24:48 -06:00
Leif Segen
91b4c80d35 Remove unused parameters 2020-11-27 22:18:49 -06:00
Leif Segen
afb795b6f5 Remove unnecessary test
PerforamnceFilter doesn't use seeds, so no need to provide different ones.
2020-11-27 22:08:23 -06:00
Leif Segen
380cca2252 Remove unused imports 2020-11-27 22:00:48 -06:00
Leif Segen
3357350628 Revert unintended change 2020-11-27 22:00:36 -06:00
Leif Segen
c34150552f Revert unrelated change 2020-11-27 21:36:55 -06:00
Leif Segen
05686998bb Add starter entry in documentation 2020-11-27 21:26:42 -06:00
Leif Segen
7cbd89657f Initial step towards implementing proposed code 2020-11-27 21:24:40 -06:00
Leif Segen
89573348b6 Fix link 2020-11-27 20:37:52 -06:00
Matthias
af1b3721fb remove duplicate settings check 2020-11-27 20:28:17 +01:00
Matthias
95c3c45ec9 Remove long deprecated settings that moved from experimental to
ask_strategy
2020-11-27 20:24:32 +01:00
Leif Segen
46ec6f498c Correct link
Fix prior redirection to a non-working link: https://www.freqtrade.io/en/latest/telegram-usage/configuration/#understand-forcebuy_enable
2020-11-27 12:51:44 -06:00
Matthias
ab7807cee5 Merge pull request #4004 from freqtrade/new_release
New release 2020.11
2020-11-27 17:11:29 +01:00
Matthias
1353c59f18 Version bump to 2020.11 2020-11-27 11:24:14 +01:00
Matthias
5d038552ae Merge branch 'stable' into new_release 2020-11-27 11:18:42 +01:00
Matthias
c69ce28b76 Update backtest assumption documentation 2020-11-27 09:26:58 +01:00
Matthias
fefb4b23d0 revise logic in should_sell 2020-11-27 09:24:53 +01:00
Matthias
4aa6ebee04 Add more tests for #2422 2020-11-27 09:17:25 +01:00
Matthias
57461a59f3 Update backtesting documentation with new logic 2020-11-27 08:30:17 +01:00
Matthias
81d08c4def Add detailed backtest test verifying the ROI / trailing stop collision 2020-11-27 08:24:56 +01:00
Matthias
22ff67c8f8 Merge pull request #4002 from mrsegen/patch-3
[Documentation] Prevent unintended LaTeX rendering
2020-11-27 08:06:47 +01:00
Matthias
31449987c0 Fix mkdocs rendering 2020-11-27 07:35:12 +01:00
Matthias
cff0527919 Merge pull request #4001 from mrsegen/patch-2
[Documentation] Fix parameter name
2020-11-27 07:00:30 +01:00
Leif Segen
fce31447ed Prevent unintended LaTeX rendering 2020-11-26 19:38:20 -06:00
Leif Segen
98118f5e95 Fix parameter name
Correct which parameter name was referred to within the 2nd Note under "Amend last stake amount"
2020-11-26 18:46:36 -06:00
Matthias
dddbc799f9 have kraken stoploss-limit support trailing stop 2020-11-26 19:40:36 +01:00
Matthias
83f6259594 Merge pull request #3999 from hoeckxer/documentation_typo
Fixed a small typo in the pairlist documentation
2020-11-26 11:21:48 +01:00
hoeckxer
0b68402c10 Fixed a small typo in the pairlist documentation
Signed-off-by: hoeckxer <hawkeyenl@yahoo.com>
2020-11-26 10:24:48 +01:00
Matthias
1d56c87a34 Fully support kraken limit stoploss 2020-11-25 21:40:39 +01:00
Matthias
53231d94a9 Merge pull request #3975 from freqtrade/volatility_filter
RangeStabilityFilter filter - filter for pairs without much movement
2020-11-25 19:17:06 +01:00
Matthias
76539bc700 Merge pull request #3997 from freqtrade/kraken_limitsl
Kraken stoploss-limit
2020-11-25 16:58:34 +01:00
Matthias
d0d9921b42 Reorder mkdocs sequence 2020-11-25 16:27:41 +01:00
Matthias
c14c0f60a1 Add Support for kraken stoploss-limit 2020-11-25 16:27:27 +01:00
Matthias
8180393bbc Merge branch 'develop' into kraken_limitsl 2020-11-25 16:04:33 +01:00
Matthias
7f621416a1 Merge pull request #3996 from freqtrade/fix/doublelog
Fix/doublelog
2020-11-25 15:22:37 +01:00
Matthias
6810192992 Update docstring for new filter 2020-11-25 15:14:36 +01:00
Matthias
8ae604d473 Ensure we're not running off of empty dataframes 2020-11-25 15:14:36 +01:00
Matthias
0d349cb355 Small finetuning 2020-11-25 15:14:36 +01:00
Matthias
8f1d2ff070 Renamd volatilityFilter to RangeStabilityFilter 2020-11-25 15:14:29 +01:00
Matthias
46389e343b Skip filehandler test on windows - as that causes a permission-error 2020-11-25 15:10:17 +01:00
Matthias
b9980330a5 Add explicit test for FileHandler 2020-11-25 14:58:09 +01:00
Matthias
0104c9fde6 Fix double logging 2020-11-25 14:31:34 +01:00
Matthias
99b67348b2 Add test for double-logging 2020-11-25 14:30:58 +01:00
Matthias
ceb50a7807 use exception handler when downloading data
closes #3992
2020-11-25 07:57:27 +01:00
Matthias
bd98ff6332 Update docstring in all pairlists 2020-11-24 20:24:51 +01:00
Matthias
006436a18d Require use_sell_signal to be true for edge
Otherwise edge will have strange results, as
edge runs with sell signal, while the bot runs without sell signal,
causing results to be invalid

closes #3900
2020-11-24 07:47:35 +01:00
Matthias
730c9ce471 Add Max_open_trades to summary metrics 2020-11-24 06:57:26 +01:00
Leif Segen
d959eeb97d Merge pull request #2 from freqtrade/develop
catch up forked dev with original dev
2020-11-23 22:11:17 -06:00
Leif Segen
312533fded Match current dev file 2020-11-23 22:08:53 -06:00
Matthias
82335027b7 Merge pull request #3979 from freqtrade/dependabot/pip/develop/aiohttp-3.7.3
Bump aiohttp from 3.7.2 to 3.7.3
2020-11-23 10:30:51 +01:00
dependabot[bot]
1ec99e6b76 Bump aiohttp from 3.7.2 to 3.7.3
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.7.2 to 3.7.3.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.7.2...v3.7.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 08:05:45 +00:00
Matthias
d325236f96 Merge pull request #3981 from freqtrade/dependabot/pip/develop/questionary-1.8.1
Bump questionary from 1.8.0 to 1.8.1
2020-11-23 07:44:12 +01:00
Matthias
421265243c Merge pull request #3978 from freqtrade/dependabot/pip/develop/ccxt-1.38.13
Bump ccxt from 1.37.69 to 1.38.13
2020-11-23 07:43:20 +01:00
Matthias
16899b9df1 Merge pull request #3983 from freqtrade/dependabot/pip/develop/coveralls-2.2.0
Bump coveralls from 2.1.2 to 2.2.0
2020-11-23 07:37:36 +01:00
Matthias
9427b5e924 Merge pull request #3982 from freqtrade/dependabot/pip/develop/python-rapidjson-0.9.4
Bump python-rapidjson from 0.9.3 to 0.9.4
2020-11-23 07:37:03 +01:00
Matthias
87a34b4306 Merge pull request #3980 from freqtrade/dependabot/pip/develop/mkdocs-material-6.1.6
Bump mkdocs-material from 6.1.5 to 6.1.6
2020-11-23 07:36:32 +01:00
dependabot[bot]
56629d882e Bump coveralls from 2.1.2 to 2.2.0
Bumps [coveralls](https://github.com/coveralls-clients/coveralls-python) from 2.1.2 to 2.2.0.
- [Release notes](https://github.com/coveralls-clients/coveralls-python/releases)
- [Changelog](https://github.com/coveralls-clients/coveralls-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/coveralls-clients/coveralls-python/compare/2.1.2...2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:51:03 +00:00
dependabot[bot]
7c7a8190ab Bump python-rapidjson from 0.9.3 to 0.9.4
Bumps [python-rapidjson](https://github.com/python-rapidjson/python-rapidjson) from 0.9.3 to 0.9.4.
- [Release notes](https://github.com/python-rapidjson/python-rapidjson/releases)
- [Changelog](https://github.com/python-rapidjson/python-rapidjson/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-rapidjson/python-rapidjson/compare/v0.9.3...v0.9.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:50:54 +00:00
dependabot[bot]
be4807d85c Bump questionary from 1.8.0 to 1.8.1
Bumps [questionary](https://github.com/tmbo/questionary) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/tmbo/questionary/releases)
- [Commits](https://github.com/tmbo/questionary/compare/1.8.0...1.8.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:50:52 +00:00
dependabot[bot]
83b4cd7b39 Bump mkdocs-material from 6.1.5 to 6.1.6
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.1.5 to 6.1.6.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.1.5...6.1.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:50:51 +00:00
dependabot[bot]
ec33011255 Bump ccxt from 1.37.69 to 1.38.13
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.37.69 to 1.38.13.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.37.69...1.38.13)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:50:43 +00:00
Matthias
29c6a9263d Protect against 0 values 2020-11-22 15:50:44 +01:00
Matthias
7e4fe23bf9 Add VolatilityFilter to full config 2020-11-22 11:08:01 +01:00
Matthias
f12a8afd41 Add test for ohlcv_as_df 2020-11-22 10:56:19 +01:00
Matthias
2e1551a2eb Improve tests of volatilityfilter 2020-11-21 19:57:17 +01:00
Matthias
f8fab5c4f8 Add tests for failure cases 2020-11-21 15:51:39 +01:00
Matthias
6b672cd0b9 Document volatilityFilter 2020-11-21 15:43:29 +01:00
Matthias
191616e4e5 Add first tests for volatilityFilter 2020-11-21 15:39:04 +01:00
Matthias
109824c9a8 Add VolatilityFilter 2020-11-21 15:39:00 +01:00
Matthias
fb86d8f8ff Add get_historic_ohlcv_as_df to support VolatilityFilter 2020-11-21 15:28:50 +01:00
Matthias
73f0e6e704 Improve wording for discord server
fix link to correct docker install guide
2020-11-21 11:40:28 +01:00
Matthias
4d60a4cf4e Add warning to StochRSI in sample strategy
closes #2961
2020-11-21 11:32:46 +01:00
Matthias
8ffd6f2469 Merge pull request #3971 from freqtrade/fix/3967
Fix bug when converting trades do ohlcv and no trades are available.
2020-11-21 11:14:30 +01:00
Matthias
89ea8dbef2 Update slack invite 2020-11-21 11:13:44 +01:00
Matthias
e8e3ca0c3c Catch ValueError from trade_conversion
closes #3967
2020-11-21 10:57:19 +01:00
Matthias
83861fabde Fix #3967, move TradeList type to constants 2020-11-21 10:52:15 +01:00
Matthias
5ed85963a9 Allow forcebuy price to be a string by converting it to float
fix #3970
2020-11-21 10:39:49 +01:00
Matthias
aa0c3dced8 Improve order types documentation 2020-11-20 13:14:02 +01:00
Matthias
fa0fcfb492 Merge pull request #3939 from drdux/historic-pair
Historic pair
2020-11-19 19:46:08 +01:00
Matthias
97e58a42f4 Update documentation with new options 2020-11-19 19:17:31 +01:00
Matthias
f88fe5d950 Document new "allow_inactive" option 2020-11-19 19:14:43 +01:00
Matthias
7a8b274a44 Merge branch 'develop' into pr/imxuwang/3799 2020-11-19 13:18:03 +01:00
Matthias
37849f8496 Merge pull request #3965 from freqtrade/fix_hdf5trades
Convert np to None when loading hdf5 trades to allow duplicate detection
2020-11-19 11:22:25 +01:00
Matthias
52c9a2c37f Convert np to None when loading hdf5 trades to allow duplicate detection 2020-11-19 07:31:54 +01:00
Matthias
dd42d61d03 Run CI on 3.9 2020-11-17 19:44:39 +01:00
dependabot[bot]
181d3a3808 Bump python from 3.8.6-slim-buster to 3.9.0-slim-buster
Bumps python from 3.8.6-slim-buster to 3.9.0-slim-buster.

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-17 19:44:05 +01:00
Matthias
bf6682d37f Merge pull request #3962 from Samaoo/patch-2
Fix typo in windows installation docs
2020-11-17 14:49:04 +01:00
Samaoo
854d0c481f Update windows_installation.md 2020-11-17 14:14:42 +01:00
Samaoo
4a215821cd Fix typo in windows installation docs 2020-11-17 14:07:24 +01:00
Matthias
9621734adc Allow setting datafromat via configuration
closes #3953
2020-11-17 06:53:38 +01:00
Matthias
853bd06841 Merge pull request #3959 from freqtrade/dependabot/pip/develop/ccxt-1.37.69
Bump ccxt from 1.37.41 to 1.37.69
2020-11-16 11:02:53 +01:00
dependabot[bot]
3f2addb729 Bump ccxt from 1.37.41 to 1.37.69
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.37.41 to 1.37.69.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.37.41...1.37.69)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 09:17:22 +00:00
Matthias
320dca19cb Merge pull request #3956 from freqtrade/dependabot/pip/develop/urllib3-1.26.2
Bump urllib3 from 1.25.11 to 1.26.2
2020-11-16 10:16:37 +01:00
dependabot[bot]
f092a92399 Bump urllib3 from 1.25.11 to 1.26.2
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.11 to 1.26.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.11...1.26.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 07:51:10 +00:00
Matthias
d00a955af9 Merge pull request #3958 from freqtrade/dependabot/pip/develop/requests-2.25.0
Bump requests from 2.24.0 to 2.25.0
2020-11-16 07:33:39 +01:00
Matthias
d6bd018da4 Merge pull request #3957 from freqtrade/dependabot/pip/develop/flask-jwt-extended-3.25.0
Bump flask-jwt-extended from 3.24.1 to 3.25.0
2020-11-16 07:10:17 +01:00
Matthias
8c88173b74 Merge pull request #3955 from freqtrade/dependabot/pip/develop/mkdocs-material-6.1.5
Bump mkdocs-material from 6.1.4 to 6.1.5
2020-11-16 07:02:54 +01:00
dependabot[bot]
23947cf30b Bump requests from 2.24.0 to 2.25.0
Bumps [requests](https://github.com/psf/requests) from 2.24.0 to 2.25.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.24.0...v2.25.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 05:40:50 +00:00
dependabot[bot]
e52c181a2a Bump flask-jwt-extended from 3.24.1 to 3.25.0
Bumps [flask-jwt-extended](https://github.com/vimalloc/flask-jwt-extended) from 3.24.1 to 3.25.0.
- [Release notes](https://github.com/vimalloc/flask-jwt-extended/releases)
- [Commits](https://github.com/vimalloc/flask-jwt-extended/compare/3.24.1...3.25.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 05:40:35 +00:00
dependabot[bot]
6ebc2f3897 Bump mkdocs-material from 6.1.4 to 6.1.5
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.1.4 to 6.1.5.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.1.4...6.1.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 05:40:25 +00:00
Samaoo
ef4ab601a9 Update exchanges.md 2020-11-15 20:02:19 +01:00
Samaoo
26176d4c91 Update exchanges.md
According to 
https://blog.kraken.com/post/5282/stop-loss-limit-take-profit-limit-two-new-advanced-orders-go-live-on-kraken/
Stop Loss Limit orders are enabled again
2020-11-15 19:55:09 +01:00
Matthias
0612658ec7 Merge pull request #3952 from Samaoo/patch-1
Fix typo in windows installation docs
2020-11-15 15:56:20 +01:00
Matthias
34120f6eb8 Merge pull request #3950 from xsa-dev/patch-1
Update telegram-usage.md
2020-11-15 15:52:50 +01:00
Matthias
7b4c1ec3ce Small wording changes 2020-11-15 15:40:40 +01:00
Aleksey Savin
da16474b25 Update telegram-usage.md 2020-11-15 15:13:44 +03:00
SamVerhaegen
7243c8ee56 Fix typo in windows installation docs. 2020-11-15 13:06:05 +01:00
Matthias
ab85c5bb49 Merge pull request #3946 from freqtrade/plot_startup_candles
Plot startup candles
2020-11-14 19:28:38 +01:00
Matthias
05f0cc787c Plotting should use startup_candles too
closes #3943
2020-11-14 09:28:00 +01:00
Matthias
164105acf2 Adjust startup_candle_count of sample strategies 2020-11-14 08:25:57 +01:00
Matthias
c09b641860 Merge pull request #3944 from freqtrade/fix_aioexception
Catch asyncio.TimeoutError when reloading async markets
2020-11-13 16:04:14 +01:00
Matthias
08b52926c8 Catch asyncio.TimeoutError when reloading async markets 2020-11-13 10:43:48 +01:00
Matthias
4eb96cfc4f Allow locks to be gathered even when the bot is stopped 2020-11-13 06:51:45 +01:00
Daniel Goller
2d6bfe1592 only skip pair validation rather than all of it 2020-11-12 11:32:45 +00:00
Daniel Goller
2424ac94c2 skip the check for active markets with flag for existing StaticPairList 2020-11-12 11:29:46 +00:00
Daniel Goller
2640dfee93 Revert "Added ConstPairList handler to skip validation of pairs if you want to backtest a pair that's not live any more, e.g. expiring contracts."
This reverts commit 13da8f9368.
2020-11-12 11:27:30 +00:00
Daniel Goller
916776bb53 Option to skip exchange validation, required to backtest pairs that are not live on the exchange any more. 2020-11-09 08:37:38 +00:00
Daniel Goller
13da8f9368 Added ConstPairList handler to skip validation of pairs if you want to backtest a pair that's not live any more, e.g. expiring contracts. 2020-11-09 08:34:40 +00:00
Matthias
5f483acdd0 Merge pull request #3938 from freqtrade/dependabot/pip/develop/ccxt-1.37.41
Bump ccxt from 1.37.14 to 1.37.41
2020-11-09 09:03:31 +01:00
dependabot[bot]
59e846d554 Bump ccxt from 1.37.14 to 1.37.41
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.37.14 to 1.37.41.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.37.14...1.37.41)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 07:48:14 +00:00
Matthias
4bc693c17c Merge pull request #3935 from freqtrade/dependabot/pip/develop/questionary-1.8.0
Bump questionary from 1.7.0 to 1.8.0
2020-11-09 07:27:49 +01:00
Matthias
d85fd3060a Merge pull request #3936 from freqtrade/dependabot/pip/develop/scipy-1.5.4
Bump scipy from 1.5.3 to 1.5.4
2020-11-09 07:03:35 +01:00
Matthias
52c147c88e Merge pull request #3934 from freqtrade/dependabot/pip/develop/numpy-1.19.4
Bump numpy from 1.19.3 to 1.19.4
2020-11-09 07:02:56 +01:00
Matthias
2a1835b165 Merge pull request #3933 from freqtrade/dependabot/pip/develop/mkdocs-material-6.1.4
Bump mkdocs-material from 6.1.2 to 6.1.4
2020-11-09 07:02:22 +01:00
dependabot[bot]
88b2f3f0d1 Bump scipy from 1.5.3 to 1.5.4
Bumps [scipy](https://github.com/scipy/scipy) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](https://github.com/scipy/scipy/compare/v1.5.3...v1.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 05:44:51 +00:00
dependabot[bot]
6063f2f91f Bump questionary from 1.7.0 to 1.8.0
Bumps [questionary](https://github.com/tmbo/questionary) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/tmbo/questionary/releases)
- [Commits](https://github.com/tmbo/questionary/compare/1.7.0...1.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 05:44:49 +00:00
dependabot[bot]
42d9e3a28f Bump numpy from 1.19.3 to 1.19.4
Bumps [numpy](https://github.com/numpy/numpy) from 1.19.3 to 1.19.4.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/master/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.19.3...v1.19.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 05:44:40 +00:00
dependabot[bot]
5243214a36 Bump mkdocs-material from 6.1.2 to 6.1.4
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.1.2 to 6.1.4.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.1.2...6.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 05:44:29 +00:00
Matthias
2af1c80fd5 Convert _rpc_show_config to static method 2020-11-08 11:26:02 +01:00
radwayne
8e03fee868 Update interface.py
Changed The should_sell() method, to handle the case where both ROI and trailing stoploss are reached in backtest.
2020-11-06 13:56:46 +01:00
Matthias
b8f6f09de8 Merge pull request #3923 from freqtrade/rpc/combine_profit_fields
Rpc/combine profit fields
2020-11-03 19:22:27 +01:00
Matthias
7d2bd00f0c Update forgotten arrow.timestamp occurance 2020-11-03 09:23:07 +01:00
Matthias
b58d6d38b5 Use correct fields in telegram 2020-11-03 08:59:11 +01:00
Matthias
d1dab23283 Remove deprecated api fields 2020-11-03 08:59:11 +01:00
Matthias
cf89a773da Standardize trade api outputs
there should be no difference between current_profit and close_profit
 it's always profit, and the information if it's a closed trade is available elsewhere
2020-11-03 08:58:57 +01:00
Matthias
887d78171c Merge pull request #3857 from freqtrade/arrow_deprecation_timestamp
Convert timestamp to int_timestamp for all arrow occurances
2020-11-02 16:40:43 +01:00
Matthias
ac55215fca Merge pull request #3921 from freqtrade/dependabot/pip/develop/ccxt-1.37.14
Bump ccxt from 1.36.85 to 1.37.14
2020-11-02 15:39:03 +01:00
dependabot[bot]
d56da41679 Bump ccxt from 1.36.85 to 1.37.14
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.36.85 to 1.37.14.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.36.85...1.37.14)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-02 13:50:07 +00:00
Matthias
894853b300 Merge pull request #3917 from freqtrade/dependabot/pip/develop/aiohttp-3.7.2
Bump aiohttp from 3.7.1 to 3.7.2
2020-11-02 14:49:25 +01:00
dependabot[bot]
74d8a985e2 Bump aiohttp from 3.7.1 to 3.7.2
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.7.1 to 3.7.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.7.1...v3.7.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-02 08:44:26 +00:00
Matthias
7e64a91720 Merge pull request #3919 from freqtrade/dependabot/pip/develop/pandas-1.1.4
Bump pandas from 1.1.3 to 1.1.4
2020-11-02 09:43:29 +01:00
dependabot[bot]
aed44ef6b3 Bump pandas from 1.1.3 to 1.1.4
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Changelog](https://github.com/pandas-dev/pandas/blob/master/RELEASE.md)
- [Commits](https://github.com/pandas-dev/pandas/compare/v1.1.3...v1.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-02 07:46:28 +00:00
Matthias
a8c6c3e2fa Merge pull request #3920 from freqtrade/dependabot/pip/develop/pytest-6.1.2
Bump pytest from 6.1.1 to 6.1.2
2020-11-02 07:30:43 +01:00
Matthias
8cbc2ce18d Merge pull request #3916 from freqtrade/dependabot/pip/develop/numpy-1.19.3
Bump numpy from 1.19.2 to 1.19.3
2020-11-02 07:30:06 +01:00
Matthias
a87fd6fcc7 Merge pull request #3918 from freqtrade/dependabot/pip/develop/mkdocs-material-6.1.2
Bump mkdocs-material from 6.1.0 to 6.1.2
2020-11-02 07:29:31 +01:00
dependabot[bot]
21b22760a7 Bump pytest from 6.1.1 to 6.1.2
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.1.1 to 6.1.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.1.1...6.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-02 05:55:12 +00:00
dependabot[bot]
6c3753ac7f Bump mkdocs-material from 6.1.0 to 6.1.2
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.1.0 to 6.1.2.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.1.0...6.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-02 05:55:07 +00:00
dependabot[bot]
81fb0c5726 Bump numpy from 1.19.2 to 1.19.3
Bumps [numpy](https://github.com/numpy/numpy) from 1.19.2 to 1.19.3.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/master/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.19.2...v1.19.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-02 05:54:57 +00:00
Matthias
16572f90e3 Merge pull request #3913 from freqtrade/fix/dmmp
FIx bug with dmmp
2020-11-01 12:48:34 +01:00
Matthias
e73203acb8 FIx bug with dmmp 2020-11-01 10:51:07 +01:00
Matthias
a262618809 Merge pull request #3910 from matspi/dataformat-informative-pair
Dataformat informative pair
2020-10-31 15:47:40 +01:00
Matthias Spiller
0d11f0bd75 Add unit test for hdf5 dataformat for informative pairs 2020-10-31 11:45:46 +00:00
Matthias Spiller
78874fa865 informative_pairs does not honor dataformat 2020-10-31 10:53:51 +00:00
Matthias Spiller
38fc5d680b Enable usage of devcontainer for macOS users 2020-10-31 10:31:58 +00:00
Matthias
4d4471480b Merge pull request #3905 from freqtrade/new_release
New release 2020.10
2020-10-30 20:15:57 +01:00
Matthias
aaa6468983 Version bump to 2020.10 2020-10-30 07:48:05 +01:00
Matthias
55838b574c Merge branch 'stable' into new_release 2020-10-30 07:47:47 +01:00
Matthias
684de9c7d0 Merge pull request #3903 from freqtrade/download_data_stake
Download data remove stake_currency
2020-10-29 09:15:46 +01:00
Matthias
3ca97223f2 Improve test for test_pairlist 2020-10-29 08:09:50 +01:00
Matthias
d8ff79a2fa Improve tests of list commands 2020-10-29 07:54:42 +01:00
Matthias
f4d39f2a12 Improve test coverage of deploy_commands 2020-10-29 07:44:03 +01:00
Matthias
19fcbc92a7 Remove stake-currency for download-data - it's not needed 2020-10-29 07:43:40 +01:00
Matthias
0539bd5280 Merge pull request #3899 from freqtrade/improve_hyperopt_tests
Improve and refactor hyperopt tests
2020-10-28 19:35:41 +01:00
Matthias
86725847ed Add explicit test for check_int_nonzero 2020-10-28 16:58:39 +01:00
Matthias
ffa6797958 Improve test coverage 2020-10-28 16:29:08 +01:00
Matthias
e1e2829ef3 Improve and refactor hyperopt tests 2020-10-28 14:49:25 +01:00
Matthias
8e8f328bba Merge pull request #3898 from freqtrade/improve_hyperoptloss_missing
Improve error when hyperopt-loss-function is missing
2020-10-28 09:49:00 +01:00
Matthias
5cb3735a57 Improve error when hyperopt-loss-function is missing 2020-10-28 07:58:55 +01:00
Matthias
28d6c3419b Fix random test failure in pairlocks 2020-10-27 20:01:23 +01:00
Matthias
58a92dc3da Merge pull request #3895 from freqtrade/pairlock/middleware
Pairlock middleware
2020-10-27 19:44:13 +01:00
Matthias
72f61f4682 Remove optional, now is not optional 2020-10-27 10:08:24 +01:00
Matthias
5c8779b155 Sort imports 2020-10-27 08:11:57 +01:00
Matthias
6c913fa617 Fix locking - should round before storing to have a consistent picture 2020-10-27 08:01:31 +01:00
Matthias
9c54c9a2bf Use correct timezone for tests 2020-10-27 07:06:07 +01:00
Matthias
e602ac3406 Introduce Pairlocks middleware 2020-10-27 07:06:06 +01:00
Matthias
69e8da30e5 Ensure times that fall on a candle are also shifted 2020-10-27 07:04:04 +01:00
Matthias
09af776b66 Merge pull request #3890 from freqtrade/dependabot/pip/develop/ccxt-1.36.85
Bump ccxt from 1.36.66 to 1.36.85
2020-10-26 19:37:05 +01:00
Matthias
442e9d20e1 Remove pinned dependency of multidict 2020-10-26 16:28:08 +01:00
Matthias
835614517b Merge branch 'dependabot/pip/develop/aiohttp-3.7.1' into dependabot/pip/develop/ccxt-1.36.85 2020-10-26 16:24:54 +01:00
Matthias
0309b06b54 Merge pull request #3892 from freqtrade/dependabot/pip/develop/plotly-4.12.0
Bump plotly from 4.11.0 to 4.12.0
2020-10-26 08:22:38 +01:00
Matthias
f29b04b4d2 Merge pull request #3891 from freqtrade/dependabot/pip/develop/python-rapidjson-0.9.3
Bump python-rapidjson from 0.9.1 to 0.9.3
2020-10-26 08:22:12 +01:00
Matthias
4146b45c6e Merge pull request #3888 from freqtrade/dependabot/pip/develop/urllib3-1.25.11
Bump urllib3 from 1.25.10 to 1.25.11
2020-10-26 07:28:16 +01:00
dependabot[bot]
066ea45ce0 Bump plotly from 4.11.0 to 4.12.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 4.11.0 to 4.12.0.
- [Release notes](https://github.com/plotly/plotly.py/releases)
- [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.py/compare/v4.11.0...v4.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-26 05:45:39 +00:00
dependabot[bot]
95d11bd0d2 Bump python-rapidjson from 0.9.1 to 0.9.3
Bumps [python-rapidjson](https://github.com/python-rapidjson/python-rapidjson) from 0.9.1 to 0.9.3.
- [Release notes](https://github.com/python-rapidjson/python-rapidjson/releases)
- [Changelog](https://github.com/python-rapidjson/python-rapidjson/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-rapidjson/python-rapidjson/compare/v0.9.1...v0.9.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-26 05:45:34 +00:00
dependabot[bot]
2831a78d0e Bump ccxt from 1.36.66 to 1.36.85
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.36.66 to 1.36.85.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.36.66...1.36.85)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-26 05:45:33 +00:00
dependabot[bot]
df5e6aa58b Bump aiohttp from 3.6.3 to 3.7.1
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.6.3 to 3.7.1.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.6.3...v3.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-26 05:45:32 +00:00
dependabot[bot]
3439e6c5c4 Bump urllib3 from 1.25.10 to 1.25.11
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.10 to 1.25.11.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.10...1.25.11)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-26 05:45:13 +00:00
Matthias
299dfe560a Merge pull request #3884 from freqtrade/fix/downloaddata_exception
Test if return value is an exception when downloading historic data
2020-10-23 14:27:31 +02:00
Matthias
b8c12f6576 Test if return value is an exception when downloading historic data 2020-10-23 07:50:40 +02:00
Matthias
2e7367d647 Merge pull request #3881 from apneamona/unfilledtimeout.buy/sell-addition
Update configuration.md
2020-10-22 15:18:37 +02:00
Matthias
50e7418d24 Merge branch 'develop' into pr/imxuwang/3799 2020-10-22 08:05:09 +02:00
Matthias
9999017953 Fix small bug in case of duplicate locks 2020-10-22 08:04:48 +02:00
Matthias
2f91f87ad3 Merge branch 'develop' into pr/imxuwang/3799 2020-10-22 07:55:48 +02:00
Matthias
71410a5a1e Merge pull request #3879 from freqtrade/persist_pairlocks
Persist pairlocks
2020-10-22 07:50:58 +02:00
Matthias
cd8610cb24 Update readme.md files 2020-10-22 07:50:09 +02:00
Matthias
ffcc47d8dd Cleanup sql cheatsheet 2020-10-22 07:42:47 +02:00
Matthias
cf1a726198 Rename table to be inline with other table naming 2020-10-22 07:35:59 +02:00
Matthias
a143f7bc43 Improve pairlock docstrings 2020-10-21 19:35:57 +02:00
Matthias
66efb5ccf1 Merge pull request #3880 from deeppaz/patch-1
update quick start steps
2020-10-21 19:27:01 +02:00
pure
42d9e2e7dc update quick start steps 2020-10-21 17:06:26 +03:00
Matthias
fd6018f67a Fix dependency sorting 2020-10-21 06:21:13 +02:00
Matthias
adffd402ea Replace some pointless occurances of arrow 2020-10-20 20:11:38 +02:00
Matthias
7a092271c5 Merge branch 'develop' into arrow_deprecation_timestamp 2020-10-20 20:01:54 +02:00
Matthias
5f63fdd8ad Use better lock message 2020-10-20 19:40:39 +02:00
Matthias
64e680d7ee Document new api method 2020-10-20 19:30:00 +02:00
Matthias
1156f5e686 Use constant for times 2020-10-20 19:21:13 +02:00
Matthias
0daf77f313 Don't check for lock start date 2020-10-20 19:21:13 +02:00
Matthias
cd2866eaec Add rest endpoint for /locks 2020-10-20 19:21:13 +02:00
Matthias
7a9768ffa6 Add /locks Telegram endpoint 2020-10-20 19:21:13 +02:00
Matthias
7caa6cfe31 Add tests for pairlock 2020-10-20 19:21:13 +02:00
Matthias
e513871fd5 Persist pairlocks
closes #3034
2020-10-20 19:21:13 +02:00
Matthias
6eab20e337 Use constant to format datetime 2020-10-20 19:21:13 +02:00
Matthias
2d04c2dd4f Fix small bug when cancel-order does not contain id
happens with kraken ...
2020-10-20 06:24:46 +02:00
Matthias
f6da9e358a Merge pull request #3878 from freqtrade/dependabot/pip/develop/ccxt-1.36.66
Bump ccxt from 1.36.12 to 1.36.66
2020-10-19 15:16:42 +02:00
dependabot[bot]
3e7c9bd485 Bump ccxt from 1.36.12 to 1.36.66
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.36.12 to 1.36.66.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.36.12...1.36.66)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-19 11:57:03 +00:00
Matthias
06293b2489 Merge pull request #3875 from freqtrade/dependabot/pip/develop/questionary-1.7.0
Bump questionary from 1.6.0 to 1.7.0
2020-10-19 08:23:08 +02:00
Matthias
f799a81c44 Merge pull request #3876 from freqtrade/dependabot/pip/develop/mkdocs-material-6.1.0
Bump mkdocs-material from 6.0.2 to 6.1.0
2020-10-19 07:57:23 +02:00
Matthias
667f1b8b8c Merge pull request #3845 from freqtrade/feat/backtest_speedup_serialize
Backtesting should not double-loop for sell signals
2020-10-19 07:52:33 +02:00
Matthias
340f25bd42 Merge pull request #3874 from freqtrade/dependabot/pip/develop/scipy-1.5.3
Bump scipy from 1.5.2 to 1.5.3
2020-10-19 07:51:01 +02:00
dependabot[bot]
b7eec3fc82 Bump mkdocs-material from 6.0.2 to 6.1.0
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.0.2 to 6.1.0.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.0.2...6.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-19 05:37:57 +00:00
dependabot[bot]
8975558595 Bump questionary from 1.6.0 to 1.7.0
Bumps [questionary](https://github.com/tmbo/questionary) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/tmbo/questionary/releases)
- [Commits](https://github.com/tmbo/questionary/compare/1.6.0...1.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-19 05:37:54 +00:00
dependabot[bot]
7997298538 Bump scipy from 1.5.2 to 1.5.3
Bumps [scipy](https://github.com/scipy/scipy) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](https://github.com/scipy/scipy/compare/v1.5.2...v1.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-19 05:37:36 +00:00
Xu Wang
1c27aaab72 Declare type of 'dur'. 2020-10-18 20:24:13 +01:00
Matthias
cf2ae788d7 Convert backtesting rows to Tuples for performance gains 2020-10-18 17:16:57 +02:00
Matthias
5d3a67d324 Don't debug-log during backtesting.
Even though log-messages are surpressed, calling "debug" will always
have to do something.
2020-10-18 16:38:16 +02:00
Matthias
b80a219d03 Improve typehints for backtesting 2020-10-18 16:35:23 +02:00
Matthias
380e6628e0 Merge branch 'develop' into feat/backtest_speedup_serialize 2020-10-18 16:19:04 +02:00
Matthias
2591a34db4 Don't use arrow objects for backtesting 2020-10-18 16:18:52 +02:00
Matthias
7a9208a8d7 Merge pull request #3873 from sanket-k/develop
updated discord link to documentation.
2020-10-17 15:17:29 +02:00
sanket-k
cd940daaf4 updated discord link to documentation. 2020-10-17 17:17:43 +05:30
Matthias
f64ed6b878 Merge pull request #3871 from freqtrade/persistence/renameinit
Rename persistence.init to init_db
2020-10-16 08:26:35 +02:00
Matthias
8cdc795a44 Rename persistence.init to init_db 2020-10-16 08:15:18 +02:00
Matthias
685d18940a specify min-version for arrow
int_timestamp was introduced in this version
2020-10-16 08:13:31 +02:00
Matthias
ec713ff5ae Convert _rpc_analysed_history_full to static method 2020-10-16 06:26:57 +02:00
Matthias
8ae193f638 Merge pull request #3868 from freqtrade/fix/3865
bittrex fetch_orderbook API change.
2020-10-14 20:28:04 +02:00
Matthias
07da21e633 Fix problem when limit is > max allowed limit 2020-10-13 20:38:02 +02:00
Matthias
8165cc11df Change get_next_limit_in_list to use list comprehension 2020-10-13 20:30:35 +02:00
Matthias
2ed20eee4e Configs should default to dry-run 2020-10-13 20:10:50 +02:00
Matthias
8962b6d5c9 Add Bittrex subclass to correctly handle L2 orderbook 2020-10-13 20:09:43 +02:00
Matthias
077374ac42 Implement generic solution for l2 limited limit 2020-10-13 20:02:47 +02:00
Matthias
886abe36c9 Merge pull request #3860 from freqtrade/dependabot/pip/develop/prompt-toolkit-3.0.8
Bump prompt-toolkit from 3.0.7 to 3.0.8
2020-10-13 16:44:57 +02:00
Matthias
d7bbda9659 Merge pull request #3859 from freqtrade/dependabot/pip/develop/sqlalchemy-1.3.20
Bump sqlalchemy from 1.3.19 to 1.3.20
2020-10-13 16:38:06 +02:00
dependabot[bot]
6a0ab83684 Bump sqlalchemy from 1.3.19 to 1.3.20
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.3.19 to 1.3.20.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 13:20:24 +00:00
Matthias
46f3ec1d0a Merge pull request #3864 from freqtrade/dependabot/pip/develop/ccxt-1.36.12
Bump ccxt from 1.36.2 to 1.36.12
2020-10-13 15:19:20 +02:00
dependabot[bot]
7c1402ef11 Bump prompt-toolkit from 3.0.7 to 3.0.8
Bumps [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/prompt-toolkit/python-prompt-toolkit/releases)
- [Changelog](https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/CHANGELOG)
- [Commits](https://github.com/prompt-toolkit/python-prompt-toolkit/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 13:06:37 +00:00
Matthias
f231a08202 Merge pull request #3861 from freqtrade/dependabot/pip/develop/colorama-0.4.4
Bump colorama from 0.4.3 to 0.4.4
2020-10-13 15:05:30 +02:00
Matthias
a0718ad8cb Merge pull request #3862 from freqtrade/dependabot/pip/develop/isort-5.6.4
Bump isort from 5.6.3 to 5.6.4
2020-10-13 15:05:07 +02:00
dependabot[bot]
fd9c8df049 Bump ccxt from 1.36.2 to 1.36.12
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.36.2 to 1.36.12.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.36.2...1.36.12)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 12:39:47 +00:00
dependabot[bot]
5f5fc513fa Bump isort from 5.6.3 to 5.6.4
Bumps [isort](https://github.com/pycqa/isort) from 5.6.3 to 5.6.4.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.6.3...5.6.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 12:39:35 +00:00
dependabot[bot]
43532a2ffa Bump colorama from 0.4.3 to 0.4.4
Bumps [colorama](https://github.com/tartley/colorama) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/tartley/colorama/releases)
- [Changelog](https://github.com/tartley/colorama/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tartley/colorama/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 12:39:31 +00:00
Matthias
ecddaa663b Convert timestamp to int_timestamp for all arrow occurances 2020-10-13 06:24:01 +02:00
Matthias
5f0d1d609e Merge pull request #3855 from freqtrade/dependabot/pip/develop/python-telegram-bot-13.0
Bump python-telegram-bot from 12.8 to 13.0
2020-10-13 06:23:15 +02:00
Matthias
0b0b9c5d45 Merge branch 'develop' into dependabot/pip/develop/python-telegram-bot-13.0 2020-10-13 06:12:35 +02:00
Matthias
10651599dd Merge pull request #3854 from freqtrade/dependabot/pip/develop/mypy-0.790
Bump mypy from 0.782 to 0.790
2020-10-12 20:25:01 +02:00
Matthias
2a383f8785 Merge branch 'develop' into dependabot/pip/develop/mypy-0.790 2020-10-12 20:11:41 +02:00
Matthias
5aa0d3e05c Add multidict and aiohttp requirements 2020-10-12 20:08:40 +02:00
Matthias
a39898a5b3 Fix mock for telegram update 2020-10-12 19:54:31 +02:00
Matthias
44e374878c Fix mypy errors due to new version 2020-10-12 19:28:14 +02:00
dependabot[bot]
f299c4188b Bump python-telegram-bot from 12.8 to 13.0
Bumps [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) from 12.8 to 13.0.
- [Release notes](https://github.com/python-telegram-bot/python-telegram-bot/releases)
- [Changelog](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-telegram-bot/python-telegram-bot/compare/v12.8...v13.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 08:13:28 +00:00
Matthias
38cbf2f902 Merge pull request #3852 from freqtrade/dependabot/pip/develop/isort-5.6.3
Bump isort from 5.5.4 to 5.6.3
2020-10-12 10:12:56 +02:00
Matthias
94bc5356b7 Merge pull request #3856 from freqtrade/dependabot/pip/develop/ccxt-1.36.2
Bump ccxt from 1.35.22 to 1.36.2
2020-10-12 10:12:34 +02:00
dependabot[bot]
e39c2f4a96 Bump ccxt from 1.35.22 to 1.36.2
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.35.22 to 1.36.2.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.35.22...1.36.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 07:35:11 +00:00
Matthias
9d2b3b2edb Merge pull request #3851 from freqtrade/dependabot/pip/develop/arrow-0.17.0
Bump arrow from 0.16.0 to 0.17.0
2020-10-12 09:34:14 +02:00
dependabot[bot]
623cee61e6 Bump isort from 5.5.4 to 5.6.3
Bumps [isort](https://github.com/pycqa/isort) from 5.5.4 to 5.6.3.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.5.4...5.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 07:31:08 +00:00
Matthias
2a2856e2dd Merge pull request #3853 from freqtrade/dependabot/pip/develop/nbconvert-6.0.7
Bump nbconvert from 6.0.6 to 6.0.7
2020-10-12 09:30:02 +02:00
Matthias
8363faf358 Merge pull request #3850 from freqtrade/dependabot/pip/develop/pandas-1.1.3
Bump pandas from 1.1.2 to 1.1.3
2020-10-12 09:29:24 +02:00
dependabot[bot]
80569c5f21 Bump mypy from 0.782 to 0.790
Bumps [mypy](https://github.com/python/mypy) from 0.782 to 0.790.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.782...v0.790)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 05:43:38 +00:00
dependabot[bot]
a33865e8c2 Bump nbconvert from 6.0.6 to 6.0.7
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.0.6 to 6.0.7.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.0.6...6.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 05:43:37 +00:00
dependabot[bot]
a2bc9d60a0 Bump arrow from 0.16.0 to 0.17.0
Bumps [arrow](https://github.com/arrow-py/arrow) from 0.16.0 to 0.17.0.
- [Release notes](https://github.com/arrow-py/arrow/releases)
- [Changelog](https://github.com/arrow-py/arrow/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/arrow-py/arrow/compare/0.16.0...0.17.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 05:43:23 +00:00
dependabot[bot]
491af5a0cb Bump pandas from 1.1.2 to 1.1.3
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Changelog](https://github.com/pandas-dev/pandas/blob/master/RELEASE.md)
- [Commits](https://github.com/pandas-dev/pandas/compare/v1.1.2...v1.1.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 05:43:19 +00:00
Matthias
fa7dc742d0 Plot-image should have freqtrade as entrypoint 2020-10-12 06:07:57 +02:00
Matthias
3d911557d1 Fix typo in docs 2020-10-11 08:37:47 +02:00
Matthias
23bad8fd9f Rename DefahltHyperoptLoss function to ShortTradeDurHyperOptLoss 2020-10-10 14:22:29 +02:00
Matthias
028dd8be3e Merge pull request #3842 from freqtrade/edge_docs
Fix example R calculation in edge documentation
2020-10-10 14:13:25 +02:00
Matthias
62859455f7 Merge pull request #3847 from freqtrade/edge_fix_nan
Implement division/0 checks for win and loss columns in edge
2020-10-09 10:27:41 +02:00
Matthias
8fdcb600bc Merge pull request #3849 from freqtrade/improve_docstructure
allow imports in Documentation
2020-10-09 09:28:21 +02:00
Matthias
cedddd02da Install mkdocs for ci 2020-10-09 09:18:25 +02:00
Matthias
f43bd250a2 Extract pairlists from configuration 2020-10-09 09:02:44 +02:00
Matthias
53984a059f Configure mkdocs to allow page includes 2020-10-09 09:02:20 +02:00
Matthias
59b00ad662 Add test for only-win scenario 2020-10-09 06:47:02 +02:00
Matthias
f676156ec7 Implement division/0 checks for win and loss columns in edge
closes #3839
2020-10-09 06:39:13 +02:00
Matthias
23278e52db remove obsolete logging statements 2020-10-08 20:22:59 +02:00
Matthias
e8f2c09f08 Extract handling of left open trades to seperate method 2020-10-08 20:11:45 +02:00
Matthias
d1db847612 Fix "storing information" documentation
closes #3843
2020-10-08 19:27:00 +02:00
Matthias
7f0afe1244 Fix calculation to not show losses > initial investment 2020-10-08 10:24:52 +02:00
Matthias
6bb045f565 Simplify stoploss calculation 2020-10-08 08:30:30 +02:00
Matthias
48750b0ef8 Improve wording in formula 2020-10-08 08:23:56 +02:00
Matthias
1b5cb3427e Fix example R calculation in edge documentation 2020-10-08 08:09:55 +02:00
Matthias
52502193c4 Backtesting should not double-loop for sell signals 2020-10-07 20:59:05 +02:00
Matthias
72337a0ab7 Merge pull request #3836 from freqtrade/hyperopt_remove_default_loss
Hyperopt remove default loss
2020-10-07 09:49:25 +02:00
apneamona
72cf3147b8 Update configuration.md 2020-10-06 20:17:05 +02:00
Matthias
1628a0a4f0 Merge pull request #3837 from freqtrade/update_actions
Update actions image to ubuntu20.04
2020-10-06 09:47:38 +02:00
Matthias
299285a7bb Update actions image to ubuntu20.04 2020-10-06 09:18:49 +02:00
Matthias
8c2f763193 Add test to ensure --hyperopt-loss is mandatory 2020-10-05 20:36:16 +02:00
Matthias
14e87ed4a1 Improvements to hyperopt docs 2020-10-05 20:13:09 +02:00
Matthias
a4a8abfdc0 Update hyperopt documentation 2020-10-05 20:06:34 +02:00
Matthias
fa1d1679f0 Adapt tests to work without default hyperoptloss 2020-10-05 19:33:50 +02:00
Matthias
378b214a56 Remove hyperopt-loss default option
Force users to make a concious choice on a hyperopt-loss function
2020-10-05 19:27:28 +02:00
Matthias
584d095295 Merge pull request #3835 from freqtrade/hyperopt_trailing_output
Fix Hyperopt trailing output
2020-10-05 19:09:02 +02:00
Matthias
11f1ce2d9f Merge pull request #3827 from freqtrade/dependabot/pip/develop/questionary-1.6.0
Bump questionary from 1.5.2 to 1.6.0
2020-10-05 16:33:43 +02:00
Matthias
1e782781a6 Merge pull request #3834 from freqtrade/dependabot/pip/develop/ta-lib-0.4.19
Bump ta-lib from 0.4.18 to 0.4.19
2020-10-05 16:23:55 +02:00
Matthias
b86a602ad4 Update typehint 2020-10-05 16:17:37 +02:00
Matthias
4b53c2bca4 Complete TA-lib update with new binary files 2020-10-05 16:12:41 +02:00
Xu Wang
355afc082e Add command 'stats' in expected test output. 2020-10-05 10:05:15 +01:00
dependabot[bot]
14c66afecc Bump ta-lib from 0.4.18 to 0.4.19
Bumps [ta-lib](https://github.com/mrjbq7/ta-lib) from 0.4.18 to 0.4.19.
- [Release notes](https://github.com/mrjbq7/ta-lib/releases)
- [Changelog](https://github.com/mrjbq7/ta-lib/blob/master/CHANGELOG)
- [Commits](https://github.com/mrjbq7/ta-lib/compare/TA_Lib-0.4.18...TA_Lib-0.4.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 07:11:13 +00:00
Matthias
0538af8875 Merge pull request #3833 from freqtrade/dependabot/pip/develop/joblib-0.17.0
Bump joblib from 0.16.0 to 0.17.0
2020-10-05 08:55:59 +02:00
Matthias
1ef702479b Merge pull request #3831 from freqtrade/dependabot/pip/develop/mkdocs-material-6.0.2
Bump mkdocs-material from 6.0.1 to 6.0.2
2020-10-05 08:55:25 +02:00
Matthias
09e9141e51 Merge pull request #3830 from freqtrade/dependabot/pip/develop/plotly-4.11.0
Bump plotly from 4.10.0 to 4.11.0
2020-10-05 08:52:25 +02:00
Matthias
d23ea36c05 Merge pull request #3832 from freqtrade/dependabot/pip/develop/pytest-6.1.1
Bump pytest from 6.1.0 to 6.1.1
2020-10-05 08:49:05 +02:00
Matthias
f4ab2dab4c Merge pull request #3829 from freqtrade/dependabot/pip/develop/pycoingecko-1.4.0
Bump pycoingecko from 1.3.0 to 1.4.0
2020-10-05 08:31:41 +02:00
Matthias
65e4c052f1 Merge pull request #3828 from freqtrade/dependabot/pip/develop/ccxt-1.35.22
Bump ccxt from 1.34.59 to 1.35.22
2020-10-05 08:21:26 +02:00
Matthias
2d6bc9aadc Merge pull request #3825 from freqtrade/dependabot/pip/develop/isort-5.5.4
Bump isort from 5.5.3 to 5.5.4
2020-10-05 08:20:27 +02:00
Matthias
482213fbb3 Merge pull request #3826 from freqtrade/dependabot/pip/develop/flake8-3.8.4
Bump flake8 from 3.8.3 to 3.8.4
2020-10-05 08:16:15 +02:00
Matthias
06759234b6 Add test to verify output of roi / trailing stop hyperopt 2020-10-05 08:07:53 +02:00
Matthias
40b61bbfe3 Adjust trailing-stop to be python compliant 2020-10-05 07:44:12 +02:00
dependabot[bot]
234f6c2f5e Bump joblib from 0.16.0 to 0.17.0
Bumps [joblib](https://github.com/joblib/joblib) from 0.16.0 to 0.17.0.
- [Release notes](https://github.com/joblib/joblib/releases)
- [Changelog](https://github.com/joblib/joblib/blob/master/CHANGES.rst)
- [Commits](https://github.com/joblib/joblib/compare/0.16.0...0.17.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:44 +00:00
dependabot[bot]
688442507e Bump mkdocs-material from 6.0.1 to 6.0.2
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/6.0.1...6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:44 +00:00
dependabot[bot]
64de911e16 Bump pytest from 6.1.0 to 6.1.1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.1.0...6.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:44 +00:00
dependabot[bot]
56647bb498 Bump plotly from 4.10.0 to 4.11.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/plotly/plotly.py/releases)
- [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.py/compare/v4.10.0...v4.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:42 +00:00
dependabot[bot]
52b6f6b940 Bump pycoingecko from 1.3.0 to 1.4.0
Bumps [pycoingecko](https://github.com/man-c/pycoingecko) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/man-c/pycoingecko/releases)
- [Changelog](https://github.com/man-c/pycoingecko/blob/master/CHANGELOG.md)
- [Commits](https://github.com/man-c/pycoingecko/compare/1.3.0...1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:40 +00:00
dependabot[bot]
0574a40693 Bump questionary from 1.5.2 to 1.6.0
Bumps [questionary](https://github.com/tmbo/questionary) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/tmbo/questionary/releases)
- [Commits](https://github.com/tmbo/questionary/compare/1.5.2...1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:39 +00:00
dependabot[bot]
8d4f7ce84f Bump ccxt from 1.34.59 to 1.35.22
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.34.59 to 1.35.22.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.34.59...1.35.22)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:39 +00:00
dependabot[bot]
80890e0f59 Bump flake8 from 3.8.3 to 3.8.4
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.3 to 3.8.4.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.3...3.8.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:37 +00:00
dependabot[bot]
887b2fdb5e Bump isort from 5.5.3 to 5.5.4
Bumps [isort](https://github.com/pycqa/isort) from 5.5.3 to 5.5.4.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.5.3...5.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 05:41:23 +00:00
Matthias
301598bac9 Merge pull request #3818 from freqtrade/rpc/candlehistory
Rpc/candlehistory
2020-10-04 09:34:25 +02:00
Matthias
c9b3766fa3 Remove rest_dump
it's just a wrapper around jsonify with no benefits
2020-10-04 09:14:46 +02:00
Matthias
63e1cba597 fix some typos 2020-10-04 09:12:52 +02:00
Matthias
2d343c8f73 Merge pull request #3823 from freqtrade/fix/hyperoptoutput
Fix hyperopt output
2020-10-03 13:42:05 +02:00
Matthias
cb74c9bcde Fix hyperopt output 2020-10-03 13:27:06 +02:00
Matthias
176006da29 Sort imports 2020-10-02 07:00:45 +02:00
Matthias
66b77d2f53 Fix some types 2020-10-02 06:52:43 +02:00
Matthias
62110dc2fc Add buy / sell signal count to dataframe interface 2020-09-29 06:35:47 +02:00
Matthias
350fcc071e Don't use __code__
__code__ is a special method name used by python already
source:
https://docs.python.org/3/reference/datamodel.html#special-method-names
2020-09-29 06:35:47 +02:00
Matthias
b38f68b3b0 Add 404 when strategy is not found 2020-09-29 06:35:47 +02:00
Matthias
becccca3d1 Add test for __code__ loading 2020-09-29 06:35:47 +02:00
Matthias
ba10bd7756 Add strategy code to __code__ 2020-09-29 06:35:47 +02:00
Matthias
4b6b7f8343 Add timeframe to candle return values 2020-09-29 06:35:47 +02:00
Matthias
a3d0889dab Add alpha to endpoint documentation 2020-09-29 06:35:47 +02:00
Matthias
816c8295f1 Add test for pair_history 2020-09-29 06:35:47 +02:00
Matthias
f82d39e1b0 Enhance restclient and add tests for new api methods 2020-09-29 06:35:47 +02:00
Matthias
bb4993dc20 Add new endpoints to the documentation 2020-09-29 06:35:47 +02:00
Matthias
c0654f3caf Add resiliancy against not having a analyzed dataframe yet 2020-09-29 06:35:47 +02:00
Matthias
c59a1be154 show_config should not use freqtrade object 2020-09-29 06:35:47 +02:00
Matthias
1de248fe38 add list_available_pairs endpoint 2020-09-29 06:35:47 +02:00
Matthias
6a59740f83 Strategies should be a nested object 2020-09-29 06:35:47 +02:00
Matthias
32e6ea314c Return strategy with analyzed data 2020-09-29 06:35:47 +02:00
Matthias
18bbfdd341 Add /strategies endpoint 2020-09-29 06:35:47 +02:00
Matthias
f227f6a755 Use passed in config object to allow this to work in webserver mode 2020-09-29 06:35:47 +02:00
Matthias
bf0e75e2a5 Include data start and end date in dataframe api 2020-09-29 06:35:47 +02:00
Matthias
b93ad8840a Return date column unmodified 2020-09-29 06:35:47 +02:00
Matthias
482f1faa88 Don't fail if no buy-signal is present 2020-09-29 06:35:46 +02:00
Matthias
f5dc10e4ae Add pair_history endpoint 2020-09-29 06:35:46 +02:00
Matthias
677078350f Add plot_config endpoint 2020-09-29 06:35:46 +02:00
Matthias
d528c44974 Add test for pair_history 2020-09-29 06:35:46 +02:00
Matthias
133ca9c770 Convert types to support valid json 2020-09-29 06:35:46 +02:00
Matthias
a38b33cd9c Support limiting analyzed history 2020-09-29 06:35:46 +02:00
Matthias
9dfbc1a7ff Add analyzed_history endpoint 2020-09-29 06:35:46 +02:00
Matthias
d2111c088b Merge pull request #3815 from freqtrade/isort_config
Introduce isort to have clear way to sort imports
2020-09-29 06:27:23 +02:00
Xu Wang
7bce2cd29d Add trade duration by win/loss. 2020-09-28 20:30:20 +01:00
Matthias
6977ffdbf9 Merge branch 'develop' into isort_config 2020-09-28 20:21:55 +02:00
Matthias
c410599a52 Merge pull request #3807 from freqtrade/hyperopt_disablecontinue
Hyperopt disablecontinue
2020-09-28 20:13:38 +02:00
Matthias
2be8e8070a Add Python 3.8 to setup.py classifiers 2020-09-28 20:02:11 +02:00
Matthias
ace2879265 Don't run isort on windows - once is enough 2020-09-28 19:53:29 +02:00
Matthias
0ea56548e4 Try fix random test failure 2020-09-28 19:50:22 +02:00
Matthias
ce228f19dc Apply isort to setup.py 2020-09-28 19:43:32 +02:00
Matthias
9df366d943 Apply isort to tests 2020-09-28 19:43:15 +02:00
Matthias
253b7b763e Apply isort to freqtrade codebase 2020-09-28 19:40:46 +02:00
Matthias
201e714343 include isort to contributing 2020-09-28 17:37:14 +02:00
Matthias
287604efd2 Add isort to project dev dependencies 2020-09-28 17:35:04 +02:00
Matthias
7623691a5f PyPi Publis should only run for releases 2020-09-28 17:19:41 +02:00
Matthias
17e605e130 Make it clear in samples that strategy is mandatory 2020-09-28 15:22:06 +02:00
Matthias
fe588e5722 Merge pull request #3811 from freqtrade/dependabot/pip/develop/ccxt-1.34.59
Bump ccxt from 1.34.40 to 1.34.59
2020-09-28 09:56:24 +02:00
Matthias
98a2811605 Version bump 2020.9.1 2020-09-28 08:55:17 +02:00
Matthias
1f14c6bacd PyPi Publis should only run for releases 2020-09-28 08:54:32 +02:00
Matthias
44e8184519 Tag image before building next image 2020-09-28 08:54:24 +02:00
Matthias
700529fe06 Tag image before building next image 2020-09-28 08:36:40 +02:00
Matthias
f174c74094 Merge pull request #3812 from freqtrade/dependabot/pip/develop/nbconvert-6.0.6
Bump nbconvert from 6.0.4 to 6.0.6
2020-09-28 08:30:48 +02:00
Matthias
f3e1eddc91 Merge pull request #3813 from freqtrade/dependabot/pip/develop/mkdocs-material-6.0.1
Bump mkdocs-material from 5.5.13 to 6.0.1
2020-09-28 08:28:50 +02:00
Matthias
5e0fa21d60 Merge pull request #3810 from freqtrade/dependabot/pip/develop/pytest-6.1.0
Bump pytest from 6.0.2 to 6.1.0
2020-09-28 08:26:42 +02:00
Matthias
c14ff2bee1 Merge pull request #3805 from freqtrade/new_release
New release 2020.9
2020-09-28 07:48:54 +02:00
dependabot[bot]
dd4d458ca8 Bump mkdocs-material from 5.5.13 to 6.0.1
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 5.5.13 to 6.0.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/5.5.13...6.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-28 05:48:15 +00:00
dependabot[bot]
6d8fadd560 Bump nbconvert from 6.0.4 to 6.0.6
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.0.4 to 6.0.6.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.0.4...6.0.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-28 05:48:14 +00:00
dependabot[bot]
1dee0eed75 Bump ccxt from 1.34.40 to 1.34.59
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.34.40 to 1.34.59.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.34.40...1.34.59)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-28 05:48:12 +00:00
dependabot[bot]
48347b49fd Bump pytest from 6.0.2 to 6.1.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.0.2 to 6.1.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.0.2...6.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-28 05:48:08 +00:00
Matthias
15bb0af1b3 Add some test-coverage 2020-09-28 00:36:13 +02:00
Xu Wang
627e221b65 Use tabulate to create sell reason message. 2020-09-27 20:23:13 +01:00
Matthias
f3de74f817 Mock all occurances of hyperopt.dump 2020-09-27 19:48:11 +02:00
Matthias
6e70ae6e95 Improve code quality 2020-09-27 19:40:55 +02:00
Matthias
5769b9244f Mock test correctly 2020-09-27 19:34:47 +02:00
Matthias
8de9c46110 Document hyperopt-filename usage 2020-09-27 17:09:33 +02:00
Matthias
3cb1a9a5a9 Support loading results from a specific hyperopt history file 2020-09-27 17:03:30 +02:00
Matthias
c42a924df8 Load latest file 2020-09-27 16:50:42 +02:00
Matthias
ff96cf154c Keep hyperopt result history 2020-09-27 16:33:26 +02:00
Matthias
7a652b07d5 UPdate documentation to remove --continue 2020-09-27 16:21:55 +02:00
Matthias
b736691e0e Remove hyperopt --continue 2020-09-27 16:18:28 +02:00
Matthias
17659001d8 Version bump to 2020.9 2020-09-27 09:51:19 +02:00
Matthias
45f4057d3c Merge branch 'stable' into new_release 2020-09-27 09:51:07 +02:00
Matthias
64c2b6c9a6 Merge pull request #3791 from freqtrade/rename_master_branch
Rename references to "master" branch to "stable"
2020-09-27 09:49:19 +02:00
Xu Wang
44ad0f631c Summarize trade reason for telegram command /stats. 2020-09-26 22:40:54 +01:00
Matthias
6a1b1eb75a Merge pull request #3803 from freqtrade/bt_params
Backtesting - handle mdifferent max_open_trades per strategy
2020-09-26 15:25:34 +02:00
Matthias
bb27b236ce Remove unused arguments 2020-09-26 14:55:12 +02:00
Matthias
c56dd487f2 Fix test failure 2020-09-25 21:00:58 +02:00
Matthias
ff3e2641ae generate_backtest_stats must take config options from the strategy
config

as a strategy can override certain options.
2020-09-25 20:47:37 +02:00
Matthias
fe45b79beb Merge pull request #3801 from freqtrade/dependabot/docker/python-3.8.6-slim-buster
Bump python from 3.8.5-slim-buster to 3.8.6-slim-buster
2020-09-25 08:02:52 +02:00
dependabot[bot]
d49488bf0e Bump python from 3.8.5-slim-buster to 3.8.6-slim-buster
Bumps python from 3.8.5-slim-buster to 3.8.6-slim-buster.

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-25 05:47:58 +00:00
Matthias
378f03a5b1 Add relevant parameters to stored backtest result 2020-09-25 06:37:40 +02:00
Matthias
fa18274e9a Merge pull request #3798 from freqtrade/fix/wallets_dont_reset
Fix wallets dont reset
2020-09-24 19:22:14 +02:00
Matthias
66ca596e7c Merge pull request #3787 from freqtrade/rpc/telegram_settings
Allow Notification finetuning for telegram messages
2020-09-23 10:20:43 +02:00
Xu Wang
28411da83e Add the telegram command function template. 2020-09-22 22:28:12 +01:00
Matthias
bb56d392a9 Fix typo in documentation 2020-09-22 20:19:46 +02:00
Matthias
6b46a35b19 Fix bug of balances not disappearing 2020-09-22 19:37:31 +02:00
Matthias
4b06c9e0ae Add test verifying wrong behaviour 2020-09-22 19:37:18 +02:00
Matthias
d639290f7d Merge branch 'develop' into rename_master_branch 2020-09-21 19:31:25 +02:00
Matthias
87f6c7bbec Merge pull request #3794 from freqtrade/dependabot/pip/develop/ccxt-1.34.40
Bump ccxt from 1.34.25 to 1.34.40
2020-09-21 08:18:16 +02:00
Matthias
6f52faf328 Merge pull request #3795 from freqtrade/dependabot/pip/develop/nbconvert-6.0.4
Bump nbconvert from 6.0.2 to 6.0.4
2020-09-21 08:17:40 +02:00
Matthias
a9198c1f7e Merge pull request #3793 from freqtrade/dependabot/pip/develop/mkdocs-material-5.5.13
Bump mkdocs-material from 5.5.12 to 5.5.13
2020-09-21 08:17:21 +02:00
Matthias
6e32ac5b3a Merge pull request #3792 from freqtrade/add_devcontainer
Add devcontainer
2020-09-21 07:42:57 +02:00
dependabot[bot]
be33556838 Bump nbconvert from 6.0.2 to 6.0.4
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.0.2 to 6.0.4.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.0.2...6.0.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-21 05:40:00 +00:00
dependabot[bot]
d1b3a16c13 Bump ccxt from 1.34.25 to 1.34.40
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.34.25 to 1.34.40.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.34.25...1.34.40)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-21 05:39:56 +00:00
dependabot[bot]
4cb5c9c85f Bump mkdocs-material from 5.5.12 to 5.5.13
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 5.5.12 to 5.5.13.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/5.5.12...5.5.13)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-21 05:39:56 +00:00
Matthias
50aec1d6d3 Jupyter service should be called differently 2020-09-20 20:19:07 +02:00
Matthias
7dadca421a Update location of docker files 2020-09-20 16:26:48 +02:00
Matthias
261b267160 Don't build devcontainer on push 2020-09-20 16:20:17 +02:00
Matthias
3c460d37b6 Document existence of PLOT image 2020-09-20 16:20:01 +02:00
Matthias
8ff1429e68 Add user_data to backtesting 2020-09-20 15:39:50 +02:00
Matthias
b02c0904b6 Use buildarg to use correct parent variable 2020-09-20 15:17:54 +02:00
Matthias
ab190f7a5b Document jupyter with docker usage 2020-09-20 15:12:30 +02:00
Matthias
30c1253f75 Use correct ports for jupyter compose file 2020-09-20 15:02:07 +02:00
Matthias
f9efbed076 Ignore userdata from docker build 2020-09-20 14:59:13 +02:00
Matthias
40132bbea4 Add this branch to CI 2020-09-20 14:58:37 +02:00
Matthias
85ab6e43ba Build _plot dockerfile 2020-09-20 14:58:27 +02:00
Matthias
129cbf5ef5 Add more Dockerfiles 2020-09-20 14:58:15 +02:00
Matthias
096079a595 Install autopep8 2020-09-20 12:41:17 +00:00
Matthias
4355f36cd6 Add gitconfig to devcontainer 2020-09-20 12:36:47 +00:00
Matthias
0a7b6f73c9 Move devcontainer stuff to .devcontainer 2020-09-20 12:35:08 +00:00
Matthias
cf85a178f3 Update developer documentation related to devcontainer 2020-09-20 12:34:57 +00:00
Matthias
20e5c1b388 Update Developer documentation related to docker 2020-09-20 12:16:58 +00:00
Matthias
7ead4f9fa3 Update devcontainer settings 2020-09-20 14:16:36 +02:00
Matthias
8ff7ce8b17 Introduce devcontainer 2020-09-20 11:40:16 +00:00
Matthias
b72cccae3c Add note about download-data in combination with startup period
closes #2673
2020-09-20 13:09:34 +02:00
Matthias
a8a9fb5c6a Merge pull request #3790 from BlueSkyTrading/patch-3
1M and 1y timeframes added
2020-09-20 13:00:16 +02:00
Matthias
637fe35549 Fix typo in release documentation 2020-09-20 11:53:47 +02:00
Matthias
b3f0bfd77f Fix a few random typos 2020-09-20 11:51:12 +02:00
Matthias
2b1d0b4ab5 Rename references to "master" branch to "stable"
closes #2496
2020-09-20 11:45:08 +02:00
Matthias
c349499985 Also add 2w (supported by kraken) 2020-09-20 11:18:45 +02:00
Matthias
80f6f6dcbc Merge branch 'pr/BlueSkyTrading/3788' into pr/BlueSkyTrading/3790 2020-09-20 11:15:32 +02:00
Matthias
d5b2ffae7a Merge pull request #3789 from BlueSkyTrading/patch-2
changed epochs from 5000 to 500
2020-09-20 08:15:38 +02:00
HumanBot
f51f445011 1M and 1y timeframes added
Huobi Pro timeframes added
2020-09-19 14:45:36 -04:00
Matthias
a31de431ed Explicitly convert to type to string 2020-09-19 20:38:42 +02:00
HumanBot
8c9a600dec changed epochs from 5000 to 500
5000 is an overkill for the hyperopt process, repetitive 500 produce better predictions
2020-09-19 14:36:12 -04:00
HumanBot
a95dbdbde4 Added 1M and 1y timeframes
Huobi Pro allows monthly and yearly data downloading
2020-09-19 14:31:23 -04:00
Matthias
2554dc48e4 Add test for notification settings 2020-09-19 20:29:44 +02:00
Matthias
413d7ddf70 Document telegram notification settings 2020-09-19 19:42:56 +02:00
Matthias
e53b88bde3 Introduce notification_settings for telegram 2020-09-19 19:38:33 +02:00
Matthias
2a7935e35e Rename custom_notification to startup_notification 2020-09-19 17:51:31 +02:00
Matthias
6674285b12 Merge pull request #3756 from allenday/patch-1
prettify hyperopt console output
2020-09-19 17:43:05 +02:00
Matthias
f0d7f18cf9 Pad wins / draws / losses for hyperopt with spaces instead of 0's 2020-09-19 17:32:22 +02:00
Matthias
476319da45 Clarify --timerange documentation 2020-09-19 17:21:56 +02:00
Matthias
934abb0094 Merge pull request #3786 from freqtrade/download_data_timerange
Download data should support absolute starting point
2020-09-19 17:19:45 +02:00
Matthias
a559611c15 Merge pull request #3682 from freqtrade/db_keep_orders
Keep order history in the database
2020-09-19 17:12:14 +02:00
Matthias
bf95fe2e5c have the 2 timerange arguments next to each other 2020-09-19 11:33:55 +02:00
Matthias
5daaed1449 Help endpoint does not make sense for the rest api server.
therefore, remove the TODO.
2020-09-19 11:25:00 +02:00
Matthias
1f086e1466 Modify test loglevel 2020-09-19 09:46:32 +02:00
Matthias
77d0189695 Remove not needed argument in update_trade_state 2020-09-19 09:37:11 +02:00
Matthias
2f6b00555a Document support for --timerange in download-data 2020-09-19 09:13:43 +02:00
Matthias
35857b3dde Datetime should support --timerange too 2020-09-19 09:10:34 +02:00
Matthias
bfd0e3553a Don't build this branch anymore in CI 2020-09-19 08:42:37 +02:00
Matthias
254875e6b3 Add test for new close functionality
* Don't updates close_date if the trade was already closed
2020-09-19 08:42:15 +02:00
Matthias
dd87938a5e Fix bug causing close_date to be set again 2020-09-19 08:34:06 +02:00
Matthias
ec01f20bf8 Add ratio to sell reason stats 2020-09-16 20:27:28 +02:00
Matthias
962fed24b0 Readd refind_order logic 2020-09-14 17:34:13 +02:00
Matthias
b4443fdb1f Merge pull request #3777 from freqtrade/dependabot/pip/develop/ccxt-1.34.25
Bump ccxt from 1.34.11 to 1.34.25
2020-09-14 09:24:22 +02:00
Matthias
49d0bd4832 Merge pull request #3779 from freqtrade/dependabot/pip/develop/nbconvert-6.0.2
Bump nbconvert from 5.6.1 to 6.0.2
2020-09-14 09:07:47 +02:00
dependabot[bot]
6d30740b55 Bump ccxt from 1.34.11 to 1.34.25
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.34.11 to 1.34.25.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.34.11...1.34.25)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-14 07:07:14 +00:00
Matthias
c510b6012d Merge pull request #3778 from freqtrade/dependabot/pip/develop/plotly-4.10.0
Bump plotly from 4.9.0 to 4.10.0
2020-09-14 09:05:28 +02:00
Matthias
3aa34c411d Merge pull request #3776 from freqtrade/dependabot/pip/develop/numpy-1.19.2
Bump numpy from 1.19.1 to 1.19.2
2020-09-14 09:01:12 +02:00
Matthias
78555adecd Merge pull request #3775 from freqtrade/dependabot/pip/develop/pytest-6.0.2
Bump pytest from 6.0.1 to 6.0.2
2020-09-14 08:49:36 +02:00
dependabot[bot]
23c1ae5d4a Bump nbconvert from 5.6.1 to 6.0.2
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 5.6.1 to 6.0.2.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/5.6.1...6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-14 06:35:41 +00:00
dependabot[bot]
9d3caae9e3 Bump plotly from 4.9.0 to 4.10.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 4.9.0 to 4.10.0.
- [Release notes](https://github.com/plotly/plotly.py/releases)
- [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.py/compare/v4.9.0...v4.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-14 06:35:36 +00:00
dependabot[bot]
3c76945d5e Bump numpy from 1.19.1 to 1.19.2
Bumps [numpy](https://github.com/numpy/numpy) from 1.19.1 to 1.19.2.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/master/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.19.1...v1.19.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-14 06:35:14 +00:00
dependabot[bot]
60538368ac Bump pytest from 6.0.1 to 6.0.2
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.0.1...6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-14 06:35:00 +00:00
Matthias
7e28896c5c Merge pull request #3774 from freqtrade/reduce_requirements_files
Reduce requirements files
2020-09-14 07:44:24 +02:00
Matthias
07ccda9146 Fix syntax for released CI 2020-09-13 19:38:41 +02:00
Matthias
d65d886d7d add branch to CI - change branch-detection to support tags as well 2020-09-13 16:54:21 +02:00
Matthias
ba8e93e2a1 Remove requirements-common.txt
in an attempt to simplify installation
2020-09-13 16:43:22 +02:00
Matthias
dcedc1480f Merge pull request #3764 from Blackhawke/develop
Added full virtualenv command to quick start
2020-09-12 08:43:59 +02:00
Matthias
503d5db113 Merge branch 'develop' into pr/Blackhawke/3764 2020-09-12 08:33:46 +02:00
Blackhawke
3f52b6d6d5 Move "source" restored ".env/" 2020-09-11 12:01:45 -07:00
Matthias
77c28187a6 Don't run refind order on stoploss 2020-09-11 20:06:05 +02:00
Matthias
977ccaac16 Merge branch 'develop' into db_keep_orders 2020-09-11 20:01:28 +02:00
Matthias
50f0483d9a FIx fluky test in test_api_logs 2020-09-11 20:00:36 +02:00
Matthias
13994fac92 Merge pull request #3770 from freqtrade/api_closesessions
scoped sessions should be closed after requests
2020-09-11 19:49:03 +02:00
Matthias
a18305ffe7 Merge pull request #3771 from caudurodev/develop
FIX: Docs: added missing ( to SQLite insert statement to avoid error.
2020-09-11 10:01:31 +02:00
caudurodev
90d97c536d FIX: added missing ) for SQLite insert 2020-09-11 08:42:42 +02:00
caudurodev
0c9301e74a FIX: added missing ) for SQLite insert 2020-09-11 08:41:33 +02:00
Matthias
aa8832f70e Convert select_order to use ft_is_open flag 2020-09-11 07:12:10 +02:00
Matthias
41942e3af1 Update docstring for select_order 2020-09-11 06:59:07 +02:00
Matthias
b8773de5b0 scoped sessions should be closed after requests 2020-09-11 06:44:20 +02:00
Matthias
85d90645c7 Remove duplciate check for buy orders 2020-09-10 15:42:34 +02:00
Matthias
4db8c779fc Fix formatting issues 2020-09-10 08:19:40 +02:00
Matthias
6a08fee25b Fix wrong import in documentation 2020-09-10 08:04:04 +02:00
Matthias
23f569ea38 Add test for sell order refind, improve overall test for this function 2020-09-10 08:03:26 +02:00
Matthias
3c521f55b2 Add 6th mock trade 2020-09-10 07:40:19 +02:00
Blackhawke
c3e0397743 Added full "source" command to virtualenv in easy install 2020-09-09 09:16:11 -07:00
Matthias
6b22b4e4c7 Merge pull request #3760 from freqtrade/dependabot/pip/develop/progressbar2-3.53.1
Bump progressbar2 from 3.52.1 to 3.53.1
2020-09-09 16:06:21 +02:00
Matthias
beb8692231 Merge pull request #3763 from freqtrade/dependabot/pip/develop/pandas-1.1.2
Bump pandas from 1.1.1 to 1.1.2
2020-09-09 15:56:48 +02:00
Matthias
511dc254ff Merge pull request #3762 from freqtrade/dependabot/pip/develop/ccxt-1.34.11
Bump ccxt from 1.34.3 to 1.34.11
2020-09-09 15:51:32 +02:00
Matthias
d28d663175 Merge pull request #3761 from freqtrade/dependabot/pip/develop/blosc-1.9.2
Bump blosc from 1.9.1 to 1.9.2
2020-09-09 15:46:59 +02:00
Matthias
4480b3b393 Fix error in documentation (wrong sequence of steps) 2020-09-09 15:39:35 +02:00
dependabot[bot]
8c97b83b8c Bump pandas from 1.1.1 to 1.1.2
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Changelog](https://github.com/pandas-dev/pandas/blob/master/RELEASE.md)
- [Commits](https://github.com/pandas-dev/pandas/compare/v1.1.1...v1.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 13:29:36 +00:00
dependabot[bot]
d8dae46544 Bump ccxt from 1.34.3 to 1.34.11
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.34.3 to 1.34.11.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.34.3...1.34.11)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 13:29:31 +00:00
dependabot[bot]
986e767d6c Bump blosc from 1.9.1 to 1.9.2
Bumps [blosc](https://github.com/blosc/python-blosc) from 1.9.1 to 1.9.2.
- [Release notes](https://github.com/blosc/python-blosc/releases)
- [Changelog](https://github.com/Blosc/python-blosc/blob/master/RELEASE_NOTES.rst)
- [Commits](https://github.com/blosc/python-blosc/compare/v1.9.1...v1.9.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 13:29:27 +00:00
dependabot[bot]
4cf66e2fba Bump progressbar2 from 3.52.1 to 3.53.1
Bumps [progressbar2](https://github.com/WoLpH/python-progressbar) from 3.52.1 to 3.53.1.
- [Release notes](https://github.com/WoLpH/python-progressbar/releases)
- [Changelog](https://github.com/WoLpH/python-progressbar/blob/develop/CHANGES.rst)
- [Commits](https://github.com/WoLpH/python-progressbar/compare/v3.52.1...v3.53.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 13:29:22 +00:00
Matthias
083c358044 Fix wrong sequence in test 2020-09-09 07:57:02 +02:00
Matthias
25938efee6 Add partial test for refind_order 2020-09-09 07:50:52 +02:00
Matthias
98840eef3c Add 5th mock trade 2020-09-09 07:01:43 +02:00
Matthias
caf0476717 Add test for handle_insufficient_funds 2020-09-09 06:49:29 +02:00
Matthias
8af610b543 Add Test for reupdate_buy_order_fees 2020-09-09 06:42:36 +02:00
Matthias
aa2d1e9cca Merge pull request #3744 from freqtrade/fix/infomrativesample
fix Informative pair documentation
2020-09-08 16:38:08 +02:00
Allen Day
3fe2ed0e18 zero pad in test 2020-09-07 23:38:51 +08:00
Allen Day
f63a378967 Update hyperopt.py
zero pad wins/draws/losses (W/D/L) column to preserve alignment in console pretty print
2020-09-07 23:26:55 +08:00
Matthias
4c34934258 Merge pull request #3668 from freqtrade/dependabot/pip/develop/scikit-learn-0.23.2
Bump scikit-learn from 0.23.1 to 0.23.2
2020-09-07 09:50:40 +02:00
Matthias
384b966265 Merge pull request #3751 from freqtrade/dependabot/pip/develop/mkdocs-material-5.5.12
Bump mkdocs-material from 5.5.11 to 5.5.12
2020-09-07 09:48:29 +02:00
dependabot[bot]
f20318fad1 Bump scikit-learn from 0.23.1 to 0.23.2
Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 0.23.1 to 0.23.2.
- [Release notes](https://github.com/scikit-learn/scikit-learn/releases)
- [Commits](https://github.com/scikit-learn/scikit-learn/compare/0.23.1...0.23.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-07 07:37:12 +00:00
Matthias
eb06ffc908 Merge pull request #3753 from freqtrade/dependabot/pip/develop/scikit-optimize-0.8.1
Bump scikit-optimize from 0.7.4 to 0.8.1
2020-09-07 09:35:55 +02:00
Matthias
d8fdbd656b Merge pull request #3752 from freqtrade/dependabot/pip/develop/ccxt-1.34.3
Bump ccxt from 1.33.72 to 1.34.3
2020-09-07 09:35:32 +02:00
dependabot[bot]
ff0e73a9e5 Bump scikit-optimize from 0.7.4 to 0.8.1
Bumps [scikit-optimize](https://github.com/scikit-optimize/scikit-optimize) from 0.7.4 to 0.8.1.
- [Release notes](https://github.com/scikit-optimize/scikit-optimize/releases)
- [Changelog](https://github.com/scikit-optimize/scikit-optimize/blob/master/CHANGELOG.md)
- [Commits](https://github.com/scikit-optimize/scikit-optimize/compare/v0.7.4...v0.8.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-07 07:09:23 +00:00
dependabot[bot]
534404c284 Bump ccxt from 1.33.72 to 1.34.3
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.33.72 to 1.34.3.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.33.72...1.34.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-07 07:09:22 +00:00
dependabot[bot]
014fcb36f4 Bump mkdocs-material from 5.5.11 to 5.5.12
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 5.5.11 to 5.5.12.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/5.5.11...5.5.12)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-07 07:09:07 +00:00
Matthias
7852feab05 support smaller timeframes 2020-09-07 09:06:43 +02:00
Matthias
f3e0370d4d Stylistic fixes 2020-09-07 07:54:55 +02:00
Matthias
6518e7a789 Add test for update_closed_trades_without_fees 2020-09-07 07:47:38 +02:00
Matthias
26a5cc5959 Add return-type for select_order 2020-09-07 07:41:58 +02:00
Matthias
f113b45036 Refactor test to not duplicate order info 2020-09-07 06:53:11 +02:00
Matthias
da0ceb7d87 Extract orders for mock trades 2020-09-07 06:48:34 +02:00
Matthias
cad0275b32 Extract mock_trade generation to sepearate file 2020-09-07 06:39:48 +02:00
Matthias
f6ebe51314 Add test for update_open_orders 2020-09-06 19:32:00 +02:00
Matthias
a0fd7f4644 Update tests to merged version 2020-09-06 15:27:16 +02:00
Matthias
5fba446e9a Merge branch 'develop' into db_keep_orders 2020-09-06 15:22:13 +02:00
Matthias
b4da36d6e9 Fix small typo and add small testcase 2020-09-06 15:05:47 +02:00
Matthias
7c1f111ddf Add insufficient_funds_test 2020-09-06 14:59:43 +02:00
Matthias
cec98ad407 Test stoploss insufficient funds handling 2020-09-06 14:51:48 +02:00
Matthias
68d51a9787 Don't raise OperationalException when orderid's dont' match 2020-09-06 14:33:45 +02:00
Matthias
a78d61150c Deleting must delete orders first 2020-09-06 14:28:24 +02:00
Matthias
b7662722ba Add tests for Order object parsing 2020-09-06 14:17:45 +02:00
Matthias
b4c3529135 Add orders to mock_trades fixture 2020-09-06 14:05:15 +02:00
Matthias
8c9297e1f0 Don't crash if a strategy imports something wrongly 2020-09-05 16:51:19 +02:00
Matthias
c18441f36f Fix typo in reloading_conf 2020-09-05 16:44:23 +02:00
Matthias
71af64af94 Move comment to the right place 2020-09-04 20:10:43 +02:00
Matthias
cc684c5141 Correctly handle identical timerame merges 2020-09-04 20:09:02 +02:00
Matthias
7bc8927914 Add documentation for merge_informative_pair helper 2020-09-04 20:02:31 +02:00
Matthias
bd4f3d838a Implement merge_informative_pairs helper 2020-09-04 19:44:35 +02:00
Matthias
3ecd23f853 Merge pull request #3745 from silvavn/develop
Updating Edge Positioning Doc.
2020-09-04 10:39:39 +02:00
Matthias
848a94d62e Merge branch 'develop' into pr/silvavn/3745 2020-09-04 07:56:10 +02:00
Matthias
bc5cc48f67 Adjust windows docs, fix failing doc-test 2020-09-04 07:28:21 +02:00
Matthias
1406691945 Rename files to have clearer paths 2020-09-04 07:12:08 +02:00
silvavn
32005b886a small typo 2020-09-03 13:39:38 -06:00
silvavn
275d853432 Updated W, L Formulas 2020-09-03 13:38:46 -06:00
silvavn
34b27d2f96 Moving stuff around
- Mac troubleshooting to the end
- optional master checkout
- Anaconda moved to the end
2020-09-03 13:32:07 -06:00
silvavn
29fe2ffff7 Added that the user can edit docker-compose.yml 2020-09-03 13:22:22 -06:00
silvavn
e6058b716b removes prolixity docker-compose 2020-09-03 13:19:05 -06:00
silvavn
66505bd9bf Fixes Raspberri Pi Image config 2020-09-03 13:18:15 -06:00
silvavn
f6a8dda8e5 Reorganize structure
- Quickstart moved out of installation
- Installation now contains only advanced modes.
- Joined quickstart with Docker
2020-09-03 13:12:43 -06:00
silvavn
714264701c Fixes typos 2020-09-03 13:11:04 -06:00
Victor Silva
47f0e69072 Update docs/edge.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-09-03 12:57:15 -06:00
Victor Silva
93d1ad5ed9 Update docs/edge.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-09-03 12:56:54 -06:00
Victor Silva
1f13a8b91d Update docs/edge.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-09-03 12:55:49 -06:00
Victor Silva
08e3546120 Update docs/edge.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-09-03 12:55:07 -06:00
Victor Silva
5f9c449d8e Update docs/edge.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-09-03 12:53:33 -06:00
Victor Silva
70eaf971cd Update docs/edge.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-09-03 12:50:23 -06:00
Victor Silva
69349a9d8d Update docs/edge.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-09-03 12:49:54 -06:00
Victor Silva
ec9b51d60a Update docs/edge.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2020-09-03 12:49:32 -06:00
Matthias
27362046d4 Add documentation section about running docs locally 2020-09-03 19:33:34 +02:00
Matthias
5c5cf782f5 Fix small bug with /daily if close_profit_abs is not yet filled 2020-09-03 19:29:48 +02:00
silvavn
47352e1721 Address issue #2487
Breakdown insllation instructions
Make installation instructions shorter
Separate Windows from the remainder
Use tabs for better navigation
Minor language improvements
2020-09-02 20:37:45 -06:00
silvavn
295ecaa9b2 Updating Edge Positioning Doc.
Integrated MathJax
Included worked out examples
Changed Language to achieve a middle ground.
Minor formatting improvements
2020-09-02 16:58:54 -06:00
Matthias
79ea8cf771 Improve wording 2020-09-02 20:02:41 +02:00
Matthias
e268bd192e Fix informative sample documentation 2020-09-02 19:59:04 +02:00
Matthias
f54fecaeba Expose helpermethods thorugh freqtrade.strategy 2020-09-02 19:58:26 +02:00
Matthias
10c5b230b4 Merge pull request #3742 from freqtrade/remove_trailingstop_config
Remove trailing_stop from default config example - it'll be misleading
2020-09-01 20:16:54 +02:00
Matthias
dff0ac2768 Remove trailing_stop from default config example - it'll be misleading 2020-09-01 19:18:19 +02:00
Matthias
43035a3f76 Merge pull request #3724 from freqtrade/fix/3084
Forcesell should use the available methods for handling a trade correctly
2020-09-01 15:11:05 +02:00
Matthias
451a18c444 Merge pull request #3740 from freqtrade/remove_deprecated_volumepairlistkeys
Remove deprectead volumepairlist options
2020-09-01 10:51:45 +02:00
Matthias
d444182829 Reinstate wrongly removed pairlist test 2020-09-01 10:31:11 +02:00
Matthias
3bc6cb36c6 Remove deprectead volumepairlist options 2020-09-01 08:04:02 +02:00
Matthias
d6d3a02a23 Merge branch 'develop' into db_keep_orders 2020-09-01 07:51:16 +02:00
Matthias
a4e3edbcc5 Fix stoploss_last_update beein updated with date object in wrong
timezone
2020-09-01 07:10:48 +02:00
Matthias
38c52c7eee Merge pull request #3626 from freqtrade/feat/hdf5
Introduce HDF5 Datahandler
2020-08-31 16:10:24 +02:00
Matthias
24df8d6bf5 Sort imports 2020-08-31 15:46:31 +02:00
Matthias
8b664644c0 Merge pull request #3733 from freqtrade/docs/clock
Move clock warning to installation pages
2020-08-31 11:24:12 +02:00
Matthias
feb3ae87f7 Merge pull request #3739 from freqtrade/dependabot/pip/develop/pytest-mock-3.3.1
Bump pytest-mock from 3.3.0 to 3.3.1
2020-08-31 09:36:55 +02:00
Matthias
8bb3b6baf3 Merge pull request #3738 from freqtrade/dependabot/pip/develop/ccxt-1.33.72
Bump ccxt from 1.33.52 to 1.33.72
2020-08-31 09:25:19 +02:00
Matthias
96f95c340d Merge pull request #3737 from freqtrade/dependabot/pip/develop/progressbar2-3.52.1
Bump progressbar2 from 3.51.4 to 3.52.1
2020-08-31 09:24:43 +02:00
Matthias
34e586243a Merge pull request #3736 from freqtrade/dependabot/pip/develop/mkdocs-material-5.5.11
Bump mkdocs-material from 5.5.8 to 5.5.11
2020-08-31 09:23:35 +02:00
Matthias
aa839c3d2f Merge pull request #3735 from freqtrade/dependabot/pip/develop/flask-cors-3.0.9
Bump flask-cors from 3.0.8 to 3.0.9
2020-08-31 09:23:11 +02:00
Matthias
fbd68dd190 Merge pull request #3734 from freqtrade/dependabot/pip/develop/prompt-toolkit-3.0.7
Bump prompt-toolkit from 3.0.6 to 3.0.7
2020-08-31 09:22:41 +02:00
dependabot[bot]
c5b8993e9d Bump ccxt from 1.33.52 to 1.33.72
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.33.52 to 1.33.72.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.33.52...1.33.72)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-31 06:38:56 +00:00
dependabot[bot]
8969ab4aa3 Bump pytest-mock from 3.3.0 to 3.3.1
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.3.0...v3.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-31 06:38:55 +00:00
dependabot[bot]
55a49bfc53 Bump progressbar2 from 3.51.4 to 3.52.1
Bumps [progressbar2](https://github.com/WoLpH/python-progressbar) from 3.51.4 to 3.52.1.
- [Release notes](https://github.com/WoLpH/python-progressbar/releases)
- [Changelog](https://github.com/WoLpH/python-progressbar/blob/develop/CHANGES.rst)
- [Commits](https://github.com/WoLpH/python-progressbar/compare/v3.51.4...v3.52.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-31 06:38:38 +00:00
dependabot[bot]
821af9be9e Bump mkdocs-material from 5.5.8 to 5.5.11
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 5.5.8 to 5.5.11.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/5.5.8...5.5.11)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-31 06:38:36 +00:00
dependabot[bot]
4adf012ee6 Bump flask-cors from 3.0.8 to 3.0.9
Bumps [flask-cors](https://github.com/corydolphin/flask-cors) from 3.0.8 to 3.0.9.
- [Release notes](https://github.com/corydolphin/flask-cors/releases)
- [Changelog](https://github.com/corydolphin/flask-cors/blob/master/CHANGELOG.md)
- [Commits](https://github.com/corydolphin/flask-cors/compare/3.0.8...3.0.9)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-31 06:38:35 +00:00
dependabot[bot]
f83633ff4e Bump prompt-toolkit from 3.0.6 to 3.0.7
Bumps [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) from 3.0.6 to 3.0.7.
- [Release notes](https://github.com/prompt-toolkit/python-prompt-toolkit/releases)
- [Changelog](https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/CHANGELOG)
- [Commits](https://github.com/prompt-toolkit/python-prompt-toolkit/compare/3.0.6...3.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-31 06:38:24 +00:00
Matthias
7f74ff53b1 Move clock warning to installation pages 2020-08-31 07:34:43 +02:00
Matthias
7cbe3cd452 Merge pull request #3730 from freqtrade/allow_pairlists_in_backtesting
[minor] Allow pairlists in backtesting
2020-08-30 10:34:49 +02:00
Matthias
3d39f05c8f Improve release documetation 2020-08-30 10:23:14 +02:00
Matthias
842eff95eb Add simple verification to ensure pairlists is iitialized 2020-08-30 10:07:58 +02:00
Matthias
284d39930f Allow using pairlists through dataprovider in backtesting 2020-08-30 10:07:28 +02:00
Matthias
a595d23bf1 Improve comment in test 2020-08-29 10:14:49 +02:00
Matthias
289425a434 Add test for dry-run-cancel order 2020-08-29 10:07:02 +02:00
Matthias
9c20d488a9 Merge branch 'develop' into fix/3084 2020-08-28 15:43:24 +02:00
Matthias
b2373fccfd Adjust tests as send_msg is only called once 2020-08-27 06:35:28 +02:00
Matthias
9c0a3fffd7 Avoid double notifications in case of partially filled buy orders 2020-08-26 22:17:43 +02:00
Matthias
5e75caa917 Adjust tests to new forcesell 2020-08-26 21:55:31 +02:00
Matthias
85e71275d3 Simplify forcesell method by using freqtrade methods 2020-08-26 21:27:09 +02:00
Matthias
add78414e4 Don't overwrite cancel_reason 2020-08-26 21:24:47 +02:00
Matthias
d161b94d72 Allow simulating cancelled orders in dry-run 2020-08-26 21:22:36 +02:00
Matthias
26f45c8323 Improve logmessage for trailing stoploss 2020-08-24 06:56:56 +02:00
Matthias
38809acde8 Don't rerun for known closed orders 2020-08-24 06:50:43 +02:00
Matthias
311b55fc24 Merge branch 'develop' into db_keep_orders 2020-08-23 19:31:59 +02:00
Matthias
c3a367e4f0 Merge branch 'develop' into db_keep_orders 2020-08-23 19:14:57 +02:00
Matthias
9ba9f73706 Improve logging, don't search for buy orders in refind_lost_order 2020-08-23 16:04:32 +02:00
Matthias
4ecb67d1d1 Merge branch 'develop' into db_keep_orders 2020-08-23 10:36:56 +02:00
Matthias
674b510d23 Parametrize fetch_order retry counts 2020-08-22 17:35:42 +02:00
Matthias
3d7e800ff2 Remove test code 2020-08-22 16:08:54 +02:00
Matthias
11e69bdd65 Update open trades too 2020-08-22 15:49:32 +02:00
Matthias
fd33282eb1 Add handle_insufficient exception 2020-08-22 15:48:00 +02:00
Matthias
3b4446339e Use fetch_order_or_stoploss order 2020-08-22 09:30:25 +02:00
Matthias
f2b390a271 Add fetch_order_or_stoploss wrapper 2020-08-22 09:28:36 +02:00
Matthias
fc2104bfad Fix bug with time when updating order_date 2020-08-22 09:12:09 +02:00
Matthias
39beb5c837 Add method to update fees on closed trades 2020-08-22 08:59:54 +02:00
Matthias
fc42d552ab Convert logs to fstrings 2020-08-22 08:59:50 +02:00
Matthias
2d6bcbb454 Fix small error in trades updating 2020-08-21 19:51:31 +02:00
Matthias
357d7714ec Add docstring to update_trade_state 2020-08-21 07:31:22 +02:00
Matthias
3be14933d4 Add comment explaining update_open_orders 2020-08-21 07:24:49 +02:00
Matthias
0b6014fae3 update_trade_state should take the order id directly - not from the trade object 2020-08-21 07:17:52 +02:00
Matthias
838985f6a0 Don't reset open-order-id just yet
it's needed to get the fees
2020-08-21 07:13:13 +02:00
Matthias
06125df10c Remove unused import 2020-08-14 11:31:02 +02:00
Matthias
d8fdd32b54 FIx migrations 2020-08-14 11:25:40 +02:00
Matthias
cfa352ecf2 Disable refind_lost_order for now 2020-08-14 11:25:20 +02:00
Matthias
b25267ad3d Build docker image for db_keep_orders branch 2020-08-14 11:13:55 +02:00
Matthias
552aaf7945 add refind order logic 2020-08-14 10:59:55 +02:00
Matthias
22af82631a Introduce InsufficientFundsError exception 2020-08-14 09:57:13 +02:00
Matthias
a6fc922f28 Introduce insufficientFunds Exception 2020-08-14 09:56:48 +02:00
Matthias
8458a380b8 Improve order catchup 2020-08-14 09:52:47 +02:00
Matthias
95efc0d688 Add open_order_updater 2020-08-14 09:52:47 +02:00
Matthias
c4d7aff5c3 Order should have a "is_open" flag 2020-08-14 09:52:47 +02:00
Matthias
da2a515d0b Add delete cascade to alchemy model 2020-08-14 09:52:46 +02:00
Matthias
1a305ea8b0 Fix migrations to use unique key 2020-08-14 09:52:46 +02:00
Matthias
2ca6547baf Update tests to have unique ordernumbers 2020-08-14 09:52:46 +02:00
Matthias
4434a54d59 Add unique key to order-Model 2020-08-14 09:52:46 +02:00
Matthias
ebd755e36a Improve order handling 2020-08-14 09:52:46 +02:00
Matthias
0af9e913d4 Timestamps are in ms 2020-08-14 09:52:46 +02:00
Matthias
73182bb2dd Update migrations to populate Orders table for open orders 2020-08-14 09:52:46 +02:00
Matthias
396e781bf4 Update orders 2020-08-14 09:52:46 +02:00
Matthias
4924d8487e Extract "update order from ccxt" to it's onw function 2020-08-14 09:52:46 +02:00
Matthias
ee7b235cdc Improve tests to use open_order mock where applicable 2020-08-14 09:52:46 +02:00
Matthias
420a8c2b1c Improve tests for rpc/forcebuy 2020-08-14 09:52:46 +02:00
Matthias
a66a3d047f Remove unneeded mocks 2020-08-14 09:52:46 +02:00
Matthias
ed87abd93a Allow selecting only a certain table range in migration 2020-08-14 09:52:46 +02:00
Matthias
171a52b21a Introduce Order database model 2020-08-14 09:52:46 +02:00
Matthias
7d03a067ee Extract migrations ot seperate module 2020-08-14 09:52:46 +02:00
Matthias
044df880e6 Move persistence into it's own submodule 2020-08-14 09:52:46 +02:00
Matthias
bad89307dd Fix mypy error 2020-07-25 17:19:41 +02:00
Matthias
119bf2a8ea Document hdf5 dataformat 2020-07-25 17:06:58 +02:00
Matthias
edb582e522 Add more tests 2020-07-24 20:40:07 +02:00
Matthias
ae1c99bdd0 more tests 2020-07-24 20:36:30 +02:00
Matthias
ed33d4781d Add more hdf5 tests 2020-07-24 20:19:34 +02:00
Matthias
d9b339ee18 Add some more tests for hdf5 2020-07-24 20:09:59 +02:00
Matthias
0a28818b46 Add some tests for hdf5 2020-07-24 19:37:37 +02:00
Matthias
e26e658f99 Improve a few tests 2020-07-24 19:33:27 +02:00
Matthias
6a0c84b649 Add tests for hdf5 2020-07-24 19:23:56 +02:00
Matthias
861e7099cc Rename hdf5handler to hdf5DataHandler 2020-07-24 19:23:37 +02:00
Matthias
3171ad33b7 Add blosc compression 2020-07-24 17:44:29 +02:00
Matthias
0f08addfbe Don't store empty arrays 2020-07-24 17:37:07 +02:00
Matthias
31df42e737 Implement get_available_data 2020-07-24 17:31:43 +02:00
Matthias
d4540c846a Add trades_load method 2020-07-23 19:33:23 +02:00
Matthias
55591e287c First version of hdf5handler - no proper support for trades yet 2020-07-23 19:33:23 +02:00
Matthias
0614e59966 Add tables dependency 2020-07-23 19:33:23 +02:00
Leif Segen
1b4b10f8cd Update docs/installation.md
Address that numpy is required before `python3 -m pip install -r requirements.txt` can run.
2019-07-23 23:45:27 -05:00
226 changed files with 10137 additions and 3628 deletions

18
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM freqtradeorg/freqtrade:develop
# Install dependencies
COPY requirements-dev.txt /freqtrade/
RUN apt-get update \
&& apt-get -y install git sudo vim \
&& apt-get clean \
&& pip install autopep8 -r docs/requirements-docs.txt -r requirements-dev.txt --no-cache-dir \
&& useradd -u 1000 -U -m ftuser \
&& mkdir -p /home/ftuser/.vscode-server /home/ftuser/.vscode-server-insiders /home/ftuser/commandhistory \
&& echo "export PROMPT_COMMAND='history -a'" >> /home/ftuser/.bashrc \
&& echo "export HISTFILE=~/commandhistory/.bash_history" >> /home/ftuser/.bashrc \
&& chown ftuser: -R /home/ftuser/
USER ftuser
# Empty the ENTRYPOINT to allow all commands
ENTRYPOINT []

View File

@@ -0,0 +1,44 @@
{
"name": "freqtrade Develop",
"dockerComposeFile": [
"docker-compose.yml"
],
"service": "ft_vscode",
"workspaceFolder": "/freqtrade/",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"editor.insertSpaces": true,
"files.trimTrailingWhitespace": true,
"[markdown]": {
"files.trimTrailingWhitespace": false,
},
"python.pythonPath": "/usr/local/bin/python",
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"davidanson.vscode-markdownlint",
"ms-azuretools.vscode-docker",
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",
// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "sudo apt-get update && apt-get install -y git",
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "ftuser"
}

View File

@@ -0,0 +1,24 @@
---
version: '3'
services:
ft_vscode:
build:
context: ..
dockerfile: ".devcontainer/Dockerfile"
volumes:
# Allow git usage within container
- "${HOME}/.ssh:/home/ftuser/.ssh:ro"
- "${HOME}/.gitconfig:/home/ftuser/.gitconfig:ro"
- ..:/freqtrade:cached
# Persist bash-history
- freqtrade-vscode-server:/home/ftuser/.vscode-server
- freqtrade-bashhistory:/home/ftuser/commandhistory
# Expose API port
ports:
- "127.0.0.1:8080:8080"
command: /bin/sh -c "while sleep 1000; do :; done"
volumes:
freqtrade-vscode-server:
freqtrade-bashhistory:

View File

@@ -13,3 +13,4 @@ CONTRIBUTING.md
MANIFEST.in
README.md
freqtrade.service
user_data

View File

@@ -4,8 +4,8 @@ on:
push:
branches:
- master
- stable
- develop
- github_actions_tests
tags:
release:
types: [published]
@@ -14,38 +14,128 @@ on:
- cron: '0 5 * * 4'
jobs:
build:
build_linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-18.04, macos-latest ]
python-version: [3.7, 3.8]
os: [ ubuntu-18.04, ubuntu-20.04 ]
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache_dependencies
uses: actions/cache@v1
uses: actions/cache@v2
id: cache
with:
path: ~/dependencies/
key: ${{ runner.os }}-dependencies
- name: pip cache (linux)
uses: actions/cache@preview
uses: actions/cache@v2
if: startsWith(matrix.os, 'ubuntu')
with:
path: ~/.cache/pip
key: test-${{ matrix.os }}-${{ matrix.python-version }}-pip
- name: TA binary *nix
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies/; cd ..
- name: Installation - *nix
run: |
python -m pip install --upgrade pip
export LD_LIBRARY_PATH=${HOME}/dependencies/lib:$LD_LIBRARY_PATH
export TA_LIBRARY_PATH=${HOME}/dependencies/lib
export TA_INCLUDE_PATH=${HOME}/dependencies/include
pip install -r requirements-dev.txt
pip install -e .
- name: Tests
run: |
pytest --random-order --cov=freqtrade --cov-config=.coveragerc
if: matrix.python-version != '3.9'
- name: Tests incl. ccxt compatibility tests
run: |
pytest --random-order --cov=freqtrade --cov-config=.coveragerc --longrun
if: matrix.python-version == '3.9'
- name: Coveralls
if: (startsWith(matrix.os, 'ubuntu-20') && matrix.python-version == '3.8')
env:
# Coveralls token. Not used as secret due to github not providing secrets to forked repositories
COVERALLS_REPO_TOKEN: 6D1m0xupS3FgutfuGao8keFf9Hc0FpIXu
run: |
# Allow failure for coveralls
coveralls -v || true
- name: Backtesting
run: |
cp config.json.example config.json
freqtrade create-userdir --userdir user_data
freqtrade backtesting --datadir tests/testdata --strategy SampleStrategy
- name: Hyperopt
run: |
cp config.json.example config.json
freqtrade create-userdir --userdir user_data
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --hyperopt-loss SharpeHyperOptLossDaily --print-all
- name: Flake8
run: |
flake8
- name: Sort imports (isort)
run: |
isort --check .
- name: Mypy
run: |
mypy freqtrade scripts
- name: Slack Notification
uses: homoluctus/slatify@v1.8.0
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI ${{ matrix.os }}*'
mention: 'here'
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
build_macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest ]
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache_dependencies
uses: actions/cache@v2
id: cache
with:
path: ~/dependencies/
key: ${{ runner.os }}-dependencies
- name: pip cache (macOS)
uses: actions/cache@preview
uses: actions/cache@v2
if: startsWith(matrix.os, 'macOS')
with:
path: ~/Library/Caches/pip
@@ -70,7 +160,7 @@ jobs:
pytest --random-order --cov=freqtrade --cov-config=.coveragerc
- name: Coveralls
if: (startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.8')
if: (startsWith(matrix.os, 'ubuntu-20') && matrix.python-version == '3.8')
env:
# Coveralls token. Not used as secret due to github not providing secrets to forked repositories
COVERALLS_REPO_TOKEN: 6D1m0xupS3FgutfuGao8keFf9Hc0FpIXu
@@ -88,12 +178,16 @@ jobs:
run: |
cp config.json.example config.json
freqtrade create-userdir --userdir user_data
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --print-all
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --hyperopt-loss SharpeHyperOptLossDaily --print-all
- name: Flake8
run: |
flake8
- name: Sort imports (isort)
run: |
isort --check .
- name: Mypy
run: |
mypy freqtrade scripts
@@ -109,6 +203,7 @@ jobs:
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
build_windows:
runs-on: ${{ matrix.os }}
@@ -121,7 +216,7 @@ jobs:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
@@ -150,7 +245,7 @@ jobs:
run: |
cp config.json.example config.json
freqtrade create-userdir --userdir user_data
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --print-all
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --hyperopt-loss SharpeHyperOptLossDaily --print-all
- name: Flake8
run: |
@@ -172,7 +267,7 @@ jobs:
url: ${{ secrets.SLACK_WEBHOOK }}
docs_check:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
@@ -180,6 +275,17 @@ jobs:
run: |
./tests/test_docs.sh
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Documentation build
run: |
pip install -r docs/requirements-docs.txt
pip install mkdocs
mkdocs build
- name: Slack Notification
uses: homoluctus/slatify@v1.8.0
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
@@ -190,18 +296,18 @@ jobs:
url: ${{ secrets.SLACK_WEBHOOK }}
cleanup-prior-runs:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Cleanup previous runs on this branch
uses: rokroskar/workflow-run-cleanup-action@v0.2.2
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.repository == 'freqtrade/freqtrade'"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/stable' && github.repository == 'freqtrade/freqtrade'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Notify on slack only once - when CI completes (and after deploy) in case it's successfull
notify-complete:
needs: [ build, build_windows, docs_check ]
runs-on: ubuntu-latest
needs: [ build_linux, build_macos, build_windows, docs_check ]
runs-on: ubuntu-20.04
steps:
- name: Slack Notification
uses: homoluctus/slatify@v1.8.0
@@ -213,20 +319,21 @@ jobs:
url: ${{ secrets.SLACK_WEBHOOK }}
deploy:
needs: [ build, build_windows, docs_check ]
runs-on: ubuntu-18.04
needs: [ build_linux, build_macos, build_windows, docs_check ]
runs-on: ubuntu-20.04
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
id: extract_branch
- name: Build distribution
@@ -236,7 +343,7 @@ jobs:
- name: Publish to PyPI (Test)
uses: pypa/gh-action-pypi-publish@master
if: (steps.extract_branch.outputs.branch == 'master' || github.event_name == 'release')
if: (github.event_name == 'release')
with:
user: __token__
password: ${{ secrets.pypi_test_password }}
@@ -244,7 +351,7 @@ jobs:
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
if: (steps.extract_branch.outputs.branch == 'master' || github.event_name == 'release')
if: (github.event_name == 'release')
with:
user: __token__
password: ${{ secrets.pypi_password }}

View File

@@ -2,7 +2,7 @@ name: Update Docker Hub Description
on:
push:
branches:
- master
- stable
jobs:
dockerHubDescription:

View File

@@ -4,5 +4,5 @@ build:
image: latest
python:
version: 3.6
version: 3.8
setup_py_install: false

View File

@@ -1,9 +1,9 @@
os:
- linux
dist: xenial
dist: bionic
language: python
python:
- 3.6
- 3.8
services:
- docker
env:
@@ -33,7 +33,7 @@ jobs:
- script:
- cp config.json.example config.json
- freqtrade create-userdir --userdir user_data
- freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt
- freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --hyperopt-loss SharpeHyperOptLossDaily
name: hyperopt
- script: flake8
name: flake8

View File

@@ -8,17 +8,17 @@ Issues labeled [good first issue](https://github.com/freqtrade/freqtrade/labels/
Few pointers for contributions:
- Create your PR against the `develop` branch, not `master`.
- New features need to contain unit tests and must be PEP8 conformant (max-line-length = 100).
- Create your PR against the `develop` branch, not `stable`.
- New features need to contain unit tests, must conform to PEP8 (max-line-length = 100) and should be documented with the introduction PR.
- PR's can be declared as `[WIP]` - which signify Work in Progress Pull Requests (which are not finished).
If you are unsure, discuss the feature on our [Slack](https://join.slack.com/t/highfrequencybot/shared_invite/enQtNjU5ODcwNjI1MDU3LTU1MTgxMjkzNmYxNWE1MDEzYzQ3YmU4N2MwZjUyNjJjODRkMDVkNjg4YTAyZGYzYzlhOTZiMTE4ZjQ4YzM0OGE)
or in a [issue](https://github.com/freqtrade/freqtrade/issues) before a PR.
If you are unsure, discuss the feature on our [discord server](https://discord.gg/MA9v74M), on [Slack](https://join.slack.com/t/highfrequencybot/shared_invite/zt-k9o2v5ut-jX8Mc4CwNM8CDc2Dyg96YA) or in a [issue](https://github.com/freqtrade/freqtrade/issues) before a PR.
## Getting started
Best start by reading the [documentation](https://www.freqtrade.io/) to get a feel for what is possible with the bot, or head straight to the [Developer-documentation](https://www.freqtrade.io/en/latest/developer/) (WIP) which should help you getting started.
## Before sending the PR:
## Before sending the PR
### 1. Run unit tests
@@ -64,6 +64,14 @@ Guide for installing them is [here](http://flake8.pycqa.org/en/latest/user/using
mypy freqtrade
```
### 4. Ensure all imports are correct
#### Run isort
``` bash
isort .
```
## (Core)-Committer Guide
### Process: Pull Requests
@@ -114,6 +122,6 @@ Contributors may be given commit privileges. Preference will be given to those w
1. Access to resources for cross-platform development and testing.
1. Time to devote to the project regularly.
Being a Committer does not grant write permission on `develop` or `master` for security reasons (Users trust Freqtrade with their Exchange API keys).
Being a Committer does not grant write permission on `develop` or `stable` for security reasons (Users trust Freqtrade with their Exchange API keys).
After being Committer for some time, a Committer may be named Core Committer and given full repository access.

View File

@@ -1,28 +1,46 @@
FROM python:3.8.5-slim-buster
FROM python:3.8.6-slim-buster as base
RUN apt-get update \
&& apt-get -y install curl build-essential libssl-dev sqlite3 \
&& apt-get clean \
&& pip install --upgrade pip
# Setup env
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1
ENV PATH=/root/.local/bin:$PATH
# Prepare environment
RUN mkdir /freqtrade
WORKDIR /freqtrade
# Install dependencies
FROM base as python-deps
RUN apt-get update \
&& apt-get -y install curl build-essential libssl-dev git \
&& apt-get clean \
&& pip install --upgrade pip
# Install TA-lib
COPY build_helpers/* /tmp/
RUN cd /tmp && /tmp/install_ta-lib.sh && rm -r /tmp/*ta-lib*
ENV LD_LIBRARY_PATH /usr/local/lib
# Install dependencies
COPY requirements.txt requirements-common.txt requirements-hyperopt.txt /freqtrade/
RUN pip install numpy --no-cache-dir \
&& pip install -r requirements-hyperopt.txt --no-cache-dir
COPY requirements.txt requirements-hyperopt.txt /freqtrade/
RUN pip install --user --no-cache-dir numpy \
&& pip install --user --no-cache-dir -r requirements-hyperopt.txt
# Copy dependencies to runtime-image
FROM base as runtime-image
COPY --from=python-deps /usr/local/lib /usr/local/lib
ENV LD_LIBRARY_PATH /usr/local/lib
COPY --from=python-deps /root/.local /root/.local
# Install and execute
COPY . /freqtrade/
RUN pip install -e . --no-cache-dir
RUN pip install -e . --no-cache-dir \
&& mkdir /freqtrade/user_data/
ENTRYPOINT ["freqtrade"]
# Default to trade mode
CMD [ "trade" ]

View File

@@ -1,25 +1,43 @@
FROM --platform=linux/arm/v7 python:3.7.7-slim-buster
FROM --platform=linux/arm/v7 python:3.7.9-slim-buster as base
RUN apt-get update \
&& apt-get -y install curl build-essential libssl-dev libffi-dev libatlas3-base libgfortran5 sqlite3 \
&& apt-get clean \
&& pip install --upgrade pip \
&& echo "[global]\nextra-index-url=https://www.piwheels.org/simple" > /etc/pip.conf
# Setup env
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1
ENV PATH=/root/.local/bin:$PATH
# Prepare environment
RUN mkdir /freqtrade
WORKDIR /freqtrade
RUN apt-get update \
&& apt-get -y install libatlas3-base curl sqlite3 \
&& apt-get clean
# Install dependencies
FROM base as python-deps
RUN apt-get -y install build-essential libssl-dev libffi-dev libgfortran5 \
&& apt-get clean \
&& pip install --upgrade pip \
&& echo "[global]\nextra-index-url=https://www.piwheels.org/simple" > /etc/pip.conf
# Install TA-lib
COPY build_helpers/* /tmp/
RUN cd /tmp && /tmp/install_ta-lib.sh && rm -r /tmp/*ta-lib*
ENV LD_LIBRARY_PATH /usr/local/lib
# Install dependencies
COPY requirements.txt requirements-common.txt /freqtrade/
RUN pip install numpy --no-cache-dir \
&& pip install -r requirements.txt --no-cache-dir
COPY requirements.txt /freqtrade/
RUN pip install --user --no-cache-dir numpy \
&& pip install --user --no-cache-dir -r requirements.txt
# Copy dependencies to runtime-image
FROM base as runtime-image
COPY --from=python-deps /usr/local/lib /usr/local/lib
ENV LD_LIBRARY_PATH /usr/local/lib
COPY --from=python-deps /root/.local /root/.local
# Install and execute
COPY . /freqtrade/

View File

@@ -37,7 +37,7 @@ Please find the complete documentation on our [website](https://www.freqtrade.io
## Features
- [x] **Based on Python 3.6+**: For botting on any operating system - Windows, macOS and Linux.
- [x] **Based on Python 3.7+**: For botting on any operating system - Windows, macOS and Linux.
- [x] **Persistence**: Persistence is achieved through sqlite.
- [x] **Dry-run**: Run the bot without playing money.
- [x] **Backtesting**: Run a simulation of your buy/sell strategy.
@@ -55,9 +55,8 @@ Please find the complete documentation on our [website](https://www.freqtrade.io
Freqtrade provides a Linux/macOS script to install all dependencies and help you to configure the bot.
```bash
git clone git@github.com:freqtrade/freqtrade.git
git clone -b develop https://github.com/freqtrade/freqtrade.git
cd freqtrade
git checkout develop
./setup.sh --install
```
@@ -111,34 +110,35 @@ optional arguments:
Telegram is not mandatory. However, this is a great way to control your bot. More details and the full command list on our [documentation](https://www.freqtrade.io/en/latest/telegram-usage/)
- `/start`: Starts the trader
- `/stop`: Stops the trader
- `/status [table]`: Lists all open trades
- `/count`: Displays number of open trades
- `/start`: Starts the trader.
- `/stop`: Stops the trader.
- `/stopbuy`: Stop entering new trades.
- `/status [table]`: Lists all open trades.
- `/profit`: Lists cumulative profit from all finished trades
- `/forcesell <trade_id>|all`: Instantly sells the given trade (Ignoring `minimum_roi`).
- `/performance`: Show performance of each finished trade grouped by pair
- `/balance`: Show account balance per currency
- `/daily <n>`: Shows profit or loss per day, over the last n days
- `/help`: Show help message
- `/version`: Show version
- `/balance`: Show account balance per currency.
- `/daily <n>`: Shows profit or loss per day, over the last n days.
- `/help`: Show help message.
- `/version`: Show version.
## Development branches
The project is currently setup in two main branches:
- `develop` - This branch has often new features, but might also cause breaking changes.
- `master` - This branch contains the latest stable release. The bot 'should' be stable on this branch, and is generally well tested.
- `develop` - This branch has often new features, but might also contain breaking changes. We try hard to keep this branch as stable as possible.
- `stable` - This branch contains the latest stable release. This branch is generally well tested.
- `feat/*` - These are feature branches, which are being worked on heavily. Please don't use these unless you want to test a specific feature.
## Support
### Help / Slack
### Help / Discord / Slack
For any questions not covered by the documentation or for further
information about the bot, we encourage you to join our slack channel.
For any questions not covered by the documentation or for further information about the bot, or to simply engage with like-minded individuals, we encourage you to join our slack channel.
- [Click here to join Slack channel](https://join.slack.com/t/highfrequencybot/shared_invite/enQtNjU5ODcwNjI1MDU3LTU1MTgxMjkzNmYxNWE1MDEzYzQ3YmU4N2MwZjUyNjJjODRkMDVkNjg4YTAyZGYzYzlhOTZiMTE4ZjQ4YzM0OGE).
Please check out our [discord server](https://discord.gg/MA9v74M).
You can also join our [Slack channel](https://join.slack.com/t/highfrequencybot/shared_invite/zt-k9o2v5ut-jX8Mc4CwNM8CDc2Dyg96YA).
### [Bugs / Issues](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue)
@@ -166,18 +166,18 @@ Please read our
[Contributing document](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md)
to understand the requirements before sending your pull-requests.
Coding is not a neccessity to contribute - maybe start with improving our documentation?
Coding is not a necessity to contribute - maybe start with improving our documentation?
Issues labeled [good first issue](https://github.com/freqtrade/freqtrade/labels/good%20first%20issue) can be good first contributions, and will help get you familiar with the codebase.
**Note** before starting any major new feature work, *please open an issue describing what you are planning to do* or talk to us on [Slack](https://join.slack.com/t/highfrequencybot/shared_invite/enQtNjU5ODcwNjI1MDU3LTU1MTgxMjkzNmYxNWE1MDEzYzQ3YmU4N2MwZjUyNjJjODRkMDVkNjg4YTAyZGYzYzlhOTZiMTE4ZjQ4YzM0OGE). This will ensure that interested parties can give valuable feedback on the feature, and let others know that you are working on it.
**Note** before starting any major new feature work, *please open an issue describing what you are planning to do* or talk to us on [discord](https://discord.gg/MA9v74M) or [Slack](https://join.slack.com/t/highfrequencybot/shared_invite/zt-k9o2v5ut-jX8Mc4CwNM8CDc2Dyg96YA). This will ensure that interested parties can give valuable feedback on the feature, and let others know that you are working on it.
**Important:** Always create your PR against the `develop` branch, not `master`.
**Important:** Always create your PR against the `develop` branch, not `stable`.
## Requirements
### Uptodate clock
### Up-to-date clock
The clock must be accurate, syncronized to a NTP server very frequently to avoid problems with communication to the exchanges.
The clock must be accurate, synchronized to a NTP server very frequently to avoid problems with communication to the exchanges.
### Min hardware required
@@ -187,7 +187,7 @@ To run this bot we recommend you a cloud instance with a minimum of:
### Software requirements
- [Python 3.6.x](http://docs.python-guide.org/en/latest/starting/installation/)
- [Python 3.7.x](http://docs.python-guide.org/en/latest/starting/installation/)
- [pip](https://pip.pypa.io/en/stable/installing/)
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [TA-Lib](https://mrjbq7.github.io/ta-lib/install.html)

Binary file not shown.

Binary file not shown.

View File

@@ -7,10 +7,10 @@ python -m pip install --upgrade pip
$pyv = python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"
if ($pyv -eq '3.7') {
pip install build_helpers\TA_Lib-0.4.18-cp37-cp37m-win_amd64.whl
pip install build_helpers\TA_Lib-0.4.19-cp37-cp37m-win_amd64.whl
}
if ($pyv -eq '3.8') {
pip install build_helpers\TA_Lib-0.4.18-cp38-cp38-win_amd64.whl
pip install build_helpers\TA_Lib-0.4.19-cp38-cp38-win_amd64.whl
}
pip install -r requirements-dev.txt

View File

@@ -2,6 +2,7 @@
# Replace / with _ to create a valid tag
TAG=$(echo "${BRANCH_NAME}" | sed -e "s/\//_/g")
TAG_PLOT=${TAG}_plot
echo "Running for ${TAG}"
# Add commit and commit_message to docker container
@@ -16,6 +17,12 @@ else
docker pull ${IMAGE_NAME}:${TAG}
docker build --cache-from ${IMAGE_NAME}:${TAG} -t freqtrade:${TAG} .
fi
# Tag image for upload and next build step
docker tag freqtrade:$TAG ${IMAGE_NAME}:$TAG
docker build --cache-from freqtrade:${TAG} --build-arg sourceimage=${TAG} -t freqtrade:${TAG_PLOT} -f docker/Dockerfile.plot .
docker tag freqtrade:$TAG_PLOT ${IMAGE_NAME}:$TAG_PLOT
if [ $? -ne 0 ]; then
echo "failed building image"
@@ -30,8 +37,6 @@ if [ $? -ne 0 ]; then
return 1
fi
# Tag image for upload
docker tag freqtrade:$TAG ${IMAGE_NAME}:$TAG
if [ $? -ne 0 ]; then
echo "failed tagging image"
return 1

View File

@@ -5,16 +5,15 @@
"tradable_balance_ratio": 0.99,
"fiat_display_currency": "USD",
"timeframe": "5m",
"dry_run": false,
"dry_run": true,
"cancel_open_orders_on_exit": false,
"trailing_stop": false,
"unfilledtimeout": {
"buy": 10,
"sell": 30
},
"bid_strategy": {
"ask_last_balance": 0.0,
"use_order_book": false,
"ask_last_balance": 0.0,
"order_book_top": 1,
"check_depth_of_market": {
"enabled": false,

View File

@@ -7,7 +7,6 @@
"timeframe": "5m",
"dry_run": true,
"cancel_open_orders_on_exit": false,
"trailing_stop": false,
"unfilledtimeout": {
"buy": 10,
"sell": 30

View File

@@ -7,7 +7,7 @@
"amount_reserve_percent": 0.05,
"amend_last_stake_amount": false,
"last_stake_amount_min_ratio": 0.5,
"dry_run": false,
"dry_run": true,
"cancel_open_orders_on_exit": false,
"timeframe": "5m",
"trailing_stop": false,
@@ -67,7 +67,40 @@
{"method": "AgeFilter", "min_days_listed": 10},
{"method": "PrecisionFilter"},
{"method": "PriceFilter", "low_price_ratio": 0.01, "min_price": 0.00000010},
{"method": "SpreadFilter", "max_spread_ratio": 0.005}
{"method": "SpreadFilter", "max_spread_ratio": 0.005},
{
"method": "RangeStabilityFilter",
"lookback_days": 10,
"min_rate_of_change": 0.01,
"refresh_period": 1440
}
],
"protections": [
{
"method": "StoplossGuard",
"lookback_period_candles": 60,
"trade_limit": 4,
"stop_duration_candles": 60,
"only_per_pair": false
},
{
"method": "CooldownPeriod",
"stop_duration_candles": 20
},
{
"method": "MaxDrawdown",
"lookback_period_candles": 200,
"trade_limit": 20,
"stop_duration_candles": 10,
"max_allowed_drawdown": 0.2
},
{
"method": "LowProfitPairs",
"lookback_period_candles": 360,
"trade_limit": 1,
"stop_duration_candles": 2,
"required_profit": 0.02
}
],
"exchange": {
"name": "bittrex",
@@ -116,7 +149,16 @@
"telegram": {
"enabled": true,
"token": "your_telegram_token",
"chat_id": "your_telegram_chat_id"
"chat_id": "your_telegram_chat_id",
"notification_settings": {
"status": "on",
"warning": "on",
"startup": "on",
"buy": "on",
"sell": "on",
"buy_cancel": "on",
"sell_cancel": "on"
}
},
"api_server": {
"enabled": false,

View File

@@ -7,7 +7,6 @@
"timeframe": "5m",
"dry_run": true,
"cancel_open_orders_on_exit": false,
"trailing_stop": false,
"unfilledtimeout": {
"buy": 10,
"sell": 30
@@ -28,12 +27,11 @@
"use_sell_signal": true,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": false
},
"exchange": {
"name": "kraken",
"key": "",
"secret": "",
"key": "your_exchange_key",
"secret": "your_exchange_key",
"ccxt_config": {"enableRateLimit": true},
"ccxt_async_config": {
"enableRateLimit": true,

View File

@@ -1,20 +0,0 @@
---
version: '3'
services:
freqtrade_develop:
build:
context: .
dockerfile: "./Dockerfile.develop"
volumes:
- ".:/freqtrade"
entrypoint:
- "freqtrade"
freqtrade_bash:
build:
context: .
dockerfile: "./Dockerfile.develop"
volumes:
- ".:/freqtrade"
entrypoint:
- "/bin/bash"

View File

@@ -2,12 +2,14 @@
version: '3'
services:
freqtrade:
image: freqtradeorg/freqtrade:master
image: freqtradeorg/freqtrade:stable
# image: freqtradeorg/freqtrade:develop
# Use plotting image
# image: freqtradeorg/freqtrade:develop_plot
# Build step - only needed when additional dependencies are needed
# build:
# context: .
# dockerfile: "./Dockerfile.technical"
# dockerfile: "./docker/Dockerfile.technical"
restart: unless-stopped
container_name: freqtrade
volumes:

View File

@@ -2,6 +2,7 @@ FROM freqtradeorg/freqtrade:develop
# Install dependencies
COPY requirements-dev.txt /freqtrade/
RUN pip install numpy --no-cache-dir \
&& pip install -r requirements-dev.txt --no-cache-dir

View File

@@ -0,0 +1,7 @@
FROM freqtradeorg/freqtrade:develop_plot
RUN pip install jupyterlab --no-cache-dir
# Empty the ENTRYPOINT to allow all commands
ENTRYPOINT []

7
docker/Dockerfile.plot Normal file
View File

@@ -0,0 +1,7 @@
ARG sourceimage=develop
FROM freqtradeorg/freqtrade:${sourceimage}
# Install dependencies
COPY requirements-plot.txt /freqtrade/
RUN pip install -r requirements-plot.txt --no-cache-dir

View File

@@ -0,0 +1,16 @@
---
version: '3'
services:
ft_jupyterlab:
build:
context: ..
dockerfile: docker/Dockerfile.jupyter
restart: unless-stopped
container_name: freqtrade
ports:
- "127.0.0.1:8888:8888"
volumes:
- "./user_data:/freqtrade/user_data"
# Default command used when running `docker compose up`
command: >
jupyter lab --port=8888 --ip 0.0.0.0 --allow-root

View File

@@ -27,9 +27,9 @@ class MyAwesomeHyperOpt2(MyAwesomeHyperOpt):
and then quickly switch between hyperopt classes, running optimization process with hyperopt class you need in each particular case:
```
$ freqtrade hyperopt --hyperopt MyAwesomeHyperOpt ...
$ freqtrade hyperopt --hyperopt MyAwesomeHyperOpt --hyperopt-loss SharpeHyperOptLossDaily --strategy MyAwesomeStrategy ...
or
$ freqtrade hyperopt --hyperopt MyAwesomeHyperOpt2 ...
$ freqtrade hyperopt --hyperopt MyAwesomeHyperOpt2 --hyperopt-loss SharpeHyperOptLossDaily --strategy MyAwesomeStrategy ...
```
## Creating and using a custom loss function
@@ -77,7 +77,7 @@ Currently, the arguments are:
* `results`: DataFrame containing the result
The following columns are available in results (corresponds to the output-file of backtesting when used with `--export trades`):
`pair, profit_percent, profit_abs, open_time, close_time, open_index, close_index, trade_duration, open_at_end, open_rate, close_rate, sell_reason`
`pair, profit_percent, profit_abs, open_date, open_rate, open_fee, close_date, close_rate, close_fee, amount, trade_duration, open_at_end, sell_reason`
* `trade_count`: Amount of trades (identical to `len(results)`)
* `min_date`: Start date of the hyperopting TimeFrame
* `min_date`: End date of the hyperopting TimeFrame

View File

@@ -162,11 +162,16 @@ A backtesting result will look like that:
|-----------------------+---------------------|
| Backtesting from | 2019-01-01 00:00:00 |
| Backtesting to | 2019-05-01 00:00:00 |
| Max open trades | 3 |
| | |
| Total trades | 429 |
| First trade | 2019-01-01 18:30:00 |
| First trade Pair | EOS/USDT |
| Total Profit % | 152.41% |
| Trades per day | 3.575 |
| | |
| Best Pair | LSK/BTC 26.26% |
| Worst Pair | ZEC/BTC -10.18% |
| Best Trade | LSK/BTC 4.25% |
| Worst Trade | ZEC/BTC -10.25% |
| Best day | 25.27% |
| Worst day | -30.67% |
| Avg. Duration Winners | 4:23:00 |
@@ -233,11 +238,16 @@ It contains some useful key metrics about performance of your strategy on backte
|-----------------------+---------------------|
| Backtesting from | 2019-01-01 00:00:00 |
| Backtesting to | 2019-05-01 00:00:00 |
| Max open trades | 3 |
| | |
| Total trades | 429 |
| First trade | 2019-01-01 18:30:00 |
| First trade Pair | EOS/USDT |
| Total Profit % | 152.41% |
| Trades per day | 3.575 |
| | |
| Best Pair | LSK/BTC 26.26% |
| Worst Pair | ZEC/BTC -10.18% |
| Best Trade | LSK/BTC 4.25% |
| Worst Trade | ZEC/BTC -10.25% |
| Best day | 25.27% |
| Worst day | -30.67% |
| Avg. Duration Winners | 4:23:00 |
@@ -251,16 +261,17 @@ It contains some useful key metrics about performance of your strategy on backte
```
- `Total trades`: Identical to the total trades of the backtest output table.
- `First trade`: First trade entered.
- `First trade pair`: Which pair was part of the first trade.
- `Backtesting from` / `Backtesting to`: Backtesting range (usually defined with the `--timerange` option).
- `Max open trades`: Setting of `max_open_trades` (or `--max-open-trades`) - to clearly see settings for this.
- `Total trades`: Identical to the total trades of the backtest output table.
- `Total Profit %`: Total profit per stake amount. Aligned to the TOTAL column of the first table.
- `Trades per day`: Total trades divided by the backtesting duration in days (this will give you information about how many trades to expect from the strategy).
- `Best Pair` / `Worst Pair`: Best and worst performing pair, and it's corresponding `Cum Profit %`.
- `Best Trade` / `Worst Trade`: Biggest winning trade and biggest losing trade
- `Best day` / `Worst day`: Best and worst day based on daily profit.
- `Avg. Duration Winners` / `Avg. Duration Loser`: Average durations for winning and losing trades.
- `Max Drawdown`: Maximum drawdown experienced. For example, the value of 50% means that from highest to subsequent lowest point, a 50% drop was experienced).
- `Drawdown Start` / `Drawdown End`: Start and end datetimes for this largest drawdown (can also be visualized via the `plot-dataframe` sub-command).
- `Drawdown Start` / `Drawdown End`: Start and end datetime for this largest drawdown (can also be visualized via the `plot-dataframe` sub-command).
- `Market change`: Change of the market during the backtest period. Calculated as average of all pairs changes from the first to the last candle using the "close" column.
### Assumptions made by backtesting
@@ -268,18 +279,24 @@ It contains some useful key metrics about performance of your strategy on backte
Since backtesting lacks some detailed information about what happens within a candle, it needs to take a few assumptions:
- Buys happen at open-price
- Sell signal sells happen at open-price of the following candle
- Low happens before high for stoploss, protecting capital first
- Sell-signal sells happen at open-price of the consecutive candle
- Sell-signal is favored over Stoploss, because sell-signals are assumed to trigger on candle's open
- ROI
- sells are compared to high - but the ROI value is used (e.g. ROI = 2%, high=5% - so the sell will be at 2%)
- sells are never "below the candle", so a ROI of 2% may result in a sell at 2.4% if low was at 2.4% profit
- Forcesells caused by `<N>=-1` ROI entries use low as sell value, unless N falls on the candle open (e.g. `120: -1` for 1h candles)
- Stoploss sells happen exactly at stoploss price, even if low was lower
- Stoploss sells happen exactly at stoploss price, even if low was lower, but the loss will be `2 * fees` higher than the stoploss price
- Stoploss is evaluated before ROI within one candle. So you can often see more trades with the `stoploss` sell reason comparing to the results obtained with the same strategy in the Dry Run/Live Trade modes
- Low happens before high for stoploss, protecting capital first
- Trailing stoploss
- High happens first - adjusting stoploss
- Low uses the adjusted stoploss (so sells with large high-low difference are backtested correctly)
- ROI applies before trailing-stop, ensuring profits are "top-capped" at ROI if both ROI and trailing stop applies
- Sell-reason does not explain if a trade was positive or negative, just what triggered the sell (this can look odd if negative ROI values are used)
- Stoploss (and trailing stoploss) is evaluated before ROI within one candle. So you can often see more trades with the `stoploss` and/or `trailing_stop` sell reason comparing to the results obtained with the same strategy in the Dry Run/Live Trade modes.
- Evaluation sequence (if multiple signals happen on the same candle)
- ROI (if not stoploss)
- Sell-signal
- Stoploss
Taking these assumptions, backtesting tries to mirror real trading as closely as possible. However, backtesting will **never** replace running a strategy in dry-run mode.
Also, keep in mind that past results don't guarantee future success.

View File

@@ -5,6 +5,9 @@ This page explains the different parameters of the bot and how to run it.
!!! Note
If you've used `setup.sh`, don't forget to activate your virtual environment (`source .env/bin/activate`) before running freqtrade commands.
!!! Warning "Up-to-date clock"
The clock on the system running the bot must be accurate, synchronized to a NTP server frequently enough to avoid problems with communication to the exchanges.
## Bot commands
```
@@ -210,9 +213,11 @@ Backtesting also uses the config specified via `-c/--config`.
usage: freqtrade backtesting [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH] [-s NAME]
[--strategy-path PATH] [-i TIMEFRAME]
[--timerange TIMERANGE] [--max-open-trades INT]
[--timerange TIMERANGE]
[--data-format-ohlcv {json,jsongz,hdf5}]
[--max-open-trades INT]
[--stake-amount STAKE_AMOUNT] [--fee FLOAT]
[--eps] [--dmmp]
[--eps] [--dmmp] [--enable-protections]
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
[--export EXPORT] [--export-filename PATH]
@@ -223,6 +228,9 @@ optional arguments:
`1d`).
--timerange TIMERANGE
Specify what timerange of data to use.
--data-format-ohlcv {json,jsongz,hdf5}
Storage format for downloaded candle (OHLCV) data.
(default: `None`).
--max-open-trades INT
Override the value of the `max_open_trades`
configuration setting.
@@ -238,6 +246,10 @@ optional arguments:
Disable applying `max_open_trades` during backtest
(same as setting `max_open_trades` to a very high
number).
--enable-protections, --enableprotections
Enable protections for backtesting.Will slow
backtesting down by a considerable amount, but will
include configured protections
--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]
Provide a space-separated list of strategies to
backtest. Please note that ticker-interval needs to be
@@ -293,14 +305,15 @@ to find optimal parameter values for your strategy.
usage: freqtrade hyperopt [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
[--userdir PATH] [-s NAME] [--strategy-path PATH]
[-i TIMEFRAME] [--timerange TIMERANGE]
[--data-format-ohlcv {json,jsongz,hdf5}]
[--max-open-trades INT]
[--stake-amount STAKE_AMOUNT] [--fee FLOAT]
[--hyperopt NAME] [--hyperopt-path PATH] [--eps]
[-e INT]
[--dmmp] [--enable-protections] [-e INT]
[--spaces {all,buy,sell,roi,stoploss,trailing,default} [{all,buy,sell,roi,stoploss,trailing,default} ...]]
[--dmmp] [--print-all] [--no-color] [--print-json]
[-j JOBS] [--random-state INT] [--min-trades INT]
[--continue] [--hyperopt-loss NAME]
[--print-all] [--no-color] [--print-json] [-j JOBS]
[--random-state INT] [--min-trades INT]
[--hyperopt-loss NAME]
optional arguments:
-h, --help show this help message and exit
@@ -309,6 +322,9 @@ optional arguments:
`1d`).
--timerange TIMERANGE
Specify what timerange of data to use.
--data-format-ohlcv {json,jsongz,hdf5}
Storage format for downloaded candle (OHLCV) data.
(default: `None`).
--max-open-trades INT
Override the value of the `max_open_trades`
configuration setting.
@@ -324,14 +340,18 @@ optional arguments:
--eps, --enable-position-stacking
Allow buying the same pair multiple times (position
stacking).
-e INT, --epochs INT Specify number of epochs (default: 100).
--spaces {all,buy,sell,roi,stoploss,trailing,default} [{all,buy,sell,roi,stoploss,trailing,default} ...]
Specify which parameters to hyperopt. Space-separated
list.
--dmmp, --disable-max-market-positions
Disable applying `max_open_trades` during backtest
(same as setting `max_open_trades` to a very high
number).
--enable-protections, --enableprotections
Enable protections for backtesting.Will slow
backtesting down by a considerable amount, but will
include configured protections
-e INT, --epochs INT Specify number of epochs (default: 100).
--spaces {all,buy,sell,roi,stoploss,trailing,default} [{all,buy,sell,roi,stoploss,trailing,default} ...]
Specify which parameters to hyperopt. Space-separated
list.
--print-all Print all results, not only the best ones.
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
@@ -346,18 +366,14 @@ optional arguments:
reproducible hyperopt results.
--min-trades INT Set minimal desired number of trades for evaluations
in the hyperopt optimization path (default: 1).
--continue Continue hyperopt from previous runs. By default,
temporary files will be removed and hyperopt will
start from scratch.
--hyperopt-loss NAME Specify the class name of the hyperopt loss function
class (IHyperOptLoss). Different functions can
generate completely different results, since the
target for optimization is different. Built-in
Hyperopt-loss-functions are: DefaultHyperOptLoss,
OnlyProfitHyperOptLoss, SharpeHyperOptLoss,
SharpeHyperOptLossDaily, SortinoHyperOptLoss,
SortinoHyperOptLossDaily.(default:
`DefaultHyperOptLoss`).
Hyperopt-loss-functions are:
ShortTradeDurHyperOptLoss, OnlyProfitHyperOptLoss,
SharpeHyperOptLoss, SharpeHyperOptLossDaily,
SortinoHyperOptLoss, SortinoHyperOptLossDaily
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).

View File

@@ -59,8 +59,8 @@ Mandatory parameters are marked as **Required**, which means that they are requi
| `trailing_stop_positive` | Changes stoploss once profit has been reached. More details in the [stoploss documentation](stoploss.md#trailing-stop-loss-custom-positive-loss). [Strategy Override](#parameters-in-the-strategy). <br> **Datatype:** Float
| `trailing_stop_positive_offset` | Offset on when to apply `trailing_stop_positive`. Percentage value which should be positive. More details in the [stoploss documentation](stoploss.md#trailing-stop-loss-only-once-the-trade-has-reached-a-certain-offset). [Strategy Override](#parameters-in-the-strategy). <br>*Defaults to `0.0` (no offset).* <br> **Datatype:** Float
| `trailing_only_offset_is_reached` | Only apply trailing stoploss when the offset is reached. [stoploss documentation](stoploss.md). [Strategy Override](#parameters-in-the-strategy). <br>*Defaults to `false`.* <br> **Datatype:** Boolean
| `unfilledtimeout.buy` | **Required.** How long (in minutes) the bot will wait for an unfilled buy order to complete, after which the order will be cancelled. [Strategy Override](#parameters-in-the-strategy).<br> **Datatype:** Integer
| `unfilledtimeout.sell` | **Required.** How long (in minutes) the bot will wait for an unfilled sell order to complete, after which the order will be cancelled. [Strategy Override](#parameters-in-the-strategy).<br> **Datatype:** Integer
| `unfilledtimeout.buy` | **Required.** How long (in minutes) the bot will wait for an unfilled buy order to complete, after which the order will be cancelled and repeated at current (new) price, as long as there is a signal. [Strategy Override](#parameters-in-the-strategy).<br> **Datatype:** Integer
| `unfilledtimeout.sell` | **Required.** How long (in minutes) the bot will wait for an unfilled sell order to complete, after which the order will be cancelled and repeated at current (new) price, as long as there is a signal. [Strategy Override](#parameters-in-the-strategy).<br> **Datatype:** Integer
| `bid_strategy.price_side` | Select the side of the spread the bot should look at to get the buy rate. [More information below](#buy-price-side).<br> *Defaults to `bid`.* <br> **Datatype:** String (either `ask` or `bid`).
| `bid_strategy.ask_last_balance` | **Required.** Set the bidding price. More information [below](#buy-price-without-orderbook-enabled).
| `bid_strategy.use_order_book` | Enable buying using the rates in [Order Book Bids](#buy-price-with-orderbook-enabled). <br> **Datatype:** Boolean
@@ -87,9 +87,11 @@ Mandatory parameters are marked as **Required**, which means that they are requi
| `exchange.ccxt_sync_config` | Additional CCXT parameters passed to the regular (sync) ccxt instance. Parameters may differ from exchange to exchange and are documented in the [ccxt documentation](https://ccxt.readthedocs.io/en/latest/manual.html#instantiation) <br> **Datatype:** Dict
| `exchange.ccxt_async_config` | Additional CCXT parameters passed to the async ccxt instance. Parameters may differ from exchange to exchange and are documented in the [ccxt documentation](https://ccxt.readthedocs.io/en/latest/manual.html#instantiation) <br> **Datatype:** Dict
| `exchange.markets_refresh_interval` | The interval in minutes in which markets are reloaded. <br>*Defaults to `60` minutes.* <br> **Datatype:** Positive Integer
| `exchange.skip_pair_validation` | Skip pairlist validation on startup.<br>*Defaults to `false`<br> **Datatype:** Boolean
| `edge.*` | Please refer to [edge configuration document](edge.md) for detailed explanation.
| `experimental.block_bad_exchanges` | Block exchanges known to not work with freqtrade. Leave on default unless you want to test if that exchange works now. <br>*Defaults to `true`.* <br> **Datatype:** Boolean
| `pairlists` | Define one or more pairlists to be used. [More information below](#pairlists-and-pairlist-handlers). <br>*Defaults to `StaticPairList`.* <br> **Datatype:** List of Dicts
| `protections` | Define one or more protections to be used. [More information below](#protections). <br> **Datatype:** List of Dicts
| `telegram.enabled` | Enable the usage of Telegram. <br> **Datatype:** Boolean
| `telegram.token` | Your Telegram bot token. Only required if `telegram.enabled` is `true`. <br>**Keep it in secret, do not disclose publicly.** <br> **Datatype:** String
| `telegram.chat_id` | Your personal Telegram account id. Only required if `telegram.enabled` is `true`. <br>**Keep it in secret, do not disclose publicly.** <br> **Datatype:** String
@@ -176,7 +178,7 @@ In the example above this would mean:
This option only applies with [Static stake amount](#static-stake-amount) - since [Dynamic stake amount](#dynamic-stake-amount) divides the balances evenly.
!!! Note
The minimum last stake amount can be configured using `amend_last_stake_amount` - which defaults to 0.5 (50%). This means that the minimum stake amount that's ever used is `stake_amount * 0.5`. This avoids very low stake amounts, that are close to the minimum tradable amount for the pair and can be refused by the exchange.
The minimum last stake amount can be configured using `last_stake_amount_min_ratio` - which defaults to 0.5 (50%). This means that the minimum stake amount that's ever used is `stake_amount * 0.5`. This avoids very low stake amounts, that are close to the minimum tradable amount for the pair and can be refused by the exchange.
#### Static stake amount
@@ -313,22 +315,21 @@ Configuration:
}
```
!!! Note
!!! Note "Market order support"
Not all exchanges support "market" orders.
The following message will be shown if your exchange does not support market orders:
`"Exchange <yourexchange> does not support market orders."`
`"Exchange <yourexchange> does not support market orders."` and the bot will refuse to start.
!!! Note
Stoploss on exchange interval is not mandatory. Do not change its value if you are
!!! Warning "Using market orders"
Please carefully read the section [Market order pricing](#market-order-pricing) section when using market orders.
!!! Note "Stoploss on exchange"
`stoploss_on_exchange_interval` is not mandatory. Do not change its value if you are
unsure of what you are doing. For more information about how stoploss works please
refer to [the stoploss documentation](stoploss.md).
!!! Note
If `stoploss_on_exchange` is enabled and the stoploss is cancelled manually on the exchange, then the bot will create a new stoploss order.
!!! Warning "Using market orders"
Please read the section [Market order pricing](#market-order-pricing) section when using market orders.
!!! Warning "Warning: stoploss_on_exchange failures"
If stoploss on exchange creation fails for some reason, then an "emergency sell" is initiated. By default, this will sell the asset using a market order. The order-type for the emergency-sell can be changed by setting the `emergencysell` value in the `order_types` dictionary - however this is not advised.
@@ -375,7 +376,7 @@ Freqtrade is based on [CCXT library](https://github.com/ccxt/ccxt) that supports
exchange markets and trading APIs. The complete up-to-date list can be found in the
[CCXT repo homepage](https://github.com/ccxt/ccxt/tree/master/python).
However, the bot was tested by the development team with only Bittrex, Binance and Kraken,
so the these are the only officially supported exhanges:
so the these are the only officially supported exchanges:
- [Bittrex](https://bittrex.com/): "bittrex"
- [Binance](https://www.binance.com/): "binance"
@@ -574,144 +575,8 @@ Assuming both buy and sell are using market orders, a configuration similar to t
```
Obviously, if only one side is using limit orders, different pricing combinations can be used.
## Pairlists and Pairlist Handlers
Pairlist Handlers define the list of pairs (pairlist) that the bot should trade. They are configured in the `pairlists` section of the configuration settings.
In your configuration, you can use Static Pairlist (defined by the [`StaticPairList`](#static-pair-list) Pairlist Handler) and Dynamic Pairlist (defined by the [`VolumePairList`](#volume-pair-list) Pairlist Handler).
Additionaly, [`AgeFilter`](#agefilter), [`PrecisionFilter`](#precisionfilter), [`PriceFilter`](#pricefilter), [`ShuffleFilter`](#shufflefilter) and [`SpreadFilter`](#spreadfilter) act as Pairlist Filters, removing certain pairs and/or moving their positions in the pairlist.
If multiple Pairlist Handlers are used, they are chained and a combination of all Pairlist Handlers forms the resulting pairlist the bot uses for trading and backtesting. Pairlist Handlers are executed in the sequence they are configured. You should always configure either `StaticPairList` or `VolumePairList` as the starting Pairlist Handler.
Inactive markets are always removed from the resulting pairlist. Explicitly blacklisted pairs (those in the `pair_blacklist` configuration setting) are also always removed from the resulting pairlist.
### Available Pairlist Handlers
* [`StaticPairList`](#static-pair-list) (default, if not configured differently)
* [`VolumePairList`](#volume-pair-list)
* [`AgeFilter`](#agefilter)
* [`PrecisionFilter`](#precisionfilter)
* [`PriceFilter`](#pricefilter)
* [`ShuffleFilter`](#shufflefilter)
* [`SpreadFilter`](#spreadfilter)
!!! Tip "Testing pairlists"
Pairlist configurations can be quite tricky to get right. Best use the [`test-pairlist`](utils.md#test-pairlist) utility subcommand to test your configuration quickly.
#### Static Pair List
By default, the `StaticPairList` method is used, which uses a statically defined pair whitelist from the configuration.
It uses configuration from `exchange.pair_whitelist` and `exchange.pair_blacklist`.
```json
"pairlists": [
{"method": "StaticPairList"}
],
```
#### Volume Pair List
`VolumePairList` employs sorting/filtering of pairs by their trading volume. It selects `number_assets` top pairs with sorting based on the `sort_key` (which can only be `quoteVolume`).
When used in the chain of Pairlist Handlers in a non-leading position (after StaticPairList and other Pairlist Filters), `VolumePairList` considers outputs of previous Pairlist Handlers, adding its sorting/selection of the pairs by the trading volume.
When used on the leading position of the chain of Pairlist Handlers, it does not consider `pair_whitelist` configuration setting, but selects the top assets from all available markets (with matching stake-currency) on the exchange.
The `refresh_period` setting allows to define the period (in seconds), at which the pairlist will be refreshed. Defaults to 1800s (30 minutes).
`VolumePairList` is based on the ticker data from exchange, as reported by the ccxt library:
* The `quoteVolume` is the amount of quote (stake) currency traded (bought or sold) in last 24 hours.
```json
"pairlists": [{
"method": "VolumePairList",
"number_assets": 20,
"sort_key": "quoteVolume",
"refresh_period": 1800,
}],
```
#### AgeFilter
Removes pairs that have been listed on the exchange for less than `min_days_listed` days (defaults to `10`).
When pairs are first listed on an exchange they can suffer huge price drops and volatility
in the first few days while the pair goes through its price-discovery period. Bots can often
be caught out buying before the pair has finished dropping in price.
This filter allows freqtrade to ignore pairs until they have been listed for at least `min_days_listed` days.
#### PrecisionFilter
Filters low-value coins which would not allow setting stoplosses.
#### PriceFilter
The `PriceFilter` allows filtering of pairs by price. Currently the following price filters are supported:
* `min_price`
* `max_price`
* `low_price_ratio`
The `min_price` setting removes pairs where the price is below the specified price. This is useful if you wish to avoid trading very low-priced pairs.
This option is disabled by default, and will only apply if set to > 0.
The `max_price` setting removes pairs where the price is above the specified price. This is useful if you wish to trade only low-priced pairs.
This option is disabled by default, and will only apply if set to > 0.
The `low_price_ratio` setting removes pairs where a raise of 1 price unit (pip) is above the `low_price_ratio` ratio.
This option is disabled by default, and will only apply if set to > 0.
For `PriceFiler` at least one of its `min_price`, `max_price` or `low_price_ratio` settings must be applied.
Calculation example:
Min price precision for SHITCOIN/BTC is 8 decimals. If its price is 0.00000011 - one price step above would be 0.00000012, which is ~9% higher than the previous price value. You may filter out this pair by using PriceFilter with `low_price_ratio` set to 0.09 (9%) or with `min_price` set to 0.00000011, correspondingly.
!!! Warning "Low priced pairs"
Low priced pairs with high "1 pip movements" are dangerous since they are often illiquid and it may also be impossible to place the desired stoploss, which can often result in high losses since price needs to be rounded to the next tradable price - so instead of having a stoploss of -5%, you could end up with a stoploss of -9% simply due to price rounding.
#### ShuffleFilter
Shuffles (randomizes) pairs in the pairlist. It can be used for preventing the bot from trading some of the pairs more frequently then others when you want all pairs be treated with the same priority.
!!! Tip
You may set the `seed` value for this Pairlist to obtain reproducible results, which can be useful for repeated backtesting sessions. If `seed` is not set, the pairs are shuffled in the non-repeatable random order.
#### SpreadFilter
Removes pairs that have a difference between asks and bids above the specified ratio, `max_spread_ratio` (defaults to `0.005`).
Example:
If `DOGE/BTC` maximum bid is 0.00000026 and minimum ask is 0.00000027, the ratio is calculated as: `1 - bid/ask ~= 0.037` which is `> 0.005` and this pair will be filtered out.
### Full example of Pairlist Handlers
The below example blacklists `BNB/BTC`, uses `VolumePairList` with `20` assets, sorting pairs by `quoteVolume` and applies both [`PrecisionFilter`](#precisionfilter) and [`PriceFilter`](#price-filter), filtering all assets where 1 priceunit is > 1%. Then the `SpreadFilter` is applied and pairs are finally shuffled with the random seed set to some predefined value.
```json
"exchange": {
"pair_whitelist": [],
"pair_blacklist": ["BNB/BTC"]
},
"pairlists": [
{
"method": "VolumePairList",
"number_assets": 20,
"sort_key": "quoteVolume",
},
{"method": "AgeFilter", "min_days_listed": 10},
{"method": "PrecisionFilter"},
{"method": "PriceFilter", "low_price_ratio": 0.01},
{"method": "SpreadFilter", "max_spread_ratio": 0.005},
{"method": "ShuffleFilter", "seed": 42}
],
```
--8<-- "includes/pairlists.md"
--8<-- "includes/protections.md"
## Switch to Dry-run mode

View File

@@ -1,12 +1,22 @@
# Analyzing bot data with Jupyter notebooks
You can analyze the results of backtests and trading history easily using Jupyter notebooks. Sample notebooks are located at `user_data/notebooks/`.
You can analyze the results of backtests and trading history easily using Jupyter notebooks. Sample notebooks are located at `user_data/notebooks/` after initializing the user directory with `freqtrade create-userdir --userdir user_data`.
## Pro tips
## Quick start with docker
Freqtrade provides a docker-compose file which starts up a jupyter lab server.
You can run this server using the following command: `docker-compose -f docker/docker-compose-jupyter.yml up`
This will create a dockercontainer running jupyter lab, which will be accessible using `https://127.0.0.1:8888/lab`.
Please use the link that's printed in the console after startup for simplified login.
For more information, Please visit the [Data analysis with Docker](docker_quickstart.md#data-analayis-using-docker-compose) section.
### Pro tips
* See [jupyter.org](https://jupyter.org/documentation) for usage instructions.
* Don't forget to start a Jupyter notebook server from within your conda or venv environment or use [nb_conda_kernels](https://github.com/Anaconda-Platform/nb_conda_kernels)*
* Copy the example notebook before use so your changes don't get clobbered with the next freqtrade update.
* Copy the example notebook before use so your changes don't get overwritten with the next freqtrade update.
### Using virtual environment with system-wide Jupyter installation
@@ -28,9 +38,7 @@ ipython kernel install --user --name=freqtrade
!!! Note
This section is provided for completeness, the Freqtrade Team won't provide full support for problems with this setup and will recommend to install Jupyter in the virtual environment directly, as that is the easiest way to get jupyter notebooks up and running. For help with this setup please refer to the [Project Jupyter](https://jupyter.org/) [documentation](https://jupyter.org/documentation) or [help channels](https://jupyter.org/community).
## Fine print
!!! Warning
Some tasks don't work especially well in notebooks. For example, anything using asynchronous execution is a problem for Jupyter. Also, freqtrade's primary entry point is the shell cli, so using pure python in a notebook bypasses arguments that provide required objects and parameters to helper functions. You may need to set those values or create expected objects manually.
## Recommended workflow

View File

@@ -8,82 +8,121 @@ If no additional parameter is specified, freqtrade will download data for `"1m"`
Exchange and pairs will come from `config.json` (if specified using `-c/--config`).
Otherwise `--exchange` becomes mandatory.
You can use a relative timerange (`--days 20`) or an absolute starting point (`--timerange 20200101-`). For incremental downloads, the relative approach should be used.
!!! Tip "Tip: Updating existing data"
If you already have backtesting data available in your data-directory and would like to refresh this data up to today, use `--days xx` with a number slightly higher than the missing number of days. Freqtrade will keep the available data and only download the missing data.
Be carefull though: If the number is too small (which would result in a few missing days), the whole dataset will be removed and only xx days will be downloaded.
Be careful though: If the number is too small (which would result in a few missing days), the whole dataset will be removed and only xx days will be downloaded.
### Usage
```
usage: freqtrade download-data [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH] [--userdir PATH] [-p PAIRS [PAIRS ...]]
[--pairs-file FILE] [--days INT] [--dl-trades] [--exchange EXCHANGE]
[-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...]]
[--erase] [--data-format-ohlcv {json,jsongz}] [--data-format-trades {json,jsongz}]
optional arguments:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
Show profits for only these pairs. Pairs are space-separated.
--pairs-file FILE File containing a list of pairs to download.
--days INT Download data for given number of days.
--dl-trades Download trades instead of OHLCV data. The bot will resample trades to the desired timeframe as specified as
--timeframes/-t.
--exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no config is provided.
-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...]
Specify which tickers to download. Space-separated list. Default: `1m 5m`.
--erase Clean all existing data for the selected exchange/pairs/timeframes.
--data-format-ohlcv {json,jsongz}
Storage format for downloaded candle (OHLCV) data. (default: `json`).
--data-format-trades {json,jsongz}
Storage format for downloaded trades data. (default: `jsongz`).
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--logfile FILE Log to the file specified. Special values are: 'syslog', 'journald'. See the documentation for more details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default: `config.json`). Multiple --config options may be used. Can be set to `-`
to read config from stdin.
-d PATH, --datadir PATH
Path to directory with historical backtesting data.
--userdir PATH, --user-data-dir PATH
Path to userdata directory.
```
### Data format
Freqtrade currently supports 2 dataformats, `json` (plain "text" json files) and `jsongz` (a gzipped version of json files).
By default, OHLCV data is stored as `json` data, while trades data is stored as `jsongz` data.
This can be changed via the `--data-format-ohlcv` and `--data-format-trades` parameters respectivly.
If the default dataformat has been changed during download, then the keys `dataformat_ohlcv` and `dataformat_trades` in the configuration file need to be adjusted to the selected dataformat as well.
!!! Note
You can convert between data-formats using the [convert-data](#subcommand-convert-data) and [convert-trade-data](#subcommand-convert-trade-data) methods.
#### Subcommand convert data
```
usage: freqtrade convert-data [-h] [-v] [--logfile FILE] [-V] [-c PATH]
usage: freqtrade download-data [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]] --format-from
{json,jsongz} --format-to {json,jsongz}
[-p PAIRS [PAIRS ...]] [--pairs-file FILE]
[--days INT] [--timerange TIMERANGE]
[--dl-trades] [--exchange EXCHANGE]
[-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...]]
[--erase]
[-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...]]
[--data-format-ohlcv {json,jsongz,hdf5}]
[--data-format-trades {json,jsongz,hdf5}]
optional arguments:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
Show profits for only these pairs. Pairs are space-
separated.
--format-from {json,jsongz}
--pairs-file FILE File containing a list of pairs to download.
--days INT Download data for given number of days.
--timerange TIMERANGE
Specify what timerange of data to use.
--dl-trades Download trades instead of OHLCV data. The bot will
resample trades to the desired timeframe as specified
as --timeframes/-t.
--exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no
config is provided.
-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...]
Specify which tickers to download. Space-separated
list. Default: `1m 5m`.
--erase Clean all existing data for the selected
exchange/pairs/timeframes.
--data-format-ohlcv {json,jsongz,hdf5}
Storage format for downloaded candle (OHLCV) data.
(default: `json`).
--data-format-trades {json,jsongz,hdf5}
Storage format for downloaded trades data. (default:
`jsongz`).
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--logfile FILE Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH
Path to directory with historical backtesting data.
--userdir PATH, --user-data-dir PATH
Path to userdata directory.
```
!!! Note "Startup period"
`download-data` is a strategy-independent command. The idea is to download a big chunk of data once, and then iteratively increase the amount of data stored.
For that reason, `download-data` does not care about the "startup-period" defined in a strategy. It's up to the user to download additional days if the backtest should start at a specific point in time (while respecting startup period).
### Data format
Freqtrade currently supports 3 data-formats for both OHLCV and trades data:
* `json` (plain "text" json files)
* `jsongz` (a gzip-zipped version of json files)
* `hdf5` (a high performance datastore)
By default, OHLCV data is stored as `json` data, while trades data is stored as `jsongz` data.
This can be changed via the `--data-format-ohlcv` and `--data-format-trades` command line arguments respectively.
To persist this change, you can should also add the following snippet to your configuration, so you don't have to insert the above arguments each time:
``` jsonc
// ...
"dataformat_ohlcv": "hdf5",
"dataformat_trades": "hdf5",
// ...
```
If the default data-format has been changed during download, then the keys `dataformat_ohlcv` and `dataformat_trades` in the configuration file need to be adjusted to the selected dataformat as well.
!!! Note
You can convert between data-formats using the [convert-data](#sub-command-convert-data) and [convert-trade-data](#sub-command-convert-trade-data) methods.
#### Sub-command convert data
```
usage: freqtrade convert-data [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]] --format-from
{json,jsongz,hdf5} --format-to
{json,jsongz,hdf5} [--erase]
[-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...]]
optional arguments:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
Show profits for only these pairs. Pairs are space-
separated.
--format-from {json,jsongz,hdf5}
Source format for data conversion.
--format-to {json,jsongz}
--format-to {json,jsongz,hdf5}
Destination format for data conversion.
--erase Clean all existing data for the selected
exchange/pairs/timeframes.
-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...]
-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...]
Specify which tickers to download. Space-separated
list. Default: `1m 5m`.
@@ -94,9 +133,10 @@ Common arguments:
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default: `config.json`).
Multiple --config options may be used. Can be set to
`-` to read config from stdin.
Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH
Path to directory with historical backtesting data.
--userdir PATH, --user-data-dir PATH
@@ -112,23 +152,23 @@ It'll also remove original json data files (`--erase` parameter).
freqtrade convert-data --format-from json --format-to jsongz --datadir ~/.freqtrade/data/binance -t 5m 15m --erase
```
#### Subcommand convert-trade data
#### Sub-command convert trade data
```
usage: freqtrade convert-trade-data [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]] --format-from
{json,jsongz} --format-to {json,jsongz}
[--erase]
{json,jsongz,hdf5} --format-to
{json,jsongz,hdf5} [--erase]
optional arguments:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
Show profits for only these pairs. Pairs are space-
separated.
--format-from {json,jsongz}
--format-from {json,jsongz,hdf5}
Source format for data conversion.
--format-to {json,jsongz}
--format-to {json,jsongz,hdf5}
Destination format for data conversion.
--erase Clean all existing data for the selected
exchange/pairs/timeframes.
@@ -140,13 +180,15 @@ Common arguments:
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default: `config.json`).
Multiple --config options may be used. Can be set to
`-` to read config from stdin.
Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH
Path to directory with historical backtesting data.
--userdir PATH, --user-data-dir PATH
Path to userdata directory.
```
##### Example converting trades
@@ -158,21 +200,21 @@ It'll also remove original jsongz data files (`--erase` parameter).
freqtrade convert-trade-data --format-from jsongz --format-to json --datadir ~/.freqtrade/data/kraken --erase
```
### Subcommand list-data
### Sub-command list-data
You can get a list of downloaded data using the `list-data` subcommand.
You can get a list of downloaded data using the `list-data` sub-command.
```
usage: freqtrade list-data [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
[--userdir PATH] [--exchange EXCHANGE]
[--data-format-ohlcv {json,jsongz}]
[--data-format-ohlcv {json,jsongz,hdf5}]
[-p PAIRS [PAIRS ...]]
optional arguments:
-h, --help show this help message and exit
--exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no
config is provided.
--data-format-ohlcv {json,jsongz}
--data-format-ohlcv {json,jsongz,hdf5}
Storage format for downloaded candle (OHLCV) data.
(default: `json`).
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
@@ -194,6 +236,7 @@ Common arguments:
Path to directory with historical backtesting data.
--userdir PATH, --user-data-dir PATH
Path to userdata directory.
```
#### Example list-data
@@ -252,12 +295,13 @@ This will download historical candle (OHLCV) data for all the currency pairs you
- To change the exchange used to download the historical data from, please use a different configuration file (you'll probably need to adjust rate limits etc.)
- To use `pairs.json` from some other directory, use `--pairs-file some_other_dir/pairs.json`.
- To download historical candle (OHLCV) data for only 10 days, use `--days 10` (defaults to 30 days).
- To download historical candle (OHLCV) data from a fixed starting point, use `--timerange 20200101-` - which will download all data from January 1st, 2020. Eventually set end dates are ignored.
- Use `--timeframes` to specify what timeframe download the historical candle (OHLCV) data for. Default is `--timeframes 1m 5m` which will download 1-minute and 5-minute data.
- To use exchange, timeframe and list of pairs as defined in your configuration file, use the `-c/--config` option. With this, the script uses the whitelist defined in the config as the list of currency pairs to download data for and does not require the pairs.json file. You can combine `-c/--config` with most other options.
### Trades (tick) data
By default, `download-data` subcommand downloads Candles (OHLCV) data. Some exchanges also provide historic trade-data via their API.
By default, `download-data` sub-command downloads Candles (OHLCV) data. Some exchanges also provide historic trade-data via their API.
This data can be useful if you need many different timeframes, since it is only downloaded once, and then resampled locally to the desired timeframes.
Since this data is large by default, the files use gzip by default. They are stored in your data-directory with the naming convention of `<pair>-trades.json.gz` (`ETH_BTC-trades.json.gz`). Incremental mode is also supported, as for historic OHLCV data, so downloading the data once per week with `--days 8` will create an incremental data-repository.

View File

@@ -32,4 +32,4 @@ The old section of configuration parameters (`"pairlist"`) has been deprecated i
### deprecation of bidVolume and askVolume from volume-pairlist
Since only quoteVolume can be compared between assets, the other options (bidVolume, askVolume) have been deprecated in 2020.4.
Since only quoteVolume can be compared between assets, the other options (bidVolume, askVolume) have been deprecated in 2020.4, and have been removed in 2020.9.

View File

@@ -2,7 +2,7 @@
This page is intended for developers of Freqtrade, people who want to contribute to the Freqtrade codebase or documentation, or people who want to understand the source code of the application they're running.
All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome. We [track issues](https://github.com/freqtrade/freqtrade/issues) on [GitHub](https://github.com) and also have a dev channel in [slack](https://join.slack.com/t/highfrequencybot/shared_invite/enQtNjU5ODcwNjI1MDU3LTU1MTgxMjkzNmYxNWE1MDEzYzQ3YmU4N2MwZjUyNjJjODRkMDVkNjg4YTAyZGYzYzlhOTZiMTE4ZjQ4YzM0OGE) where you can ask questions.
All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome. We [track issues](https://github.com/freqtrade/freqtrade/issues) on [GitHub](https://github.com) and also have a dev channel on [discord](https://discord.gg/MA9v74M) or [slack](https://join.slack.com/t/highfrequencybot/shared_invite/zt-k9o2v5ut-jX8Mc4CwNM8CDc2Dyg96YA) where you can ask questions.
## Documentation
@@ -10,13 +10,35 @@ Documentation is available at [https://freqtrade.io](https://www.freqtrade.io/)
Special fields for the documentation (like Note boxes, ...) can be found [here](https://squidfunk.github.io/mkdocs-material/extensions/admonition/).
To test the documentation locally use the following commands.
``` bash
pip install -r docs/requirements-docs.txt
mkdocs serve
```
This will spin up a local server (usually on port 8000) so you can see if everything looks as you'd like it to.
## Developer setup
To configure a development environment, best use the `setup.sh` script and answer "y" when asked "Do you want to install dependencies for dev [y/N]? ".
Alternatively (if your system is not supported by the setup.sh script), follow the manual installation process and run `pip3 install -e .[all]`.
To configure a development environment, you can either use the provided [DevContainer](#devcontainer-setup), or use the `setup.sh` script and answer "y" when asked "Do you want to install dependencies for dev [y/N]? ".
Alternatively (e.g. if your system is not supported by the setup.sh script), follow the manual installation process and run `pip3 install -e .[all]`.
This will install all required tools for development, including `pytest`, `flake8`, `mypy`, and `coveralls`.
### Devcontainer setup
The fastest and easiest way to get started is to use [VSCode](https://code.visualstudio.com/) with the Remote container extension.
This gives developers the ability to start the bot with all required dependencies *without* needing to install any freqtrade specific dependencies on your local machine.
#### Devcontainer dependencies
* [VSCode](https://code.visualstudio.com/)
* [docker](https://docs.docker.com/install/)
* [Remote container extension documentation](https://code.visualstudio.com/docs/remote)
For more information about the [Remote container extension](https://code.visualstudio.com/docs/remote), best consult the documentation.
### Tests
New code should be covered by basic unittests. Depending on the complexity of the feature, Reviewers may request more in-depth unittests.
@@ -41,50 +63,6 @@ def test_method_to_test(caplog):
```
### Local docker usage
The fastest and easiest way to start up is to use docker-compose.develop which gives developers the ability to start the bot up with all the required dependencies, *without* needing to install any freqtrade specific dependencies on your local machine.
#### Install
* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [docker](https://docs.docker.com/install/)
* [docker-compose](https://docs.docker.com/compose/install/)
#### Starting the bot
##### Use the develop dockerfile
``` bash
rm docker-compose.yml && mv docker-compose.develop.yml docker-compose.yml
```
#### Docker Compose
##### Starting
``` bash
docker-compose up
```
![Docker compose up](https://user-images.githubusercontent.com/419355/65456322-47f63a80-de06-11e9-90c6-3c74d1bad0b8.png)
##### Rebuilding
``` bash
docker-compose build
```
##### Execing (effectively SSH into the container)
The `exec` command requires that the container already be running, if you want to start it
that can be effected by `docker-compose up` or `docker-compose run freqtrade_develop`
``` bash
docker-compose exec freqtrade_develop /bin/bash
```
![image](https://user-images.githubusercontent.com/419355/65456522-ba671a80-de06-11e9-9598-df9ca0d8dcac.png)
## ErrorHandling
Freqtrade Exceptions all inherit from `FreqtradeException`.
@@ -110,13 +88,17 @@ Below is an outline of exception inheritance hierarchy:
| +---+ InvalidOrderException
| |
| +---+ RetryableOrderError
| |
| +---+ InsufficientFundsError
|
+---+ StrategyError
```
## Modules
---
### Dynamic Pairlist
## Plugins
### Pairlists
You have a great idea for a new pair selection algorithm you would like to try out? Great.
Hopefully you also want to contribute this back upstream.
@@ -127,7 +109,7 @@ First of all, have a look at the [VolumePairList](https://github.com/freqtrade/f
This is a simple Handler, which however serves as a good example on how to start developing.
Next, modify the classname of the Handler (ideally align this with the module filename).
Next, modify the class-name of the Handler (ideally align this with the module filename).
The base-class provides an instance of the exchange (`self._exchange`) the pairlist manager (`self._pairlistmanager`), as well as the main configuration (`self._config`), the pairlist dedicated configuration (`self._pairlistconfig`) and the absolute position within the list of pairlists.
@@ -139,6 +121,9 @@ The base-class provides an instance of the exchange (`self._exchange`) the pairl
self._pairlist_pos = pairlist_pos
```
!!! Tip
Don't forget to register your pairlist in `constants.py` under the variable `AVAILABLE_PAIRLISTS` - otherwise it will not be selectable.
Now, let's step through the methods which require actions:
#### Pairlist configuration
@@ -147,7 +132,7 @@ Configuration for the chain of Pairlist Handlers is done in the bot configuratio
By convention, `"number_assets"` is used to specify the maximum number of pairs to keep in the pairlist. Please follow this to ensure a consistent user experience.
Additional parameters can be configured as needed. For instance, `VolumePairList` uses `"sort_key"` to specify the sorting value - however feel free to specify whatever is necessary for your great algorithm to be successfull and dynamic.
Additional parameters can be configured as needed. For instance, `VolumePairList` uses `"sort_key"` to specify the sorting value - however feel free to specify whatever is necessary for your great algorithm to be successful and dynamic.
#### short_desc
@@ -163,7 +148,7 @@ This is called with each iteration of the bot (only if the Pairlist Handler is a
It must return the resulting pairlist (which may then be passed into the chain of Pairlist Handlers).
Validations are optional, the parent class exposes a `_verify_blacklist(pairlist)` and `_whitelist_for_active_markets(pairlist)` to do default filtering. Use this if you limit your result to a certain number of pairs - so the endresult is not shorter than expected.
Validations are optional, the parent class exposes a `_verify_blacklist(pairlist)` and `_whitelist_for_active_markets(pairlist)` to do default filtering. Use this if you limit your result to a certain number of pairs - so the end-result is not shorter than expected.
#### filter_pairlist
@@ -171,7 +156,7 @@ This method is called for each Pairlist Handler in the chain by the pairlist man
This is called with each iteration of the bot - so consider implementing caching for compute/network heavy calculations.
It get's passed a pairlist (which can be the result of previous pairlists) as well as `tickers`, a pre-fetched version of `get_tickers()`.
It gets passed a pairlist (which can be the result of previous pairlists) as well as `tickers`, a pre-fetched version of `get_tickers()`.
The default implementation in the base class simply calls the `_validate_pair()` method for each pair in the pairlist, but you may override it. So you should either implement the `_validate_pair()` in your Pairlist Handler or override `filter_pairlist()` to do something else.
@@ -190,6 +175,66 @@ In `VolumePairList`, this implements different methods of sorting, does early va
return pairs
```
### Protections
Best read the [Protection documentation](configuration.md#protections) to understand protections.
This Guide is directed towards Developers who want to develop a new protection.
No protection should use datetime directly, but use the provided `date_now` variable for date calculations. This preserves the ability to backtest protections.
!!! Tip "Writing a new Protection"
Best copy one of the existing Protections to have a good example.
Don't forget to register your protection in `constants.py` under the variable `AVAILABLE_PROTECTIONS` - otherwise it will not be selectable.
#### Implementation of a new protection
All Protection implementations must have `IProtection` as parent class.
For that reason, they must implement the following methods:
* `short_desc()`
* `global_stop()`
* `stop_per_pair()`.
`global_stop()` and `stop_per_pair()` must return a ProtectionReturn tuple, which consists of:
* lock pair - boolean
* lock until - datetime - until when should the pair be locked (will be rounded up to the next new candle)
* reason - string, used for logging and storage in the database
The `until` portion should be calculated using the provided `calculate_lock_end()` method.
All Protections should use `"stop_duration"` / `"stop_duration_candles"` to define how long a a pair (or all pairs) should be locked.
The content of this is made available as `self._stop_duration` to the each Protection.
If your protection requires a look-back period, please use `"lookback_period"` / `"lockback_period_candles"` to keep all protections aligned.
#### Global vs. local stops
Protections can have 2 different ways to stop trading for a limited :
* Per pair (local)
* For all Pairs (globally)
##### Protections - per pair
Protections that implement the per pair approach must set `has_local_stop=True`.
The method `stop_per_pair()` will be called whenever a trade closed (sell order completed).
##### Protections - global protection
These Protections should do their evaluation across all pairs, and consequently will also lock all pairs from trading (called a global PairLock).
Global protection must set `has_global_stop=True` to be evaluated for global stops.
The method `global_stop()` will be called whenever a trade closed (sell order completed).
##### Protections - calculating lock end time
Protections should calculate the lock end time based on the last trade it considers.
This avoids re-locking should the lookback-period be longer than the actual lock period.
The `IProtection` parent class provides a helper method for this in `calculate_lock_end()`.
---
## Implement a new Exchange (WIP)
!!! Note
@@ -197,11 +242,14 @@ In `VolumePairList`, this implements different methods of sorting, does early va
Most exchanges supported by CCXT should work out of the box.
To quickly test the public endpoints of an exchange, add a configuration for your exchange to `test_ccxt_compat.py` and run these tests with `pytest --longrun tests/exchange/test_ccxt_compat.py`.
Completing these tests successfully a good basis point (it's a requirement, actually), however these won't guarantee correct exchange functioning, as this only tests public endpoints, but no private endpoint (like generate order or similar).
### Stoploss On Exchange
Check if the new exchange supports Stoploss on Exchange orders through their API.
Since CCXT does not provide unification for Stoploss On Exchange yet, we'll need to implement the exchange-specific parameters ourselfs. Best look at `binance.py` for an example implementation of this. You'll need to dig through the documentation of the Exchange's API on how exactly this can be done. [CCXT Issues](https://github.com/ccxt/ccxt/issues) may also provide great help, since others may have implemented something similar for their projects.
Since CCXT does not provide unification for Stoploss On Exchange yet, we'll need to implement the exchange-specific parameters ourselves. Best look at `binance.py` for an example implementation of this. You'll need to dig through the documentation of the Exchange's API on how exactly this can be done. [CCXT Issues](https://github.com/ccxt/ccxt/issues) may also provide great help, since others may have implemented something similar for their projects.
### Incomplete candles
@@ -251,13 +299,14 @@ jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to markdown freqtrade
This documents some decisions taken for the CI Pipeline.
* CI runs on all OS variants, Linux (ubuntu), macOS and Windows.
* Docker images are build for the branches `master` and `develop`.
* Raspberry PI Docker images are postfixed with `_pi` - so tags will be `:master_pi` and `develop_pi`.
* Docker images are build for the branches `stable` and `develop`.
* Docker images containing Plot dependencies are also available as `stable_plot` and `develop_plot`.
* Raspberry PI Docker images are postfixed with `_pi` - so tags will be `:stable_pi` and `develop_pi`.
* Docker images contain a file, `/freqtrade/freqtrade_commit` containing the commit this image is based of.
* Full docker image rebuilds are run once a week via schedule.
* Deployments run on ubuntu.
* ta-lib binaries are contained in the build_helpers directory to avoid fails related to external unavailability.
* All tests must pass for a PR to be merged to `master` or `develop`.
* All tests must pass for a PR to be merged to `stable` or `develop`.
## Creating a release
@@ -274,21 +323,22 @@ git checkout -b new_release <commitid>
Determine if crucial bugfixes have been made between this commit and the current state, and eventually cherry-pick these.
* Merge the release branch (stable) into this branch.
* Edit `freqtrade/__init__.py` and add the version matching the current date (for example `2019.7` for July 2019). Minor versions can be `2019.7.1` should we need to do a second release that month. Version numbers must follow allowed versions from PEP0440 to avoid failures pushing to pypi.
* Commit this part
* push that branch to the remote and create a PR against the master branch
* push that branch to the remote and create a PR against the stable branch
### Create changelog from git commits
!!! Note
Make sure that the master branch is uptodate!
Make sure that the `stable` branch is up-to-date!
``` bash
# Needs to be done before merging / pulling that branch.
git log --oneline --no-decorate --no-merges master..new_release
git log --oneline --no-decorate --no-merges stable..new_release
```
To keep the release-log short, best wrap the full git changelog into a collapsible details secction.
To keep the release-log short, best wrap the full git changelog into a collapsible details section.
```markdown
<details>
@@ -301,17 +351,20 @@ To keep the release-log short, best wrap the full git changelog into a collapsib
### Create github release / tag
Once the PR against master is merged (best right after merging):
Once the PR against stable is merged (best right after merging):
* Use the button "Draft a new release" in the Github UI (subsection releases).
* Use the version-number specified as tag.
* Use "master" as reference (this step comes after the above PR is merged).
* Use "stable" as reference (this step comes after the above PR is merged).
* Use the above changelog as release comment (as codeblock)
## Releases
### pypi
!!! Note
This process is now automated as part of Github Actions.
To create a pypi release, please run the following commands:
Additional requirement: `wheel`, `twine` (for uploading), account on pypi with proper permissions.

View File

@@ -1,145 +1,7 @@
# Using Freqtrade with Docker
## Install Docker
Start by downloading and installing Docker CE for your platform:
* [Mac](https://docs.docker.com/docker-for-mac/install/)
* [Windows](https://docs.docker.com/docker-for-windows/install/)
* [Linux](https://docs.docker.com/install/)
Optionally, [docker-compose](https://docs.docker.com/compose/install/) should be installed and available to follow the [docker quick start guide](#docker-quick-start).
Once you have Docker installed, simply prepare the config file (e.g. `config.json`) and run the image for `freqtrade` as explained below.
## Freqtrade with docker-compose
Freqtrade provides an official Docker image on [Dockerhub](https://hub.docker.com/r/freqtradeorg/freqtrade/), as well as a [docker-compose file](https://github.com/freqtrade/freqtrade/blob/develop/docker-compose.yml) ready for usage.
!!! Note
The following section assumes that docker and docker-compose is installed and available to the logged in user.
!!! Note
All below comands use relative directories and will have to be executed from the directory containing the `docker-compose.yml` file.
!!! Note "Docker on Raspberry"
If you're running freqtrade on a Raspberry PI, you must change the image from `freqtradeorg/freqtrade:master` to `freqtradeorg/freqtrade:master_pi` or `freqtradeorg/freqtrade:develop_pi`, otherwise the image will not work.
### Docker quick start
Create a new directory and place the [docker-compose file](https://github.com/freqtrade/freqtrade/blob/develop/docker-compose.yml) in this directory.
``` bash
mkdir ft_userdata
cd ft_userdata/
# Download the docker-compose file from the repository
curl https://raw.githubusercontent.com/freqtrade/freqtrade/develop/docker-compose.yml -o docker-compose.yml
# Pull the freqtrade image
docker-compose pull
# Create user directory structure
docker-compose run --rm freqtrade create-userdir --userdir user_data
# Create configuration - Requires answering interactive questions
docker-compose run --rm freqtrade new-config --config user_data/config.json
```
The above snippet creates a new directory called "ft_userdata", downloads the latest compose file and pulls the freqtrade image.
The last 2 steps in the snippet create the directory with user-data, as well as (interactively) the default configuration based on your selections.
!!! Note
You can edit the configuration at any time, which is available as `user_data/config.json` (within the directory `ft_userdata`) when using the above configuration.
#### Adding your strategy
The configuration is now available as `user_data/config.json`.
You should now copy your strategy to `user_data/strategies/` - and add the Strategy class name to the `docker-compose.yml` file, replacing `SampleStrategy`. If you wish to run the bot with the SampleStrategy, just leave it as it is.
!!! Warning
The `SampleStrategy` is there for your reference and give you ideas for your own strategy.
Please always backtest the strategy and use dry-run for some time before risking real money!
Once this is done, you're ready to launch the bot in trading mode (Dry-run or Live-trading, depending on your answer to the corresponding question you made above).
``` bash
docker-compose up -d
```
#### Docker-compose logs
Logs will be written to `user_data/logs/freqtrade.log`.
Alternatively, you can check the latest logs using `docker-compose logs -f`.
#### Database
The database will be in the user_data directory as well, and will be called `user_data/tradesv3.sqlite`.
#### Updating freqtrade with docker-compose
To update freqtrade when using docker-compose is as simple as running the following 2 commands:
``` bash
# Download the latest image
docker-compose pull
# Restart the image
docker-compose up -d
```
This will first pull the latest image, and will then restart the container with the just pulled version.
!!! Note
You should always check the changelog for breaking changes / manual interventions required and make sure the bot starts correctly after the update.
#### Going from here
Advanced users may edit the docker-compose file further to include all possible options or arguments.
All possible freqtrade arguments will be available by running `docker-compose run --rm freqtrade <command> <optional arguments>`.
!!! Note "`docker-compose run --rm`"
Including `--rm` will clean up the container after completion, and is highly recommended for all modes except trading mode (running with `freqtrade trade` command).
##### Example: Download data with docker-compose
Download backtesting data for 5 days for the pair ETH/BTC and 1h timeframe from Binance. The data will be stored in the directory `user_data/data/` on the host.
``` bash
docker-compose run --rm freqtrade download-data --pairs ETH/BTC --exchange binance --days 5 -t 1h
```
Head over to the [Data Downloading Documentation](data-download.md) for more details on downloading data.
##### Example: Backtest with docker-compose
Run backtesting in docker-containers for SampleStrategy and specified timerange of historical data, on 5m timeframe:
``` bash
docker-compose run --rm freqtrade backtesting --config user_data/config.json --strategy SampleStrategy --timerange 20190801-20191001 -i 5m
```
Head over to the [Backtesting Documentation](backtesting.md) to learn more.
#### Additional dependencies with docker-compose
If your strategy requires dependencies not included in the default image (like [technical](https://github.com/freqtrade/technical)) - it will be necessary to build the image on your host.
For this, please create a Dockerfile containing installation steps for the additional dependencies (have a look at [Dockerfile.technical](https://github.com/freqtrade/freqtrade/blob/develop/Dockerfile.technical) for an example).
You'll then also need to modify the `docker-compose.yml` file and uncomment the build step, as well as rename the image to avoid naming collisions.
``` yaml
image: freqtrade_custom
build:
context: .
dockerfile: "./Dockerfile.<yourextension>"
```
You can then run `docker-compose build` to build the docker image, and run it using the commands described above.
## Freqtrade with docker without docker-compose
!!! Warning
The below documentation is provided for completeness and assumes that you are somewhat familiar with running docker containers. If you're just starting out with docker, we recommend to follow the [Freqtrade with docker-compose](#freqtrade-with-docker-compose) instructions.
The below documentation is provided for completeness and assumes that you are familiar with running docker containers. If you're just starting out with Docker, we recommend to follow the [Quickstart](docker.md) instructions.
### Download the official Freqtrade docker image
@@ -148,9 +10,9 @@ Pull the image from docker hub.
Branches / tags available can be checked out on [Dockerhub tags page](https://hub.docker.com/r/freqtradeorg/freqtrade/tags/).
```bash
docker pull freqtradeorg/freqtrade:develop
docker pull freqtradeorg/freqtrade:stable
# Optionally tag the repository so the run-commands remain shorter
docker tag freqtradeorg/freqtrade:develop freqtrade
docker tag freqtradeorg/freqtrade:stable freqtrade
```
To update the image, simply run the above commands again and restart your running container.
@@ -158,7 +20,7 @@ To update the image, simply run the above commands again and restart your runnin
Should you require additional libraries, please [build the image yourself](#build-your-own-docker-image).
!!! Note "Docker image update frequency"
The official docker images with tags `master`, `develop` and `latest` are automatically rebuild once a week to keep the base image uptodate.
The official docker images with tags `stable`, `develop` and `latest` are automatically rebuild once a week to keep the base image up-to-date.
In addition to that, every merge to `develop` will trigger a rebuild for `develop` and `latest`.
### Prepare the configuration files
@@ -190,39 +52,38 @@ cp -n config.json.example config.json
#### Create your database file
Production
```bash
touch tradesv3.sqlite
````
Dry-Run
=== "Dry-Run"
``` bash
touch tradesv3.dryrun.sqlite
```
!!! Note
Make sure to use the path to this file when starting the bot in docker.
=== "Production"
``` bash
touch tradesv3.sqlite
```
!!! Warning "Database File Path"
Make sure to use the path to the correct database file when starting the bot in Docker.
### Build your own Docker image
Best start by pulling the official docker image from dockerhub as explained [here](#download-the-official-docker-image) to speed up building.
To add additional libraries to your docker image, best check out [Dockerfile.technical](https://github.com/freqtrade/freqtrade/blob/develop/Dockerfile.technical) which adds the [technical](https://github.com/freqtrade/technical) module to the image.
To add additional libraries to your docker image, best check out [Dockerfile.technical](https://github.com/freqtrade/freqtrade/blob/develop/docker/Dockerfile.technical) which adds the [technical](https://github.com/freqtrade/technical) module to the image.
```bash
docker build -t freqtrade -f Dockerfile.technical .
docker build -t freqtrade -f docker/Dockerfile.technical .
```
If you are developing using Docker, use `Dockerfile.develop` to build a dev Docker image, which will also set up develop dependencies:
If you are developing using Docker, use `docker/Dockerfile.develop` to build a dev Docker image, which will also set up develop dependencies:
```bash
docker build -f Dockerfile.develop -t freqtrade-dev .
docker build -f docker/Dockerfile.develop -t freqtrade-dev .
```
!!! Note
For security reasons, your configuration file will not be included in the image, you will need to bind mount it. It is also advised to bind mount an SQLite database file (see the "5. Run a restartable docker image" section) to keep it between updates.
!!! Warning "Include your config file manually"
For security reasons, your configuration file will not be included in the image, you will need to bind mount it. It is also advised to bind mount an SQLite database file (see [5. Run a restartable docker image](#run-a-restartable-docker-image)") to keep it between updates.
#### Verify the Docker image
@@ -243,15 +104,14 @@ docker run --rm -v `pwd`/config.json:/freqtrade/config.json -it freqtrade
```
!!! Warning
In this example, the database will be created inside the docker instance and will be lost when you will refresh your image.
In this example, the database will be created inside the docker instance and will be lost when you refresh your image.
#### Adjust timezone
By default, the container will use UTC timezone.
Should you find this irritating please add the following to your docker commands:
##### Linux
If you would like to change the timezone use the following commands:
=== "Linux"
``` bash
-v /etc/timezone:/etc/timezone:ro
@@ -259,21 +119,21 @@ Should you find this irritating please add the following to your docker commands
docker run --rm -v /etc/timezone:/etc/timezone:ro -v `pwd`/config.json:/freqtrade/config.json -it freqtrade
```
##### MacOS
There is known issue in OSX Docker versions after 17.09.1, whereby `/etc/localtime` cannot be shared causing Docker to not start. A work-around for this is to start with the following cmd.
=== "MacOS"
```bash
docker run --rm -e TZ=`ls -la /etc/localtime | cut -d/ -f8-9` -v `pwd`/config.json:/freqtrade/config.json -it freqtrade
```
!!! Note "MacOS Issues"
The OSX Docker versions after 17.09.1 have a known issue whereby `/etc/localtime` cannot be shared causing Docker to not start.<br>
A work-around for this is to start with the MacOS command above
More information on this docker issue and work-around can be read [here](https://github.com/docker/for-mac/issues/2396).
### Run a restartable docker image
To run a restartable instance in the background (feel free to place your configuration and database files wherever it feels comfortable on your filesystem).
#### Move your config file and database
#### 1. Move your config file and database
The following will assume that you place your configuration / database files to `~/.freqtrade`, which is a hidden directory in your home directory. Feel free to use a different directory and replace the directory in the upcomming commands.
@@ -283,7 +143,7 @@ mv config.json ~/.freqtrade
mv tradesv3.sqlite ~/.freqtrade
```
#### Run the docker image
#### 2. Run the docker image
```bash
docker run -d \

191
docs/docker_quickstart.md Normal file
View File

@@ -0,0 +1,191 @@
# Using Freqtrade with Docker
## Install Docker
Start by downloading and installing Docker CE for your platform:
* [Mac](https://docs.docker.com/docker-for-mac/install/)
* [Windows](https://docs.docker.com/docker-for-windows/install/)
* [Linux](https://docs.docker.com/install/)
Optionally, [`docker-compose`](https://docs.docker.com/compose/install/) should be installed and available to follow the [docker quick start guide](#docker-quick-start).
Once you have Docker installed, simply prepare the config file (e.g. `config.json`) and run the image for `freqtrade` as explained below.
## Freqtrade with docker-compose
Freqtrade provides an official Docker image on [Dockerhub](https://hub.docker.com/r/freqtradeorg/freqtrade/), as well as a [docker-compose file](https://github.com/freqtrade/freqtrade/blob/develop/docker-compose.yml) ready for usage.
!!! Note
- The following section assumes that `docker` and `docker-compose` are installed and available to the logged in user.
- All below commands use relative directories and will have to be executed from the directory containing the `docker-compose.yml` file.
### Docker quick start
Create a new directory and place the [docker-compose file](https://github.com/freqtrade/freqtrade/blob/develop/docker-compose.yml) in this directory.
=== "PC/MAC/Linux"
``` bash
mkdir ft_userdata
cd ft_userdata/
# Download the docker-compose file from the repository
curl https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml -o docker-compose.yml
# Pull the freqtrade image
docker-compose pull
# Create user directory structure
docker-compose run --rm freqtrade create-userdir --userdir user_data
# Create configuration - Requires answering interactive questions
docker-compose run --rm freqtrade new-config --config user_data/config.json
```
=== "RaspberryPi"
``` bash
mkdir ft_userdata
cd ft_userdata/
# Download the docker-compose file from the repository
curl https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml -o docker-compose.yml
# Pull the freqtrade image
docker-compose pull
# Create user directory structure
docker-compose run --rm freqtrade create-userdir --userdir user_data
# Create configuration - Requires answering interactive questions
docker-compose run --rm freqtrade new-config --config user_data/config.json
```
!!! Note "Change your docker Image"
You have to change the docker image in the docker-compose file for your Raspberry build to work properly.
``` yml
image: freqtradeorg/freqtrade:stable_pi
# image: freqtradeorg/freqtrade:develop_pi
```
The above snippet creates a new directory called `ft_userdata`, downloads the latest compose file and pulls the freqtrade image.
The last 2 steps in the snippet create the directory with `user_data`, as well as (interactively) the default configuration based on your selections.
!!! Question "How to edit the bot configuration?"
You can edit the configuration at any time, which is available as `user_data/config.json` (within the directory `ft_userdata`) when using the above configuration.
You can also change the both Strategy and commands by editing the `docker-compose.yml` file.
#### Adding a custom strategy
1. The configuration is now available as `user_data/config.json`
2. Copy a custom strategy to the directory `user_data/strategies/`
3. add the Strategy' class name to the `docker-compose.yml` file
The `SampleStrategy` is run by default.
!!! Warning "`SampleStrategy` is just a demo!"
The `SampleStrategy` is there for your reference and give you ideas for your own strategy.
Please always backtest the strategy and use dry-run for some time before risking real money!
Once this is done, you're ready to launch the bot in trading mode (Dry-run or Live-trading, depending on your answer to the corresponding question you made above).
``` bash
docker-compose up -d
```
#### Docker-compose logs
Logs will be located at: `user_data/logs/freqtrade.log`.
You can check the latest log with the command `docker-compose logs -f`.
#### Database
The database will be at: `user_data/tradesv3.sqlite`
#### Updating freqtrade with docker-compose
To update freqtrade when using `docker-compose` is as simple as running the following 2 commands:
``` bash
# Download the latest image
docker-compose pull
# Restart the image
docker-compose up -d
```
This will first pull the latest image, and will then restart the container with the just pulled version.
!!! Warning "Check the Changelog"
You should always check the changelog for breaking changes / manual interventions required and make sure the bot starts correctly after the update.
### Editing the docker-compose file
Advanced users may edit the docker-compose file further to include all possible options or arguments.
All possible freqtrade arguments will be available by running `docker-compose run --rm freqtrade <command> <optional arguments>`.
!!! Note "`docker-compose run --rm`"
Including `--rm` will clean up the container after completion, and is highly recommended for all modes except trading mode (running with `freqtrade trade` command).
#### Example: Download data with docker-compose
Download backtesting data for 5 days for the pair ETH/BTC and 1h timeframe from Binance. The data will be stored in the directory `user_data/data/` on the host.
``` bash
docker-compose run --rm freqtrade download-data --pairs ETH/BTC --exchange binance --days 5 -t 1h
```
Head over to the [Data Downloading Documentation](data-download.md) for more details on downloading data.
#### Example: Backtest with docker-compose
Run backtesting in docker-containers for SampleStrategy and specified timerange of historical data, on 5m timeframe:
``` bash
docker-compose run --rm freqtrade backtesting --config user_data/config.json --strategy SampleStrategy --timerange 20190801-20191001 -i 5m
```
Head over to the [Backtesting Documentation](backtesting.md) to learn more.
### Additional dependencies with docker-compose
If your strategy requires dependencies not included in the default image (like [technical](https://github.com/freqtrade/technical)) - it will be necessary to build the image on your host.
For this, please create a Dockerfile containing installation steps for the additional dependencies (have a look at [docker/Dockerfile.technical](https://github.com/freqtrade/freqtrade/blob/develop/docker/Dockerfile.technical) for an example).
You'll then also need to modify the `docker-compose.yml` file and uncomment the build step, as well as rename the image to avoid naming collisions.
``` yaml
image: freqtrade_custom
build:
context: .
dockerfile: "./Dockerfile.<yourextension>"
```
You can then run `docker-compose build` to build the docker image, and run it using the commands described above.
## Plotting with docker-compose
Commands `freqtrade plot-profit` and `freqtrade plot-dataframe` ([Documentation](plotting.md)) are available by changing the image to `*_plot` in your docker-compose.yml file.
You can then use these commands as follows:
``` bash
docker-compose run --rm freqtrade plot-dataframe --strategy AwesomeStrategy -p BTC/ETH --timerange=20180801-20180805
```
The output will be stored in the `user_data/plot` directory, and can be opened with any modern browser.
## Data analayis using docker compose
Freqtrade provides a docker-compose file which starts up a jupyter lab server.
You can run this server using the following command:
``` bash
docker-compose --rm -f docker/docker-compose-jupyter.yml up
```
This will create a dockercontainer running jupyter lab, which will be accessible using `https://127.0.0.1:8888/lab`.
Please use the link that's printed in the console after startup for simplified login.
Since part of this image is built on your machine, it is recommended to rebuild the image from time to time to keep freqtrade (and dependencies) uptodate.
``` bash
docker-compose -f docker/docker-compose-jupyter.yml build --no-cache
```

View File

@@ -1,92 +1,156 @@
# Edge positioning
This page explains how to use Edge Positioning module in your bot in order to enter into a trade only if the trade has a reasonable win rate and risk reward ratio, and consequently adjust your position size and stoploss.
The `Edge Positioning` module uses probability to calculate your win rate and risk reward ration. It will use these statistics to control your strategy trade entry points, position side and, stoploss.
!!! Warning
Edge positioning is not compatible with dynamic (volume-based) whitelist.
`Edge positioning` is not compatible with dynamic (volume-based) whitelist.
!!! Note
Edge does not consider anything other than *its own* buy/sell/stoploss signals. It ignores the stoploss, trailing stoploss, and ROI settings in the strategy configuration file.
Therefore, it is important to understand that Edge can improve the performance of some trading strategies but *decrease* the performance of others.
`Edge Positioning` only considers *its own* buy/sell/stoploss signals. It ignores the stoploss, trailing stoploss, and ROI settings in the strategy configuration file.
`Edge Positioning` improves the performance of some trading strategies and *decreases* the performance of others.
## Introduction
Trading is all about probability. No one can claim that he has a strategy working all the time. You have to assume that sometimes you lose.
Trading strategies are not perfect. They are frameworks that are susceptible to the market and its indicators. Because the market is not at all predictable, sometimes a strategy will win and sometimes the same strategy will lose.
But it doesn't mean there is no rule, it only means rules should work "most of the time". Let's play a game: we toss a coin, heads: I give you 10$, tails: you give me 10$. Is it an interesting game? No, it's quite boring, isn't it?
To obtain an edge in the market, a strategy has to make more money than it loses. Making money in trading is not only about *how often* the strategy makes or loses money.
But let's say the probability that we have heads is 80% (because our coin has the displaced distribution of mass or other defect), and the probability that we have tails is 20%. Now it is becoming interesting...
!!! tip "It doesn't matter how often, but how much!"
A bad strategy might make 1 penny in *ten* transactions but lose 1 dollar in *one* transaction. If one only checks the number of winning trades, it would be misleading to think that the strategy is actually making a profit.
That means 10$ X 80% versus 10$ X 20%. 8$ versus 2$. That means over time you will win 8$ risking only 2$ on each toss of coin.
The Edge Positioning module seeks to improve a strategy's winning probability and the money that the strategy will make *on the long run*.
Let's complicate it more: you win 80% of the time but only 2$, I win 20% of the time but 8$. The calculation is: 80% X 2$ versus 20% X 8$. It is becoming boring again because overtime you win $1.6$ (80% X 2$) and me $1.6 (20% X 8$) too.
We raise the following question[^1]:
The question is: How do you calculate that? How do you know if you wanna play?
!!! Question "Which trade is a better option?"
a) A trade with 80% of chance of losing 100\$ and 20% chance of winning 200\$<br/>
b) A trade with 100% of chance of losing 30\$
The answer comes to two factors:
???+ Info "Answer"
The expected value of *a)* is smaller than the expected value of *b)*.<br/>
Hence, *b*) represents a smaller loss in the long run.<br/>
However, the answer is: *it depends*
- Win Rate
- Risk Reward Ratio
Another way to look at it is to ask a similar question:
### Win Rate
!!! Question "Which trade is a better option?"
a) A trade with 80% of chance of winning 100\$ and 20% chance of losing 200\$<br/>
b) A trade with 100% of chance of winning 30\$
Win Rate (*W*) is is the mean over some amount of trades (*N*) what is the percentage of winning trades to total number of trades (note that we don't consider how much you gained but only if you won or not).
Edge positioning tries to answer the hard questions about risk/reward and position size automatically, seeking to minimizes the chances of losing of a given strategy.
```
W = (Number of winning trades) / (Total number of trades) = (Number of winning trades) / N
```
### Trading, winning and losing
Complementary Loss Rate (*L*) is defined as
Let's call $o$ the return of a single transaction $o$ where $o \in \mathbb{R}$. The collection $O = \{o_1, o_2, ..., o_N\}$ is the set of all returns of transactions made during a trading session. We say that $N$ is the cardinality of $O$, or, in lay terms, it is the number of transactions made in a trading session.
```
L = (Number of losing trades) / (Total number of trades) = (Number of losing trades) / N
```
!!! Example
In a session where a strategy made three transactions we can say that $O = \{3.5, -1, 15\}$. That means that $N = 3$ and $o_1 = 3.5$, $o_2 = -1$, $o_3 = 15$.
or, which is the same, as
A winning trade is a trade where a strategy *made* money. Making money means that the strategy closed the position in a value that returned a profit, after all deducted fees. Formally, a winning trade will have a return $o_i > 0$. Similarly, a losing trade will have a return $o_j \leq 0$. With that, we can discover the set of all winning trades, $T_{win}$, as follows:
```
L = 1 W
```
$$ T_{win} = \{ o \in O | o > 0 \} $$
Similarly, we can discover the set of losing trades $T_{lose}$ as follows:
$$ T_{lose} = \{o \in O | o \leq 0\} $$
!!! Example
In a section where a strategy made three transactions $O = \{3.5, -1, 15, 0\}$:<br>
$T_{win} = \{3.5, 15\}$<br>
$T_{lose} = \{-1, 0\}$<br>
### Win Rate and Lose Rate
The win rate $W$ is the proportion of winning trades with respect to all the trades made by a strategy. We use the following function to compute the win rate:
$$W = \frac{|T_{win}|}{N}$$
Where $W$ is the win rate, $N$ is the number of trades and, $T_{win}$ is the set of all trades where the strategy made money.
Similarly, we can compute the rate of losing trades:
$$
L = \frac{|T_{lose}|}{N}
$$
Where $L$ is the lose rate, $N$ is the amount of trades made and, $T_{lose}$ is the set of all trades where the strategy lost money. Note that the above formula is the same as calculating $L = 1 W$ or $W = 1 L$
### Risk Reward Ratio
Risk Reward Ratio (*R*) is a formula used to measure the expected gains of a given investment against the risk of loss. It is basically what you potentially win divided by what you potentially lose:
Risk Reward Ratio ($R$) is a formula used to measure the expected gains of a given investment against the risk of loss. It is basically what you potentially win divided by what you potentially lose. Formally:
```
R = Profit / Loss
```
$$ R = \frac{\text{potential_profit}}{\text{potential_loss}} $$
Over time, on many trades, you can calculate your risk reward by dividing your average profit on winning trades by your average loss on losing trades:
???+ Example "Worked example of $R$ calculation"
Let's say that you think that the price of *stonecoin* today is 10.0\$. You believe that, because they will start mining stonecoin, it will go up to 15.0\$ tomorrow. There is the risk that the stone is too hard, and the GPUs can't mine it, so the price might go to 0\$ tomorrow. You are planning to invest 100\$, which will give you 10 shares (100 / 10).
```
Average profit = (Sum of profits) / (Number of winning trades)
Your potential profit is calculated as:
Average loss = (Sum of losses) / (Number of losing trades)
$\begin{aligned}
\text{potential_profit} &= (\text{potential_price} - \text{entry_price}) * \frac{\text{investment}}{\text{entry_price}} \\
&= (15 - 10) * (100 / 10) \\
&= 50
\end{aligned}$
Since the price might go to 0\$, the 100\$ dollars invested could turn into 0.
We do however use a stoploss of 15% - so in the worst case, we'll sell 15% below entry price (or at 8.5$\).
$\begin{aligned}
\text{potential_loss} &= (\text{entry_price} - \text{stoploss}) * \frac{\text{investment}}{\text{entry_price}} \\
&= (10 - 8.5) * (100 / 10)\\
&= 15
\end{aligned}$
We can compute the Risk Reward Ratio as follows:
$\begin{aligned}
R &= \frac{\text{potential_profit}}{\text{potential_loss}}\\
&= \frac{50}{15}\\
&= 3.33
\end{aligned}$<br>
What it effectively means is that the strategy have the potential to make 3.33\$ for each 1\$ invested.
On a long horizon, that is, on many trades, we can calculate the risk reward by dividing the strategy' average profit on winning trades by the strategy' average loss on losing trades. We can calculate the average profit, $\mu_{win}$, as follows:
$$ \text{average_profit} = \mu_{win} = \frac{\text{sum_of_profits}}{\text{count_winning_trades}} = \frac{\sum^{o \in T_{win}} o}{|T_{win}|} $$
Similarly, we can calculate the average loss, $\mu_{lose}$, as follows:
$$ \text{average_loss} = \mu_{lose} = \frac{\text{sum_of_losses}}{\text{count_losing_trades}} = \frac{\sum^{o \in T_{lose}} o}{|T_{lose}|} $$
Finally, we can calculate the Risk Reward ratio, $R$, as follows:
$$ R = \frac{\text{average_profit}}{\text{average_loss}} = \frac{\mu_{win}}{\mu_{lose}}\\ $$
???+ Example "Worked example of $R$ calculation using mean profit/loss"
Let's say the strategy that we are using makes an average win $\mu_{win} = 2.06$ and an average loss $\mu_{loss} = 4.11$.<br>
We calculate the risk reward ratio as follows:<br>
$R = \frac{\mu_{win}}{\mu_{loss}} = \frac{2.06}{4.11} = 0.5012...$
R = (Average profit) / (Average loss)
```
### Expectancy
At this point we can combine *W* and *R* to create an expectancy ratio. This is a simple process of multiplying the risk reward ratio by the percentage of winning trades and subtracting the percentage of losing trades, which is calculated as follows:
By combining the Win Rate $W$ and and the Risk Reward ratio $R$ to create an expectancy ratio $E$. A expectance ratio is the expected return of the investment made in a trade. We can compute the value of $E$ as follows:
```
Expectancy Ratio = (Risk Reward Ratio X Win Rate) Loss Rate = (R X W) L
```
$$E = R * W - L$$
So lets say your Win rate is 28% and your Risk Reward Ratio is 5:
!!! Example "Calculating $E$"
Let's say that a strategy has a win rate $W = 0.28$ and a risk reward ratio $R = 5$. What this means is that the strategy is expected to make 5 times the investment around on 28% of the trades it makes. Working out the example:<br>
$E = R * W - L = 5 * 0.28 - 0.72 = 0.68$
<br>
```
Expectancy = (5 X 0.28) 0.72 = 0.68
```
The expectancy worked out in the example above means that, on average, this strategy' trades will return 1.68 times the size of its losses. Said another way, the strategy makes 1.68\$ for every 1\$ it loses, on average.
Superficially, this means that on average you expect this strategys trades to return 1.68 times the size of your loses. Said another way, you can expect to win $1.68 for every $1 you lose. This is important for two reasons: First, it may seem obvious, but you know right away that you have a positive return. Second, you now have a number you can compare to other candidate systems to make decisions about which ones you employ.
This is important for two reasons: First, it may seem obvious, but you know right away that you have a positive return. Second, you now have a number you can compare to other candidate systems to make decisions about which ones you employ.
It is important to remember that any system with an expectancy greater than 0 is profitable using past data. The key is finding one that will be profitable in the future.
You can also use this value to evaluate the effectiveness of modifications to this system.
**NOTICE:** It's important to keep in mind that Edge is testing your expectancy using historical data, there's no guarantee that you will have a similar edge in the future. It's still vital to do this testing in order to build confidence in your methodology, but be wary of "curve-fitting" your approach to the historical data as things are unlikely to play out the exact same way for future trades.
!!! Note
It's important to keep in mind that Edge is testing your expectancy using historical data, there's no guarantee that you will have a similar edge in the future. It's still vital to do this testing in order to build confidence in your methodology but be wary of "curve-fitting" your approach to the historical data as things are unlikely to play out the exact same way for future trades.
## How does it work?
@@ -99,13 +163,13 @@ Edge combines dynamic stoploss, dynamic positions, and whitelist generation into
| XZC/ETH | -0.03 | 0.52 |1.359670 | 0.228 |
| XZC/ETH | -0.04 | 0.51 |1.234539 | 0.117 |
The goal here is to find the best stoploss for the strategy in order to have the maximum expectancy. In the above example stoploss at 3% leads to the maximum expectancy according to historical data.
The goal here is to find the best stoploss for the strategy in order to have the maximum expectancy. In the above example stoploss at $3%$ leads to the maximum expectancy according to historical data.
Edge module then forces stoploss value it evaluated to your strategy dynamically.
### Position size
Edge also dictates the stake amount for each trade to the bot according to the following factors:
Edge dictates the amount at stake for each trade to the bot according to the following factors:
- Allowed capital at risk
- Stoploss
@@ -116,9 +180,9 @@ Allowed capital at risk is calculated as follows:
Allowed capital at risk = (Capital available_percentage) X (Allowed risk per trade)
```
Stoploss is calculated as described above against historical data.
Stoploss is calculated as described above with respect to historical data.
Your position size then will be:
The position size is calculated as follows:
```
Position size = (Allowed capital at risk) / Stoploss
@@ -126,19 +190,23 @@ Position size = (Allowed capital at risk) / Stoploss
Example:
Let's say the stake currency is ETH and you have 10 ETH on the exchange, your capital available percentage is 50% and you would allow 1% of risk for each trade. thus your available capital for trading is **10 x 0.5 = 5 ETH** and allowed capital at risk would be **5 x 0.01 = 0.05 ETH**.
Let's say the stake currency is **ETH** and there is $10$ **ETH** on the wallet. The capital available percentage is $50%$ and the allowed risk per trade is $1\%$. Thus, the available capital for trading is $10 * 0.5 = 5$ **ETH** and the allowed capital at risk would be $5 * 0.01 = 0.05$ **ETH**.
Let's assume Edge has calculated that for **XLM/ETH** market your stoploss should be at 2%. So your position size will be **0.05 / 0.02 = 2.5 ETH**.
- **Trade 1:** The strategy detects a new buy signal in the **XLM/ETH** market. `Edge Positioning` calculates a stoploss of $2\%$ and a position of $0.05 / 0.02 = 2.5$ **ETH**. The bot takes a position of $2.5$ **ETH** in the **XLM/ETH** market.
Bot takes a position of 2.5 ETH on XLM/ETH (call it trade 1). Up next, you receive another buy signal while trade 1 is still open. This time on **BTC/ETH** market. Edge calculated stoploss for this market at 4%. So your position size would be 0.05 / 0.04 = 1.25 ETH (call it trade 2).
- **Trade 2:** The strategy detects a buy signal on the **BTC/ETH** market while **Trade 1** is still open. `Edge Positioning` calculates the stoploss of $4\%$ on this market. Thus, **Trade 2** position size is $0.05 / 0.04 = 1.25$ **ETH**.
Note that available capital for trading didnt change for trade 2 even if you had already trade 1. The available capital doesnt mean the free amount on your wallet.
!!! Tip "Available Capital $\neq$ Available in wallet"
The available capital for trading didn't change in **Trade 2** even with **Trade 1** still open. The available capital **is not** the free amount in the wallet.
Now you have two trades open. The bot receives yet another buy signal for another market: **ADA/ETH**. This time the stoploss is calculated at 1%. So your position size is **0.05 / 0.01 = 5 ETH**. But there are already 3.75 ETH blocked in two previous trades. So the position size for this third trade would be **5 3.75 = 1.25 ETH**.
- **Trade 3:** The strategy detects a buy signal in the **ADA/ETH** market. `Edge Positioning` calculates a stoploss of $1\%$ and a position of $0.05 / 0.01 = 5$ **ETH**. Since **Trade 1** has $2.5$ **ETH** blocked and **Trade 2** has $1.25$ **ETH** blocked, there is only $5 - 1.25 - 2.5 = 1.25$ **ETH** available. Hence, the position size of **Trade 3** is $1.25$ **ETH**.
Available capital doesnt change before a position is sold. Lets assume that trade 1 receives a sell signal and it is sold with a profit of 1 ETH. Your total capital on exchange would be 11 ETH and the available capital for trading becomes 5.5 ETH.
!!! Tip "Available Capital Updates"
The available capital does not change before a position is sold. After a trade is closed the Available Capital goes up if the trade was profitable or goes down if the trade was a loss.
So the Bot receives another buy signal for trade 4 with a stoploss at 2% then your position size would be **0.055 / 0.02 = 2.75 ETH**.
- The strategy detects a sell signal in the **XLM/ETH** market. The bot exits **Trade 1** for a profit of $1$ **ETH**. The total capital in the wallet becomes $11$ **ETH** and the available capital for trading becomes $5.5$ **ETH**.
- **Trade 4** The strategy detects a new buy signal int the **XLM/ETH** market. `Edge Positioning` calculates the stoploss of $2%$, and the position size of $0.055 / 0.02 = 2.75$ **ETH**.
## Configurations
@@ -154,7 +222,7 @@ Edge module has following configuration options:
| `stoploss_range_max` | Maximum stoploss. <br>*Defaults to `-0.10`.* <br> **Datatype:** Float
| `stoploss_range_step` | As an example if this is set to -0.01 then Edge will test the strategy for `[-0.01, -0,02, -0,03 ..., -0.09, -0.10]` ranges. <br> **Note** than having a smaller step means having a bigger range which could lead to slow calculation. <br> If you set this parameter to -0.001, you then slow down the Edge calculation by a factor of 10. <br>*Defaults to `-0.001`.* <br> **Datatype:** Float
| `minimum_winrate` | It filters out pairs which don't have at least minimum_winrate. <br>This comes handy if you want to be conservative and don't comprise win rate in favour of risk reward ratio. <br>*Defaults to `0.60`.* <br> **Datatype:** Float
| `minimum_expectancy` | It filters out pairs which have the expectancy lower than this number. <br>Having an expectancy of 0.20 means if you put 10$ on a trade you expect a 12$ return. <br>*Defaults to `0.20`.* <br> **Datatype:** Float
| `minimum_expectancy` | It filters out pairs which have the expectancy lower than this number. <br>Having an expectancy of 0.20 means if you put 10\$ on a trade you expect a 12\$ return. <br>*Defaults to `0.20`.* <br> **Datatype:** Float
| `min_trade_number` | When calculating *W*, *R* and *E* (expectancy) against historical data, you always want to have a minimum number of trades. The more this number is the more Edge is reliable. <br>Having a win rate of 100% on a single trade doesn't mean anything at all. But having a win rate of 70% over past 100 trades means clearly something. <br>*Defaults to `10` (it is highly recommended not to decrease this number).* <br> **Datatype:** Integer
| `max_trade_duration_minute` | Edge will filter out trades with long duration. If a trade is profitable after 1 month, it is hard to evaluate the strategy based on it. But if most of trades are profitable and they have maximum duration of 30 minutes, then it is clearly a good sign.<br>**NOTICE:** While configuring this value, you should take into consideration your timeframe. As an example filtering out trades having duration less than one day for a strategy which has 4h interval does not make sense. Default value is set assuming your strategy interval is relatively small (1m or 5m, etc.).<br>*Defaults to `1440` (one day).* <br> **Datatype:** Integer
| `remove_pumps` | Edge will remove sudden pumps in a given market while going through historical data. However, given that pumps happen very often in crypto markets, we recommend you keep this off.<br>*Defaults to `false`.* <br> **Datatype:** Boolean
@@ -169,23 +237,23 @@ freqtrade edge
An example of its output:
| pair | stoploss | win rate | risk reward ratio | required risk reward | expectancy | total number of trades | average duration (min) |
|:----------|-----------:|-----------:|--------------------:|-----------------------:|-------------:|-------------------------:|-------------------------:|
| AGI/BTC | -0.02 | 0.64 | 5.86 | 0.56 | 3.41 | 14 | 54 |
| NXS/BTC | -0.03 | 0.64 | 2.99 | 0.57 | 1.54 | 11 | 26 |
| LEND/BTC | -0.02 | 0.82 | 2.05 | 0.22 | 1.50 | 11 | 36 |
| VIA/BTC | -0.01 | 0.55 | 3.01 | 0.83 | 1.19 | 11 | 48 |
| MTH/BTC | -0.09 | 0.56 | 2.82 | 0.80 | 1.12 | 18 | 52 |
| ARDR/BTC | -0.04 | 0.42 | 3.14 | 1.40 | 0.73 | 12 | 42 |
| BCPT/BTC | -0.01 | 0.71 | 1.34 | 0.40 | 0.67 | 14 | 30 |
| WINGS/BTC | -0.02 | 0.56 | 1.97 | 0.80 | 0.65 | 27 | 42 |
| VIBE/BTC | -0.02 | 0.83 | 0.91 | 0.20 | 0.59 | 12 | 35 |
| MCO/BTC | -0.02 | 0.79 | 0.97 | 0.27 | 0.55 | 14 | 31 |
| GNT/BTC | -0.02 | 0.50 | 2.06 | 1.00 | 0.53 | 18 | 24 |
| HOT/BTC | -0.01 | 0.17 | 7.72 | 4.81 | 0.50 | 209 | 7 |
| SNM/BTC | -0.03 | 0.71 | 1.06 | 0.42 | 0.45 | 17 | 38 |
| APPC/BTC | -0.02 | 0.44 | 2.28 | 1.27 | 0.44 | 25 | 43 |
| NEBL/BTC | -0.03 | 0.63 | 1.29 | 0.58 | 0.44 | 19 | 59 |
| **pair** | **stoploss** | **win rate** | **risk reward ratio** | **required risk reward** | **expectancy** | **total number of trades** | **average duration (min)** |
|:----------|-----------:|-----------:|--------------------:|-----------------------:|-------------:|-----------------:|---------------:|
| **AGI/BTC** | -0.02 | 0.64 | 5.86 | 0.56 | 3.41 | 14 | 54 |
| **NXS/BTC** | -0.03 | 0.64 | 2.99 | 0.57 | 1.54 | 11 | 26 |
| **LEND/BTC** | -0.02 | 0.82 | 2.05 | 0.22 | 1.50 | 11 | 36 |
| **VIA/BTC** | -0.01 | 0.55 | 3.01 | 0.83 | 1.19 | 11 | 48 |
| **MTH/BTC** | -0.09 | 0.56 | 2.82 | 0.80 | 1.12 | 18 | 52 |
| **ARDR/BTC** | -0.04 | 0.42 | 3.14 | 1.40 | 0.73 | 12 | 42 |
| **BCPT/BTC** | -0.01 | 0.71 | 1.34 | 0.40 | 0.67 | 14 | 30 |
| **WINGS/BTC** | -0.02 | 0.56 | 1.97 | 0.80 | 0.65 | 27 | 42 |
| **VIBE/BTC** | -0.02 | 0.83 | 0.91 | 0.20 | 0.59 | 12 | 35 |
| **MCO/BTC** | -0.02 | 0.79 | 0.97 | 0.27 | 0.55 | 14 | 31 |
| **GNT/BTC** | -0.02 | 0.50 | 2.06 | 1.00 | 0.53 | 18 | 24 |
| **HOT/BTC** | -0.01 | 0.17 | 7.72 | 4.81 | 0.50 | 209 | 7 |
| **SNM/BTC** | -0.03 | 0.71 | 1.06 | 0.42 | 0.45 | 17 | 38 |
| **APPC/BTC** | -0.02 | 0.44 | 2.28 | 1.27 | 0.44 | 25 | 43 |
| **NEBL/BTC** | -0.03 | 0.63 | 1.29 | 0.58 | 0.44 | 19 | 59 |
Edge produced the above table by comparing `calculate_since_number_of_days` to `minimum_expectancy` to find `min_trade_number` historical information based on the config file. The timerange Edge uses for its comparisons can be further limited by using the `--timerange` switch.
@@ -218,3 +286,6 @@ The full timerange specification:
* Use tickframes since 2018/01/31: `--timerange=20180131-`
* Use tickframes since 2018/01/31 till 2018/03/01 : `--timerange=20180131-20180301`
* Use tickframes between POSIX timestamps 1527595200 1527618600: `--timerange=1527595200-1527618600`
[^1]: Question extracted from MIT Opencourseware S096 - Mathematics with applications in Finance: https://ocw.mit.edu/courses/mathematics/18-s096-topics-in-mathematics-with-applications-in-finance-fall-2013/

View File

@@ -23,7 +23,8 @@ Binance has been split into 3, and users must use the correct ccxt exchange ID f
## Kraken
!!! Tip "Stoploss on Exchange"
Kraken supports `stoploss_on_exchange` and uses stop-loss-market orders. It provides great advantages, so we recommend to benefit from it, however since the resulting order is a stoploss-market order, sell-rates are not guaranteed, which makes this feature less secure than on other exchanges. This limitation is based on kraken's policy [source](https://blog.kraken.com/post/1234/announcement-delisting-pairs-and-temporary-suspension-of-advanced-order-types/) and [source2](https://blog.kraken.com/post/1494/kraken-enables-advanced-orders-and-adds-10-currency-pairs/) - which has stoploss-limit orders disabled.
Kraken supports `stoploss_on_exchange` and can use both stop-loss-market and stop-loss-limit orders. It provides great advantages, so we recommend to benefit from it.
You can use either `"limit"` or `"market"` in the `order_types.stoploss` configuration setting to decide which type to use.
### Historic Kraken data
@@ -75,8 +76,7 @@ print(res)
!!! Tip "Stoploss on Exchange"
FTX supports `stoploss_on_exchange` and can use both stop-loss-market and stop-loss-limit orders. It provides great advantages, so we recommend to benefit from it.
You can use either `"limit"` or `"market"` in the `order_types.stoploss` configuration setting to decide.
You can use either `"limit"` or `"market"` in the `order_types.stoploss` configuration setting to decide which type of stoploss shall be used.
### Using subaccounts
@@ -99,10 +99,10 @@ To use subaccounts with FTX, you need to edit the configuration and add the foll
Should you experience constant errors with Nonce (like `InvalidNonce`), it is best to regenerate the API keys. Resetting Nonce is difficult and it's usually easier to regenerate the API keys.
## Random notes for other exchanges
* The Ocean (exchange id: `theocean`) exchange uses Web3 functionality and requires `web3` python package to be installed:
```shell
$ pip3 install web3
```

View File

@@ -2,30 +2,30 @@
## Beginner Tips & Tricks
* When you work with your strategy & hyperopt file you should use a proper code editor like vscode or Pycharm. A good code editor will provide syntax highlighting as well as line numbers, making it easy to find syntax errors (most likely, pointed out by Freqtrade during startup).
* When you work with your strategy & hyperopt file you should use a proper code editor like VSCode or PyCharm. A good code editor will provide syntax highlighting as well as line numbers, making it easy to find syntax errors (most likely pointed out by Freqtrade during startup).
## Freqtrade common issues
### The bot does not start
Running the bot with `freqtrade trade --config config.json` does show the output `freqtrade: command not found`.
Running the bot with `freqtrade trade --config config.json` shows the output `freqtrade: command not found`.
This could have the following reasons:
This could be caused by the following reasons:
* The virtual environment is not active
* run `source .env/bin/activate` to activate the virtual environment
* The virtual environment is not active.
* Run `source .env/bin/activate` to activate the virtual environment.
* The installation did not work correctly.
* Please check the [Installation documentation](installation.md).
### I have waited 5 minutes, why hasn't the bot made any trades yet?!
### I have waited 5 minutes, why hasn't the bot made any trades yet?
* Depending on the buy strategy, the amount of whitelisted coins, the
situation of the market etc, it can take up to hours to find good entry
situation of the market etc, it can take up to hours to find a good entry
position for a trade. Be patient!
* Or it may because of a configuration error? Best check the logs, it's usually telling you if the bot is simply not getting buy signals (only heartbeat messages), or if there is something wrong (errors / exceptions in the log).
* It may be because of a configuration error. It's best to check the logs, they usually tell you if the bot is simply not getting buy signals (only heartbeat messages), or if there is something wrong (errors / exceptions in the log).
### I have made 12 trades already, why is my total profit negative?!
### I have made 12 trades already, why is my total profit negative?
I understand your disappointment but unfortunately 12 trades is just
not enough to say anything. If you run backtesting, you can see that our
@@ -36,11 +36,9 @@ of course constantly aim to improve the bot but it will _always_ be a
gamble, which should leave you with modest wins on monthly basis but
you can't say much from few trades.
### Id like to change the stake amount. Can I just stop the bot with /stop and then change the config.json and run it again?
### Id like to make changes to the config. Can I do that without having to kill the bot?
Not quite. Trades are persisted to a database but the configuration is
currently only read when the bot is killed and restarted. `/stop` more
like pauses. You can stop your bot, adjust settings and start it again.
Yes. You can edit your config, use the `/stop` command in Telegram, followed by `/reload_config` and the bot will run with the new config.
### I want to improve the bot with a new strategy
@@ -49,7 +47,7 @@ the tutorial [here|Testing-new-strategies-with-Hyperopt](bot-usage.md#hyperopt-c
### Is there a setting to only SELL the coins being held and not perform anymore BUYS?
You can use the `/forcesell all` command from Telegram.
You can use the `/stopbuy` command in Telegram to prevent future buys, followed by `/forcesell all` (sell all open trades).
### I want to run multiple bots on the same machine
@@ -59,7 +57,7 @@ Please look at the [advanced setup documentation Page](advanced-setup.md#running
This message is just a warning that the latest candles had missing candles in them.
Depending on the exchange, this can indicate that the pair didn't have a trade for the timeframe you are using - and the exchange does only return candles with volume.
On low volume pairs, this is a rather common occurance.
On low volume pairs, this is a rather common occurrence.
If this happens for all pairs in the pairlist, this might indicate a recent exchange downtime. Please check your exchange's public channels for details.
@@ -73,7 +71,7 @@ Read [the Bittrex section about restricted markets](exchanges.md#restricted-mark
### I'm getting the "Exchange Bittrex does not support market orders." message and cannot run my strategy
As the message says, Bittrex does not support market orders and you have one of the [order types](configuration.md/#understand-order_types) set to "market". Probably your strategy was written with other exchanges in mind and sets "market" orders for "stoploss" orders, which is correct and preferable for most of the exchanges supporting market orders (but not for Bittrex).
As the message says, Bittrex does not support market orders and you have one of the [order types](configuration.md/#understand-order_types) set to "market". Your strategy was probably written with other exchanges in mind and sets "market" orders for "stoploss" orders, which is correct and preferable for most of the exchanges supporting market orders (but not for Bittrex).
To fix it for Bittrex, redefine order types in the strategy to use "limit" instead of "market":
@@ -85,11 +83,11 @@ To fix it for Bittrex, redefine order types in the strategy to use "limit" inste
}
```
Same fix should be done in the configuration file, if order types are defined in your custom config rather than in the strategy.
The same fix should be applied in the configuration file, if order types are defined in your custom config rather than in the strategy.
### How do I search the bot logs for something?
By default, the bot writes its log into stderr stream. This is implemented this way so that you can easily separate the bot's diagnostics messages from Backtesting, Edge and Hyperopt results, output from other various Freqtrade utility subcommands, as well as from the output of your custom `print()`'s you may have inserted into your strategy. So if you need to search the log messages with the grep utility, you need to redirect stderr to stdout and disregard stdout.
By default, the bot writes its log into stderr stream. This is implemented this way so that you can easily separate the bot's diagnostics messages from Backtesting, Edge and Hyperopt results, output from other various Freqtrade utility sub-commands, as well as from the output of your custom `print()`'s you may have inserted into your strategy. So if you need to search the log messages with the grep utility, you need to redirect stderr to stdout and disregard stdout.
* In unix shells, this normally can be done as simple as:
```shell
@@ -127,47 +125,41 @@ On Windows, the `--logfile` option is also supported by Freqtrade and you can us
## Hyperopt module
### How many epoch do I need to get a good Hyperopt result?
### How many epochs do I need to get a good Hyperopt result?
Per default Hyperopt called without the `-e`/`--epochs` command line option will only
run 100 epochs, means 100 evals of your triggers, guards, ... Too few
run 100 epochs, means 100 evaluations of your triggers, guards, ... Too few
to find a great result (unless if you are very lucky), so you probably
have to run it for 10.000 or more. But it will take an eternity to
compute.
Since hyperopt uses Bayesian search, running for too many epochs may not produce greater results.
It's therefore recommended to run between 500-1000 epochs over and over until you hit at least 10.000 epocs in total (or are satisfied with the result). You can best judge by looking at the results - if the bot keeps discovering better strategies, it's best to keep on going.
It's therefore recommended to run between 500-1000 epochs over and over until you hit at least 10.000 epochs in total (or are satisfied with the result). You can best judge by looking at the results - if the bot keeps discovering better strategies, it's best to keep on going.
```bash
freqtrade hyperopt -e 1000
```
or if you want intermediate result to see
```bash
for i in {1..100}; do freqtrade hyperopt -e 1000; done
freqtrade hyperopt --hyperopt SampleHyperopt --hyperopt-loss SharpeHyperOptLossDaily --strategy SampleStrategy -e 1000
```
### Why does it take a long time to run hyperopt?
* Discovering a great strategy with Hyperopt takes time. Study www.freqtrade.io, the Freqtrade Documentation page, join the Freqtrade [Slack community](https://join.slack.com/t/highfrequencybot/shared_invite/enQtNjU5ODcwNjI1MDU3LTU1MTgxMjkzNmYxNWE1MDEzYzQ3YmU4N2MwZjUyNjJjODRkMDVkNjg4YTAyZGYzYzlhOTZiMTE4ZjQ4YzM0OGE) - or the Freqtrade [discord community](https://discord.gg/X89cVG). While you patiently wait for the most advanced, free crypto bot in the world, to hand you a possible golden strategy specially designed just for you.
* Discovering a great strategy with Hyperopt takes time. Study www.freqtrade.io, the Freqtrade Documentation page, join the Freqtrade [Slack community](https://join.slack.com/t/highfrequencybot/shared_invite/zt-k9o2v5ut-jX8Mc4CwNM8CDc2Dyg96YA) - or the Freqtrade [discord community](https://discord.gg/X89cVG). While you patiently wait for the most advanced, free crypto bot in the world, to hand you a possible golden strategy specially designed just for you.
* If you wonder why it can take from 20 minutes to days to do 1000 epocs here are some answers:
* If you wonder why it can take from 20 minutes to days to do 1000 epochs here are some answers:
This answer was written during the release 0.15.1, when we had:
- 8 triggers
- 9 guards: let's say we evaluate even 10 values from each
- 1 stoploss calculation: let's say we want 10 values from that too to be evaluated
* 8 triggers
* 9 guards: let's say we evaluate even 10 values from each
* 1 stoploss calculation: let's say we want 10 values from that too to be evaluated
The following calculation is still very rough and not very precise
but it will give the idea. With only these triggers and guards there is
already 8\*10^9\*10 evaluations. A roughly total of 80 billion evals.
Did you run 100 000 evals? Congrats, you've done roughly 1 / 100 000 th
already 8\*10^9\*10 evaluations. A roughly total of 80 billion evaluations.
Did you run 100 000 evaluations? Congrats, you've done roughly 1 / 100 000 th
of the search space, assuming that the bot never tests the same parameters more than once.
* The time it takes to run 1000 hyperopt epocs depends on things like: The available cpu, harddisk, ram, timeframe, timerange, indicator settings, indicator count, amount of coins that hyperopt test strategies on and the resulting trade count - which can be 650 trades in a year or 10.0000 trades depending if the strategy aims for big profits by trading rarely or for many low profit trades.
* The time it takes to run 1000 hyperopt epochs depends on things like: The available cpu, hard-disk, ram, timeframe, timerange, indicator settings, indicator count, amount of coins that hyperopt test strategies on and the resulting trade count - which can be 650 trades in a year or 10.0000 trades depending if the strategy aims for big profits by trading rarely or for many low profit trades.
Example: 4% profit 650 times vs 0,3% profit a trade 10.000 times in a year. If we assume you set the --timerange to 365 days.

View File

@@ -37,12 +37,20 @@ pip install -r requirements-hyperopt.txt
Before we start digging into Hyperopt, we recommend you to take a look at
the sample hyperopt file located in [user_data/hyperopts/](https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/templates/sample_hyperopt.py).
Configuring hyperopt is similar to writing your own strategy, and many tasks will be similar and a lot of code can be copied across from the strategy.
Configuring hyperopt is similar to writing your own strategy, and many tasks will be similar.
The simplest way to get started is to use `freqtrade new-hyperopt --hyperopt AwesomeHyperopt`.
This will create a new hyperopt file from a template, which will be located under `user_data/hyperopts/AwesomeHyperopt.py`.
!!! Tip "About this page"
For this page, we will be using a fictional strategy called `AwesomeStrategy` - which will be optimized using the `AwesomeHyperopt` class.
### Checklist on all tasks / possibilities in hyperopt
The simplest way to get started is to use the following, command, which will create a new hyperopt file from a template, which will be located under `user_data/hyperopts/AwesomeHyperopt.py`.
``` bash
freqtrade new-hyperopt --hyperopt AwesomeHyperopt
```
### Hyperopt checklist
Checklist on all tasks / possibilities in hyperopt
Depending on the space you want to optimize, only some of the below are required:
@@ -54,17 +62,15 @@ Depending on the space you want to optimize, only some of the below are required
!!! Note
`populate_indicators` needs to create all indicators any of thee spaces may use, otherwise hyperopt will not work.
Optional - can also be loaded from a strategy:
Optional in hyperopt - can also be loaded from a strategy (recommended):
* copy `populate_indicators` from your strategy - otherwise default-strategy will be used
* copy `populate_buy_trend` from your strategy - otherwise default-strategy will be used
* copy `populate_sell_trend` from your strategy - otherwise default-strategy will be used
!!! Note
Assuming the optional methods are not in your hyperopt file, please use `--strategy AweSomeStrategy` which contains these methods so hyperopt can use these methods instead.
* `populate_indicators` - fallback to create indicators
* `populate_buy_trend` - fallback if not optimizing for buy space. should come from strategy
* `populate_sell_trend` - fallback if not optimizing for sell space. should come from strategy
!!! Note
You always have to provide a strategy to Hyperopt, even if your custom Hyperopt class contains all methods.
Assuming the optional methods are not in your hyperopt file, please use `--strategy AweSomeStrategy` which contains these methods so hyperopt can use these methods instead.
Rarely you may also need to override:
@@ -80,36 +86,41 @@ Rarely you may also need to override:
# Have a working strategy at hand.
freqtrade new-hyperopt --hyperopt EmptyHyperopt
freqtrade hyperopt --hyperopt EmptyHyperopt --spaces roi stoploss trailing --strategy MyWorkingStrategy --config config.json -e 100
freqtrade hyperopt --hyperopt EmptyHyperopt --hyperopt-loss SharpeHyperOptLossDaily --spaces roi stoploss trailing --strategy MyWorkingStrategy --config config.json -e 100
```
### 1. Install a Custom Hyperopt File
### Create a Custom Hyperopt File
Put your hyperopt file into the directory `user_data/hyperopts`.
Let assume you want a hyperopt file `AwesomeHyperopt.py`:
Let assume you want a hyperopt file `awesome_hyperopt.py`:
Copy the file `user_data/hyperopts/sample_hyperopt.py` into `user_data/hyperopts/awesome_hyperopt.py`
``` bash
freqtrade new-hyperopt --hyperopt AwesomeHyperopt
```
### 2. Configure your Guards and Triggers
This command will create a new hyperopt file from a template, allowing you to get started quickly.
### Configure your Guards and Triggers
There are two places you need to change in your hyperopt file to add a new buy hyperopt for testing:
* Inside `indicator_space()` - the parameters hyperopt shall be optimizing.
* Inside `populate_buy_trend()` - applying the parameters.
* Within `buy_strategy_generator()` - populate the nested `populate_buy_trend()` to apply the parameters.
There you have two different types of indicators: 1. `guards` and 2. `triggers`.
1. Guards are conditions like "never buy if ADX < 10", or never buy if current price is over EMA10.
2. Triggers are ones that actually trigger buy in specific moment, like "buy when EMA5 crosses over EMA10" or "buy when close price touches lower Bollinger band".
Hyperoptimization will, for each eval round, pick one trigger and possibly
multiple guards. The constructed strategy will be something like
"*buy exactly when close price touches lower Bollinger band, BUT only if
!!! Hint "Guards and Triggers"
Technically, there is no difference between Guards and Triggers.
However, this guide will make this distinction to make it clear that signals should not be "sticking".
Sticking signals are signals that are active for multiple candles. This can lead into buying a signal late (right before the signal disappears - which means that the chance of success is a lot lower than right at the beginning).
Hyper-optimization will, for each epoch round, pick one trigger and possibly
multiple guards. The constructed strategy will be something like "*buy exactly when close price touches lower Bollinger band, BUT only if
ADX > 10*".
If you have updated the buy strategy, i.e. changed the contents of
`populate_buy_trend()` method, you have to update the `guards` and
`triggers` your hyperopt must use correspondingly.
If you have updated the buy strategy, i.e. changed the contents of `populate_buy_trend()` method, you have to update the `guards` and `triggers` your hyperopt must use correspondingly.
#### Sell optimization
@@ -117,7 +128,7 @@ Similar to the buy-signal above, sell-signals can also be optimized.
Place the corresponding settings into the following methods
* Inside `sell_indicator_space()` - the parameters hyperopt shall be optimizing.
* Inside `populate_sell_trend()` - applying the parameters.
* Within `sell_strategy_generator()` - populate the nested method `populate_sell_trend()` to apply the parameters.
The configuration and rules are the same than for buy signals.
To avoid naming collisions in the search-space, please prefix all sell-spaces with `sell-`.
@@ -126,7 +137,7 @@ To avoid naming collisions in the search-space, please prefix all sell-spaces wi
The Strategy class exposes the timeframe value as the `self.timeframe` attribute.
The same value is available as class-attribute `HyperoptName.timeframe`.
In the case of the linked sample-value this would be `SampleHyperOpt.timeframe`.
In the case of the linked sample-value this would be `AwesomeHyperopt.timeframe`.
## Solving a Mystery
@@ -162,6 +173,11 @@ one we call `trigger` and use it to decide which buy trigger we want to use.
So let's write the buy strategy using these values:
```python
@staticmethod
def buy_strategy_generator(params: Dict[str, Any]) -> Callable:
"""
Define the buy strategy parameters to be used by Hyperopt.
"""
def populate_buy_trend(dataframe: DataFrame) -> DataFrame:
conditions = []
# GUARDS AND TRENDS
@@ -192,27 +208,25 @@ So let's write the buy strategy using these values:
return populate_buy_trend
```
Hyperopting will now call this `populate_buy_trend` as many times you ask it (`epochs`)
with different value combinations. It will then use the given historical data and make
buys based on the buy signals generated with the above function and based on the results
it will end with telling you which parameter combination produced the best profits.
Hyperopt will now call `populate_buy_trend()` many times (`epochs`) with different value combinations.
It will use the given historical data and make buys based on the buy signals generated with the above function.
Based on the results, hyperopt will tell you which parameter combination produced the best results (based on the configured [loss function](#loss-functions)).
!!! Note
The above setup expects to find ADX, RSI and Bollinger Bands in the populated indicators.
When you want to test an indicator that isn't used by the bot currently, remember to
add it to the `populate_indicators()` method in your custom hyperopt file.
add it to the `populate_indicators()` method in your strategy or hyperopt file.
## Loss-functions
Each hyperparameter tuning requires a target. This is usually defined as a loss function (sometimes also called objective function), which should decrease for more desirable results, and increase for bad results.
By default, Freqtrade uses a loss function, which has been with freqtrade since the beginning and optimizes mostly for short trade duration and avoiding losses.
A different loss function can be specified by using the `--hyperopt-loss <Class-name>` argument.
A loss function must be specified via the `--hyperopt-loss <Class-name>` argument (or optionally via the configuration under the `"hyperopt_loss"` key).
This class should be in its own file within the `user_data/hyperopts/` directory.
Currently, the following loss functions are builtin:
* `DefaultHyperOptLoss` (default legacy Freqtrade hyperoptimization loss function)
* `ShortTradeDurHyperOptLoss` (default legacy Freqtrade hyperoptimization loss function) - Mostly for short trade duration and avoiding losses.
* `OnlyProfitHyperOptLoss` (which takes only amount of profit into consideration)
* `SharpeHyperOptLoss` (optimizes Sharpe Ratio calculated on trade returns relative to standard deviation)
* `SharpeHyperOptLossDaily` (optimizes Sharpe Ratio calculated on **daily** trade returns relative to standard deviation)
@@ -229,21 +243,20 @@ Because hyperopt tries a lot of combinations to find the best parameters it will
We strongly recommend to use `screen` or `tmux` to prevent any connection loss.
```bash
freqtrade hyperopt --config config.json --hyperopt <hyperoptname> -e 5000 --spaces all
freqtrade hyperopt --config config.json --hyperopt <hyperoptname> --hyperopt-loss <hyperoptlossname> --strategy <strategyname> -e 500 --spaces all
```
Use `<hyperoptname>` as the name of the custom hyperopt used.
The `-e` option will set how many evaluations hyperopt will do. We recommend
running at least several thousand evaluations.
The `-e` option will set how many evaluations hyperopt will do. Since hyperopt uses Bayesian search, running too many epochs at once may not produce greater results. Experience has shown that best results are usually not improving much after 500-1000 epochs.
Doing multiple runs (executions) with a few 1000 epochs and different random state will most likely produce different results.
The `--spaces all` option determines that all possible parameters should be optimized. Possibilities are listed below.
!!! Note
By default, hyperopt will erase previous results and start from scratch. Continuation can be archived by using `--continue`.
!!! Warning
When switching parameters or changing configuration options, make sure to not use the argument `--continue` so temporary results can be removed.
Hyperopt will store hyperopt results with the timestamp of the hyperopt start time.
Reading commands (`hyperopt-list`, `hyperopt-show`) can use `--hyperopt-filename <filename>` to read and display older hyperopt results.
You can find a list of filenames with `ls -l user_data/hyperopt_results/`.
### Execute Hyperopt with different historical data source
@@ -251,13 +264,13 @@ If you would like to hyperopt parameters using an alternate historical data set
you have on-disk, use the `--datadir PATH` option. By default, hyperopt
uses data from directory `user_data/data`.
### Running Hyperopt with Smaller Testset
### Running Hyperopt with a smaller test-set
Use the `--timerange` argument to change how much of the testset you want to use.
Use the `--timerange` argument to change how much of the test-set you want to use.
For example, to use one month of data, pass the following parameter to the hyperopt call:
```bash
freqtrade hyperopt --timerange 20180401-20180501
freqtrade hyperopt --hyperopt <hyperoptname> --strategy <strategyname> --timerange 20180401-20180501
```
### Running Hyperopt using methods from a strategy
@@ -265,16 +278,15 @@ freqtrade hyperopt --timerange 20180401-20180501
Hyperopt can reuse `populate_indicators`, `populate_buy_trend`, `populate_sell_trend` from your strategy, assuming these methods are **not** in your custom hyperopt file, and a strategy is provided.
```bash
freqtrade hyperopt --strategy SampleStrategy --hyperopt SampleHyperopt
freqtrade hyperopt --hyperopt AwesomeHyperopt --hyperopt-loss SharpeHyperOptLossDaily --strategy AwesomeStrategy
```
### Running Hyperopt with Smaller Search Space
Use the `--spaces` option to limit the search space used by hyperopt.
Letting Hyperopt optimize everything is a huuuuge search space. Often it
might make more sense to start by just searching for initial buy algorithm.
Or maybe you just want to optimize your stoploss or roi table for that awesome
new buy strategy you have.
Letting Hyperopt optimize everything is a huuuuge search space.
Often it might make more sense to start by just searching for initial buy algorithm.
Or maybe you just want to optimize your stoploss or roi table for that awesome new buy strategy you have.
Legal values are:
@@ -318,7 +330,7 @@ The initial state for generation of these random values (random state) is contro
If you have not set this value explicitly in the command line options, Hyperopt seeds the random state with some random value for you. The random state value for each Hyperopt run is shown in the log, so you can copy and paste it into the `--random-state` command line option to repeat the set of the initial random epochs used.
If you have not changed anything in the command line options, configuration, timerange, Strategy and Hyperopt classes, historical data and the Loss Function -- you should obtain same hyperoptimization results with same random state value used.
If you have not changed anything in the command line options, configuration, timerange, Strategy and Hyperopt classes, historical data and the Loss Function -- you should obtain same hyper-optimization results with same random state value used.
## Understand the Hyperopt Result
@@ -371,7 +383,7 @@ By default, hyperopt prints colorized results -- epochs with positive profit are
You can use the `--print-all` command line option if you would like to see all results in the hyperopt output, not only the best ones. When `--print-all` is used, current best results are also colorized by default -- they are printed in bold (bright) style. This can also be switched off with the `--no-color` command line option.
!!! Note "Windows and color output"
Windows does not support color-output nativly, therefore it is automatically disabled. To have color-output for hyperopt running under windows, please consider using WSL.
Windows does not support color-output natively, therefore it is automatically disabled. To have color-output for hyperopt running under windows, please consider using WSL.
### Understand Hyperopt ROI results
@@ -419,7 +431,9 @@ These ranges should be sufficient in most cases. The minutes in the steps (ROI d
If you have the `generate_roi_table()` and `roi_space()` methods in your custom hyperopt file, remove them in order to utilize these adaptive ROI tables and the ROI hyperoptimization space generated by Freqtrade by default.
Override the `roi_space()` method if you need components of the ROI tables to vary in other ranges. Override the `generate_roi_table()` and `roi_space()` methods and implement your own custom approach for generation of the ROI tables during hyperoptimization if you need a different structure of the ROI tables or other amount of rows (steps). A sample for these methods can be found in [user_data/hyperopts/sample_hyperopt_advanced.py](https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/templates/sample_hyperopt_advanced.py).
Override the `roi_space()` method if you need components of the ROI tables to vary in other ranges. Override the `generate_roi_table()` and `roi_space()` methods and implement your own custom approach for generation of the ROI tables during hyperoptimization if you need a different structure of the ROI tables or other amount of rows (steps).
A sample for these methods can be found in [sample_hyperopt_advanced.py](https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/templates/sample_hyperopt_advanced.py).
### Understand Hyperopt Stoploss results
@@ -441,7 +455,7 @@ Stoploss: -0.27996
In order to use this best stoploss value found by Hyperopt in backtesting and for live trades/dry-run, copy-paste it as the value of the `stoploss` attribute of your custom strategy:
```
``` python
# Optimal stoploss designed for the strategy
# This attribute will be overridden if the config file contains "stoploss"
stoploss = -0.27996
@@ -475,7 +489,7 @@ Trailing stop:
In order to use these best trailing stop parameters found by Hyperopt in backtesting and for live trades/dry-run, copy-paste them as the values of the corresponding attributes of your custom strategy:
```
``` python
# Trailing stop
# These attributes will be overridden if the config file contains corresponding values.
trailing_stop = True
@@ -494,10 +508,14 @@ Override the `trailing_space()` method and define the desired range in it if you
## Show details of Hyperopt results
After you run Hyperopt for the desired amount of epochs, you can later list all results for analysis, select only best or profitable once, and show the details for any of the epochs previously evaluated. This can be done with the `hyperopt-list` and `hyperopt-show` subcommands. The usage of these subcommands is described in the [Utils](utils.md#list-hyperopt-results) chapter.
After you run Hyperopt for the desired amount of epochs, you can later list all results for analysis, select only best or profitable once, and show the details for any of the epochs previously evaluated. This can be done with the `hyperopt-list` and `hyperopt-show` sub-commands. The usage of these sub-commands is described in the [Utils](utils.md#list-hyperopt-results) chapter.
## Validate backtesting results
Once the optimized strategy has been implemented into your strategy, you should backtest this strategy to make sure everything is working as expected.
To achieve same results (number of trades, their durations, profit, etc.) than during Hyperopt, please use same set of arguments `--dmmp`/`--disable-max-market-positions` and `--eps`/`--enable-position-stacking` for Backtesting.
To achieve same results (number of trades, their durations, profit, etc.) than during Hyperopt, please use same configuration and parameters (timerange, timeframe, ...) used for hyperopt `--dmmp`/`--disable-max-market-positions` and `--eps`/`--enable-position-stacking` for Backtesting.
Should results don't match, please double-check to make sure you transferred all conditions correctly.
Pay special care to the stoploss (and trailing stoploss) parameters, as these are often set in configuration files, which override changes to the strategy.
You should also carefully review the log of your backtest to ensure that there were no parameters inadvertently set by the configuration (like `stoploss` or `trailing_stop`).

186
docs/includes/pairlists.md Normal file
View File

@@ -0,0 +1,186 @@
## Pairlists and Pairlist Handlers
Pairlist Handlers define the list of pairs (pairlist) that the bot should trade. They are configured in the `pairlists` section of the configuration settings.
In your configuration, you can use Static Pairlist (defined by the [`StaticPairList`](#static-pair-list) Pairlist Handler) and Dynamic Pairlist (defined by the [`VolumePairList`](#volume-pair-list) Pairlist Handler).
Additionally, [`AgeFilter`](#agefilter), [`PrecisionFilter`](#precisionfilter), [`PriceFilter`](#pricefilter), [`ShuffleFilter`](#shufflefilter) and [`SpreadFilter`](#spreadfilter) act as Pairlist Filters, removing certain pairs and/or moving their positions in the pairlist.
If multiple Pairlist Handlers are used, they are chained and a combination of all Pairlist Handlers forms the resulting pairlist the bot uses for trading and backtesting. Pairlist Handlers are executed in the sequence they are configured. You should always configure either `StaticPairList` or `VolumePairList` as the starting Pairlist Handler.
Inactive markets are always removed from the resulting pairlist. Explicitly blacklisted pairs (those in the `pair_blacklist` configuration setting) are also always removed from the resulting pairlist.
### Available Pairlist Handlers
* [`StaticPairList`](#static-pair-list) (default, if not configured differently)
* [`VolumePairList`](#volume-pair-list)
* [`AgeFilter`](#agefilter)
* [`PerformanceFilter`](#performancefilter)
* [`PrecisionFilter`](#precisionfilter)
* [`PriceFilter`](#pricefilter)
* [`ShuffleFilter`](#shufflefilter)
* [`SpreadFilter`](#spreadfilter)
* [`RangeStabilityFilter`](#rangestabilityfilter)
!!! Tip "Testing pairlists"
Pairlist configurations can be quite tricky to get right. Best use the [`test-pairlist`](utils.md#test-pairlist) utility sub-command to test your configuration quickly.
#### Static Pair List
By default, the `StaticPairList` method is used, which uses a statically defined pair whitelist from the configuration.
It uses configuration from `exchange.pair_whitelist` and `exchange.pair_blacklist`.
```json
"pairlists": [
{"method": "StaticPairList"}
],
```
By default, only currently enabled pairs are allowed.
To skip pair validation against active markets, set `"allow_inactive": true` within the `StaticPairList` configuration.
This can be useful for backtesting expired pairs (like quarterly spot-markets).
This option must be configured along with `exchange.skip_pair_validation` in the exchange configuration.
#### Volume Pair List
`VolumePairList` employs sorting/filtering of pairs by their trading volume. It selects `number_assets` top pairs with sorting based on the `sort_key` (which can only be `quoteVolume`).
When used in the chain of Pairlist Handlers in a non-leading position (after StaticPairList and other Pairlist Filters), `VolumePairList` considers outputs of previous Pairlist Handlers, adding its sorting/selection of the pairs by the trading volume.
When used on the leading position of the chain of Pairlist Handlers, it does not consider `pair_whitelist` configuration setting, but selects the top assets from all available markets (with matching stake-currency) on the exchange.
The `refresh_period` setting allows to define the period (in seconds), at which the pairlist will be refreshed. Defaults to 1800s (30 minutes).
`VolumePairList` is based on the ticker data from exchange, as reported by the ccxt library:
* The `quoteVolume` is the amount of quote (stake) currency traded (bought or sold) in last 24 hours.
```json
"pairlists": [{
"method": "VolumePairList",
"number_assets": 20,
"sort_key": "quoteVolume",
"refresh_period": 1800
}],
```
!!! Note
`VolumePairList` does not support backtesting mode.
#### AgeFilter
Removes pairs that have been listed on the exchange for less than `min_days_listed` days (defaults to `10`).
When pairs are first listed on an exchange they can suffer huge price drops and volatility
in the first few days while the pair goes through its price-discovery period. Bots can often
be caught out buying before the pair has finished dropping in price.
This filter allows freqtrade to ignore pairs until they have been listed for at least `min_days_listed` days.
#### PerformanceFilter
Sorts pairs by past trade performance, as follows:
1. Positive performance.
2. No closed trades yet.
3. Negative performance.
Trade count is used as a tie breaker.
!!! Note
`PerformanceFilter` does not support backtesting mode.
#### PrecisionFilter
Filters low-value coins which would not allow setting stoplosses.
#### PriceFilter
The `PriceFilter` allows filtering of pairs by price. Currently the following price filters are supported:
* `min_price`
* `max_price`
* `low_price_ratio`
The `min_price` setting removes pairs where the price is below the specified price. This is useful if you wish to avoid trading very low-priced pairs.
This option is disabled by default, and will only apply if set to > 0.
The `max_price` setting removes pairs where the price is above the specified price. This is useful if you wish to trade only low-priced pairs.
This option is disabled by default, and will only apply if set to > 0.
The `low_price_ratio` setting removes pairs where a raise of 1 price unit (pip) is above the `low_price_ratio` ratio.
This option is disabled by default, and will only apply if set to > 0.
For `PriceFiler` at least one of its `min_price`, `max_price` or `low_price_ratio` settings must be applied.
Calculation example:
Min price precision for SHITCOIN/BTC is 8 decimals. If its price is 0.00000011 - one price step above would be 0.00000012, which is ~9% higher than the previous price value. You may filter out this pair by using PriceFilter with `low_price_ratio` set to 0.09 (9%) or with `min_price` set to 0.00000011, correspondingly.
!!! Warning "Low priced pairs"
Low priced pairs with high "1 pip movements" are dangerous since they are often illiquid and it may also be impossible to place the desired stoploss, which can often result in high losses since price needs to be rounded to the next tradable price - so instead of having a stoploss of -5%, you could end up with a stoploss of -9% simply due to price rounding.
#### ShuffleFilter
Shuffles (randomizes) pairs in the pairlist. It can be used for preventing the bot from trading some of the pairs more frequently then others when you want all pairs be treated with the same priority.
!!! Tip
You may set the `seed` value for this Pairlist to obtain reproducible results, which can be useful for repeated backtesting sessions. If `seed` is not set, the pairs are shuffled in the non-repeatable random order.
#### SpreadFilter
Removes pairs that have a difference between asks and bids above the specified ratio, `max_spread_ratio` (defaults to `0.005`).
Example:
If `DOGE/BTC` maximum bid is 0.00000026 and minimum ask is 0.00000027, the ratio is calculated as: `1 - bid/ask ~= 0.037` which is `> 0.005` and this pair will be filtered out.
#### RangeStabilityFilter
Removes pairs where the difference between lowest low and highest high over `lookback_days` days is below `min_rate_of_change`. Since this is a filter that requires additional data, the results are cached for `refresh_period`.
In the below example:
If the trading range over the last 10 days is <1%, remove the pair from the whitelist.
```json
"pairlists": [
{
"method": "RangeStabilityFilter",
"lookback_days": 10,
"min_rate_of_change": 0.01,
"refresh_period": 1440
}
]
```
!!! Tip
This Filter can be used to automatically remove stable coin pairs, which have a very low trading range, and are therefore extremely difficult to trade with profit.
### Full example of Pairlist Handlers
The below example blacklists `BNB/BTC`, uses `VolumePairList` with `20` assets, sorting pairs by `quoteVolume` and applies both [`PrecisionFilter`](#precisionfilter) and [`PriceFilter`](#price-filter), filtering all assets where 1 price unit is > 1%. Then the `SpreadFilter` is applied and pairs are finally shuffled with the random seed set to some predefined value.
```json
"exchange": {
"pair_whitelist": [],
"pair_blacklist": ["BNB/BTC"]
},
"pairlists": [
{
"method": "VolumePairList",
"number_assets": 20,
"sort_key": "quoteVolume",
},
{"method": "AgeFilter", "min_days_listed": 10},
{"method": "PrecisionFilter"},
{"method": "PriceFilter", "low_price_ratio": 0.01},
{"method": "SpreadFilter", "max_spread_ratio": 0.005},
{
"method": "RangeStabilityFilter",
"lookback_days": 10,
"min_rate_of_change": 0.01,
"refresh_period": 1440
},
{"method": "ShuffleFilter", "seed": 42}
],
```

View File

@@ -0,0 +1,169 @@
## Protections
!!! Warning "Beta feature"
This feature is still in it's testing phase. Should you notice something you think is wrong please let us know via Discord, Slack or via Github Issue.
Protections will protect your strategy from unexpected events and market conditions by temporarily stop trading for either one pair, or for all pairs.
All protection end times are rounded up to the next candle to avoid sudden, unexpected intra-candle buys.
!!! Note
Not all Protections will work for all strategies, and parameters will need to be tuned for your strategy to improve performance.
!!! Tip
Each Protection can be configured multiple times with different parameters, to allow different levels of protection (short-term / long-term).
!!! Note "Backtesting"
Protections are supported by backtesting and hyperopt, but must be explicitly enabled by using the `--enable-protections` flag.
### Available Protections
* [`StoplossGuard`](#stoploss-guard) Stop trading if a certain amount of stoploss occurred within a certain time window.
* [`MaxDrawdown`](#maxdrawdown) Stop trading if max-drawdown is reached.
* [`LowProfitPairs`](#low-profit-pairs) Lock pairs with low profits
* [`CooldownPeriod`](#cooldown-period) Don't enter a trade right after selling a trade.
### Common settings to all Protections
| Parameter| Description |
|------------|-------------|
| `method` | Protection name to use. <br> **Datatype:** String, selected from [available Protections](#available-protections)
| `stop_duration_candles` | For how many candles should the lock be set? <br> **Datatype:** Positive integer (in candles)
| `stop_duration` | how many minutes should protections be locked. <br>Cannot be used together with `stop_duration_candles`. <br> **Datatype:** Float (in minutes)
| `lookback_period_candles` | Only trades that completed within the last `lookback_period_candles` candles will be considered. This setting may be ignored by some Protections. <br> **Datatype:** Positive integer (in candles).
| `lookback_period` | Only trades that completed after `current_time - lookback_period` will be considered. <br>Cannot be used together with `lookback_period_candles`. <br>This setting may be ignored by some Protections. <br> **Datatype:** Float (in minutes)
| `trade_limit` | Number of trades required at minimum (not used by all Protections). <br> **Datatype:** Positive integer
!!! Note "Durations"
Durations (`stop_duration*` and `lookback_period*` can be defined in either minutes or candles).
For more flexibility when testing different timeframes, all below examples will use the "candle" definition.
#### Stoploss Guard
`StoplossGuard` selects all trades within `lookback_period`, and determines if the amount of trades that resulted in stoploss are above `trade_limit` - in which case trading will stop for `stop_duration`.
This applies across all pairs, unless `only_per_pair` is set to true, which will then only look at one pair at a time.
The below example stops trading for all pairs for 4 candles after the last trade if the bot hit stoploss 4 times within the last 24 candles.
```json
"protections": [
{
"method": "StoplossGuard",
"lookback_period_candles": 24,
"trade_limit": 4,
"stop_duration_candles": 4,
"only_per_pair": false
}
],
```
!!! Note
`StoplossGuard` considers all trades with the results `"stop_loss"` and `"trailing_stop_loss"` if the resulting profit was negative.
`trade_limit` and `lookback_period` will need to be tuned for your strategy.
#### MaxDrawdown
`MaxDrawdown` uses all trades within `lookback_period` (in minutes) to determine the maximum drawdown. If the drawdown is below `max_allowed_drawdown`, trading will stop for `stop_duration` (in minutes) after the last trade - assuming that the bot needs some time to let markets recover.
The below sample stops trading for 12 candles if max-drawdown is > 20% considering all trades within the last 48 candles.
```json
"protections": [
{
"method": "MaxDrawdown",
"lookback_period_candles": 48,
"trade_limit": 20,
"stop_duration_candles": 12,
"max_allowed_drawdown": 0.2
},
],
```
#### Low Profit Pairs
`LowProfitPairs` uses all trades for a pair within `lookback_period` (in minutes) to determine the overall profit ratio.
If that ratio is below `required_profit`, that pair will be locked for `stop_duration` (in minutes).
The below example will stop trading a pair for 60 minutes if the pair does not have a required profit of 2% (and a minimum of 2 trades) within the last 6 candles.
```json
"protections": [
{
"method": "LowProfitPairs",
"lookback_period_candles": 6,
"trade_limit": 2,
"stop_duration": 60,
"required_profit": 0.02
}
],
```
#### Cooldown Period
`CooldownPeriod` locks a pair for `stop_duration` (in minutes) after selling, avoiding a re-entry for this pair for `stop_duration` minutes.
The below example will stop trading a pair for 2 candles after closing a trade, allowing this pair to "cool down".
```json
"protections": [
{
"method": "CooldownPeriod",
"stop_duration_candles": 2
}
],
```
!!! Note
This Protection applies only at pair-level, and will never lock all pairs globally.
This Protection does not consider `lookback_period` as it only looks at the latest trade.
### Full example of Protections
All protections can be combined at will, also with different parameters, creating a increasing wall for under-performing pairs.
All protections are evaluated in the sequence they are defined.
The below example assumes a timeframe of 1 hour:
* Locks each pair after selling for an additional 5 candles (`CooldownPeriod`), giving other pairs a chance to get filled.
* Stops trading for 4 hours (`4 * 1h candles`) if the last 2 days (`48 * 1h candles`) had 20 trades, which caused a max-drawdown of more than 20%. (`MaxDrawdown`).
* Stops trading if more than 4 stoploss occur for all pairs within a 1 day (`24 * 1h candles`) limit (`StoplossGuard`).
* Locks all pairs that had 4 Trades within the last 6 hours (`6 * 1h candles`) with a combined profit ratio of below 0.02 (<2%) (`LowProfitPairs`).
* Locks all pairs for 2 candles that had a profit of below 0.01 (<1%) within the last 24h (`24 * 1h candles`), a minimum of 4 trades.
```json
"timeframe": "1h",
"protections": [
{
"method": "CooldownPeriod",
"stop_duration_candles": 5
},
{
"method": "MaxDrawdown",
"lookback_period_candles": 48,
"trade_limit": 20,
"stop_duration_candles": 4,
"max_allowed_drawdown": 0.2
},
{
"method": "StoplossGuard",
"lookback_period_candles": 24,
"trade_limit": 4,
"stop_duration_candles": 2,
"only_per_pair": false
},
{
"method": "LowProfitPairs",
"lookback_period_candles": 6,
"trade_limit": 2,
"stop_duration_candles": 60,
"required_profit": 0.02
},
{
"method": "LowProfitPairs",
"lookback_period_candles": 24,
"trade_limit": 4,
"stop_duration_candles": 2,
"required_profit": 0.01
}
],
```

View File

@@ -8,13 +8,13 @@
<!-- Place this tag where you want the button to render. -->
<a class="github-button" href="https://github.com/freqtrade/freqtrade/fork" data-icon="octicon-repo-forked" data-size="large" aria-label="Fork freqtrade/freqtrade on GitHub">Fork</a>
<!-- Place this tag where you want the button to render. -->
<a class="github-button" href="https://github.com/freqtrade/freqtrade/archive/master.zip" data-icon="octicon-cloud-download" data-size="large" aria-label="Download freqtrade/freqtrade on GitHub">Download</a>
<a class="github-button" href="https://github.com/freqtrade/freqtrade/archive/stable.zip" data-icon="octicon-cloud-download" data-size="large" aria-label="Download freqtrade/freqtrade on GitHub">Download</a>
<!-- Place this tag where you want the button to render. -->
<a class="github-button" href="https://github.com/freqtrade" data-size="large" aria-label="Follow @freqtrade on GitHub">Follow @freqtrade</a>
## Introduction
Freqtrade is a crypto-currency algorithmic trading software developed in python (3.6+) and supported on Windows, macOS and Linux.
Freqtrade is a crypto-currency algorithmic trading software developed in python (3.7+) and supported on Windows, macOS and Linux.
!!! Danger "DISCLAIMER"
This software is for educational purposes only. Do not risk money which you are afraid to lose. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS.
@@ -37,13 +37,9 @@ Freqtrade is a crypto-currency algorithmic trading software developed in python
## Requirements
### Up to date clock
The clock on the system running the bot must be accurate, synchronized to a NTP server frequently enough to avoid problems with communication to the exchanges.
### Hardware requirements
To run this bot we recommend you a cloud instance with a minimum of:
To run this bot we recommend you a linux cloud instance with a minimum of:
- 2GB RAM
- 1GB disk space
@@ -55,7 +51,7 @@ To run this bot we recommend you a cloud instance with a minimum of:
Alternatively
- Python 3.6.x
- Python 3.7+
- pip (pip3)
- git
- TA-Lib
@@ -63,11 +59,14 @@ Alternatively
## Support
### Help / Slack
For any questions not covered by the documentation or for further information about the bot, we encourage you to join our passionate Slack community.
### Help / Discord / Slack
Click [here](https://join.slack.com/t/highfrequencybot/shared_invite/enQtNjU5ODcwNjI1MDU3LTU1MTgxMjkzNmYxNWE1MDEzYzQ3YmU4N2MwZjUyNjJjODRkMDVkNjg4YTAyZGYzYzlhOTZiMTE4ZjQ4YzM0OGE) to join the Freqtrade Slack channel.
For any questions not covered by the documentation or for further information about the bot, or to simply engage with like-minded individuals, we encourage you to join our slack channel.
Please check out our [discord server](https://discord.gg/MA9v74M).
You can also join our [Slack channel](https://join.slack.com/t/highfrequencybot/shared_invite/zt-k9o2v5ut-jX8Mc4CwNM8CDc2Dyg96YA).
## Ready to try?
Begin by reading our installation guide [for docker](docker.md), or for [installation without docker](installation.md).
Begin by reading our installation guide [for docker](docker_quickstart.md) (recommended), or for [installation without docker](installation.md).

View File

@@ -10,7 +10,7 @@ Please consider using the prebuilt [docker images](docker.md) to get started qui
Click each one for install guide:
* [Python >= 3.6.x](http://docs.python-guide.org/en/latest/starting/installation/)
* [Python >= 3.7.x](http://docs.python-guide.org/en/latest/starting/installation/)
* [pip](https://pip.pypa.io/en/stable/installing/)
* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [virtualenv](https://virtualenv.pypa.io/en/stable/installation.html) (Recommended)
@@ -18,6 +18,9 @@ Click each one for install guide:
We also recommend a [Telegram bot](telegram-usage.md#setup-your-telegram-bot), which is optional but recommended.
!!! Warning "Up-to-date clock"
The clock on the system running the bot must be accurate, synchronized to a NTP server frequently enough to avoid problems with communication to the exchanges.
## Quick start
Freqtrade provides the Linux/MacOS Easy Installation script to install all dependencies and help you configure the bot.
@@ -28,21 +31,21 @@ Freqtrade provides the Linux/MacOS Easy Installation script to install all depen
The easiest way to install and run Freqtrade is to clone the bot Github repository and then run the Easy Installation script, if it's available for your platform.
!!! Note "Version considerations"
When cloning the repository the default working branch has the name `develop`. This branch contains all last features (can be considered as relatively stable, thanks to automated tests). The `master` branch contains the code of the last release (done usually once per month on an approximately one week old snapshot of the `develop` branch to prevent packaging bugs, so potentially it's more stable).
When cloning the repository the default working branch has the name `develop`. This branch contains all last features (can be considered as relatively stable, thanks to automated tests). The `stable` branch contains the code of the last release (done usually once per month on an approximately one week old snapshot of the `develop` branch to prevent packaging bugs, so potentially it's more stable).
!!! Note
Python3.6 or higher and the corresponding `pip` are assumed to be available. The install-script will warn you and stop if that's not the case. `git` is also needed to clone the Freqtrade repository.
Python3.7 or higher and the corresponding `pip` are assumed to be available. The install-script will warn you and stop if that's not the case. `git` is also needed to clone the Freqtrade repository.
This can be achieved with the following commands:
```bash
git clone https://github.com/freqtrade/freqtrade.git
cd freqtrade
git checkout master # Optional, see (1)
# git checkout stable # Optional, see (1)
./setup.sh --install
```
(1) This command switches the cloned repository to the use of the `master` branch. It's not needed if you wish to stay on the `develop` branch. You may later switch between branches at any time with the `git checkout master`/`git checkout develop` commands.
(1) This command switches the cloned repository to the use of the `stable` branch. It's not needed if you wish to stay on the `develop` branch. You may later switch between branches at any time with the `git checkout stable`/`git checkout develop` commands.
## Easy Installation Script (Linux/MacOS)
@@ -53,14 +56,14 @@ $ ./setup.sh
usage:
-i,--install Install freqtrade from scratch
-u,--update Command git pull to update.
-r,--reset Hard reset your develop/master branch.
-r,--reset Hard reset your develop/stable branch.
-c,--config Easy config generator (Will override your existing file).
```
** --install **
With this option, the script will install the bot and most dependencies:
You will need to have git and python3.6+ installed beforehand for this to work.
You will need to have git and python3.7+ installed beforehand for this to work.
* Mandatory software as: `ta-lib`
* Setup your virtualenv under `.env/`
@@ -73,24 +76,27 @@ This option will pull the last version of your current branch and update your vi
** --reset **
This option will hard reset your branch (only if you are on either `master` or `develop`) and recreate your virtualenv.
This option will hard reset your branch (only if you are on either `stable` or `develop`) and recreate your virtualenv.
** --config **
DEPRECATED - use `freqtrade new-config -c config.json` instead.
### Activate your virtual environment
Each time you open a new terminal, you must run `source .env/bin/activate`.
------
## Custom Installation
We've included/collected install instructions for Ubuntu 16.04, MacOS, and Windows. These are guidelines and your success may vary with other distros.
We've included/collected install instructions for Ubuntu, MacOS, and Windows. These are guidelines and your success may vary with other distros.
OS Specific steps are listed first, the [Common](#common) section below is necessary for all systems.
!!! Note
Python3.6 or higher and the corresponding pip are assumed to be available.
### Linux - Ubuntu 16.04
Python3.7 or higher and the corresponding pip are assumed to be available.
=== "Ubuntu/Debian"
#### Install necessary dependencies
```bash
@@ -98,15 +104,18 @@ sudo apt-get update
sudo apt-get install build-essential git
```
### Raspberry Pi / Raspbian
The following assumes the latest [Raspbian Buster lite image](https://www.raspberrypi.org/downloads/raspbian/) from at least September 2019.
=== "RaspberryPi/Raspbian"
The following assumes the latest [Raspbian Buster lite image](https://www.raspberrypi.org/downloads/raspbian/).
This image comes with python3.7 preinstalled, making it easy to get freqtrade up and running.
Tested using a Raspberry Pi 3 with the Raspbian Buster lite image, all updates applied.
``` bash
sudo apt-get install python3-venv libatlas-base-dev
sudo apt-get install python3-venv libatlas-base-dev cmake
# Use pywheels.org to speed up installation
sudo echo "[global]\nextra-index-url=https://www.piwheels.org/simple" > tee /etc/pip.conf
git clone https://github.com/freqtrade/freqtrade.git
cd freqtrade
@@ -115,6 +124,7 @@ bash setup.sh -i
!!! Note "Installation duration"
Depending on your internet speed and the Raspberry Pi version, installation can take multiple hours to complete.
Due to this, we recommend to use the prebuild docker-image for Raspberry, by following the [Docker quickstart documentation](docker_quickstart.md)
!!! Note
The above does not install hyperopt dependencies. To install these, please use `python3 -m pip install -e .[hyperopt]`.
@@ -169,12 +179,7 @@ Clone the git repository:
```bash
git clone https://github.com/freqtrade/freqtrade.git
cd freqtrade
```
Optionally checkout the master branch to get the latest stable release:
```bash
git checkout master
git checkout stable
```
#### 4. Install python dependencies
@@ -212,72 +217,18 @@ On Linux, as an optional post-installation task, you may wish to setup the bot t
------
## Using Conda
### Anaconda
Freqtrade can also be installed using Anaconda (or Miniconda).
!!! Note
This requires the [ta-lib](#1-install-ta-lib) C-library to be installed first. See below.
``` bash
conda env create -f environment.yml
```
!!! Note
This requires the [ta-lib](#1-install-ta-lib) C-library to be installed first.
## Windows
We recommend that Windows users use [Docker](docker.md) as this will work much easier and smoother (also more secure).
If that is not possible, try using the Windows Linux subsystem (WSL) - for which the Ubuntu instructions should work.
If that is not available on your system, feel free to try the instructions below, which led to success for some.
### Install freqtrade manually
!!! Note
Make sure to use 64bit Windows and 64bit Python to avoid problems with backtesting or hyperopt due to the memory constraints 32bit applications have under Windows.
!!! Hint
Using the [Anaconda Distribution](https://www.anaconda.com/distribution/) under Windows can greatly help with installation problems. Check out the [Conda section](#using-conda) in this document for more information.
#### Clone the git repository
```bash
git clone https://github.com/freqtrade/freqtrade.git
```
#### Install ta-lib
Install ta-lib according to the [ta-lib documentation](https://github.com/mrjbq7/ta-lib#windows).
As compiling from source on windows has heavy dependencies (requires a partial visual studio installation), there is also a repository of unofficial precompiled windows Wheels [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib), which needs to be downloaded and installed using `pip install TA_Lib0.4.18cp38cp38win_amd64.whl` (make sure to use the version matching your python version)
```cmd
>cd \path\freqtrade-develop
>python -m venv .env
>.env\Scripts\activate.bat
REM optionally install ta-lib from wheel
REM >pip install TA_Lib0.4.18cp38cp38win_amd64.whl
>pip install -r requirements.txt
>pip install -e .
>freqtrade
```
> Thanks [Owdr](https://github.com/Owdr) for the commands. Source: [Issue #222](https://github.com/freqtrade/freqtrade/issues/222)
#### Error during installation under Windows
``` bash
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
```
Unfortunately, many packages requiring compilation don't provide a pre-build wheel. It is therefore mandatory to have a C/C++ compiler installed and available for your python environment to use.
The easiest way is to download install Microsoft Visual Studio Community [here](https://visualstudio.microsoft.com/downloads/) and make sure to install "Common Tools for Visual C++" to enable building c code on Windows. Unfortunately, this is a heavy download / dependency (~4Gb) so you might want to consider WSL or [docker](docker.md) first.
---
Now you have an environment ready, the next step is
[Bot Configuration](configuration.md).
-----
## Troubleshooting
### MacOS installation error
@@ -291,4 +242,9 @@ For MacOS 10.14, this can be accomplished with the below command.
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
```
If this file is inexistant, then you're probably on a different version of MacOS, so you may need to consult the internet for specific resolution details.
If this file is inexistent, then you're probably on a different version of MacOS, so you may need to consult the internet for specific resolution details.
-----
Now you have an environment ready, the next step is
[Bot Configuration](configuration.md).

View File

@@ -0,0 +1,12 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

View File

@@ -1,51 +1,48 @@
{#-
This file was automatically generated - do not edit
-#}
{% set site_url = config.site_url | d(nav.homepage.url, true) | url %}
{% if not config.use_directory_urls and site_url[0] == site_url[-1] == "." %}
{% set site_url = site_url ~ "/index.html" %}
{% endif %}
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}"
class="md-header-nav__button md-logo">
{% if config.theme.logo.icon %}
<i class="md-icon">{{ config.theme.logo.icon }}</i>
{% else %}
<img src="{{ config.theme.logo | url }}" width="24" height="24">
{% endif %}
<nav class="md-header-nav md-grid" aria-label="{{ lang.t('header.title') }}">
<a href="{{ site_url }}" title="{{ config.site_name | e }}" class="md-header-nav__button md-logo"
aria-label="{{ config.site_name }}">
{% include "partials/logo.html" %}
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
{% block site_name %}
{% if config.site_name == page.title %}
<label class="md-header-nav__button md-icon" for="__drawer">
{% include ".icons/material/menu" ~ ".svg" %}
</label>
<div class="md-header-nav__title" data-md-component="header-title">
<div class="md-header-nav__ellipsis">
<div class="md-header-nav__topic">
<span class="md-ellipsis">
{{ config.site_name }}
</span>
</div>
<div class="md-header-nav__topic">
<span class="md-ellipsis">
{% if page and page.meta and page.meta.title %}
{{ page.meta.title }}
{% else %}
<span class="md-header-nav__topic">
{{ config.site_name }}
</span>
<span class="md-header-nav__topic">
{{ page.title }}
</span>
{% endif %}
{% endblock %}
</span>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
{% block search_box %}
{% if "search" in config["plugins"] %}
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<label class="md-header-nav__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %}
</label>
{% include "partials/search.html" %}
{% endif %}
{% endblock %}
</div>
{% if config.repo_url %}
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
{% include "partials/source.html" %}
</div>
</div>
{% endif %}
</div>
</nav>
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>

View File

@@ -168,6 +168,7 @@ Additional features when using plot_config include:
* Specify colors per indicator
* Specify additional subplots
* Specify indicator pairs to fill area in between
The sample plot configuration below specifies fixed colors for the indicators. Otherwise consecutive plots may produce different colorschemes each time, making comparisons difficult.
It also allows multiple subplots to display both MACD and RSI at the same time.
@@ -183,23 +184,33 @@ Sample configuration with inline comments explaining the process:
'ema50': {'color': '#CCCCCC'},
# By omitting color, a random color is selected.
'sar': {},
# fill area between senkou_a and senkou_b
'senkou_a': {
'color': 'green', #optional
'fill_to': 'senkou_b',
'fill_label': 'Ichimoku Cloud' #optional,
'fill_color': 'rgba(255,76,46,0.2)', #optional
},
# plot senkou_b, too. Not only the area to it.
'senkou_b': {}
},
'subplots': {
# Create subplot MACD
"MACD": {
'macd': {'color': 'blue'},
'macdsignal': {'color': 'orange'},
'macd': {'color': 'blue', 'fill_to': 'macdhist'},
'macdsignal': {'color': 'orange'}
},
# Additional subplot RSI
"RSI": {
'rsi': {'color': 'red'},
'rsi': {'color': 'red'}
}
}
}
```
```
!!! Note
The above configuration assumes that `ema10`, `ema50`, `macd`, `macdsignal` and `rsi` are columns in the DataFrame created by the strategy.
The above configuration assumes that `ema10`, `ema50`, `senkou_a`, `senkou_b`,
`macd`, `macdsignal`, `macdhist` and `rsi` are columns in the DataFrame created by the strategy.
## Plot profit

3
docs/plugins.md Normal file
View File

@@ -0,0 +1,3 @@
# Plugins
--8<-- "includes/pairlists.md"
--8<-- "includes/protections.md"

View File

@@ -1,2 +1,3 @@
mkdocs-material==5.5.8
mkdocs-material==6.2.3
mdx_truly_sane_lists==1.2
pymdown-extensions==8.1

View File

@@ -104,32 +104,43 @@ By default, the script assumes `127.0.0.1` (localhost) and port `8080` to be use
python3 scripts/rest_client.py --config rest_config.json <command> [optional parameters]
```
## Available commands
## Available endpoints
| Command | Description |
|----------|-------------|
| `ping` | Simple command testing the API Readiness - requires no authentication.
| `start` | Starts the trader
| `stop` | Stops the trader
| `start` | Starts the trader.
| `stop` | Stops the trader.
| `stopbuy` | Stops the trader from opening new trades. Gracefully closes open trades according to their rules.
| `reload_config` | Reloads the configuration file
| `reload_config` | Reloads the configuration file.
| `trades` | List last trades.
| `delete_trade <trade_id>` | Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.
| `show_config` | Shows part of the current configuration with relevant settings to operation
| `logs` | Shows last log messages
| `status` | Lists all open trades
| `count` | Displays number of trades used and available
| `profit` | Display a summary of your profit/loss from close trades and some stats about your performance
| `show_config` | Shows part of the current configuration with relevant settings to operation.
| `logs` | Shows last log messages.
| `status` | Lists all open trades.
| `count` | Displays number of trades used and available.
| `locks` | Displays currently locked pairs.
| `profit` | Display a summary of your profit/loss from close trades and some stats about your performance.
| `forcesell <trade_id>` | Instantly sells the given trade (Ignoring `minimum_roi`).
| `forcesell all` | Instantly sells all open trades (Ignoring `minimum_roi`).
| `forcebuy <pair> [rate]` | Instantly buys the given pair. Rate is optional. (`forcebuy_enable` must be set to True)
| `performance` | Show performance of each finished trade grouped by pair
| `balance` | Show account balance per currency
| `daily <n>` | Shows profit or loss per day, over the last n days (n defaults to 7)
| `whitelist` | Show the current whitelist
| `performance` | Show performance of each finished trade grouped by pair.
| `balance` | Show account balance per currency.
| `daily <n>` | Shows profit or loss per day, over the last n days (n defaults to 7).
| `stats` | Display a summary of profit / loss reasons as well as average holding times.
| `whitelist` | Show the current whitelist.
| `blacklist [pair]` | Show the current blacklist, or adds a pair to the blacklist.
| `edge` | Show validated pairs by Edge if it is enabled.
| `version` | Show version
| `pair_candles` | Returns dataframe for a pair / timeframe combination while the bot is running. **Alpha**
| `pair_history` | Returns an analyzed dataframe for a given timerange, analyzed by a given strategy. **Alpha**
| `plot_config` | Get plot config from the strategy (or nothing if not configured). **Alpha**
| `strategies` | List strategies in strategy directory. **Alpha**
| `strategy <strategy>` | Get specific Strategy content. **Alpha**
| `available_pairs` | List available backtest data. **Alpha**
| `version` | Show version.
!!! Warning "Alpha status"
Endpoints labeled with *Alpha status* above may change at any time without notice.
Possible commands can be listed from the rest-client script using the `help` command.
@@ -140,6 +151,12 @@ python3 scripts/rest_client.py help
``` output
Possible commands:
available_pairs
Return available pair (backtest data) based on timeframe / stake_currency selection
:param timeframe: Only pairs with this timeframe available.
:param stake_currency: Only pairs that include this timeframe
balance
Get the account balance.
@@ -179,9 +196,27 @@ logs
:param limit: Limits log messages to the last <limit> logs. No limit to get all the trades.
pair_candles
Return live dataframe for <pair><timeframe>.
:param pair: Pair to get data for
:param timeframe: Only pairs with this timeframe available.
:param limit: Limit result to the last n candles.
pair_history
Return historic, analyzed dataframe
:param pair: Pair to get data for
:param timeframe: Only pairs with this timeframe available.
:param strategy: Strategy to analyze and get values for
:param timerange: Timerange to get data for (same format than --timerange endpoints)
performance
Return the performance of the different coins.
plot_config
Return plot configuration if the strategy defines one.
profit
Return the profit summary.
@@ -195,6 +230,9 @@ show_config
start
Start the bot if it's in the stopped state.
stats
Return the stats report (durations, sell-reasons).
status
Get the status of open trades.
@@ -204,6 +242,14 @@ stop
stopbuy
Stop buying (but handle sells gracefully). Use `reload_config` to reset.
strategies
Lists available strategies
strategy
Get strategy details
:param strategy: Strategy class name
trades
Return trades history.
@@ -215,7 +261,6 @@ version
whitelist
Show the current whitelist.
```
## Advanced API usage using JWT tokens

View File

@@ -43,52 +43,6 @@ sqlite3
.schema <table_name>
```
### Trade table structure
```sql
CREATE TABLE trades
id INTEGER NOT NULL,
exchange VARCHAR NOT NULL,
pair VARCHAR NOT NULL,
is_open BOOLEAN NOT NULL,
fee_open FLOAT NOT NULL,
fee_open_cost FLOAT,
fee_open_currency VARCHAR,
fee_close FLOAT NOT NULL,
fee_close_cost FLOAT,
fee_close_currency VARCHAR,
open_rate FLOAT,
open_rate_requested FLOAT,
open_trade_price FLOAT,
close_rate FLOAT,
close_rate_requested FLOAT,
close_profit FLOAT,
close_profit_abs FLOAT,
stake_amount FLOAT NOT NULL,
amount FLOAT,
open_date DATETIME NOT NULL,
close_date DATETIME,
open_order_id VARCHAR,
stop_loss FLOAT,
stop_loss_pct FLOAT,
initial_stop_loss FLOAT,
initial_stop_loss_pct FLOAT,
stoploss_order_id VARCHAR,
stoploss_last_update DATETIME,
max_rate FLOAT,
min_rate FLOAT,
sell_reason VARCHAR,
strategy VARCHAR,
timeframe INTEGER,
PRIMARY KEY (id),
CHECK (is_open IN (0, 1))
);
CREATE INDEX ix_trades_stoploss_order_id ON trades (stoploss_order_id);
CREATE INDEX ix_trades_pair ON trades (pair);
CREATE INDEX ix_trades_is_open ON trades (is_open);
```
## Get all trades in the table
```sql
@@ -128,23 +82,12 @@ SET is_open=0,
WHERE id=31;
```
## Manually insert a new trade
```sql
INSERT INTO trades (exchange, pair, is_open, fee_open, fee_close, open_rate, stake_amount, amount, open_date)
VALUES ('binance', 'ETH/BTC', 1, 0.0025, 0.0025, <open_rate>, <stake_amount>, <amount>, '<datetime>')
```
### Insert trade example
```sql
INSERT INTO trades (exchange, pair, is_open, fee_open, fee_close, open_rate, stake_amount, amount, open_date)
VALUES ('binance', 'ETH/BTC', 1, 0.0025, 0.0025, 0.00258580, 0.002, 0.7715262081, '2020-06-28 12:44:24.000000')
```
## Remove trade from the database
Maybe you'd like to remove a trade from the database, because something went wrong.
!!! Tip "Use RPC Methods to delete trades"
Consider using `/delete <tradeid>` via telegram or rest API. That's the recommended way to deleting trades.
If you'd still like to remove a trade from the database directly, you can use the below query.
```sql
DELETE FROM trades WHERE id = <tradeid>;

View File

@@ -23,11 +23,12 @@ These modes can be configured with these values:
```
!!! Note
Stoploss on exchange is only supported for Binance (stop-loss-limit), Kraken (stop-loss-market) and FTX (stop limit and stop-market) as of now.
<ins>Do not set too low stoploss value if using stop loss on exchange!</ins>
If set to low/tight then you have greater risk of missing fill on the order and stoploss will not work
Stoploss on exchange is only supported for Binance (stop-loss-limit), Kraken (stop-loss-market, stop-loss-limit) and FTX (stop limit and stop-market) as of now.
<ins>Do not set too low/tight stoploss value if using stop loss on exchange!</ins>
If set to low/tight then you have greater risk of missing fill on the order and stoploss will not work.
### stoploss_on_exchange and stoploss_on_exchange_limit_ratio
Enable or Disable stop loss on exchange.
If the stoploss is *on exchange* it means a stoploss limit order is placed on the exchange immediately after buy order happens successfully. This will protect you against sudden crashes in market as the order will be in the queue immediately and if market goes down then the order has more chance of being fulfilled.
@@ -35,18 +36,23 @@ If `stoploss_on_exchange` uses limit orders, the exchange needs 2 prices, the st
`stoploss` defines the stop-price where the limit order is placed - and limit should be slightly below this.
If an exchange supports both limit and market stoploss orders, then the value of `stoploss` will be used to determine the stoploss type.
Calculation example: we bought the asset at 100$.
Stop-price is 95$, then limit would be `95 * 0.99 = 94.05$` - so the limit order fill can happen between 95$ and 94.05$.
Calculation example: we bought the asset at 100\$.
Stop-price is 95\$, then limit would be `95 * 0.99 = 94.05$` - so the limit order fill can happen between 95$ and 94.05$.
For example, assuming the stoploss is on exchange, and trailing stoploss is enabled, and the market is going up, then the bot automatically cancels the previous stoploss order and puts a new one with a stop value higher than the previous stoploss order.
!!! Note
If `stoploss_on_exchange` is enabled and the stoploss is cancelled manually on the exchange, then the bot will create a new stoploss order.
### stoploss_on_exchange_interval
In case of stoploss on exchange there is another parameter called `stoploss_on_exchange_interval`. This configures the interval in seconds at which the bot will check the stoploss and update it if necessary.
The bot cannot do these every 5 seconds (at each iteration), otherwise it would get banned by the exchange.
So this parameter will tell the bot how often it should update the stoploss order. The default value is 60 (1 minute).
This same logic will reapply a stoploss order on the exchange should you cancel it accidentally.
### emergencysell
`emergencysell` is an optional value, which defaults to `market` and is used when creating stop loss on exchange orders fails.
The below is the default which is used if not changed in strategy or configuration file.
@@ -84,6 +90,7 @@ Example of stop loss:
```
For example, simplified math:
* the bot buys an asset at a price of 100$
* the stop loss is defined at -10%
* the stop loss would get triggered once the asset drops below 90$
@@ -107,7 +114,7 @@ For example, simplified math:
* the stop loss would get triggered once the asset drops below 90$
* assuming the asset now increases to 102$
* the stop loss will now be -10% of 102$ = 91.8$
* now the asset drops in value to 101$, the stop loss will still be 91.8$ and would trigger at 91.8$.
* now the asset drops in value to 101\$, the stop loss will still be 91.8$ and would trigger at 91.8$.
In summary: The stoploss will be adjusted to be always be -10% of the highest observed price.
@@ -133,8 +140,8 @@ For example, simplified math:
* the stop loss is defined at -10%
* the stop loss would get triggered once the asset drops below 90$
* assuming the asset now increases to 102$
* the stop loss will now be -2% of 102$ = 99.96$ (99.96$ stop loss will be locked in and will follow asset price increasements with -2%)
* now the asset drops in value to 101$, the stop loss will still be 99.96$ and would trigger at 99.96$
* the stop loss will now be -2% of 102$ = 99.96$ (99.96$ stop loss will be locked in and will follow asset price increments with -2%)
* now the asset drops in value to 101\$, the stop loss will still be 99.96$ and would trigger at 99.96$
The 0.02 would translate to a -2% stop loss.
Before this, `stoploss` is used for the trailing stoploss.
@@ -151,7 +158,7 @@ This option can be used with or without `trailing_stop_positive`, but uses `trai
trailing_only_offset_is_reached = True
```
Configuration (offset is buyprice + 3%):
Configuration (offset is buy-price + 3%):
``` python
stoploss = -0.10
@@ -169,7 +176,7 @@ For example, simplified math:
* stoploss will remain at 90$ unless asset increases to or above our configured offset
* assuming the asset now increases to 103$ (where we have the offset configured)
* the stop loss will now be -2% of 103$ = 100.94$
* now the asset drops in value to 101$, the stop loss will still be 100.94$ and would trigger at 100.94$
* now the asset drops in value to 101\$, the stop loss will still be 100.94$ and would trigger at 100.94$
!!! Tip
Make sure to have this value (`trailing_stop_positive_offset`) lower than minimal ROI, otherwise minimal ROI will apply first and sell the trade.

View File

@@ -147,7 +147,7 @@ Let's try to backtest 1 month (January 2019) of 5m candles using an example stra
freqtrade backtesting --timerange 20190101-20190201 --timeframe 5m
```
Assuming `startup_candle_count` is set to 100, backtesting knows it needs 100 candles to generate valid buy signals. It will load data from `20190101 - (100 * 5m)` - which is ~2019-12-31 15:30:00.
Assuming `startup_candle_count` is set to 100, backtesting knows it needs 100 candles to generate valid buy signals. It will load data from `20190101 - (100 * 5m)` - which is ~2018-12-31 15:30:00.
If this data is available, indicators will be calculated with this extended timerange. The instable startup period (up to 2019-01-01 00:00:00) will then be removed before starting backtesting.
!!! Note
@@ -312,12 +312,17 @@ The name of the variable can be chosen at will, but should be prefixed with `cus
class Awesomestrategy(IStrategy):
# Create custom dictionary
cust_info = {}
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# Check if the entry already exists
if not metadata["pair"] in self._cust_info:
# Create empty entry for this pair
self._cust_info[metadata["pair"]] = {}
if "crosstime" in self.cust_info[metadata["pair"]:
self.cust_info[metadata["pair"]["crosstime"] += 1
self.cust_info[metadata["pair"]]["crosstime"] += 1
else:
self.cust_info[metadata["pair"]["crosstime"] = 1
self.cust_info[metadata["pair"]]["crosstime"] = 1
```
!!! Warning
@@ -483,6 +488,9 @@ if self.dp:
### Complete Data-provider sample
```python
from freqtrade.strategy import IStrategy, merge_informative_pair
from pandas import DataFrame
class SampleStrategy(IStrategy):
# strategy init stuff...
@@ -513,17 +521,12 @@ class SampleStrategy(IStrategy):
# Get the 14 day rsi
informative['rsi'] = ta.RSI(informative, timeperiod=14)
# Rename columns to be unique
informative.columns = [f"{col}_{inf_tf}" for col in informative.columns]
# Assuming inf_tf = '1d' - then the columns will now be:
# date_1d, open_1d, high_1d, low_1d, close_1d, rsi_1d
# Combine the 2 dataframes
# all indicators on the informative sample MUST be calculated before this point
dataframe = pd.merge(dataframe, informative, left_on='date', right_on=f'date_{inf_tf}', how='left')
# FFill to have the 1d value available in every row throughout the day.
# Without this, comparisons would only work once per day.
dataframe = dataframe.ffill()
# Use the helper function merge_informative_pair to safely merge the pair
# Automatically renames the columns and merges a shorter timeframe dataframe and a longer timeframe informative pair
# use ffill to have the 1d value available in every row throughout the day.
# Without this, comparisons between columns of the original and the informative pair would only work once per day.
# Full documentation of this method, see below
dataframe = merge_informative_pair(dataframe, informative, self.timeframe, inf_tf, ffill=True)
# Calculate rsi of the original dataframe (5m timeframe)
dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
@@ -547,6 +550,69 @@ class SampleStrategy(IStrategy):
***
## Helper functions
### *merge_informative_pair()*
This method helps you merge an informative pair to a regular dataframe without lookahead bias.
It's there to help you merge the dataframe in a safe and consistent way.
Options:
- Rename the columns for you to create unique columns
- Merge the dataframe without lookahead bias
- Forward-fill (optional)
All columns of the informative dataframe will be available on the returning dataframe in a renamed fashion:
!!! Example "Column renaming"
Assuming `inf_tf = '1d'` the resulting columns will be:
``` python
'date', 'open', 'high', 'low', 'close', 'rsi' # from the original dataframe
'date_1d', 'open_1d', 'high_1d', 'low_1d', 'close_1d', 'rsi_1d' # from the informative dataframe
```
??? Example "Column renaming - 1h"
Assuming `inf_tf = '1h'` the resulting columns will be:
``` python
'date', 'open', 'high', 'low', 'close', 'rsi' # from the original dataframe
'date_1h', 'open_1h', 'high_1h', 'low_1h', 'close_1h', 'rsi_1h' # from the informative dataframe
```
??? Example "Custom implementation"
A custom implementation for this is possible, and can be done as follows:
``` python
# Shift date by 1 candle
# This is necessary since the data is always the "open date"
# and a 15m candle starting at 12:15 should not know the close of the 1h candle from 12:00 to 13:00
minutes = timeframe_to_minutes(inf_tf)
# Only do this if the timeframes are different:
informative['date_merge'] = informative["date"] + pd.to_timedelta(minutes, 'm')
# Rename columns to be unique
informative.columns = [f"{col}_{inf_tf}" for col in informative.columns]
# Assuming inf_tf = '1d' - then the columns will now be:
# date_1d, open_1d, high_1d, low_1d, close_1d, rsi_1d
# Combine the 2 dataframes
# all indicators on the informative sample MUST be calculated before this point
dataframe = pd.merge(dataframe, informative, left_on='date', right_on=f'date_merge_{inf_tf}', how='left')
# FFill to have the 1d value available in every row throughout the day.
# Without this, comparisons would only work once per day.
dataframe = dataframe.ffill()
```
!!! Warning "Informative timeframe < timeframe"
Using informative timeframes smaller than the dataframe timeframe is not recommended with this method, as it will not use any of the additional information this would provide.
To use the more detailed information properly, more advanced methods should be applied (which are out of scope for freqtrade documentation, as it'll depend on the respective need).
***
## Additional data (Wallets)
The strategy provides access to the `Wallets` object. This contains the current balances on the exchange.
@@ -627,18 +693,18 @@ Locked pairs will show the message `Pair <pair> is currently locked.`.
Sometimes it may be desired to lock a pair after certain events happen (e.g. multiple losing trades in a row).
Freqtrade has an easy method to do this from within the strategy, by calling `self.lock_pair(pair, until)`.
`until` must be a datetime object in the future, after which trading will be reenabled for that pair.
Freqtrade has an easy method to do this from within the strategy, by calling `self.lock_pair(pair, until, [reason])`.
`until` must be a datetime object in the future, after which trading will be re-enabled for that pair, while `reason` is an optional string detailing why the pair was locked.
Locks can also be lifted manually, by calling `self.unlock_pair(pair)`.
To verify if a pair is currently locked, use `self.is_pair_locked(pair)`.
!!! Note
Locked pairs are not persisted, so a restart of the bot, or calling `/reload_config` will reset locked pairs.
Locked pairs will always be rounded up to the next candle. So assuming a `5m` timeframe, a lock with `until` set to 10:18 will lock the pair until the candle from 10:15-10:20 will be finished.
!!! Warning
Locking pairs is not functioning during backtesting.
Locking pairs is not available during backtesting.
#### Pair locking example
@@ -704,8 +770,6 @@ To get additional Ideas for strategies, head over to our [strategy repository](h
Feel free to use any of them as inspiration for your own strategies.
We're happy to accept Pull Requests containing new Strategies to that repo.
We also got a *strategy-sharing* channel in our [Slack community](https://join.slack.com/t/highfrequencybot/shared_invite/enQtNjU5ODcwNjI1MDU3LTU1MTgxMjkzNmYxNWE1MDEzYzQ3YmU4N2MwZjUyNjJjODRkMDVkNjg4YTAyZGYzYzlhOTZiMTE4ZjQ4YzM0OGE) which is a great place to get and/or share ideas.
## Next step
Now you have a perfect strategy you probably want to backtest it.

View File

@@ -35,12 +35,93 @@ Copy the API Token (`22222222:APITOKEN` in the above example) and keep use it fo
Don't forget to start the conversation with your bot, by clicking `/START` button
### 2. Get your user id
### 2. Telegram user_id
#### Get your user id
Talk to the [userinfobot](https://telegram.me/userinfobot)
Get your "Id", you will use it for the config parameter `chat_id`.
#### Use Group id
You can use bots in telegram groups by just adding them to the group. You can find the group id by first adding a [RawDataBot](https://telegram.me/rawdatabot) to your group. The Group id is shown as id in the `"chat"` section, which the RawDataBot will send to you:
``` json
"chat":{
"id":-1001332619709
}
```
For the Freqtrade configuration, you can then use the the full value (including `-` if it's there) as string:
```json
"chat_id": "-1001332619709"
```
## Control telegram noise
Freqtrade provides means to control the verbosity of your telegram bot.
Each setting has the following possible values:
* `on` - Messages will be sent, and user will be notified.
* `silent` - Message will be sent, Notification will be without sound / vibration.
* `off` - Skip sending a message-type all together.
Example configuration showing the different settings:
``` json
"telegram": {
"enabled": true,
"token": "your_telegram_token",
"chat_id": "your_telegram_chat_id",
"notification_settings": {
"status": "silent",
"warning": "on",
"startup": "off",
"buy": "silent",
"sell": "on",
"buy_cancel": "silent",
"sell_cancel": "on"
}
},
```
## Create a custom keyboard (command shortcut buttons)
Telegram allows us to create a custom keyboard with buttons for commands.
The default custom keyboard looks like this.
```python
[
["/daily", "/profit", "/balance"], # row 1, 3 commands
["/status", "/status table", "/performance"], # row 2, 3 commands
["/count", "/start", "/stop", "/help"] # row 3, 4 commands
]
```
### Usage
You can create your own keyboard in `config.json`:
``` json
"telegram": {
"enabled": true,
"token": "your_telegram_token",
"chat_id": "your_telegram_chat_id",
"keyboard": [
["/daily", "/stats", "/balance", "/profit"],
["/status table", "/performance"],
["/reload_config", "/count", "/logs"]
]
},
```
!!! Note "Supported Commands"
Only the following commands are allowed. Command arguments are not supported!
`/start`, `/stop`, `/status`, `/status table`, `/trades`, `/profit`, `/performance`, `/daily`, `/stats`, `/count`, `/locks`, `/balance`, `/stopbuy`, `/reload_config`, `/show_config`, `/logs`, `/whitelist`, `/blacklist`, `/edge`, `/help`, `/version`
## Telegram commands
Per default, the Telegram bot shows predefined commands. Some commands
@@ -60,6 +141,7 @@ official commands. You can ask at any moment for help with `/help`.
| `/trades [limit]` | List all recently closed trades in a table format.
| `/delete <trade_id>` | Delete a specific trade from the Database. Tries to close open orders. Requires manual handling of this trade on the exchange.
| `/count` | Displays number of trades used and available
| `/locks` | Show currently locked pairs.
| `/profit` | Display a summary of your profit/loss from close trades and some stats about your performance
| `/forcesell <trade_id>` | Instantly sells the given trade (Ignoring `minimum_roi`).
| `/forcesell all` | Instantly sells all open trades (Ignoring `minimum_roi`).
@@ -67,6 +149,7 @@ official commands. You can ask at any moment for help with `/help`.
| `/performance` | Show performance of each finished trade grouped by pair
| `/balance` | Show account balance per currency
| `/daily <n>` | Shows profit or loss per day, over the last n days (n defaults to 7)
| `/stats` | Shows Wins / losses by Sell reason as well as Avg. holding durations for buys and sells
| `/whitelist` | Show the current whitelist
| `/blacklist [pair]` | Show the current blacklist, or adds a pair to the blacklist.
| `/edge` | Show validated pairs by Edge if it is enabled.
@@ -161,7 +244,7 @@ Return a summary of your profit/loss and performance.
Note that for this to work, `forcebuy_enable` needs to be set to true.
[More details](configuration.md/#understand-forcebuy_enable)
[More details](configuration.md#understand-forcebuy_enable)
### /performance

31
docs/updating.md Normal file
View File

@@ -0,0 +1,31 @@
# How to update
To update your freqtrade installation, please use one of the below methods, corresponding to your installation method.
## docker-compose
!!! Note "Legacy installations using the `master` image"
We're switching from master to stable for the release Images - please adjust your docker-file and replace `freqtradeorg/freqtrade:master` with `freqtradeorg/freqtrade:stable`
``` bash
docker-compose pull
docker-compose up -d
```
## Installation via setup script
``` bash
./setup.sh --update
```
!!! Note
Make sure to run this command with your virtual environment disabled!
## Plain native installation
Please ensure that you're also updating dependencies - otherwise things might break without you noticing.
``` bash
git pull
pip install -U -r requirements.txt
```

View File

@@ -423,7 +423,7 @@ freqtrade test-pairlist --config config.json --quote USDT BTC
## List Hyperopt results
You can list the hyperoptimization epochs the Hyperopt module evaluated previously with the `hyperopt-list` subcommand.
You can list the hyperoptimization epochs the Hyperopt module evaluated previously with the `hyperopt-list` sub-command.
```
usage: freqtrade hyperopt-list [-h] [-v] [--logfile FILE] [-V] [-c PATH]
@@ -432,10 +432,11 @@ usage: freqtrade hyperopt-list [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[--max-trades INT] [--min-avg-time FLOAT]
[--max-avg-time FLOAT] [--min-avg-profit FLOAT]
[--max-avg-profit FLOAT]
[--min-total-profit FLOAT] [--max-total-profit FLOAT]
[--min-total-profit FLOAT]
[--max-total-profit FLOAT]
[--min-objective FLOAT] [--max-objective FLOAT]
[--no-color] [--print-json] [--no-details]
[--export-csv FILE]
[--hyperopt-filename PATH] [--export-csv FILE]
optional arguments:
-h, --help show this help message and exit
@@ -443,24 +444,27 @@ optional arguments:
--profitable Select only profitable epochs.
--min-trades INT Select epochs with more than INT trades.
--max-trades INT Select epochs with less than INT trades.
--min-avg-time FLOAT Select epochs on above average time.
--max-avg-time FLOAT Select epochs on under average time.
--min-avg-time FLOAT Select epochs above average time.
--max-avg-time FLOAT Select epochs below average time.
--min-avg-profit FLOAT
Select epochs on above average profit.
Select epochs above average profit.
--max-avg-profit FLOAT
Select epochs on below average profit.
Select epochs below average profit.
--min-total-profit FLOAT
Select epochs on above total profit.
Select epochs above total profit.
--max-total-profit FLOAT
Select epochs on below total profit.
Select epochs below total profit.
--min-objective FLOAT
Select epochs on above objective (- is added by default).
Select epochs above objective.
--max-objective FLOAT
Select epochs on below objective (- is added by default).
Select epochs below objective.
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--print-json Print best result detailization in JSON format.
--print-json Print output in JSON format.
--no-details Do not print best epoch details.
--hyperopt-filename FILENAME
Hyperopt result filename.Example: `--hyperopt-
filename=hyperopt_results_2020-09-27_16-20-48.pickle`
--export-csv FILE Export to CSV-File. This will disable table print.
Example: --export-csv hyperopt.csv
@@ -481,6 +485,10 @@ Common arguments:
Path to userdata directory.
```
!!! Note
`hyperopt-list` will automatically use the latest available hyperopt results file.
You can override this using the `--hyperopt-filename` argument, and specify another, available filename (without path!).
### Examples
List all results, print details of the best result at the end:
@@ -501,17 +509,41 @@ You can show the details of any hyperoptimization epoch previously evaluated by
usage: freqtrade hyperopt-show [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH] [--best]
[--profitable] [-n INT] [--print-json]
[--no-header]
[--hyperopt-filename PATH] [--no-header]
optional arguments:
-h, --help show this help message and exit
--best Select only best epochs.
--profitable Select only profitable epochs.
-n INT, --index INT Specify the index of the epoch to print details for.
--print-json Print best result detailization in JSON format.
--print-json Print output in JSON format.
--hyperopt-filename FILENAME
Hyperopt result filename.Example: `--hyperopt-
filename=hyperopt_results_2020-09-27_16-20-48.pickle`
--no-header Do not print epoch details header.
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--logfile FILE Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH
Path to directory with historical backtesting data.
--userdir PATH, --user-data-dir PATH
Path to userdata directory.
```
!!! Note
`hyperopt-show` will automatically use the latest available hyperopt results file.
You can override this using the `--hyperopt-filename` argument, and specify another, available filename (without path!).
### Examples
Print details for the epoch 168 (the number of the epoch is shown by the `hyperopt-list` subcommand or by Hyperopt itself during hyperoptimization run):

View File

@@ -0,0 +1,57 @@
We **strongly** recommend that Windows users use [Docker](docker.md) as this will work much easier and smoother (also more secure).
If that is not possible, try using the Windows Linux subsystem (WSL) - for which the Ubuntu instructions should work.
Otherwise, try the instructions below.
## Install freqtrade manually
!!! Note
Make sure to use 64bit Windows and 64bit Python to avoid problems with backtesting or hyperopt due to the memory constraints 32bit applications have under Windows.
!!! Hint
Using the [Anaconda Distribution](https://www.anaconda.com/distribution/) under Windows can greatly help with installation problems. Check out the [Anaconda installation section](installation.md#Anaconda) in this document for more information.
### 1. Clone the git repository
```bash
git clone https://github.com/freqtrade/freqtrade.git
```
### 2. Install ta-lib
Install ta-lib according to the [ta-lib documentation](https://github.com/mrjbq7/ta-lib#windows).
As compiling from source on windows has heavy dependencies (requires a partial visual studio installation), there is also a repository of unofficial precompiled windows Wheels [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib), which needs to be downloaded and installed using `pip install TA_Lib0.4.19cp38cp38win_amd64.whl` (make sure to use the version matching your python version)
Freqtrade provides these dependencies for the latest 2 Python versions (3.7 and 3.8) and for 64bit Windows.
Other versions must be downloaded from the above link.
``` powershell
cd \path\freqtrade
python -m venv .env
.env\Scripts\activate.ps1
# optionally install ta-lib from wheel
# Eventually adjust the below filename to match the downloaded wheel
pip install build_helpers/TA_Lib-0.4.19-cp38-cp38-win_amd64.whl
pip install -r requirements.txt
pip install -e .
freqtrade
```
!!! Note "Use Powershell"
The above installation script assumes you're using powershell on a 64bit windows.
Commands for the legacy CMD windows console may differ.
> Thanks [Owdr](https://github.com/Owdr) for the commands. Source: [Issue #222](https://github.com/freqtrade/freqtrade/issues/222)
### Error during installation on Windows
``` bash
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
```
Unfortunately, many packages requiring compilation don't provide a pre-built wheel. It is therefore mandatory to have a C/C++ compiler installed and available for your python environment to use.
The easiest way is to download install Microsoft Visual Studio Community [here](https://visualstudio.microsoft.com/downloads/) and make sure to install "Common Tools for Visual C++" to enable building C code on Windows. Unfortunately, this is a heavy download / dependency (~4Gb) so you might want to consider WSL or [docker](docker.md) first.
---

View File

@@ -4,7 +4,7 @@ channels:
- conda-forge
dependencies:
# Required for app
- python>=3.6
- python>=3.7
- pip
- wheel
- numpy

View File

@@ -1,5 +1,5 @@
""" Freqtrade bot """
__version__ = '2020.8'
__version__ = '2020.12'
if __version__ == 'develop':

View File

@@ -3,10 +3,11 @@
__main__.py for Freqtrade
To launch Freqtrade as a module
> python -m freqtrade (with Python >= 3.6)
> python -m freqtrade (with Python >= 3.7)
"""
from freqtrade import main
if __name__ == '__main__':
main.main()

View File

@@ -8,23 +8,15 @@ Note: Be careful with file-scoped imports in these subfiles.
"""
from freqtrade.commands.arguments import Arguments
from freqtrade.commands.build_config_commands import start_new_config
from freqtrade.commands.data_commands import (start_convert_data,
start_download_data,
from freqtrade.commands.data_commands import (start_convert_data, start_download_data,
start_list_data)
from freqtrade.commands.deploy_commands import (start_create_userdir,
start_new_hyperopt,
from freqtrade.commands.deploy_commands import (start_create_userdir, start_new_hyperopt,
start_new_strategy)
from freqtrade.commands.hyperopt_commands import (start_hyperopt_list,
start_hyperopt_show)
from freqtrade.commands.list_commands import (start_list_exchanges,
start_list_hyperopts,
start_list_markets,
start_list_strategies,
start_list_timeframes,
start_show_trades)
from freqtrade.commands.optimize_commands import (start_backtesting,
start_edge, start_hyperopt)
from freqtrade.commands.hyperopt_commands import start_hyperopt_list, start_hyperopt_show
from freqtrade.commands.list_commands import (start_list_exchanges, start_list_hyperopts,
start_list_markets, start_list_strategies,
start_list_timeframes, start_show_trades)
from freqtrade.commands.optimize_commands import start_backtesting, start_edge, start_hyperopt
from freqtrade.commands.pairlist_commands import start_test_pairlist
from freqtrade.commands.plot_commands import (start_plot_dataframe,
start_plot_profit)
from freqtrade.commands.plot_commands import start_plot_dataframe, start_plot_profit
from freqtrade.commands.trade_commands import start_trading

View File

@@ -9,24 +9,27 @@ from typing import Any, Dict, List, Optional
from freqtrade.commands.cli_options import AVAILABLE_CLI_OPTIONS
from freqtrade.constants import DEFAULT_CONFIG
ARGS_COMMON = ["verbosity", "logfile", "version", "config", "datadir", "user_data_dir"]
ARGS_STRATEGY = ["strategy", "strategy_path"]
ARGS_TRADE = ["db_url", "sd_notify", "dry_run"]
ARGS_COMMON_OPTIMIZE = ["timeframe", "timerange",
ARGS_COMMON_OPTIMIZE = ["timeframe", "timerange", "dataformat_ohlcv",
"max_open_trades", "stake_amount", "fee"]
ARGS_BACKTEST = ARGS_COMMON_OPTIMIZE + ["position_stacking", "use_max_market_positions",
"enable_protections",
"strategy_list", "export", "exportfilename"]
ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path",
"position_stacking", "epochs", "spaces",
"use_max_market_positions", "print_all",
"position_stacking", "use_max_market_positions",
"enable_protections",
"epochs", "spaces", "print_all",
"print_colorized", "print_json", "hyperopt_jobs",
"hyperopt_random_state", "hyperopt_min_trades",
"hyperopt_continue", "hyperopt_loss"]
"hyperopt_loss"]
ARGS_EDGE = ARGS_COMMON_OPTIMIZE + ["stoploss_range"]
@@ -41,7 +44,8 @@ ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column"]
ARGS_LIST_PAIRS = ["exchange", "print_list", "list_pairs_print_json", "print_one_column",
"print_csv", "base_currencies", "quote_currencies", "list_pairs_all"]
ARGS_TEST_PAIRLIST = ["config", "quote_currencies", "print_one_column", "list_pairs_print_json"]
ARGS_TEST_PAIRLIST = ["verbosity", "config", "quote_currencies", "print_one_column",
"list_pairs_print_json"]
ARGS_CREATE_USERDIR = ["user_data_dir", "reset"]
@@ -56,7 +60,7 @@ ARGS_CONVERT_DATA_OHLCV = ARGS_CONVERT_DATA + ["timeframes"]
ARGS_LIST_DATA = ["exchange", "dataformat_ohlcv", "pairs"]
ARGS_DOWNLOAD_DATA = ["pairs", "pairs_file", "days", "download_trades", "exchange",
ARGS_DOWNLOAD_DATA = ["pairs", "pairs_file", "days", "timerange", "download_trades", "exchange",
"timeframes", "erase", "dataformat_ohlcv", "dataformat_trades"]
ARGS_PLOT_DATAFRAME = ["pairs", "indicators1", "indicators2", "plot_limit",
@@ -75,10 +79,10 @@ ARGS_HYPEROPT_LIST = ["hyperopt_list_best", "hyperopt_list_profitable",
"hyperopt_list_min_total_profit", "hyperopt_list_max_total_profit",
"hyperopt_list_min_objective", "hyperopt_list_max_objective",
"print_colorized", "print_json", "hyperopt_list_no_details",
"export_csv"]
"hyperoptexportfilename", "export_csv"]
ARGS_HYPEROPT_SHOW = ["hyperopt_list_best", "hyperopt_list_profitable", "hyperopt_show_index",
"print_json", "hyperopt_show_no_header"]
"print_json", "hyperoptexportfilename", "hyperopt_show_no_header"]
NO_CONF_REQURIED = ["convert-data", "convert-trade-data", "download-data", "list-timeframes",
"list-markets", "list-pairs", "list-strategies", "list-data",
@@ -161,16 +165,14 @@ class Arguments:
self.parser = argparse.ArgumentParser(description='Free, open source crypto trading bot')
self._build_args(optionlist=['version'], parser=self.parser)
from freqtrade.commands import (start_create_userdir, start_convert_data,
start_download_data, start_list_data,
start_hyperopt_list, start_hyperopt_show,
from freqtrade.commands import (start_backtesting, start_convert_data, start_create_userdir,
start_download_data, start_edge, start_hyperopt,
start_hyperopt_list, start_hyperopt_show, start_list_data,
start_list_exchanges, start_list_hyperopts,
start_list_markets, start_list_strategies,
start_list_timeframes, start_new_config,
start_new_hyperopt, start_new_strategy,
start_plot_dataframe, start_plot_profit, start_show_trades,
start_backtesting, start_hyperopt, start_edge,
start_test_pairlist, start_trading)
start_list_timeframes, start_new_config, start_new_hyperopt,
start_new_strategy, start_plot_dataframe, start_plot_profit,
start_show_trades, start_test_pairlist, start_trading)
subparsers = self.parser.add_subparsers(dest='command',
# Use custom message when no subhandler is added

View File

@@ -1,13 +1,15 @@
import logging
from pathlib import Path
from typing import Any, Dict
from typing import Any, Dict, List
from questionary import Separator, prompt
from freqtrade.constants import UNLIMITED_STAKE_AMOUNT
from freqtrade.exchange import available_exchanges, MAP_EXCHANGE_CHILDCLASS
from freqtrade.misc import render_template
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import MAP_EXCHANGE_CHILDCLASS, available_exchanges
from freqtrade.misc import render_template
logger = logging.getLogger(__name__)
@@ -46,7 +48,7 @@ def ask_user_config() -> Dict[str, Any]:
Interactive questions built using https://github.com/tmbo/questionary
:returns: Dict with keys to put into template
"""
questions = [
questions: List[Dict[str, Any]] = [
{
"type": "confirm",
"name": "dry_run",

View File

@@ -4,6 +4,7 @@ Definition of cli arguments used in arguments.py
from argparse import ArgumentTypeError
from freqtrade import __version__, constants
from freqtrade.constants import HYPEROPT_LOSS_BUILTIN
def check_int_positive(value: str) -> int:
@@ -143,6 +144,14 @@ AVAILABLE_CLI_OPTIONS = {
action='store_false',
default=True,
),
"enable_protections": Arg(
'--enable-protections', '--enableprotections',
help='Enable protections for backtesting.'
'Will slow backtesting down by a considerable amount, but will include '
'configured protections',
action='store_true',
default=False,
),
"strategy_list": Arg(
'--strategy-list',
help='Provide a space-separated list of strategies to backtest. '
@@ -252,23 +261,19 @@ AVAILABLE_CLI_OPTIONS = {
metavar='INT',
default=1,
),
"hyperopt_continue": Arg(
"--continue",
help="Continue hyperopt from previous runs. "
"By default, temporary files will be removed and hyperopt will start from scratch.",
default=False,
action='store_true',
),
"hyperopt_loss": Arg(
'--hyperopt-loss',
help='Specify the class name of the hyperopt loss function class (IHyperOptLoss). '
'Different functions can generate completely different results, '
'since the target for optimization is different. Built-in Hyperopt-loss-functions are: '
'DefaultHyperOptLoss, OnlyProfitHyperOptLoss, SharpeHyperOptLoss, SharpeHyperOptLossDaily, '
'SortinoHyperOptLoss, SortinoHyperOptLossDaily.'
'(default: `%(default)s`).',
f'{", ".join(HYPEROPT_LOSS_BUILTIN)}',
metavar='NAME',
default=constants.DEFAULT_HYPEROPT_LOSS,
),
"hyperoptexportfilename": Arg(
'--hyperopt-filename',
help='Hyperopt result filename.'
'Example: `--hyperopt-filename=hyperopt_results_2020-09-27_16-20-48.pickle`',
metavar='FILENAME',
),
# List exchanges
"print_one_column": Arg(
@@ -357,13 +362,11 @@ AVAILABLE_CLI_OPTIONS = {
'--data-format-ohlcv',
help='Storage format for downloaded candle (OHLCV) data. (default: `%(default)s`).',
choices=constants.AVAILABLE_DATAHANDLERS,
default='json'
),
"dataformat_trades": Arg(
'--data-format-trades',
help='Storage format for downloaded trades data. (default: `%(default)s`).',
choices=constants.AVAILABLE_DATAHANDLERS,
default='jsongz'
),
"exchange": Arg(
'--exchange',
@@ -375,7 +378,7 @@ AVAILABLE_CLI_OPTIONS = {
help='Specify which tickers to download. Space-separated list. '
'Default: `1m 5m`.',
choices=['1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h',
'6h', '8h', '12h', '1d', '3d', '1w'],
'6h', '8h', '12h', '1d', '3d', '1w', '2w', '1M', '1y'],
default=['1m', '5m'],
nargs='+',
),

View File

@@ -1,21 +1,19 @@
import logging
import sys
from collections import defaultdict
from datetime import datetime, timedelta
from typing import Any, Dict, List
import arrow
from freqtrade.configuration import TimeRange, setup_utils_configuration
from freqtrade.data.converter import (convert_ohlcv_format,
convert_trades_format)
from freqtrade.data.history import (convert_trades_to_ohlcv,
refresh_backtest_ohlcv_data,
from freqtrade.data.converter import convert_ohlcv_format, convert_trades_format
from freqtrade.data.history import (convert_trades_to_ohlcv, refresh_backtest_ohlcv_data,
refresh_backtest_trades_data)
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import timeframe_to_minutes
from freqtrade.resolvers import ExchangeResolver
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)
@@ -25,11 +23,20 @@ def start_download_data(args: Dict[str, Any]) -> None:
"""
config = setup_utils_configuration(args, RunMode.UTIL_EXCHANGE)
if 'days' in config and 'timerange' in config:
raise OperationalException("--days and --timerange are mutually exclusive. "
"You can only specify one or the other.")
timerange = TimeRange()
if 'days' in config:
time_since = arrow.utcnow().shift(days=-config['days']).strftime("%Y%m%d")
time_since = (datetime.now() - timedelta(days=config['days'])).strftime("%Y%m%d")
timerange = TimeRange.parse_timerange(f'{time_since}-')
if 'timerange' in config:
timerange = timerange.parse_timerange(config['timerange'])
# Remove stake-currency to skip checks which are not relevant for datadownload
config['stake_currency'] = ''
if 'pairs' not in config:
raise OperationalException(
"Downloading data requires a list of pairs. "
@@ -99,8 +106,9 @@ def start_list_data(args: Dict[str, Any]) -> None:
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
from freqtrade.data.history.idatahandler import get_datahandler
from tabulate import tabulate
from freqtrade.data.history.idatahandler import get_datahandler
dhc = get_datahandler(config['datadir'], config['dataformat_ohlcv'])
paircombs = dhc.ohlcv_get_available_data(config['datadir'])

View File

@@ -4,13 +4,13 @@ from pathlib import Path
from typing import Any, Dict
from freqtrade.configuration import setup_utils_configuration
from freqtrade.configuration.directory_operations import (copy_sample_files,
create_userdata_dir)
from freqtrade.configuration.directory_operations import copy_sample_files, create_userdata_dir
from freqtrade.constants import USERPATH_HYPEROPTS, USERPATH_STRATEGIES
from freqtrade.exceptions import OperationalException
from freqtrade.misc import render_template, render_template_with_fallback
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)
@@ -133,7 +133,7 @@ def start_new_hyperopt(args: Dict[str, Any]) -> None:
if new_path.exists():
raise OperationalException(f"`{new_path}` already exists. "
"Please choose another Strategy Name.")
"Please choose another Hyperopt Name.")
deploy_new_hyperopt(args['hyperopt'], new_path, args['template'])
else:
raise OperationalException("`new-hyperopt` requires --hyperopt to be set.")

View File

@@ -5,9 +5,11 @@ from typing import Any, Dict, List
from colorama import init as colorama_init
from freqtrade.configuration import setup_utils_configuration
from freqtrade.data.btanalysis import get_latest_hyperopt_file
from freqtrade.exceptions import OperationalException
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)
@@ -40,8 +42,9 @@ def start_hyperopt_list(args: Dict[str, Any]) -> None:
'filter_max_objective': config.get('hyperopt_list_max_objective', None),
}
results_file = (config['user_data_dir'] /
'hyperopt_results' / 'hyperopt_results.pickle')
results_file = get_latest_hyperopt_file(
config['user_data_dir'] / 'hyperopt_results',
config.get('hyperoptexportfilename'))
# Previous evaluations
epochs = Hyperopt.load_previous_results(results_file)
@@ -80,8 +83,10 @@ def start_hyperopt_show(args: Dict[str, Any]) -> None:
print_json = config.get('print_json', False)
no_header = config.get('hyperopt_show_no_header', False)
results_file = (config['user_data_dir'] /
'hyperopt_results' / 'hyperopt_results.pickle')
results_file = get_latest_hyperopt_file(
config['user_data_dir'] / 'hyperopt_results',
config.get('hyperoptexportfilename'))
n = config.get('hyperopt_show_index', -1)
filteroptions = {

View File

@@ -5,20 +5,20 @@ from collections import OrderedDict
from pathlib import Path
from typing import Any, Dict, List
from colorama import init as colorama_init
from colorama import Fore, Style
import rapidjson
from colorama import Fore, Style
from colorama import init as colorama_init
from tabulate import tabulate
from freqtrade.configuration import setup_utils_configuration
from freqtrade.constants import USERPATH_HYPEROPTS, USERPATH_STRATEGIES
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import (available_exchanges, ccxt_exchanges,
market_is_active)
from freqtrade.exchange import available_exchanges, ccxt_exchanges, market_is_active
from freqtrade.misc import plural
from freqtrade.resolvers import ExchangeResolver, StrategyResolver
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)
@@ -203,15 +203,16 @@ def start_show_trades(args: Dict[str, Any]) -> None:
"""
Show trades
"""
from freqtrade.persistence import init, Trade
import json
from freqtrade.persistence import Trade, init_db
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
if 'db_url' not in config:
raise OperationalException("--db-url is required for this command.")
logger.info(f'Using DB: "{config["db_url"]}"')
init(config['db_url'], clean_open_orders=False)
init_db(config['db_url'], clean_open_orders=False)
tfilter = []
if config.get('trade_ids'):

View File

@@ -6,6 +6,7 @@ from freqtrade.configuration import setup_utils_configuration
from freqtrade.exceptions import DependencyException, OperationalException
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)
@@ -58,6 +59,7 @@ def start_hyperopt(args: Dict[str, Any]) -> None:
# Import here to avoid loading hyperopt module when it's not used
try:
from filelock import FileLock, Timeout
from freqtrade.optimize.hyperopt import Hyperopt
except ImportError as e:
raise OperationalException(
@@ -98,6 +100,7 @@ def start_edge(args: Dict[str, Any]) -> None:
:return: None
"""
from freqtrade.optimize.edge_cli import EdgeCli
# Initialize configuration
config = setup_optimize_configuration(args, RunMode.EDGE)
logger.info('Starting freqtrade in Edge mode')

View File

@@ -7,6 +7,7 @@ from freqtrade.configuration import setup_utils_configuration
from freqtrade.resolvers import ExchangeResolver
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)
@@ -14,7 +15,7 @@ def start_test_pairlist(args: Dict[str, Any]) -> None:
"""
Test Pairlist configuration
"""
from freqtrade.pairlist.pairlistmanager import PairListManager
from freqtrade.plugins.pairlistmanager import PairListManager
config = setup_utils_configuration(args, RunMode.UTIL_EXCHANGE)
exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config, validate=False)

View File

@@ -1,5 +1,4 @@
import logging
from typing import Any, Dict

View File

@@ -1,7 +1,7 @@
# flake8: noqa: F401
from freqtrade.configuration.config_setup import setup_utils_configuration
from freqtrade.configuration.check_exchange import check_exchange, remove_credentials
from freqtrade.configuration.timerange import TimeRange
from freqtrade.configuration.configuration import Configuration
from freqtrade.configuration.config_setup import setup_utils_configuration
from freqtrade.configuration.config_validation import validate_config_consistency
from freqtrade.configuration.configuration import Configuration
from freqtrade.configuration.timerange import TimeRange

View File

@@ -2,11 +2,11 @@ import logging
from typing import Any, Dict
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import (available_exchanges, get_exchange_bad_reason,
is_exchange_bad, is_exchange_known_ccxt,
is_exchange_officially_supported)
from freqtrade.exchange import (available_exchanges, get_exchange_bad_reason, is_exchange_bad,
is_exchange_known_ccxt, is_exchange_officially_supported)
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)

View File

@@ -1,10 +1,12 @@
import logging
from typing import Any, Dict
from freqtrade.state import RunMode
from .check_exchange import remove_credentials
from .config_validation import validate_config_consistency
from .configuration import Configuration
from .check_exchange import remove_credentials
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)

View File

@@ -9,6 +9,7 @@ from freqtrade import constants
from freqtrade.exceptions import OperationalException
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)
@@ -73,6 +74,7 @@ def validate_config_consistency(conf: Dict[str, Any]) -> None:
_validate_trailing_stoploss(conf)
_validate_edge(conf)
_validate_whitelist(conf)
_validate_protections(conf)
_validate_unlimited_amount(conf)
# validate configuration before returning
@@ -136,6 +138,10 @@ def _validate_edge(conf: Dict[str, Any]) -> None:
"Edge and VolumePairList are incompatible, "
"Edge will override whatever pairs VolumePairlist selects."
)
if not conf.get('ask_strategy', {}).get('use_sell_signal', True):
raise OperationalException(
"Edge requires `use_sell_signal` to be True, otherwise no sells will happen."
)
def _validate_whitelist(conf: Dict[str, Any]) -> None:
@@ -150,3 +156,22 @@ def _validate_whitelist(conf: Dict[str, Any]) -> None:
if (pl.get('method') == 'StaticPairList'
and not conf.get('exchange', {}).get('pair_whitelist')):
raise OperationalException("StaticPairList requires pair_whitelist to be set.")
def _validate_protections(conf: Dict[str, Any]) -> None:
"""
Validate protection configuration validity
"""
for prot in conf.get('protections', []):
if ('stop_duration' in prot and 'stop_duration_candles' in prot):
raise OperationalException(
"Protections must specify either `stop_duration` or `stop_duration_candles`.\n"
f"Please fix the protection {prot.get('method')}"
)
if ('lookback_period' in prot and 'lookback_period_candles' in prot):
raise OperationalException(
"Protections must specify either `lookback_period` or `lookback_period_candles`.\n"
f"Please fix the protection {prot.get('method')}"
)

View File

@@ -10,14 +10,14 @@ from typing import Any, Callable, Dict, List, Optional
from freqtrade import constants
from freqtrade.configuration.check_exchange import check_exchange
from freqtrade.configuration.deprecated_settings import process_temporary_deprecated_settings
from freqtrade.configuration.directory_operations import (create_datadir,
create_userdata_dir)
from freqtrade.configuration.directory_operations import create_datadir, create_userdata_dir
from freqtrade.configuration.load_config import load_config_file
from freqtrade.exceptions import OperationalException
from freqtrade.loggers import setup_logging
from freqtrade.misc import deep_merge_dicts, json_load
from freqtrade.state import NON_UTIL_MODES, TRADING_MODES, RunMode
logger = logging.getLogger(__name__)
@@ -211,6 +211,9 @@ class Configuration:
self._args_to_config(config, argname='position_stacking',
logstring='Parameter --enable-position-stacking detected ...')
self._args_to_config(
config, argname='enable_protections',
logstring='Parameter --enable-protections detected, enabling Protections. ...')
# Setting max_open_trades to infinite if -1
if config.get('max_open_trades') == -1:
config['max_open_trades'] = float('inf')
@@ -263,6 +266,9 @@ class Configuration:
self._args_to_config(config, argname='hyperopt_path',
logstring='Using additional Hyperopt lookup path: {}')
self._args_to_config(config, argname='hyperoptexportfilename',
logstring='Using hyperopt file: {}')
self._args_to_config(config, argname='epochs',
logstring='Parameter --epochs detected ... '
'Will run Hyperopt with for {} epochs ...'
@@ -295,9 +301,6 @@ class Configuration:
self._args_to_config(config, argname='hyperopt_min_trades',
logstring='Parameter --min-trades detected: {}')
self._args_to_config(config, argname='hyperopt_continue',
logstring='Hyperopt continue: {}')
self._args_to_config(config, argname='hyperopt_loss',
logstring='Using Hyperopt loss class name: {}')

View File

@@ -26,6 +26,24 @@ def check_conflicting_settings(config: Dict[str, Any],
)
def process_removed_setting(config: Dict[str, Any],
section1: str, name1: str,
section2: str, name2: str) -> None:
"""
:param section1: Removed section
:param name1: Removed setting name
:param section2: new section for this key
:param name2: new setting name
"""
section1_config = config.get(section1, {})
if name1 in section1_config:
raise OperationalException(
f"Setting `{section1}.{name1}` has been moved to `{section2}.{name2}. "
f"Please delete it from your configuration and use the `{section2}.{name2}` "
"setting instead."
)
def process_deprecated_setting(config: Dict[str, Any],
section1: str, name1: str,
section2: str, name2: str) -> None:
@@ -44,19 +62,18 @@ def process_deprecated_setting(config: Dict[str, Any],
def process_temporary_deprecated_settings(config: Dict[str, Any]) -> None:
check_conflicting_settings(config, 'ask_strategy', 'use_sell_signal',
'experimental', 'use_sell_signal')
check_conflicting_settings(config, 'ask_strategy', 'sell_profit_only',
'experimental', 'sell_profit_only')
check_conflicting_settings(config, 'ask_strategy', 'ignore_roi_if_buy_signal',
'experimental', 'ignore_roi_if_buy_signal')
# Kept for future deprecated / moved settings
# check_conflicting_settings(config, 'ask_strategy', 'use_sell_signal',
# 'experimental', 'use_sell_signal')
# process_deprecated_setting(config, 'ask_strategy', 'use_sell_signal',
# 'experimental', 'use_sell_signal')
process_deprecated_setting(config, 'ask_strategy', 'use_sell_signal',
'experimental', 'use_sell_signal')
process_deprecated_setting(config, 'ask_strategy', 'sell_profit_only',
'experimental', 'sell_profit_only')
process_deprecated_setting(config, 'ask_strategy', 'ignore_roi_if_buy_signal',
'experimental', 'ignore_roi_if_buy_signal')
process_removed_setting(config, 'experimental', 'use_sell_signal',
'ask_strategy', 'use_sell_signal')
process_removed_setting(config, 'experimental', 'sell_profit_only',
'ask_strategy', 'sell_profit_only')
process_removed_setting(config, 'experimental', 'ignore_roi_if_buy_signal',
'ask_strategy', 'ignore_roi_if_buy_signal')
if (config.get('edge', {}).get('enabled', False)
and 'capital_available_percentage' in config.get('edge', {})):

View File

@@ -3,8 +3,9 @@ import shutil
from pathlib import Path
from typing import Any, Dict, Optional
from freqtrade.exceptions import OperationalException
from freqtrade.constants import USER_DATA_FILES
from freqtrade.exceptions import OperationalException
logger = logging.getLogger(__name__)

View File

@@ -11,6 +11,7 @@ import rapidjson
from freqtrade.exceptions import OperationalException
logger = logging.getLogger(__name__)

View File

@@ -52,11 +52,11 @@ class TimeRange:
:return: None (Modifies the object in place)
"""
if (not self.starttype or (startup_candles
and min_date.timestamp >= self.startts)):
and min_date.int_timestamp >= self.startts)):
# If no startts was defined, or backtest-data starts at the defined backtest-date
logger.warning("Moving start-date by %s candles to account for startup time.",
startup_candles)
self.startts = (min_date.timestamp + timeframe_secs * startup_candles)
self.startts = (min_date.int_timestamp + timeframe_secs * startup_candles)
self.starttype = 'date'
@staticmethod
@@ -89,7 +89,7 @@ class TimeRange:
if stype[0]:
starts = rvals[index]
if stype[0] == 'date' and len(starts) == 8:
start = arrow.get(starts, 'YYYYMMDD').timestamp
start = arrow.get(starts, 'YYYYMMDD').int_timestamp
elif len(starts) == 13:
start = int(starts) // 1000
else:
@@ -98,7 +98,7 @@ class TimeRange:
if stype[1]:
stops = rvals[index]
if stype[1] == 'date' and len(stops) == 8:
stop = arrow.get(stops, 'YYYYMMDD').timestamp
stop = arrow.get(stops, 'YYYYMMDD').int_timestamp
elif len(stops) == 13:
stop = int(stops) // 1000
else:

View File

@@ -11,7 +11,6 @@ DEFAULT_EXCHANGE = 'bittrex'
PROCESS_THROTTLE_SECS = 5 # sec
HYPEROPT_EPOCH = 100 # epochs
RETRY_TIMEOUT = 30 # sec
DEFAULT_HYPEROPT_LOSS = 'DefaultHyperOptLoss'
DEFAULT_DB_PROD_URL = 'sqlite:///tradesv3.sqlite'
DEFAULT_DB_DRYRUN_URL = 'sqlite:///tradesv3.dryrun.sqlite'
UNLIMITED_STAKE_AMOUNT = 'unlimited'
@@ -21,10 +20,15 @@ REQUIRED_ORDERTYPES = ['buy', 'sell', 'stoploss', 'stoploss_on_exchange']
ORDERBOOK_SIDES = ['ask', 'bid']
ORDERTYPE_POSSIBILITIES = ['limit', 'market']
ORDERTIF_POSSIBILITIES = ['gtc', 'fok', 'ioc']
HYPEROPT_LOSS_BUILTIN = ['ShortTradeDurHyperOptLoss', 'OnlyProfitHyperOptLoss',
'SharpeHyperOptLoss', 'SharpeHyperOptLossDaily',
'SortinoHyperOptLoss', 'SortinoHyperOptLossDaily']
AVAILABLE_PAIRLISTS = ['StaticPairList', 'VolumePairList',
'AgeFilter', 'PrecisionFilter', 'PriceFilter',
'ShuffleFilter', 'SpreadFilter']
AVAILABLE_DATAHANDLERS = ['json', 'jsongz']
'AgeFilter', 'PerformanceFilter', 'PrecisionFilter',
'PriceFilter', 'RangeStabilityFilter', 'ShuffleFilter',
'SpreadFilter']
AVAILABLE_PROTECTIONS = ['CooldownPeriod', 'LowProfitPairs', 'MaxDrawdown', 'StoplossGuard']
AVAILABLE_DATAHANDLERS = ['json', 'jsongz', 'hdf5']
DRY_RUN_WALLET = 1000
DATETIME_PRINT_FORMAT = '%Y-%m-%d %H:%M:%S'
MATH_CLOSE_PREC = 1e-14 # Precision used for float comparisons
@@ -39,6 +43,8 @@ USERPATH_HYPEROPTS = 'hyperopts'
USERPATH_STRATEGIES = 'strategies'
USERPATH_NOTEBOOKS = 'notebooks'
TELEGRAM_SETTING_OPTIONS = ['on', 'off', 'silent']
# Soure files with destination directories within user-directory
USER_DATA_FILES = {
'sample_strategy.py': USERPATH_STRATEGIES,
@@ -178,9 +184,6 @@ CONF_SCHEMA = {
'experimental': {
'type': 'object',
'properties': {
'use_sell_signal': {'type': 'boolean'},
'sell_profit_only': {'type': 'boolean'},
'ignore_roi_if_buy_signal': {'type': 'boolean'},
'block_bad_exchanges': {'type': 'boolean'}
}
},
@@ -190,7 +193,21 @@ CONF_SCHEMA = {
'type': 'object',
'properties': {
'method': {'type': 'string', 'enum': AVAILABLE_PAIRLISTS},
'config': {'type': 'object'}
},
'required': ['method'],
}
},
'protections': {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'method': {'type': 'string', 'enum': AVAILABLE_PROTECTIONS},
'stop_duration': {'type': 'number', 'minimum': 0.0},
'stop_duration_candles': {'type': 'number', 'minimum': 0},
'trade_limit': {'type': 'number', 'minimum': 1},
'lookback_period': {'type': 'number', 'minimum': 1},
'lookback_period_candles': {'type': 'number', 'minimum': 1},
},
'required': ['method'],
}
@@ -201,6 +218,18 @@ CONF_SCHEMA = {
'enabled': {'type': 'boolean'},
'token': {'type': 'string'},
'chat_id': {'type': 'string'},
'notification_settings': {
'type': 'object',
'properties': {
'status': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS},
'warning': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS},
'startup': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS},
'buy': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS},
'sell': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS},
'buy_cancel': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS},
'sell_cancel': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS}
}
}
},
'required': ['enabled', 'token', 'chat_id']
},
@@ -338,11 +367,17 @@ SCHEMA_MINIMAL_REQUIRED = [
CANCEL_REASON = {
"TIMEOUT": "cancelled due to timeout",
"PARTIALLY_FILLED": "partially filled - keeping order open",
"PARTIALLY_FILLED_KEEP_OPEN": "partially filled - keeping order open",
"PARTIALLY_FILLED": "partially filled",
"FULLY_CANCELLED": "fully cancelled",
"ALL_CANCELLED": "cancelled (all unfilled and partially filled open orders cancelled)",
"CANCELLED_ON_EXCHANGE": "cancelled on exchange",
"FORCE_SELL": "forcesold",
}
# List of pairs with their timeframes
PairWithTimeframe = Tuple[str, str]
ListPairsWithTimeframes = List[PairWithTimeframe]
# Type for trades list
TradeList = List[List]

View File

@@ -2,17 +2,17 @@
Helpers when analyzing backtest data
"""
import logging
from datetime import timezone
from pathlib import Path
from typing import Dict, Union, Tuple, Any, Optional
from typing import Any, Dict, Optional, Tuple, Union
import numpy as np
import pandas as pd
from datetime import timezone
from freqtrade import persistence
from freqtrade.constants import LAST_BT_RESULT_FN
from freqtrade.misc import json_load
from freqtrade.persistence import Trade
from freqtrade.persistence import Trade, init_db
logger = logging.getLogger(__name__)
@@ -21,10 +21,11 @@ BT_DATA_COLUMNS = ["pair", "profit_percent", "open_date", "close_date", "index",
"open_rate", "close_rate", "open_at_end", "sell_reason"]
def get_latest_backtest_filename(directory: Union[Path, str]) -> str:
def get_latest_optimize_filename(directory: Union[Path, str], variant: str) -> str:
"""
Get latest backtest export based on '.last_result.json'.
:param directory: Directory to search for last result
:param variant: 'backtest' or 'hyperopt' - the method to return
:return: string containing the filename of the latest backtest result
:raises: ValueError in the following cases:
* Directory does not exist
@@ -44,10 +45,57 @@ def get_latest_backtest_filename(directory: Union[Path, str]) -> str:
with filename.open() as file:
data = json_load(file)
if 'latest_backtest' not in data:
if f'latest_{variant}' not in data:
raise ValueError(f"Invalid '{LAST_BT_RESULT_FN}' format.")
return data['latest_backtest']
return data[f'latest_{variant}']
def get_latest_backtest_filename(directory: Union[Path, str]) -> str:
"""
Get latest backtest export based on '.last_result.json'.
:param directory: Directory to search for last result
:return: string containing the filename of the latest backtest result
:raises: ValueError in the following cases:
* Directory does not exist
* `directory/.last_result.json` does not exist
* `directory/.last_result.json` has the wrong content
"""
return get_latest_optimize_filename(directory, 'backtest')
def get_latest_hyperopt_filename(directory: Union[Path, str]) -> str:
"""
Get latest hyperopt export based on '.last_result.json'.
:param directory: Directory to search for last result
:return: string containing the filename of the latest hyperopt result
:raises: ValueError in the following cases:
* Directory does not exist
* `directory/.last_result.json` does not exist
* `directory/.last_result.json` has the wrong content
"""
try:
return get_latest_optimize_filename(directory, 'hyperopt')
except ValueError:
# Return default (legacy) pickle filename
return 'hyperopt_results.pickle'
def get_latest_hyperopt_file(directory: Union[Path, str], predef_filename: str = None) -> Path:
"""
Get latest hyperopt export based on '.last_result.json'.
:param directory: Directory to search for last result
:return: string containing the filename of the latest hyperopt result
:raises: ValueError in the following cases:
* Directory does not exist
* `directory/.last_result.json` does not exist
* `directory/.last_result.json` has the wrong content
"""
if isinstance(directory, str):
directory = Path(directory)
if predef_filename:
return directory / predef_filename
return directory / get_latest_hyperopt_filename(directory)
def load_backtest_stats(filename: Union[Path, str]) -> Dict[str, Any]:
@@ -169,7 +217,7 @@ def load_trades_from_db(db_url: str, strategy: Optional[str] = None) -> pd.DataF
Can also serve as protection to load the correct result.
:return: Dataframe containing Trades
"""
persistence.init(db_url, clean_open_orders=False)
init_db(db_url, clean_open_orders=False)
columns = ["pair", "open_date", "close_date", "profit", "profit_percent",
"open_rate", "close_rate", "amount", "trade_duration", "sell_reason",

View File

@@ -10,8 +10,8 @@ from typing import Any, Dict, List
import pandas as pd
from pandas import DataFrame, to_datetime
from freqtrade.constants import (DEFAULT_DATAFRAME_COLUMNS,
DEFAULT_TRADES_COLUMNS)
from freqtrade.constants import DEFAULT_DATAFRAME_COLUMNS, DEFAULT_TRADES_COLUMNS, TradeList
logger = logging.getLogger(__name__)
@@ -168,7 +168,7 @@ def trades_remove_duplicates(trades: List[List]) -> List[List]:
return [i for i, _ in itertools.groupby(sorted(trades, key=itemgetter(0)))]
def trades_dict_to_list(trades: List[Dict]) -> List[List]:
def trades_dict_to_list(trades: List[Dict]) -> TradeList:
"""
Convert fetch_trades result into a List (to be more memory efficient).
:param trades: List of trades, as returned by ccxt.fetch_trades.
@@ -177,16 +177,18 @@ def trades_dict_to_list(trades: List[Dict]) -> List[List]:
return [[t[col] for col in DEFAULT_TRADES_COLUMNS] for t in trades]
def trades_to_ohlcv(trades: List, timeframe: str) -> DataFrame:
def trades_to_ohlcv(trades: TradeList, timeframe: str) -> DataFrame:
"""
Converts trades list to OHLCV list
TODO: This should get a dedicated test
:param trades: List of trades, as returned by ccxt.fetch_trades.
:param timeframe: Timeframe to resample data to
:return: OHLCV Dataframe.
:raises: ValueError if no trades are provided
"""
from freqtrade.exchange import timeframe_to_minutes
timeframe_minutes = timeframe_to_minutes(timeframe)
if not trades:
raise ValueError('Trade-list empty.')
df = pd.DataFrame(trades, columns=DEFAULT_TRADES_COLUMNS)
df['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms',
utc=True,)
@@ -255,6 +257,7 @@ def convert_ohlcv_format(config: Dict[str, Any], convert_from: str, convert_to:
drop_incomplete=False,
startup_candles=0)
logger.info(f"Converting {len(data)} candles for {pair}")
if len(data) > 0:
trg.ohlcv_store(pair=pair, timeframe=timeframe, data=data)
if erase and convert_from != convert_to:
logger.info(f"Deleting source data for {pair} / {timeframe}")

View File

@@ -8,7 +8,6 @@ import logging
from datetime import datetime, timezone
from typing import Any, Dict, List, Optional, Tuple
from arrow import Arrow
from pandas import DataFrame
from freqtrade.constants import ListPairsWithTimeframes, PairWithTimeframe
@@ -17,6 +16,7 @@ from freqtrade.exceptions import ExchangeError, OperationalException
from freqtrade.exchange import Exchange
from freqtrade.state import RunMode
logger = logging.getLogger(__name__)
@@ -37,7 +37,13 @@ class DataProvider:
:param timeframe: Timeframe to get data for
:param dataframe: analyzed dataframe
"""
self.__cached_pairs[(pair, timeframe)] = (dataframe, Arrow.utcnow().datetime)
self.__cached_pairs[(pair, timeframe)] = (dataframe, datetime.now(timezone.utc))
def add_pairlisthandler(self, pairlists) -> None:
"""
Allow adding pairlisthandler after initialization
"""
self._pairlists = pairlists
def refresh(self,
pairlist: ListPairsWithTimeframes,
@@ -81,7 +87,8 @@ class DataProvider:
"""
return load_pair_history(pair=pair,
timeframe=timeframe or self._config['timeframe'],
datadir=self._config['datadir']
datadir=self._config['datadir'],
data_format=self._config.get('dataformat_ohlcv', 'json')
)
def get_pair_dataframe(self, pair: str, timeframe: str = None) -> DataFrame:

View File

@@ -5,10 +5,8 @@ Includes:
* load data for a pair (or a list of pairs) from disk
* download data from exchange and store to disk
"""
from .history_utils import (convert_trades_to_ohlcv, # noqa: F401
get_timerange, load_data, load_pair_history,
refresh_backtest_ohlcv_data,
refresh_backtest_trades_data, refresh_data,
# flake8: noqa: F401
from .history_utils import (convert_trades_to_ohlcv, get_timerange, load_data, load_pair_history,
refresh_backtest_ohlcv_data, refresh_backtest_trades_data, refresh_data,
validate_backtest_data)
from .idatahandler import get_datahandler # noqa: F401
from .idatahandler import get_datahandler

View File

@@ -0,0 +1,213 @@
import logging
import re
from pathlib import Path
from typing import List, Optional
import numpy as np
import pandas as pd
from freqtrade import misc
from freqtrade.configuration import TimeRange
from freqtrade.constants import (DEFAULT_DATAFRAME_COLUMNS, DEFAULT_TRADES_COLUMNS,
ListPairsWithTimeframes, TradeList)
from .idatahandler import IDataHandler
logger = logging.getLogger(__name__)
class HDF5DataHandler(IDataHandler):
_columns = DEFAULT_DATAFRAME_COLUMNS
@classmethod
def ohlcv_get_available_data(cls, datadir: Path) -> ListPairsWithTimeframes:
"""
Returns a list of all pairs with ohlcv data available in this datadir
:param datadir: Directory to search for ohlcv files
:return: List of Tuples of (pair, timeframe)
"""
_tmp = [re.search(r'^([a-zA-Z_]+)\-(\d+\S+)(?=.h5)', p.name)
for p in datadir.glob("*.h5")]
return [(match[1].replace('_', '/'), match[2]) for match in _tmp
if match and len(match.groups()) > 1]
@classmethod
def ohlcv_get_pairs(cls, datadir: Path, timeframe: str) -> List[str]:
"""
Returns a list of all pairs with ohlcv data available in this datadir
for the specified timeframe
:param datadir: Directory to search for ohlcv files
:param timeframe: Timeframe to search pairs for
:return: List of Pairs
"""
_tmp = [re.search(r'^(\S+)(?=\-' + timeframe + '.h5)', p.name)
for p in datadir.glob(f"*{timeframe}.h5")]
# Check if regex found something and only return these results
return [match[0].replace('_', '/') for match in _tmp if match]
def ohlcv_store(self, pair: str, timeframe: str, data: pd.DataFrame) -> None:
"""
Store data in hdf5 file.
:param pair: Pair - used to generate filename
:timeframe: Timeframe - used to generate filename
:data: Dataframe containing OHLCV data
:return: None
"""
key = self._pair_ohlcv_key(pair, timeframe)
_data = data.copy()
filename = self._pair_data_filename(self._datadir, pair, timeframe)
ds = pd.HDFStore(filename, mode='a', complevel=9, complib='blosc')
ds.put(key, _data.loc[:, self._columns], format='table', data_columns=['date'])
ds.close()
def _ohlcv_load(self, pair: str, timeframe: str,
timerange: Optional[TimeRange] = None) -> pd.DataFrame:
"""
Internal method used to load data for one pair from disk.
Implements the loading and conversion to a Pandas dataframe.
Timerange trimming and dataframe validation happens outside of this method.
:param pair: Pair to load data
:param timeframe: Timeframe (e.g. "5m")
:param timerange: Limit data to be loaded to this timerange.
Optionally implemented by subclasses to avoid loading
all data where possible.
:return: DataFrame with ohlcv data, or empty DataFrame
"""
key = self._pair_ohlcv_key(pair, timeframe)
filename = self._pair_data_filename(self._datadir, pair, timeframe)
if not filename.exists():
return pd.DataFrame(columns=self._columns)
where = []
if timerange:
if timerange.starttype == 'date':
where.append(f"date >= Timestamp({timerange.startts * 1e9})")
if timerange.stoptype == 'date':
where.append(f"date < Timestamp({timerange.stopts * 1e9})")
pairdata = pd.read_hdf(filename, key=key, mode="r", where=where)
if list(pairdata.columns) != self._columns:
raise ValueError("Wrong dataframe format")
pairdata = pairdata.astype(dtype={'open': 'float', 'high': 'float',
'low': 'float', 'close': 'float', 'volume': 'float'})
return pairdata
def ohlcv_purge(self, pair: str, timeframe: str) -> bool:
"""
Remove data for this pair
:param pair: Delete data for this pair.
:param timeframe: Timeframe (e.g. "5m")
:return: True when deleted, false if file did not exist.
"""
filename = self._pair_data_filename(self._datadir, pair, timeframe)
if filename.exists():
filename.unlink()
return True
return False
def ohlcv_append(self, pair: str, timeframe: str, data: pd.DataFrame) -> None:
"""
Append data to existing data structures
:param pair: Pair
:param timeframe: Timeframe this ohlcv data is for
:param data: Data to append.
"""
raise NotImplementedError()
@classmethod
def trades_get_pairs(cls, datadir: Path) -> List[str]:
"""
Returns a list of all pairs for which trade data is available in this
:param datadir: Directory to search for ohlcv files
:return: List of Pairs
"""
_tmp = [re.search(r'^(\S+)(?=\-trades.h5)', p.name)
for p in datadir.glob("*trades.h5")]
# Check if regex found something and only return these results to avoid exceptions.
return [match[0].replace('_', '/') for match in _tmp if match]
def trades_store(self, pair: str, data: TradeList) -> None:
"""
Store trades data (list of Dicts) to file
:param pair: Pair - used for filename
:param data: List of Lists containing trade data,
column sequence as in DEFAULT_TRADES_COLUMNS
"""
key = self._pair_trades_key(pair)
ds = pd.HDFStore(self._pair_trades_filename(self._datadir, pair),
mode='a', complevel=9, complib='blosc')
ds.put(key, pd.DataFrame(data, columns=DEFAULT_TRADES_COLUMNS),
format='table', data_columns=['timestamp'])
ds.close()
def trades_append(self, pair: str, data: TradeList):
"""
Append data to existing files
:param pair: Pair - used for filename
:param data: List of Lists containing trade data,
column sequence as in DEFAULT_TRADES_COLUMNS
"""
raise NotImplementedError()
def _trades_load(self, pair: str, timerange: Optional[TimeRange] = None) -> TradeList:
"""
Load a pair from h5 file.
:param pair: Load trades for this pair
:param timerange: Timerange to load trades for - currently not implemented
:return: List of trades
"""
key = self._pair_trades_key(pair)
filename = self._pair_trades_filename(self._datadir, pair)
if not filename.exists():
return []
where = []
if timerange:
if timerange.starttype == 'date':
where.append(f"timestamp >= {timerange.startts * 1e3}")
if timerange.stoptype == 'date':
where.append(f"timestamp < {timerange.stopts * 1e3}")
trades: pd.DataFrame = pd.read_hdf(filename, key=key, mode="r", where=where)
trades[['id', 'type']] = trades[['id', 'type']].replace({np.nan: None})
return trades.values.tolist()
def trades_purge(self, pair: str) -> bool:
"""
Remove data for this pair
:param pair: Delete data for this pair.
:return: True when deleted, false if file did not exist.
"""
filename = self._pair_trades_filename(self._datadir, pair)
if filename.exists():
filename.unlink()
return True
return False
@classmethod
def _pair_ohlcv_key(cls, pair: str, timeframe: str) -> str:
return f"{pair}/ohlcv/tf_{timeframe}"
@classmethod
def _pair_trades_key(cls, pair: str) -> str:
return f"{pair}/trades"
@classmethod
def _pair_data_filename(cls, datadir: Path, pair: str, timeframe: str) -> Path:
pair_s = misc.pair_to_filename(pair)
filename = datadir.joinpath(f'{pair_s}-{timeframe}.h5')
return filename
@classmethod
def _pair_trades_filename(cls, datadir: Path, pair: str) -> Path:
pair_s = misc.pair_to_filename(pair)
filename = datadir.joinpath(f'{pair_s}-trades.h5')
return filename

View File

@@ -9,14 +9,14 @@ from pandas import DataFrame
from freqtrade.configuration import TimeRange
from freqtrade.constants import DEFAULT_DATAFRAME_COLUMNS
from freqtrade.data.converter import (ohlcv_to_dataframe,
trades_remove_duplicates,
trades_to_ohlcv)
from freqtrade.data.converter import (clean_ohlcv_dataframe, ohlcv_to_dataframe,
trades_remove_duplicates, trades_to_ohlcv)
from freqtrade.data.history.idatahandler import IDataHandler, get_datahandler
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import Exchange
from freqtrade.misc import format_ms_time
logger = logging.getLogger(__name__)
@@ -135,7 +135,6 @@ def _load_cached_data_for_updating(pair: str, timeframe: str, timerange: Optiona
start = None
if timerange:
if timerange.starttype == 'date':
# TODO: convert to date for conversion
start = datetime.fromtimestamp(timerange.startts, tz=timezone.utc)
# Intentionally don't pass timerange in - since we need to load the full dataset.
@@ -202,7 +201,10 @@ def _download_pair_history(datadir: Path,
if data.empty:
data = new_dataframe
else:
data = data.append(new_dataframe)
# Run cleaning again to ensure there were no duplicate candles
# Especially between existing and new data.
data = clean_ohlcv_dataframe(data.append(new_dataframe), timeframe, pair,
fill_missing=False, drop_incomplete=False)
logger.debug("New Start: %s",
f"{data.iloc[0]['date']:%Y-%m-%d %H:%M:%S}" if not data.empty else 'None')
@@ -212,10 +214,9 @@ def _download_pair_history(datadir: Path,
data_handler.ohlcv_store(pair, timeframe, data=data)
return True
except Exception as e:
logger.error(
except Exception:
logger.exception(
f'Failed to download history data for pair: "{pair}", timeframe: {timeframe}.'
f'Error: {e}'
)
return False
@@ -302,10 +303,9 @@ def _download_trades_history(exchange: Exchange,
logger.info(f"New Amount of trades: {len(trades)}")
return True
except Exception as e:
logger.error(
except Exception:
logger.exception(
f'Failed to download historic trades for pair: "{pair}". '
f'Error: {e}'
)
return False
@@ -354,9 +354,12 @@ def convert_trades_to_ohlcv(pairs: List[str], timeframes: List[str],
if erase:
if data_handler_ohlcv.ohlcv_purge(pair, timeframe):
logger.info(f'Deleting existing data for pair {pair}, interval {timeframe}.')
try:
ohlcv = trades_to_ohlcv(trades, timeframe)
# Store ohlcv
data_handler_ohlcv.ohlcv_store(pair, timeframe, data=ohlcv)
except ValueError:
logger.exception(f'Could not convert {pair} to OHLCV.')
def get_timerange(data: Dict[str, DataFrame]) -> Tuple[arrow.Arrow, arrow.Arrow]:

View File

@@ -13,15 +13,12 @@ from typing import List, Optional, Type
from pandas import DataFrame
from freqtrade.configuration import TimeRange
from freqtrade.constants import ListPairsWithTimeframes
from freqtrade.data.converter import (clean_ohlcv_dataframe,
trades_remove_duplicates, trim_dataframe)
from freqtrade.constants import ListPairsWithTimeframes, TradeList
from freqtrade.data.converter import clean_ohlcv_dataframe, trades_remove_duplicates, trim_dataframe
from freqtrade.exchange import timeframe_to_seconds
logger = logging.getLogger(__name__)
# Type for trades list
TradeList = List[List]
logger = logging.getLogger(__name__)
class IDataHandler(ABC):
@@ -50,9 +47,7 @@ class IDataHandler(ABC):
@abstractmethod
def ohlcv_store(self, pair: str, timeframe: str, data: DataFrame) -> None:
"""
Store data in json format "values".
format looks as follows:
[[<date>,<open>,<high>,<low>,<close>]]
Store ohlcv data.
:param pair: Pair - used to generate filename
:timeframe: Timeframe - used to generate filename
:data: Dataframe containing OHLCV data
@@ -239,6 +234,9 @@ def get_datahandlerclass(datatype: str) -> Type[IDataHandler]:
elif datatype == 'jsongz':
from .jsondatahandler import JsonGzDataHandler
return JsonGzDataHandler
elif datatype == 'hdf5':
from .hdf5datahandler import HDF5DataHandler
return HDF5DataHandler
else:
raise ValueError(f"No datahandler for datatype {datatype} available.")

View File

@@ -8,11 +8,11 @@ from pandas import DataFrame, read_json, to_datetime
from freqtrade import misc
from freqtrade.configuration import TimeRange
from freqtrade.constants import (DEFAULT_DATAFRAME_COLUMNS,
ListPairsWithTimeframes)
from freqtrade.constants import DEFAULT_DATAFRAME_COLUMNS, ListPairsWithTimeframes, TradeList
from freqtrade.data.converter import trades_dict_to_list
from .idatahandler import IDataHandler, TradeList
from .idatahandler import IDataHandler
logger = logging.getLogger(__name__)

View File

@@ -9,11 +9,12 @@ import utils_find_1st as utf1st
from pandas import DataFrame
from freqtrade.configuration import TimeRange
from freqtrade.constants import UNLIMITED_STAKE_AMOUNT, DATETIME_PRINT_FORMAT
from freqtrade.exceptions import OperationalException
from freqtrade.constants import DATETIME_PRINT_FORMAT, UNLIMITED_STAKE_AMOUNT
from freqtrade.data.history import get_timerange, load_data, refresh_data
from freqtrade.exceptions import OperationalException
from freqtrade.strategy.interface import SellType
logger = logging.getLogger(__name__)
@@ -86,7 +87,7 @@ class Edge:
heartbeat = self.edge_config.get('process_throttle_secs')
if (self._last_updated > 0) and (
self._last_updated + heartbeat > arrow.utcnow().timestamp):
self._last_updated + heartbeat > arrow.utcnow().int_timestamp):
return False
data: Dict[str, Any] = {}
@@ -145,7 +146,7 @@ class Edge:
# Fill missing, calculable columns, profit, duration , abs etc.
trades_df = self._fill_calculable_fields(DataFrame(trades))
self._cached_pairs = self._process_expectancy(trades_df)
self._last_updated = arrow.utcnow().timestamp
self._last_updated = arrow.utcnow().int_timestamp
return True
@@ -309,8 +310,10 @@ class Edge:
# Calculating number of losing trades, average win and average loss
df['nb_loss_trades'] = df['nb_trades'] - df['nb_win_trades']
df['average_win'] = df['profit_sum'] / df['nb_win_trades']
df['average_loss'] = df['loss_sum'] / df['nb_loss_trades']
df['average_win'] = np.where(df['nb_win_trades'] == 0, 0.0,
df['profit_sum'] / df['nb_win_trades'])
df['average_loss'] = np.where(df['nb_loss_trades'] == 0, 0.0,
df['loss_sum'] / df['nb_loss_trades'])
# Win rate = number of profitable trades / number of trades
df['winrate'] = df['nb_win_trades'] / df['nb_trades']

View File

@@ -51,6 +51,13 @@ class RetryableOrderError(InvalidOrderException):
"""
class InsufficientFundsError(InvalidOrderException):
"""
This error is used when there are not enough funds available on the exchange
to create an order.
"""
class TemporaryError(ExchangeError):
"""
Temporary network or exchange related error.

View File

@@ -1,19 +1,17 @@
# flake8: noqa: F401
# isort: off
from freqtrade.exchange.common import MAP_EXCHANGE_CHILDCLASS
from freqtrade.exchange.exchange import Exchange
from freqtrade.exchange.exchange import (get_exchange_bad_reason,
is_exchange_bad,
is_exchange_known_ccxt,
is_exchange_officially_supported,
ccxt_exchanges,
available_exchanges)
from freqtrade.exchange.exchange import (timeframe_to_seconds,
timeframe_to_minutes,
timeframe_to_msecs,
timeframe_to_next_date,
timeframe_to_prev_date)
from freqtrade.exchange.exchange import (market_is_active)
from freqtrade.exchange.kraken import Kraken
from freqtrade.exchange.binance import Binance
# isort: on
from freqtrade.exchange.bibox import Bibox
from freqtrade.exchange.binance import Binance
from freqtrade.exchange.bittrex import Bittrex
from freqtrade.exchange.bybit import Bybit
from freqtrade.exchange.exchange import (available_exchanges, ccxt_exchanges,
get_exchange_bad_reason, is_exchange_bad,
is_exchange_known_ccxt, is_exchange_officially_supported,
market_is_active, timeframe_to_minutes, timeframe_to_msecs,
timeframe_to_next_date, timeframe_to_prev_date,
timeframe_to_seconds)
from freqtrade.exchange.ftx import Ftx
from freqtrade.exchange.kraken import Kraken

View File

@@ -4,6 +4,7 @@ from typing import Dict
from freqtrade.exchange import Exchange
logger = logging.getLogger(__name__)

View File

@@ -4,12 +4,12 @@ from typing import Dict
import ccxt
from freqtrade.exceptions import (DDosProtection, ExchangeError,
InvalidOrderException, OperationalException,
TemporaryError)
from freqtrade.exceptions import (DDosProtection, InsufficientFundsError, InvalidOrderException,
OperationalException, TemporaryError)
from freqtrade.exchange import Exchange
from freqtrade.exchange.common import retrier
logger = logging.getLogger(__name__)
@@ -18,22 +18,12 @@ class Binance(Exchange):
_ft_has: Dict = {
"stoploss_on_exchange": True,
"order_time_in_force": ['gtc', 'fok', 'ioc'],
"ohlcv_candle_limit": 1000,
"trades_pagination": "id",
"trades_pagination_arg": "fromId",
"l2_limit_range": [5, 10, 20, 50, 100, 500, 1000],
}
def fetch_l2_order_book(self, pair: str, limit: int = 100) -> dict:
"""
get order book level 2 from exchange
20180619: binance support limits but only on specific range
"""
limit_range = [5, 10, 20, 50, 100, 500, 1000]
# get next-higher step in the limit_range list
limit = min(list(filter(lambda x: limit <= x, limit_range)))
return super().fetch_l2_order_book(pair, limit)
def stoploss_adjust(self, stop_loss: float, order: Dict) -> bool:
"""
Verify stop_loss against stoploss-order value (limit or price)
@@ -80,7 +70,7 @@ class Binance(Exchange):
'stop price: %s. limit: %s', pair, stop_price, rate)
return order
except ccxt.InsufficientFunds as e:
raise ExchangeError(
raise InsufficientFundsError(
f'Insufficient funds to create {ordertype} sell order on market {pair}. '
f'Tried to sell amount {amount} at rate {rate}. '
f'Message: {e}') from e

View File

@@ -0,0 +1,23 @@
""" Bittrex exchange subclass """
import logging
from typing import Dict
from freqtrade.exchange import Exchange
logger = logging.getLogger(__name__)
class Bittrex(Exchange):
"""
Bittrex exchange class. Contains adjustments needed for Freqtrade to work
with this exchange.
Please note that this exchange is not included in the list of exchanges
officially supported by the Freqtrade development team. So some features
may still not work as expected.
"""
_ft_has: Dict = {
"l2_limit_range": [1, 25, 500],
}

View File

@@ -0,0 +1,24 @@
""" Bybit exchange subclass """
import logging
from typing import Dict
from freqtrade.exchange import Exchange
logger = logging.getLogger(__name__)
class Bybit(Exchange):
"""
Bybit exchange class. Contains adjustments needed for Freqtrade to work
with this exchange.
Please note that this exchange is not included in the list of exchanges
officially supported by the Freqtrade development team. So some features
may still not work as expected.
"""
# fetchCurrencies API point requires authentication for Bybit,
_ft_has: Dict = {
"ohlcv_candle_limit": 200,
}

View File

@@ -3,13 +3,17 @@ import logging
import time
from functools import wraps
from freqtrade.exceptions import (DDosProtection, RetryableOrderError,
TemporaryError)
from freqtrade.exceptions import DDosProtection, RetryableOrderError, TemporaryError
logger = logging.getLogger(__name__)
# Maximum default retry count.
# Functions are always called RETRY_COUNT + 1 times (for the original call)
API_RETRY_COUNT = 4
API_FETCH_ORDER_RETRY_COUNT = 5
BAD_EXCHANGES = {
"bitmex": "Various reasons.",
"bitstamp": "Does not provide history. "

Some files were not shown because too many files have changed in this diff Show More