Compare commits

...

1714 Commits

Author SHA1 Message Date
Matthias
2e397a88e1 Merge pull request #6592 from freqtrade/new_release
New release 2022.3
2022-03-27 15:51:58 +02:00
Matthias
fe6c62e144 Version bump 2022.3 2022-03-27 15:27:16 +02:00
Matthias
f0db721f05 Merge branch 'stable' into new_release 2022-03-27 15:09:06 +02:00
Matthias
60f2a12bd9 Fix wrong datetime conversion 2022-03-26 08:23:02 +01:00
Matthias
a682faf6b1 Merge pull request #6585 from mkavinkumar1/conftest
Removed old datetime keys and added timestamp
2022-03-25 15:57:37 +01:00
Matthias
81957e004d Revert false update 2022-03-25 15:38:38 +01:00
மனோஜ்குமார் பழனிச்சாமி
2cb24ed310 Added in ms
Just multiplied by 1000 as minuting checking in ms is not performed
2022-03-25 13:45:05 +05:30
Matthias
a55bc9c1e4 Pin jinja in docs requirements 2022-03-25 08:02:27 +01:00
மனோஜ்குமார் பழனிச்சாமி
3f98fcb0db all datetime included again 2022-03-25 09:19:39 +05:30
மனோஜ்குமார் பழனிச்சாமி
d94b84e38c datetime included again 2022-03-25 08:58:27 +05:30
Matthias
2442257856 Merge pull request #6540 from mkavinkumar1/patch-2
correcting docs for pricing of ask strategy
2022-03-24 08:02:46 +01:00
Matthias
dae9f4d877 Update doc clarity, partially revert prior commit 2022-03-24 06:50:25 +01:00
மனோஜ்குமார் பழனிச்சாமி
094676def4 Removed old datetime keys and added timestamp 2022-03-23 20:47:55 +05:30
Matthias
e7418cdcdb Remove obsolete note box
closes #6581
2022-03-22 19:03:22 +01:00
Matthias
00287febc6 Merge pull request #6542 from TheJoeSchr/check_version_with_endswith
[develop] Check version with endswith
2022-03-21 22:17:39 +01:00
Matthias
487d3e891e Revert version to develop for now 2022-03-21 19:41:34 +01:00
Matthias
4e52055a17 Merge pull request #6560 from freqtrade/inject_path_iresolver
Inject path to strategy loading
2022-03-21 19:09:14 +01:00
Matthias
7eddc09c1c Merge pull request #6569 from freqtrade/dependabot/pip/develop/urllib3-1.26.9
Bump urllib3 from 1.26.8 to 1.26.9
2022-03-21 10:25:58 +01:00
Matthias
4db713318b Merge pull request #6568 from freqtrade/dependabot/pip/develop/types-tabulate-0.8.6
Bump types-tabulate from 0.8.5 to 0.8.6
2022-03-21 10:25:42 +01:00
Matthias
0a977291b6 Merge pull request #6571 from freqtrade/dependabot/pip/develop/mypy-0.941
Bump mypy from 0.940 to 0.941
2022-03-21 09:44:28 +01:00
dependabot[bot]
c28e0b0d0c Bump types-tabulate from 0.8.5 to 0.8.6
Bumps [types-tabulate](https://github.com/python/typeshed) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-tabulate
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 08:06:41 +00:00
dependabot[bot]
7170b585f9 Bump mypy from 0.940 to 0.941
Bumps [mypy](https://github.com/python/mypy) from 0.940 to 0.941.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.940...v0.941)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 08:06:25 +00:00
Matthias
47516ed353 Merge pull request #6567 from freqtrade/dependabot/pip/develop/types-requests-2.27.14
Bump types-requests from 2.27.12 to 2.27.14
2022-03-21 09:05:17 +01:00
Matthias
4d8d30ea39 Version bump to 2022.2.2 2022-03-21 06:34:33 +01:00
Matthias
e90e3cead0 Map usdt fiat to correct coingecko fiat 2022-03-21 06:34:20 +01:00
Matthias
334452d3ee Merge pull request #6566 from freqtrade/dependabot/pip/develop/cryptography-36.0.2
Bump cryptography from 36.0.1 to 36.0.2
2022-03-21 06:32:47 +01:00
Matthias
9d756bc6a1 Merge pull request #6573 from freqtrade/dependabot/pip/develop/pytest-7.1.1
Bump pytest from 7.1.0 to 7.1.1
2022-03-21 06:32:17 +01:00
Matthias
c9dc07bdaa Merge pull request #6570 from freqtrade/dependabot/pip/develop/ccxt-1.76.65
Bump ccxt from 1.76.5 to 1.76.65
2022-03-21 06:32:06 +01:00
Matthias
2b63adf6c3 Merge pull request #6565 from freqtrade/dependabot/pip/develop/pymdown-extensions-9.3
Bump pymdown-extensions from 9.2 to 9.3
2022-03-21 06:31:51 +01:00
dependabot[bot]
057db5aaab Bump types-requests from 2.27.12 to 2.27.14
Bumps [types-requests](https://github.com/python/typeshed) from 2.27.12 to 2.27.14.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 05:30:51 +00:00
Matthias
371f6bf90e Merge pull request #6572 from freqtrade/dependabot/pip/develop/types-python-dateutil-2.8.10
Bump types-python-dateutil from 2.8.9 to 2.8.10
2022-03-21 06:29:59 +01:00
dependabot[bot]
03090d8f3f Bump pytest from 7.1.0 to 7.1.1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.0 to 7.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.0...7.1.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 03:01:45 +00:00
dependabot[bot]
1a37100bd4 Bump types-python-dateutil from 2.8.9 to 2.8.10
Bumps [types-python-dateutil](https://github.com/python/typeshed) from 2.8.9 to 2.8.10.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 03:01:41 +00:00
dependabot[bot]
5a136f04df Bump ccxt from 1.76.5 to 1.76.65
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.76.5 to 1.76.65.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.76.5...1.76.65)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 03:01:33 +00:00
dependabot[bot]
59c7403b12 Bump urllib3 from 1.26.8 to 1.26.9
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.8 to 1.26.9.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/1.26.9/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.8...1.26.9)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 03:01:23 +00:00
dependabot[bot]
1bc5d449a2 Bump cryptography from 36.0.1 to 36.0.2
Bumps [cryptography](https://github.com/pyca/cryptography) from 36.0.1 to 36.0.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/36.0.1...36.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 03:01:16 +00:00
dependabot[bot]
f5e71a67fa Bump pymdown-extensions from 9.2 to 9.3
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 9.2 to 9.3.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/9.2...9.3)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 03:01:11 +00:00
Matthias
e9c4e6a69d Update derived strategy documentation 2022-03-20 13:21:09 +01:00
Matthias
6ec7b84b92 Modify hyperoptable strategy to use relative importing 2022-03-20 13:12:26 +01:00
Matthias
49e087df5b Allow Strategy subclassing in different files by enabling local imports 2022-03-20 13:07:06 +01:00
Matthias
fcec071a08 Use order date to fetch trades
using the trade open-date may fail in case of several trade-entries spread over a longer timeperiod.

closes #6551
2022-03-20 09:46:51 +01:00
Matthias
8556e6a053 Automatically assign buy-tag to force-buys
closes #6544
2022-03-20 09:33:47 +01:00
Matthias
aceaa3faec remove last ticker_interval compatibility shim 2022-03-20 09:33:47 +01:00
Matthias
0f76b23733 update deprecation message for ticker_interval 2022-03-20 09:03:43 +01:00
Matthias
eb08b92180 Raise exception when ticker_interval is set. 2022-03-20 09:01:36 +01:00
Matthias
95f69b905a Remove ticker_interval support 2022-03-20 09:00:53 +01:00
Matthias
73fc344eb1 Improve wording in docs 2022-03-18 06:38:54 +01:00
Matthias
f55db8e262 Spreadfilter should fail to start if fetchTickers is not supported 2022-03-17 20:21:10 +01:00
Matthias
96bf82dbc6 Remove gateio broker program 2022-03-17 17:06:10 +01:00
Matthias
6024fa482e Use brackets to break IF lines 2022-03-17 07:41:08 +01:00
Joe Schr
47317e0f06 version: use 'contains' to check for "develop" instead of literal comparison 2022-03-15 21:08:37 +01:00
Kavinkumar
89aae71c32 correcting docs for pricing of ask strategy 2022-03-15 11:41:39 +05:30
Matthias
ebd61ebdef Merge pull request #6513 from samgermain/gateio-stoploss
Gateio stoploss on exchange
2022-03-15 06:27:54 +01:00
Matthias
18030a30e7 Add exchange parameter to test-pairlist command
This will allow for quick tests of the same pairlist config against
multiple exchanges.
2022-03-14 19:21:58 +01:00
Matthias
3b53ffb22f Merge pull request #6533 from freqtrade/dependabot/pip/develop/ccxt-1.76.5
Bump ccxt from 1.75.12 to 1.76.5
2022-03-14 07:58:49 +01:00
Matthias
8cb3158810 Merge pull request #6532 from freqtrade/dependabot/pip/develop/uvicorn-0.17.6
Bump uvicorn from 0.17.5 to 0.17.6
2022-03-14 07:14:18 +01:00
Matthias
717a4b82fe Merge pull request #6529 from freqtrade/dependabot/pip/develop/mypy-0.940
Bump mypy from 0.931 to 0.940
2022-03-14 07:14:01 +01:00
dependabot[bot]
5462ff0ebc Bump mypy from 0.931 to 0.940
Bumps [mypy](https://github.com/python/mypy) from 0.931 to 0.940.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.931...v0.940)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 05:25:16 +00:00
Matthias
af1543ea37 Merge pull request #6534 from freqtrade/dependabot/pip/develop/types-requests-2.27.12
Bump types-requests from 2.27.11 to 2.27.12
2022-03-14 06:24:37 +01:00
Matthias
edda5b4ceb Merge pull request #6531 from freqtrade/dependabot/pip/develop/types-cachetools-5.0.0
Bump types-cachetools from 4.2.10 to 5.0.0
2022-03-14 06:24:22 +01:00
Matthias
a419e7012e Merge pull request #6535 from freqtrade/dependabot/pip/develop/nbconvert-6.4.4
Bump nbconvert from 6.4.2 to 6.4.4
2022-03-14 06:24:04 +01:00
Matthias
404d700a74 Raise min-requirement for ccxt 2022-03-14 06:23:48 +01:00
Matthias
c5cb617c92 Merge pull request #6536 from freqtrade/dependabot/pip/develop/numpy-1.22.3
Bump numpy from 1.22.2 to 1.22.3
2022-03-14 06:22:43 +01:00
Matthias
999a154213 Merge pull request #6530 from freqtrade/dependabot/pip/develop/pytest-7.1.0
Bump pytest from 7.0.1 to 7.1.0
2022-03-14 06:22:16 +01:00
dependabot[bot]
3fbe4a9944 Bump numpy from 1.22.2 to 1.22.3
Bumps [numpy](https://github.com/numpy/numpy) from 1.22.2 to 1.22.3.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.22.2...v1.22.3)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 03:01:30 +00:00
dependabot[bot]
a7133f1974 Bump nbconvert from 6.4.2 to 6.4.4
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.4.2 to 6.4.4.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.4.2...6.4.4)

---
updated-dependencies:
- dependency-name: nbconvert
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 03:01:20 +00:00
dependabot[bot]
4cbdc9a74f Bump types-requests from 2.27.11 to 2.27.12
Bumps [types-requests](https://github.com/python/typeshed) from 2.27.11 to 2.27.12.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 03:01:17 +00:00
dependabot[bot]
3fc1c94aba Bump ccxt from 1.75.12 to 1.76.5
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.75.12 to 1.76.5.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.75.12...1.76.5)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 03:01:14 +00:00
dependabot[bot]
3a0ad2f26e Bump uvicorn from 0.17.5 to 0.17.6
Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.17.5 to 0.17.6.
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.17.5...0.17.6)

---
updated-dependencies:
- dependency-name: uvicorn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 03:01:07 +00:00
dependabot[bot]
7764ad1541 Bump types-cachetools from 4.2.10 to 5.0.0
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.10 to 5.0.0.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 03:01:03 +00:00
dependabot[bot]
be5b0acfbd Bump pytest from 7.0.1 to 7.1.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.0.1 to 7.1.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.0.1...7.1.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 03:01:00 +00:00
Matthias
c63b5fbbbf Use last to get rates for /balance endpoints 2022-03-13 17:53:52 +01:00
Matthias
32c06f4a05 Improve test 2022-03-13 16:45:11 +01:00
Matthias
3133be19e3 Update precisionfilter to use last instead of ask or bid. 2022-03-13 15:23:01 +01:00
Matthias
7146122f4a Update docstring 2022-03-13 15:06:32 +01:00
Matthias
b8b56d95f3 Update missleading docstring 2022-03-13 14:57:32 +01:00
Matthias
9107819c95 Fix order migration "forgetting" average 2022-03-13 14:42:15 +01:00
Sam Germain
843606c9cb gateio stoploss adjust 2022-03-12 20:14:23 -06:00
Sam Germain
91549d3254 Revert "stoploss_adjust fixed breaking tests"
This reverts commit 6f4d607902.
2022-03-12 20:07:56 -06:00
Sam Germain
7e7e596372 Revert "moved binance.stoploss_adjust to exchange class"
This reverts commit 6bb93bdc25.
2022-03-12 20:07:50 -06:00
Sam Germain
bf5afbcdbd Merge branch 'develop' into gateio-stoploss 2022-03-12 19:50:46 -06:00
Sam Germain
2ba79a32a0 Update docs/exchanges.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2022-03-12 19:42:40 -06:00
Matthias
f343036e66 Add stoploss-ordertypes mapping for gateio 2022-03-12 19:23:20 +01:00
Matthias
7825d855cd Fix flake8 error in tests 2022-03-11 19:28:15 +01:00
Matthias
11c76c3c89 Check if timeframe is available before calling exchange
closes #6517
2022-03-11 18:01:30 +01:00
Matthias
24f480b4ce Double-check stoploss behaviour
closes #6508
2022-03-11 08:28:47 +01:00
Matthias
9ff52c0a93 Add test for emergencysell behaviour 2022-03-11 08:26:28 +01:00
Sam Germain
6f4d607902 stoploss_adjust fixed breaking tests 2022-03-09 19:31:51 -06:00
Sam Germain
7db28b1b16 gateio stoploss docs 2022-03-09 15:54:17 -06:00
Sam Germain
6bb93bdc25 moved binance.stoploss_adjust to exchange class 2022-03-09 15:47:16 -06:00
Matthias
6e10439f90 Map usdt fiat to correct coingecko fiat 2022-03-09 17:35:41 +01:00
Sam Germain
d47274066e Added stoploss_on_exchange flag to gateio 2022-03-09 01:05:21 -06:00
Sam Germain
ae4742afcb test_fetch_stoploss_order_gateio and test_cancel_stoploss_order_gateio 2022-03-09 00:59:28 -06:00
Sam Germain
e3ced55f5c gateio.fetch_order and gateio.cancel_order 2022-03-09 00:45:50 -06:00
Sam Germain
61182f849b exchange.fetch_order and exchange.cancel_order added params argument 2022-03-09 00:45:10 -06:00
Matthias
f2ed6165e9 convert price to precision price before verifying stoploss adjustment
closes #6504
2022-03-08 19:35:30 +01:00
Matthias
17041b78fc Add stoploss-limit-ratio to full config sample 2022-03-07 19:39:15 +01:00
Matthias
f0252cf79d Merge pull request #6497 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.32
Bump sqlalchemy from 1.4.31 to 1.4.32
2022-03-07 12:52:15 +01:00
Matthias
98acff8169 Merge pull request #6500 from freqtrade/dependabot/pip/develop/types-cachetools-4.2.10
Bump types-cachetools from 4.2.9 to 4.2.10
2022-03-07 07:04:31 +01:00
Matthias
26f6d8076d Merge pull request #6498 from freqtrade/dependabot/pip/develop/pytest-asyncio-0.18.2
Bump pytest-asyncio from 0.18.1 to 0.18.2
2022-03-07 06:25:20 +01:00
Matthias
82595f3a5d Merge pull request #6501 from freqtrade/dependabot/pip/develop/ccxt-1.75.12
Bump ccxt from 1.74.63 to 1.75.12
2022-03-07 06:25:07 +01:00
Matthias
805a04a6cb Merge pull request #6496 from freqtrade/dependabot/pip/develop/fastapi-0.75.0
Bump fastapi from 0.74.1 to 0.75.0
2022-03-07 06:24:56 +01:00
Matthias
07524e9f37 Merge pull request #6499 from freqtrade/dependabot/pip/develop/mkdocs-material-8.2.5
Bump mkdocs-material from 8.2.3 to 8.2.5
2022-03-07 06:24:40 +01:00
Matthias
749e0dd5a0 Merge pull request #6502 from freqtrade/dependabot/github_actions/develop/actions/setup-python-3
Bump actions/setup-python from 2 to 3
2022-03-07 06:24:14 +01:00
dependabot[bot]
3c83d8c74a Bump actions/setup-python from 2 to 3
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 05:24:08 +00:00
Matthias
46c3f56bf5 Merge pull request #6503 from freqtrade/dependabot/github_actions/develop/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-03-07 06:23:41 +01:00
dependabot[bot]
25964f70d8 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 03:12:15 +00:00
dependabot[bot]
0c8dd7e502 Bump ccxt from 1.74.63 to 1.75.12
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.74.63 to 1.75.12.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.74.63...1.75.12)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 03:01:33 +00:00
dependabot[bot]
f1d2cb9ce4 Bump types-cachetools from 4.2.9 to 4.2.10
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.9 to 4.2.10.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 03:01:25 +00:00
dependabot[bot]
1d63bb66a9 Bump mkdocs-material from 8.2.3 to 8.2.5
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.2.3 to 8.2.5.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.2.3...8.2.5)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 03:01:23 +00:00
dependabot[bot]
67a8b8b631 Bump pytest-asyncio from 0.18.1 to 0.18.2
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.18.1 to 0.18.2.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.18.1...v0.18.2)

---
updated-dependencies:
- dependency-name: pytest-asyncio
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 03:01:19 +00:00
dependabot[bot]
708def3d96 Bump sqlalchemy from 1.4.31 to 1.4.32
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.31 to 1.4.32.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 03:01:15 +00:00
dependabot[bot]
d74e3091de Bump fastapi from 0.74.1 to 0.75.0
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.74.1 to 0.75.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.74.1...0.75.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 03:01:09 +00:00
Matthias
f571fee899 Merge pull request #6494 from freqtrade/stoploss_special_ccase
Explicitly check for None to determine if initial stoploss was set
2022-03-05 15:15:45 +01:00
Matthias
be4bc4955c Explicitly check for None to determine if initial stoploss was set
closes #6460
2022-03-05 14:12:14 +01:00
Matthias
c0e12d632f Add FTX ref links 2022-03-03 19:19:10 +01:00
Matthias
e9456cdf15 Update trade response to use a single Order object 2022-03-02 19:58:08 +01:00
Matthias
17c9c3caf3 Enable orders via API 2022-03-02 19:58:08 +01:00
Matthias
d4fbb785b5 Merge pull request #6458 from stash86/pos_adjust
Hide sell_reason if a trade is still open
2022-03-02 07:23:49 +01:00
Matthias
b18256c231 Merge pull request #6487 from samgermain/setup-gettext
setup.sh install gettext for mac
2022-03-02 06:39:27 +01:00
Matthias
71be547d82 Bump ccxt to 1.74.63
closes #6484
2022-03-02 06:26:00 +01:00
Sam Germain
abc8854b5a setup.sh install gettext for mac 2022-03-01 17:38:38 -06:00
Matthias
f74de1cca3 Improve Backtesting "wrong setup" message to include tradable_balance 2022-03-01 19:46:13 +01:00
Matthias
54165662ce Don't require unfilledtimeout, it's optional. 2022-03-01 19:41:26 +01:00
Matthias
69cfb0b278 Revert change to telegram - this should be handled at the source 2022-03-01 19:32:25 +01:00
Matthias
c2b90afa61 Merge branch 'develop' into pr/stash86/6458 2022-03-01 19:31:36 +01:00
Matthias
a2c9879375 Reset sell-reason if order is cancelled 2022-03-01 19:30:16 +01:00
Matthias
f26247e8e0 Revert wrong version string 2022-03-01 19:08:04 +01:00
Matthias
dca83b070d Merge pull request #6478 from freqtrade/dependabot/pip/develop/fastapi-0.74.1
Bump fastapi from 0.74.0 to 0.74.1
2022-02-28 07:08:02 +01:00
Matthias
68bc2a6107 Add huobi to ccxt compat tests 2022-02-28 07:00:52 +01:00
Matthias
a922c4df70 Merge pull request #6477 from freqtrade/dependabot/pip/develop/ccxt-1.74.43
Bump ccxt from 1.74.17 to 1.74.43
2022-02-28 06:52:18 +01:00
Matthias
cf22926cee Merge pull request #6475 from freqtrade/dependabot/pip/develop/mkdocs-material-8.2.3
Bump mkdocs-material from 8.2.1 to 8.2.3
2022-02-28 06:50:48 +01:00
Matthias
151841965a Merge pull request #6476 from freqtrade/dependabot/pip/develop/types-requests-2.27.11
Bump types-requests from 2.27.10 to 2.27.11
2022-02-28 06:34:34 +01:00
dependabot[bot]
207b211e5e Bump fastapi from 0.74.0 to 0.74.1
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.74.0 to 0.74.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.74.0...0.74.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 03:01:38 +00:00
dependabot[bot]
42fbec4172 Bump ccxt from 1.74.17 to 1.74.43
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.74.17 to 1.74.43.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.74.17...1.74.43)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 03:01:29 +00:00
dependabot[bot]
faf6a35ad7 Bump types-requests from 2.27.10 to 2.27.11
Bumps [types-requests](https://github.com/python/typeshed) from 2.27.10 to 2.27.11.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 03:01:20 +00:00
dependabot[bot]
590944a600 Bump mkdocs-material from 8.2.1 to 8.2.3
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.2.1 to 8.2.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.2.1...8.2.3)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 03:01:17 +00:00
Matthias
1ac360674c Update Readme quickstart
#6472
2022-02-27 17:37:46 +01:00
Matthias
0ebf40f390 Don't call amount_to_precision twice on entry 2022-02-27 15:57:44 +01:00
Matthias
fdbd75501f Merge pull request #6465 from freqtrade/huobi
Huobi
2022-02-26 15:24:42 +01:00
Matthias
41316abb55 Sort supported exchanges alphabetically 2022-02-26 14:57:17 +01:00
Matthias
14d49e85af Update Huobi stoploss to shared method 2022-02-26 14:57:13 +01:00
Matthias
a1f2f6ddeb Updates required for huobi datadownload 2022-02-26 10:33:37 +01:00
Matthias
f3421dfa9f Use unified stopPrice argument 2022-02-26 10:33:37 +01:00
Matthias
1b91be08fe Add huobi to list of supported exchanges 2022-02-26 10:33:37 +01:00
Matthias
292c350885 Add stoploss support for huobi 2022-02-26 10:33:36 +01:00
Matthias
9504b3eb05 Improve huobi config generation 2022-02-26 10:33:11 +01:00
Matthias
ee7bc55727 Add huobi to Exchange setup 2022-02-26 10:33:11 +01:00
Matthias
2ec1a7b370 Add huobi exchange class 2022-02-26 10:33:11 +01:00
Matthias
f181cdeecd Merge pull request #6463 from freqtrade/stoploss_simplify
Stoploss simplify - kucoin stoploss on exchange
2022-02-26 10:31:50 +01:00
Matthias
a568548192 Merge pull request #6464 from freqtrade/new_release
New release 2022.2.1
2022-02-26 08:57:42 +01:00
Matthias
f9d10a7fad Version bump 2022.2.1 2022-02-26 08:35:50 +01:00
Matthias
cbc2b00ee6 Merge branch 'stable' into new_release 2022-02-26 08:35:31 +01:00
Matthias
3942b30ebf Add kraken TODO 2022-02-26 08:34:23 +01:00
Matthias
6caa5f7131 Update dry-run behaviour 2022-02-26 08:25:42 +01:00
Matthias
0749199097 Add stoploss tests for kucoin 2022-02-26 08:25:42 +01:00
Matthias
020729cf50 update docs about kucoin stoploss 2022-02-26 08:25:42 +01:00
Matthias
768b526c38 Add kucoin stoploss on exchange 2022-02-26 08:25:42 +01:00
Matthias
7ba92086c9 Make stoploss method more flexible 2022-02-26 08:25:42 +01:00
Matthias
ea197b79ca Add some more logic to stoploss 2022-02-26 08:25:42 +01:00
Matthias
1d57ce19eb Move stoploss -limit implemenentation to exchange class, as this seems to be used by multiple exchanges. 2022-02-26 08:25:42 +01:00
Matthias
7883160ce0 Update to fstrings 2022-02-26 08:23:13 +01:00
Matthias
018c620057 Fix 0 Division error on exchanges without average
closes #6461
2022-02-26 08:19:45 +01:00
Matthias
a0b42c7aa2 gitignore sqlite temporary files 2022-02-25 20:47:15 +01:00
Matthias
8f7b857ae9 Merge pull request #6459 from freqtrade/new_release
New release 2022.2
2022-02-25 15:14:27 +01:00
Matthias
5826698c04 Don't emergencysell partial sold exit
closes #6457
2022-02-25 15:07:35 +01:00
Matthias
e88b022cd4 Version bump 2022.2 2022-02-25 12:07:09 +01:00
Matthias
bfb738f69f Merge branch 'stable' into new_release 2022-02-25 12:06:11 +01:00
Matthias
3c88b4cf0c Merge pull request #6416 from froggleston/patch-2 2022-02-25 11:58:43 +01:00
Matthias
00dd8e76ee Merge pull request #6416 from froggleston/patch-2
Update windows_installation.md
2022-02-25 11:44:40 +01:00
Matthias
4b7271df46 Improve wording, add Picture detailing what must be installed. 2022-02-25 11:03:03 +01:00
Matthias
3b1b66bee8 Prevent backtest starting when not in webserver mode
#6455
2022-02-25 07:40:49 +01:00
Stefano Ariestasia
df726a54f8 cater for case where sell limit order expired 2022-02-25 00:20:53 +00:00
Matthias
42df65d4ec Make sure backtesting is cleaned up in tests 2022-02-24 14:22:49 +00:00
Matthias
53452c8d64 Merge pull request #6437 from freqtrade/update_trade
Migrate trade updating to use order model
2022-02-23 19:56:02 +01:00
Matthias
731eb99713 Update mock-trade creation to rollback first 2022-02-23 19:18:04 +01:00
Matthias
afd2be06d8 Merge pull request #6447 from freqtrade/dependabot/pip/develop/uvicorn-0.17.5
Bump uvicorn from 0.17.4 to 0.17.5
2022-02-23 07:51:33 +01:00
Matthias
5a4f30d1bd Don't specially handle empty results. 2022-02-22 20:07:41 +01:00
Matthias
1f9ed0beff Add test for wal mode 2022-02-22 19:39:55 +01:00
Matthias
02ce0dc02e Set journal mode to wal for sqlite databases
closes #6353
2022-02-22 19:31:58 +01:00
Matthias
a2960d8505 Merge pull request #6448 from freqtrade/dependabot/pip/develop/mkdocs-material-8.2.1
Bump mkdocs-material from 8.1.11 to 8.2.1
2022-02-21 08:10:25 +01:00
Matthias
2b16606dbc Merge pull request #6443 from freqtrade/dependabot/pip/develop/python-rapidjson-1.6
Bump python-rapidjson from 1.5 to 1.6
2022-02-21 07:26:28 +01:00
Matthias
c6a9c0805c Merge pull request #6442 from freqtrade/dependabot/pip/develop/types-requests-2.27.10
Bump types-requests from 2.27.9 to 2.27.10
2022-02-21 06:53:41 +01:00
Matthias
fdad14d852 Merge pull request #6446 from freqtrade/dependabot/pip/develop/ccxt-1.73.70
Bump ccxt from 1.72.98 to 1.73.70
2022-02-21 06:53:27 +01:00
dependabot[bot]
b9a99bd0b7 Bump python-rapidjson from 1.5 to 1.6
Bumps [python-rapidjson](https://github.com/python-rapidjson/python-rapidjson) from 1.5 to 1.6.
- [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/v1.5...v1.6)

---
updated-dependencies:
- dependency-name: python-rapidjson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 05:28:53 +00:00
dependabot[bot]
7b6a0f7a19 Bump uvicorn from 0.17.4 to 0.17.5
Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.17.4 to 0.17.5.
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.17.4...0.17.5)

---
updated-dependencies:
- dependency-name: uvicorn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 05:28:52 +00:00
Matthias
0bd621ece8 Merge pull request #6445 from freqtrade/dependabot/pip/develop/fastapi-0.74.0
Bump fastapi from 0.73.0 to 0.74.0
2022-02-21 06:28:03 +01:00
Matthias
df04612549 Merge pull request #6444 from freqtrade/dependabot/pip/develop/filelock-3.6.0
Bump filelock from 3.4.2 to 3.6.0
2022-02-21 06:27:08 +01:00
dependabot[bot]
d354f1f84c Bump mkdocs-material from 8.1.11 to 8.2.1
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.11 to 8.2.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.11...8.2.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 03:02:06 +00:00
dependabot[bot]
317487fefc Bump ccxt from 1.72.98 to 1.73.70
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.72.98 to 1.73.70.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.72.98...1.73.70)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 03:01:58 +00:00
dependabot[bot]
dc8e9bab44 Bump fastapi from 0.73.0 to 0.74.0
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.73.0 to 0.74.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.73.0...0.74.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 03:01:51 +00:00
dependabot[bot]
d1cded3532 Bump filelock from 3.4.2 to 3.6.0
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.4.2 to 3.6.0.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/py-filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.4.2...3.6.0)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 03:01:45 +00:00
dependabot[bot]
21b5f56f7d Bump types-requests from 2.27.9 to 2.27.10
Bumps [types-requests](https://github.com/python/typeshed) from 2.27.9 to 2.27.10.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 03:01:39 +00:00
Matthias
fddacfedaa Remove returntype 2022-02-20 16:47:02 +01:00
Matthias
a24586cd41 Update migrations for new column 2022-02-20 16:32:04 +01:00
Matthias
6fb5b22a8e Some cleanup 2022-02-20 16:31:44 +01:00
Matthias
dc7bcf5dda Update failing test 2022-02-20 14:29:26 +01:00
Matthias
db540dc990 Orders should also store fee if in receiving currency 2022-02-20 14:24:27 +01:00
Matthias
e9f451406c Use correct order id 2022-02-19 16:43:38 +01:00
Matthias
874c161f78 Update more tests to use order_obj to update trade 2022-02-19 16:43:38 +01:00
Matthias
508e677d70 Fix some tests to call update_trade with order object 2022-02-19 16:43:38 +01:00
Matthias
1b1216fc87 Rename update_trade method 2022-02-19 16:43:38 +01:00
Matthias
c13eed2178 use Order object to update trade 2022-02-19 16:43:38 +01:00
Matthias
d610b6305d Improve /balance output by removing trailing zeros 2022-02-19 16:40:30 +01:00
Matthias
a7a25bb285 Update "round coin value" to trim trailing zeros 2022-02-19 16:40:26 +01:00
Matthias
42bb33811c Merge pull request #6434 from freqtrade/fix/ftx_stoploss
Update FTX stoploss code to avoid exception for stoploss-market orders
2022-02-19 10:50:53 +01:00
Matthias
a32aed2225 Update FTX stoploss code to avoid exception for stoploss-market orders
closes #6430, closes #6392
2022-02-19 10:07:32 +01:00
Matthias
3785f04be7 Handle empty min stake amount as observed on FTX
(closes #6429)
2022-02-19 06:39:43 +01:00
Matthias
0bbbe2e96c Add test for #6429 2022-02-19 06:39:43 +01:00
Matthias
5705ff7f82 Merge pull request #6432 from mkavinkumar1/patch-1
fixed stake amount
2022-02-19 06:39:19 +01:00
Kavinkumar
60d1e7fc65 fix stake amt 2022-02-18 19:47:45 +05:30
Kavinkumar
95d4a11bb1 add precision 2022-02-18 19:32:37 +05:30
Kavinkumar
eb88c0f71b fixed stake amount 2022-02-18 19:25:56 +05:30
Matthias
e60553b8f7 Add max_entry_position hyperopt to docs
closes #6356
2022-02-16 19:21:04 +01:00
Matthias
877a0750ce Merge pull request #6417 from freqtrade/fix/6261
Attempt fix for #6261
2022-02-16 15:48:57 +01:00
Matthias
e7bfb4fd5c Add test case for "sell below close" case 2022-02-16 13:42:39 +01:00
Matthias
a77c11c7e0 Merge pull request #6420 from stash86/pos_adjust
add "dry_run_wallet" to config_full.example.json
2022-02-16 06:48:07 +01:00
Stefano Ariestasia
b043697d70 Update config_full.example.json 2022-02-16 12:19:48 +09:00
Matthias
78a93b6052 noqa 2022-02-15 20:15:03 +01:00
Matthias
3787b747ae Simplify api schema by not using union types 2022-02-15 20:07:02 +01:00
Matthias
64b98989d2 Update open candle ROI condition 2022-02-15 19:25:32 +01:00
Matthias
dfd5d3b8b2 Merge pull request #6418 from m3h7/patch-1
corrects typo
2022-02-15 06:40:30 +01:00
Maik H
7b2e33b0bc corrects typo 2022-02-14 20:21:42 +01:00
Matthias
30f6dbfc40 Attempt fix for #6261 2022-02-14 20:02:38 +01:00
Matthias
acd7f26a9d update tc36 to properly cover #6261 2022-02-14 20:00:31 +01:00
Robert Davey
cd54f1536e Update windows_installation.md
Update links to include just the cpp build tools instead of the 4GB full Visual Studio link.
2022-02-14 16:41:58 +00:00
Matthias
35e800a84b Merge pull request #6411 from freqtrade/dependabot/pip/develop/pytest-asyncio-0.18.1
Bump pytest-asyncio from 0.17.2 to 0.18.1
2022-02-14 07:09:45 +01:00
Matthias
7e2e9272cc Merge pull request #6403 from freqtrade/dependabot/pip/develop/prompt-toolkit-3.0.28
Bump prompt-toolkit from 3.0.26 to 3.0.28
2022-02-14 07:09:18 +01:00
Matthias
8ba149a2af Merge pull request #6409 from freqtrade/dependabot/pip/develop/types-requests-2.27.9
Bump types-requests from 2.27.8 to 2.27.9
2022-02-14 06:28:42 +01:00
Matthias
1ad41f0efc Merge pull request #6410 from freqtrade/dependabot/pip/develop/nbconvert-6.4.2
Bump nbconvert from 6.4.1 to 6.4.2
2022-02-14 06:28:29 +01:00
Matthias
9c62ffe4f6 Merge pull request #6404 from freqtrade/dependabot/pip/develop/plotly-5.6.0
Bump plotly from 5.5.0 to 5.6.0
2022-02-14 06:28:16 +01:00
dependabot[bot]
5cc6c2afe1 Bump pytest-asyncio from 0.17.2 to 0.18.1
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.17.2 to 0.18.1.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.17.2...v0.18.1)

---
updated-dependencies:
- dependency-name: pytest-asyncio
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 05:28:10 +00:00
Matthias
6290fb6d10 Merge pull request #6408 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.11
Bump mkdocs-material from 8.1.10 to 8.1.11
2022-02-14 06:27:59 +01:00
Matthias
067378d7fc Merge pull request #6405 from freqtrade/dependabot/pip/develop/pymdown-extensions-9.2
Bump pymdown-extensions from 9.1 to 9.2
2022-02-14 06:27:42 +01:00
Matthias
0c632555d6 Merge pull request #6406 from freqtrade/dependabot/pip/develop/ccxt-1.72.98
Bump ccxt from 1.72.36 to 1.72.98
2022-02-14 06:27:22 +01:00
Matthias
e63ef86e9e Merge pull request #6407 from freqtrade/dependabot/pip/develop/pytest-7.0.1
Bump pytest from 7.0.0 to 7.0.1
2022-02-14 06:27:09 +01:00
Matthias
ecb93f14b1 Merge pull request #6412 from freqtrade/dependabot/pip/develop/pandas-1.4.1
Bump pandas from 1.4.0 to 1.4.1
2022-02-14 06:26:33 +01:00
dependabot[bot]
5062c17ac0 Bump pandas from 1.4.0 to 1.4.1
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Changelog](https://github.com/pandas-dev/pandas/blob/main/RELEASE.md)
- [Commits](https://github.com/pandas-dev/pandas/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:02:07 +00:00
dependabot[bot]
04c20afece Bump nbconvert from 6.4.1 to 6.4.2
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.4.1 to 6.4.2.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.4.1...6.4.2)

---
updated-dependencies:
- dependency-name: nbconvert
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:01:56 +00:00
dependabot[bot]
7f8e956b44 Bump types-requests from 2.27.8 to 2.27.9
Bumps [types-requests](https://github.com/python/typeshed) from 2.27.8 to 2.27.9.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:01:52 +00:00
dependabot[bot]
22036d69d8 Bump mkdocs-material from 8.1.10 to 8.1.11
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.10 to 8.1.11.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.10...8.1.11)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:01:50 +00:00
dependabot[bot]
b18e44bc43 Bump pytest from 7.0.0 to 7.0.1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.0.0...7.0.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:01:46 +00:00
dependabot[bot]
1674beed91 Bump ccxt from 1.72.36 to 1.72.98
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.72.36 to 1.72.98.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.72.36...1.72.98)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:01:43 +00:00
dependabot[bot]
03d4002be8 Bump pymdown-extensions from 9.1 to 9.2
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 9.1 to 9.2.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/9.1...9.2)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:01:35 +00:00
dependabot[bot]
be8accebd8 Bump plotly from 5.5.0 to 5.6.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 5.5.0 to 5.6.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/v5.5.0...v5.6.0)

---
updated-dependencies:
- dependency-name: plotly
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:01:31 +00:00
dependabot[bot]
ca62914794 Bump prompt-toolkit from 3.0.26 to 3.0.28
Bumps [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) from 3.0.26 to 3.0.28.
- [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.26...3.0.28)

---
updated-dependencies:
- dependency-name: prompt-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 03:01:28 +00:00
Matthias
b1b8167b5e Update stop documentation
closes #6393
2022-02-13 19:14:57 +01:00
Matthias
109440a6bf Merge pull request #6396 from freqtrade/order_refind_update
Improve "order refind" to also work for stoploss orders
2022-02-13 12:31:37 +01:00
Matthias
c769e9757d Improve "order refind" to also work for stoploss orders 2022-02-12 20:13:12 +01:00
Matthias
119d4d5204 select_order should use ft_order_side, not the exchange specific one 2022-02-12 17:06:03 +01:00
Matthias
08803524bd align variable naming to use current_time 2022-02-12 15:21:46 +01:00
Matthias
d0adc4ee62 Merge pull request #6391 from lukasgor/lg/feat/add-buy-tag-to-forcebuy
feature: add buy tag to forcebuy
2022-02-11 19:37:46 +01:00
Matthias
c9cfc246f1 Sort /forcebuy pairs alphabetically, add cancel button
closes #6389
2022-02-11 19:37:35 +01:00
lukasgor
6511b3bec2 fix: rename buy_tag to entry_tag 2022-02-11 15:31:15 +01:00
lukasgor
d563bfc3d0 feature: add buy tag to forcebuy 2022-02-11 13:38:33 +01:00
Matthias
6a59103869 update wallets in backtesting to ensure a fresh wallet is used
closes #6388
2022-02-10 19:40:36 +01:00
Matthias
be84a028c1 Avoid mixed types in the api for /stats 2022-02-10 07:03:19 +01:00
Matthias
af984bdc0d Update comment regarting NaT replacement 2022-02-09 09:32:53 +01:00
Matthias
2e41d80a2c Merge pull request #6340 from TheJoeSchr/frequi-datetime
freqUI: fix can't import backtest with missing datetime data
2022-02-09 07:21:30 +01:00
Matthias
7252cf47fb Update url to include campaign tracking 2022-02-09 07:20:27 +01:00
Matthias
9f47853661 Merge pull request #6235 from freqtrade/backtest_order_timeout
Backtest order timeout
2022-02-09 07:12:35 +01:00
Matthias
45c03f1440 Docstrings are evaluated, while comments are not 2022-02-09 07:02:44 +01:00
Matthias
a6a041526a Update intro message 2022-02-09 06:57:46 +01:00
Matthias
1ba9b70afc Improve index/readme wording 2022-02-09 06:57:46 +01:00
Matthias
6d3803fa22 Add TokenBot promo 2022-02-09 06:57:46 +01:00
Matthias
4e2f06fe9c Simplify band-aid code 2022-02-09 06:48:26 +01:00
Matthias
6191288ff9 Add test for NaT problematic 2022-02-09 06:36:17 +01:00
Matthias
1d10d2c87c Okex -> okx 2022-02-08 19:45:39 +01:00
Matthias
172e018d2d Add probit to list of non-working exchanges
closes #6379
2022-02-08 19:21:27 +01:00
Matthias
dcf8ad36f9 Backtesting should not allow unrealistic (automatic-filling) orders. 2022-02-08 19:12:01 +01:00
Joe Schr
926b017981 Fix freqUI charts not displaying when dtype(datetime) column has NaT values
fix dataframe_to_dict() issues by replacing NaT empty string and
prepare for proper `.replace({NaT})` fix
2022-02-08 17:09:37 +01:00
Joe Schr
118ae8a3d0 Fix api_schemas/json_encoders by manually converting NaT values to empty Strings
makes import of datetime columns more robust by first checking
if value is null because strftime can't handle NaT values

use `isnull()` because it handles all NaN/None/NaT cases
2022-02-08 17:09:29 +01:00
Matthias
b192c82731 Only call "custom_exit_price" for limit orders 2022-02-08 07:10:54 +01:00
Matthias
d2dbe8f8d0 Improve doc wording 2022-02-08 06:47:55 +01:00
Matthias
535bbd681f Merge pull request #6362 from ediziks/add-profit-drawdown-hypeloss
Add ProfitDrawdownHyperoptLoss method
2022-02-07 19:37:35 +01:00
Matthias
85767d0d70 Add timedout_*_orders to tests 2022-02-07 19:33:22 +01:00
Matthias
036c2888b4 Track timedout entry/exit orders 2022-02-07 18:49:30 +01:00
Matthias
380e383eee Add log_Responses to full config example
#6374
2022-02-07 18:38:28 +01:00
Matthias
3a60709f16 Merge pull request #6368 from freqtrade/dependabot/pip/develop/uvicorn-0.17.4
Bump uvicorn from 0.17.1 to 0.17.4
2022-02-07 18:28:33 +01:00
zx
4bce64b427 commented method deletition 2022-02-07 14:12:07 +01:00
Matthias
5f886e7ffe Merge pull request #6363 from stash86/pos_adjust
Change "buy" and "sell" to "entry" and "exit"
2022-02-07 09:22:36 +01:00
Stefano Ariestasia
92d1f2b945 fix tests 2022-02-07 07:31:35 +00:00
zx
7811a36ae9 max_drawdown_abs calc fix & .DS_Store deletition 2022-02-07 07:44:13 +01:00
Matthias
5047492f5a gitignore .ds_store files 2022-02-07 07:20:55 +01:00
Matthias
36dad186fd Merge pull request #6367 from freqtrade/dependabot/pip/develop/types-requests-2.27.8
Bump types-requests from 2.27.7 to 2.27.8
2022-02-07 07:03:19 +01:00
Matthias
2d979b84bf Merge pull request #6369 from freqtrade/dependabot/pip/develop/numpy-1.22.2
Bump numpy from 1.22.1 to 1.22.2
2022-02-07 07:03:08 +01:00
Matthias
48ff2b3baa Merge pull request #6365 from freqtrade/dependabot/pip/develop/pytest-7.0.0
Bump pytest from 6.2.5 to 7.0.0
2022-02-07 06:32:46 +01:00
zx
8cdb6e0774 DRAWDOWN_MULT back to a higher value as built-in for safer HOs first 2022-02-07 06:31:16 +01:00
Matthias
39a0cef922 Merge pull request #6371 from freqtrade/dependabot/pip/develop/python-telegram-bot-13.11
Bump python-telegram-bot from 13.10 to 13.11
2022-02-07 06:28:46 +01:00
dependabot[bot]
f31fa07b3f Bump numpy from 1.22.1 to 1.22.2
Bumps [numpy](https://github.com/numpy/numpy) from 1.22.1 to 1.22.2.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.22.1...v1.22.2)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 05:28:26 +00:00
Matthias
548b9e75f3 Merge pull request #6364 from freqtrade/dependabot/pip/develop/scipy-1.8.0
Bump scipy from 1.7.3 to 1.8.0
2022-02-07 06:28:25 +01:00
Matthias
37ea07a45d Merge pull request #6366 from freqtrade/dependabot/pip/develop/ccxt-1.72.36
Bump ccxt from 1.71.73 to 1.72.36
2022-02-07 06:27:28 +01:00
Matthias
5221194318 Merge pull request #6370 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.10
Bump mkdocs-material from 8.1.9 to 8.1.10
2022-02-07 06:27:10 +01:00
zx
2893d0b50d proper var name 2022-02-07 06:22:27 +01:00
dependabot[bot]
94b546228b Bump python-telegram-bot from 13.10 to 13.11
Bumps [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) from 13.10 to 13.11.
- [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.10...v13.11)

---
updated-dependencies:
- dependency-name: python-telegram-bot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 03:01:48 +00:00
dependabot[bot]
b8af4bf8fe Bump mkdocs-material from 8.1.9 to 8.1.10
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.9 to 8.1.10.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.9...8.1.10)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 03:01:43 +00:00
dependabot[bot]
110a270a0b Bump uvicorn from 0.17.1 to 0.17.4
Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.17.1 to 0.17.4.
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.17.1...0.17.4)

---
updated-dependencies:
- dependency-name: uvicorn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 03:01:31 +00:00
dependabot[bot]
576d5a5b48 Bump types-requests from 2.27.7 to 2.27.8
Bumps [types-requests](https://github.com/python/typeshed) from 2.27.7 to 2.27.8.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 03:01:29 +00:00
dependabot[bot]
1e43683283 Bump ccxt from 1.71.73 to 1.72.36
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.71.73 to 1.72.36.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.71.73...1.72.36)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 03:01:27 +00:00
dependabot[bot]
22e395af87 Bump pytest from 6.2.5 to 7.0.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...7.0.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 03:01:18 +00:00
dependabot[bot]
e24c837e1f Bump scipy from 1.7.3 to 1.8.0
Bumps [scipy](https://github.com/scipy/scipy) from 1.7.3 to 1.8.0.
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](https://github.com/scipy/scipy/compare/v1.7.3...v1.8.0)

---
updated-dependencies:
- dependency-name: scipy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 03:01:13 +00:00
Stefano Ariestasia
099a03f190 flake8 2022-02-07 01:52:59 +00:00
Stefano Ariestasia
6d91a5ecbd Change "buy" and "sell" to "entry" and "exit" 2022-02-07 01:40:05 +00:00
zx
7d3b80fbde isort fix and leftover cleaning 2022-02-06 21:09:40 +01:00
Matthias
fe33b86308 Merge pull request #6360 from stash86/pos_adjust
Hide some lines for /status when a trade is closed
2022-02-06 17:08:37 +01:00
zx
6b5f63d4d6 change profit_ratio by profit_abs 2022-02-06 16:28:01 +01:00
Matthias
ee2a7a968b Add tests for /status on closed trades 2022-02-06 16:26:00 +01:00
Matthias
5eb5029856 Performancefilter - improve sorting
Ordering of Pairs without history should remain identical, so pairs with
positive performance move to the front, and negative pairs move to the back.

closes #4893
2022-02-06 16:19:11 +01:00
Matthias
ef086d438c Update PerformanceFilter test to run with USDT pairs 2022-02-06 16:03:14 +01:00
Matthias
c19f3950da Add losing trade to usdt_mock_trades 2022-02-06 16:02:18 +01:00
zx
0b01fcf047 Add ProfitDrawdownHyperoptLoss method 2022-02-06 15:40:54 +01:00
Matthias
303b12efd8 Merge pull request #6273 from freqtrade/pg_migrations
Update database migrations for PG and mariadb
2022-02-06 14:39:02 +01:00
Matthias
b657d2d8de Add Github funding 2022-02-06 14:38:20 +01:00
Matthias
7232324eb7 Update missing doc segment 2022-02-06 14:33:31 +01:00
Matthias
da73e754b4 Explicit map coingecko symbol to ID for bnb and sol
closes #6361
2022-02-06 14:20:09 +01:00
Matthias
8f2425e49f Add rudimentary tests for pg-specific stuff 2022-02-06 14:06:46 +01:00
Matthias
644442e2f9 Track timedout orders 2022-02-06 13:37:31 +01:00
Matthias
17d748dd4c Improve handling of left_open_trades 2022-02-06 13:19:00 +01:00
Matthias
c5e0daf2d3 Merge pull request #6358 from Bloodhunter4rc/patch-1
Update setup.sh / correct minimum required python version
2022-02-06 13:15:03 +01:00
Stefano Ariestasia
2a3ab1ef61 1 more line to be hidden 2022-02-06 07:08:27 +00:00
Matthias
6b9696057d Update documentation to require python3.8 everywhere 2022-02-06 07:47:10 +01:00
Stefano Ariestasia
4cf514e293 fix flake8 2022-02-06 03:16:56 +00:00
Stefano Ariestasia
131b2d68d8 reduce complexity (flake8) 2022-02-06 03:04:23 +00:00
Stefano Ariestasia
0477070faa hide some lines if trade is closed 2022-02-06 02:49:02 +00:00
Stefano Ariestasia
c4a54cc9cd refinement of status 2022-02-06 02:31:14 +00:00
Stefano Ariestasia
cfaf13c90f update 2022-02-06 02:21:16 +00:00
Bloodhunter4rc
82006ff1db Update setup.sh 2022-02-05 22:19:42 +01:00
Matthias
22173851d6 Detail tests for custom exit pricing 2022-02-05 16:28:47 +01:00
Matthias
2a59ef7311 Add detail tests for timeout behaviour 2022-02-05 16:28:47 +01:00
Matthias
808cefe526 Update order_selection logic 2022-02-05 16:28:47 +01:00
Matthias
9bf86bbe27 Extract backtesting row validation to separate function 2022-02-05 16:28:47 +01:00
Matthias
58fad72778 Update wallets when necessary
closes #6321
2022-02-05 16:28:47 +01:00
Matthias
e08006ea25 Adjust tests to use order Object 2022-02-05 16:28:47 +01:00
Matthias
4ea79a32e4 Use Order object for ft_timeout check 2022-02-05 16:28:47 +01:00
Matthias
1e603985c5 Extract backtesting order cancelling 2022-02-05 16:28:47 +01:00
Matthias
6637dacd7f Extract protections in backtesting 2022-02-05 16:28:47 +01:00
Matthias
7ac44380f7 Extract backtest order closing to models class 2022-02-05 16:28:46 +01:00
Matthias
090554f197 Try fill backtest order imediately for adjusted order 2022-02-05 16:28:21 +01:00
Matthias
f4149ee462 Force ROI to be within candle 2022-02-05 16:28:21 +01:00
Matthias
44e616c264 Add unfilledtimeout to required props for backtesting 2022-02-05 16:28:21 +01:00
Matthias
49cecf1cb2 Small cosmetic fix 2022-02-05 16:28:21 +01:00
Rokas Kupstys
9140679bf4 Backtest order timeout continued. 2022-02-05 16:28:21 +01:00
Rokas Kupstys
15698dd1ca Fix errors so it runs, implement timeout handling. 2022-02-05 16:28:21 +01:00
Matthias
f7a1cabe23 Add first version to fill orders "later" in backtesting 2022-02-05 16:28:21 +01:00
Matthias
c12e5a3b6c Initial idea backtesting order timeout 2022-02-05 16:28:21 +01:00
Matthias
6ed237a72a Merge pull request #6272 from stash86/fix-docs
Add more info on Telegram's status message
2022-02-05 16:22:45 +01:00
Matthias
06387478b5 Merge pull request #6341 from TheJoeSchr/backtest-filename
Plotting: add alias `--backtest-filename` for `--export-filename`
2022-02-04 16:31:03 +01:00
Joe Schr
761f7fdefb fix: linter 2022-02-04 13:14:55 +01:00
Joe Schr
e84a58de28 fix: don't use different configuration keys, just add as 2nd argument 2022-02-04 12:47:13 +01:00
Joe Schr
a3e045f69d Plotting: add alias --backtest-filename for --export-filename
makes it easier to discover how to use this argument
2022-02-04 12:47:13 +01:00
Matthias
f8faf748df Simplify prepare_buy_details 2022-02-03 19:47:03 +01:00
Matthias
1e6362debf Add test for new /status telegram message 2022-02-03 19:41:45 +01:00
Matthias
29879bb415 Update wording to entry/exit 2022-02-03 19:11:35 +01:00
Matthias
d6482066ef Merge pull request #6348 from freqtrade/new_release
New release 2022.1
2022-02-03 12:29:04 +01:00
Matthias
a733a74dd9 Merge pull request #6294 from xataxxx/health
/health api and telegram commands to return last processing time
2022-02-02 19:53:45 +01:00
Matthias
a4e1aaa9bd Merge pull request #6307 from freqtrade/bt_shift
Remove shift in analyzed dataframe columns
2022-02-02 19:52:10 +01:00
Matthias
2d45163f8f Bump version to 2022.1 2022-02-02 19:46:48 +01:00
Matthias
e95fb7ef3e Merge branch 'stable' into new_release 2022-02-02 19:46:33 +01:00
Matthias
0058abcc2d Fix crash when no min-stake-amount could be determined 2022-02-02 12:20:05 +01:00
Matthias
5aa683006c Merge pull request #6337 from TheJoeSchr/patch-8
docs: fix typo and fix markdown list rendering
2022-02-01 20:45:06 +01:00
Matthias
64d0c75bbb Fix deprecation warnings 2022-02-01 19:11:51 +01:00
Matthias
d96a354a3e Version bump ccxt to 1.71.73
closes #6339
2022-02-01 18:50:22 +01:00
Matthias
479b560549 Add missing entry_tag argument to custom_entry_tag documentation 2022-02-01 06:15:57 +01:00
TheJoeSchr
1a838680e7 docs: fix typo and fix markdown list rendering 2022-01-31 20:23:02 +01:00
Matthias
2c492abc1e Merge pull request #6336 from TheJoeSchr/patch-7
Docs: fix typo in strategy-callbacks.md
2022-01-31 20:22:12 +01:00
TheJoeSchr
f35c6545c1 Update strategy-callbacks.md
fix typo
2022-01-31 20:04:19 +01:00
Matthias
b3e36def34 Merge pull request #6329 from freqtrade/dependabot/pip/develop/prompt-toolkit-3.0.26
Bump prompt-toolkit from 3.0.24 to 3.0.26
2022-01-31 07:00:42 +01:00
Matthias
c53122ed02 Merge pull request #6323 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.9
Bump mkdocs-material from 8.1.8 to 8.1.9
2022-01-31 07:00:28 +01:00
Matthias
d10d84adf3 Merge pull request #6326 from freqtrade/dependabot/pip/develop/uvicorn-0.17.1
Bump uvicorn from 0.17.0 to 0.17.1
2022-01-31 07:00:12 +01:00
Matthias
aac6d15a1d Merge pull request #6327 from freqtrade/dependabot/pip/develop/pytest-mock-3.7.0
Bump pytest-mock from 3.6.1 to 3.7.0
2022-01-31 06:58:58 +01:00
Matthias
faa23949b5 Merge pull request #6324 from freqtrade/dependabot/pip/develop/nbconvert-6.4.1
Bump nbconvert from 6.4.0 to 6.4.1
2022-01-31 06:56:08 +01:00
Matthias
677a14ddde Merge pull request #6322 from freqtrade/dependabot/pip/develop/ccxt-1.71.46
Bump ccxt from 1.70.45 to 1.71.46
2022-01-31 06:55:43 +01:00
Matthias
d4ca2e5767 Merge pull request #6325 from freqtrade/dependabot/pip/develop/types-python-dateutil-2.8.9
Bump types-python-dateutil from 2.8.8 to 2.8.9
2022-01-31 06:55:13 +01:00
Matthias
ab3c6a7ee4 Merge pull request #6328 from freqtrade/dependabot/pip/develop/arrow-1.2.2
Bump arrow from 1.2.1 to 1.2.2
2022-01-31 06:54:52 +01:00
dependabot[bot]
bc5adc0188 Bump prompt-toolkit from 3.0.24 to 3.0.26
Bumps [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) from 3.0.24 to 3.0.26.
- [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.24...3.0.26)

---
updated-dependencies:
- dependency-name: prompt-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 03:01:46 +00:00
dependabot[bot]
65526e9803 Bump arrow from 1.2.1 to 1.2.2
Bumps [arrow](https://github.com/arrow-py/arrow) from 1.2.1 to 1.2.2.
- [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/1.2.1...1.2.2)

---
updated-dependencies:
- dependency-name: arrow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 03:01:42 +00:00
dependabot[bot]
8a9b70cc49 Bump pytest-mock from 3.6.1 to 3.7.0
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.6.1 to 3.7.0.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.6.1...v3.7.0)

---
updated-dependencies:
- dependency-name: pytest-mock
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 03:01:34 +00:00
dependabot[bot]
ab5c1e6c1e Bump uvicorn from 0.17.0 to 0.17.1
Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.17.0 to 0.17.1.
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.17.0...0.17.1)

---
updated-dependencies:
- dependency-name: uvicorn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 03:01:31 +00:00
dependabot[bot]
15dbdfe130 Bump types-python-dateutil from 2.8.8 to 2.8.9
Bumps [types-python-dateutil](https://github.com/python/typeshed) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 03:01:27 +00:00
dependabot[bot]
dbf2226841 Bump nbconvert from 6.4.0 to 6.4.1
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.4.0...6.4.1)

---
updated-dependencies:
- dependency-name: nbconvert
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 03:01:25 +00:00
dependabot[bot]
7d066d81c1 Bump mkdocs-material from 8.1.8 to 8.1.9
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.8 to 8.1.9.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.8...8.1.9)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 03:01:22 +00:00
dependabot[bot]
287e90af8e Bump ccxt from 1.70.45 to 1.71.46
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.70.45 to 1.71.46.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.70.45...1.71.46)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 03:01:18 +00:00
Matthias
cafda31869 Merge pull request #6320 from stash86/pos_adjust
Change new-config message for max_open_trades input
2022-01-30 14:11:20 +01:00
Matthias
7aae9565c7 Only look at buy orders when looking to recalculate trade value 2022-01-30 14:08:42 +01:00
Stefano Ariestasia
da39ca6650 fix new-config 2022-01-30 21:19:05 +09:00
Matthias
aea84dc117 Limit should default to None when calling pair_candles 2022-01-29 20:16:58 +01:00
Stefano Ariestasia
326ba46bf8 Merge branch 'freqtrade:develop' into fix-docs 2022-01-29 23:20:41 +09:00
Matthias
d1d520769e Improve status table for position adjust
don't show "/max" if no maximum is set

closes #6317
2022-01-29 14:29:09 +01:00
Matthias
e7409e74c2 Remove default from position_adjustment (otherwise strategy parameters won't work anymore) 2022-01-28 19:21:42 +01:00
Matthias
fb3c67d86b Accept that keys sometimes are not provided 2022-01-28 17:07:34 +01:00
Matthias
571ddceaf6 Merge pull request #6310 from Verbalinsurection/perso
Fix ETH duplicate in CoinGecko
2022-01-28 12:35:44 +01:00
Verbalinsurection
9ae14f0b56 Merge remote-tracking branch 'Verbalinsurection/perso' into perso 2022-01-28 11:17:27 +01:00
Verbalinsurection
2ba2144df1 Add tests for ETH fiat_convert 2022-01-28 11:17:16 +01:00
Matthias
15d5389564 Update /health endpoint to be in local timezone 2022-01-28 10:33:35 +01:00
Verbalinsurection
660f474ab8 Fix ETH duplicate in CoinGecko 2022-01-28 10:26:31 +01:00
Matthias
e062188a18 Merge pull request #6309 from freqtrade/fix_krakenci
Filter tickers on stake-currency for kraken
2022-01-28 08:08:00 +01:00
Matthias
5d0c2bcb44 Shift candles after pushing them to dataprovider
this will ensure that the signals are not shifted in callbacks
closes #6234
2022-01-28 07:25:10 +01:00
Matthias
138e867a68 Filter tickers on stake-currency for kraken 2022-01-28 07:20:47 +01:00
Matthias
9df7014de3 Skip kraken tests temporarily 2022-01-28 06:59:37 +01:00
Matthias
bf8ef58439 Merge pull request #6308 from stash86/pos_adjust
Fix wordings
2022-01-28 06:59:08 +01:00
Stefano Ariestasia
b8f29802e5 another typo 2022-01-28 09:31:36 +09:00
Stefano Ariestasia
cbd213bc0a fix typo 2022-01-28 09:16:56 +09:00
Stefano Ariestasia
bd1b991448 Merge branch 'freqtrade:develop' into fix-docs 2022-01-28 06:57:13 +09:00
Verbalinsurection
31211a33fd Fix ETH duplicate in CoinGecko 2022-01-27 22:21:16 +01:00
Matthias
82e193d9f0 Merge pull request #6260 from stash86/pos_adjust
Add max_buy_position_adjustment as attribute
2022-01-27 20:13:51 +01:00
Matthias
4b9d55dbe2 Add test for backtest dataprovider
(should cache the correct candle)
2022-01-27 18:59:23 +01:00
Matthias
002226f5fd Update setting to max_entry_position_adjustment 2022-01-27 16:57:50 +01:00
Matthias
18168cba7a Merge pull request #6303 from Wings22Actual/develop
Added note to docker_quickstart.md
2022-01-27 07:36:38 +01:00
Wings22Actual
4a2914d72e Update docs/docker_quickstart.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2022-01-27 07:04:06 +01:00
Stefano Ariestasia
396ebebdc1 Merge branch 'freqtrade:develop' into fix-docs 2022-01-26 16:09:11 +09:00
Stefano Ariestasia
ed71f777a3 Merge branch 'fix-docs' of https://github.com/stash86/freqtrade into fix-docs 2022-01-26 07:07:00 +00:00
Stefano Ariestasia
1f26709aca changes 2022-01-26 07:06:52 +00:00
Wings22Actual
4408f97a00 Added note to docker_quickstart.md
Added note that 'docker run --rm' can be used instead of 'docker-compose run --rm' for some commands (line 129-132)
2022-01-26 06:56:39 +00:00
Matthias
b6943f3bca Merge pull request #6296 from freqtrade/python_37_remove
Update references to remove python 3.7 support
2022-01-25 20:01:14 +01:00
Matthias
12c79967f5 Merge pull request #6258 from italodamato/pass_dimensions_to_generate_estimator
Pass dimensions to generate_estimator
2022-01-25 19:37:22 +01:00
Italo
30b27ae736 explicit dtype 2022-01-25 12:29:55 +00:00
Matthias
2e2b1e2470 Merge pull request #6299 from freqtrade/dependabot/pip/develop/ccxt-1.70.45
Bump ccxt from 1.68.20 to 1.70.45
2022-01-25 13:18:54 +01:00
Italo
f7a5b2cb71 explicit dimensions, added **kwargs, updated docs 2022-01-25 11:43:40 +00:00
dependabot[bot]
6e47d06733 Bump ccxt from 1.68.20 to 1.70.45
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.68.20 to 1.70.45.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.68.20...1.70.45)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 05:44:03 +00:00
Matthias
d9347e9900 Update references to remove python 3.7 support 2022-01-25 06:43:36 +01:00
Matthias
eb677ad9b6 Merge pull request #6291 from freqtrade/dependabot/pip/develop/pandas-1.4.0
Bump pandas from 1.3.5 to 1.4.0
2022-01-25 06:43:03 +01:00
Stefano Ariestasia
0fa7986369 Merge branch 'freqtrade:develop' into pos_adjust 2022-01-25 10:30:18 +09:00
Stefano Ariestasia
7c975df42a Merge branch 'freqtrade:develop' into fix-docs 2022-01-25 10:30:03 +09:00
Matthias
aacddf64cf Add pandas 3.7 requirements workaround 2022-01-24 19:07:37 +01:00
Reigo Reinmets
e72c3ec19f Commit just to force tests to run again. 2022-01-24 15:27:03 +02:00
Reigo Reinmets
78986a0def I sort managed to fit it on another row. Impressive. 2022-01-24 14:09:23 +02:00
Reigo Reinmets
acf6e94591 Fix unittest. 2022-01-24 13:56:52 +02:00
Reigo Reinmets
1d59a6b7e3 Merge branch 'freqtrade:develop' into health 2022-01-24 13:52:53 +02:00
Matthias
ac71d79364 Merge pull request #6281 from freqtrade/stake_amount_tag
Entry callbacks - provide buy_tag
2022-01-24 09:28:40 +01:00
Matthias
b8377b9e30 Merge pull request #6288 from freqtrade/dependabot/pip/develop/pytest-asyncio-0.17.2
Bump pytest-asyncio from 0.17.1 to 0.17.2
2022-01-24 08:02:01 +01:00
Matthias
2823da977d Merge pull request #6289 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.31
Bump sqlalchemy from 1.4.29 to 1.4.31
2022-01-24 08:00:46 +01:00
Matthias
45a2298929 Re-add getting buy orders in docs 2022-01-24 07:11:22 +01:00
Matthias
381bda1e4a Update test to add new argument 2022-01-24 07:02:02 +01:00
Matthias
194a5ce3cc Update advanced strategy template with missing methods 2022-01-24 07:02:02 +01:00
Matthias
e252830229 Add entry_tag to "entry" callbacks 2022-01-24 07:02:01 +01:00
Reigo Reinmets
d3d4894ec5 Merge branch 'freqtrade:develop' into health 2022-01-24 08:01:00 +02:00
Matthias
6d91ceb28c Merge pull request #6282 from xataxxx/develop
Fix missing order time data in backtesting.
2022-01-24 06:59:21 +01:00
Matthias
ce7dff405f Merge pull request #6292 from freqtrade/dependabot/pip/develop/fastapi-0.73.0
Bump fastapi from 0.72.0 to 0.73.0
2022-01-24 06:53:39 +01:00
Matthias
1aa7c193ba Merge pull request #6287 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.8
Bump mkdocs-material from 8.1.7 to 8.1.8
2022-01-24 06:52:57 +01:00
Matthias
0990e5d472 Merge pull request #6286 from freqtrade/dependabot/pip/develop/types-python-dateutil-2.8.8
Bump types-python-dateutil from 2.8.7 to 2.8.8
2022-01-24 06:22:58 +01:00
Matthias
9ae6bbb8d2 Merge pull request #6290 from freqtrade/dependabot/pip/develop/types-filelock-3.2.5
Bump types-filelock from 3.2.4 to 3.2.5
2022-01-24 06:22:24 +01:00
dependabot[bot]
b8413410d1 Bump fastapi from 0.72.0 to 0.73.0
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.72.0 to 0.73.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.72.0...0.73.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 03:01:33 +00:00
dependabot[bot]
fd1828c283 Bump pandas from 1.3.5 to 1.4.0
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.3.5 to 1.4.0.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Changelog](https://github.com/pandas-dev/pandas/blob/main/RELEASE.md)
- [Commits](https://github.com/pandas-dev/pandas/compare/v1.3.5...v1.4.0)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 03:01:30 +00:00
dependabot[bot]
cf79cef7ba Bump types-filelock from 3.2.4 to 3.2.5
Bumps [types-filelock](https://github.com/python/typeshed) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-filelock
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 03:01:24 +00:00
dependabot[bot]
95c7d48684 Bump sqlalchemy from 1.4.29 to 1.4.31
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.29 to 1.4.31.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 03:01:22 +00:00
dependabot[bot]
12fabba784 Bump pytest-asyncio from 0.17.1 to 0.17.2
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.17.1 to 0.17.2.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.17.1...v0.17.2)

---
updated-dependencies:
- dependency-name: pytest-asyncio
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 03:01:12 +00:00
dependabot[bot]
013262f7e2 Bump mkdocs-material from 8.1.7 to 8.1.8
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.7 to 8.1.8.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.7...8.1.8)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 03:01:07 +00:00
dependabot[bot]
138fd9440a Bump types-python-dateutil from 2.8.7 to 2.8.8
Bumps [types-python-dateutil](https://github.com/python/typeshed) from 2.8.7 to 2.8.8.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 03:01:03 +00:00
Reigo Reinmets
bf62fc9b25 Add /health endpoint that returns last_process timestamp, fix issue #6009 2022-01-23 21:58:46 +02:00
Reigo Reinmets
451eca51c8 Optimise the multiple usages of the same timestamp. 2022-01-23 20:58:25 +02:00
Reigo Reinmets
e67a54f7a9 Fix missing order time info in backtesting. 2022-01-23 20:52:35 +02:00
Matthias
daee59f4f1 Reorder interface methods 2022-01-23 19:20:31 +01:00
Matthias
57067ce88d Add tests for max_adjustment_buy handling 2022-01-23 19:07:37 +01:00
Matthias
7429f535c1 Imrpove code by reusing available properties 2022-01-23 18:59:09 +01:00
Matthias
62df044618 Merge pull request #6279 from xataxxx/develop
Fix position adjustment not counting older orders because of missing average field value
2022-01-23 17:42:51 +01:00
Matthias
6492e1cd76 Investigate random test failure 2022-01-23 17:42:18 +01:00
Matthias
4b6f9121ca Merge pull request #6275 from freqtrade/extract_timedout_from_ftbot
Extract timedout from ftbot
2022-01-23 17:28:10 +01:00
Reigo Reinmets
6613e3757a Additional fix 2022-01-23 18:09:57 +02:00
Matthias
09db4bcadd Don't use strings, use methods directly 2022-01-23 17:00:00 +01:00
Reigo Reinmets
51b94889b2 Just in case also check for closed to avoid counting in canceled orders. 2022-01-23 17:56:41 +02:00
Reigo Reinmets
8c79d55739 Fix issue #6268 2022-01-23 17:44:16 +02:00
Stefano Ariestasia
480ed90a02 create to_json function for Order 2022-01-23 11:33:06 +00:00
Matthias
821a9d9cdc Add current_time to check_timeout functions for convenience 2022-01-23 08:10:35 +01:00
Stefano Ariestasia
cc3852daf3 Add defaults to constants.py and update docs 2022-01-23 03:54:58 +00:00
Matthias
56daafd6b7 Use realistic date for dry-run orders 2022-01-22 16:31:59 +01:00
Matthias
01b331ee42 Merge pull request #6274 from italodamato/set-stoploss-at-trade-creation
set stoploss at trade creation
2022-01-22 16:17:47 +01:00
Matthias
7bef9a9b3e Extract timeout handling from freqtradebot class 2022-01-22 15:59:10 +01:00
Italo
82f0d4d056 set stoploss at trade creation 2022-01-22 14:03:12 +00:00
Matthias
bd4014e1e6 Small cleanup 2022-01-22 15:01:27 +01:00
Matthias
a35b0b519a Update forcebuy endpoint to support stake-amount
closes #6223
2022-01-22 13:26:02 +01:00
Stefano Ariestasia
fe5f61694b Merge branch 'freqtrade:develop' into pos_adjust 2022-01-22 21:25:16 +09:00
Matthias
1505ad451c Merge pull request #6271 from freqtrade/fix/6267
Allow @informative in webserver mode
2022-01-22 10:33:52 +01:00
Matthias
9ecd7400c8 Allow NaN when calculating digests 2022-01-22 08:10:09 +01:00
Matthias
314a544881 Add Failing test for get_strategy_run_id
Fails because max_open_trades is "inf"
emulates behaviour of `max_open_trades=-1` when loading the
configuration)
2022-01-22 08:09:08 +01:00
Stefano Ariestasia
f79decdb9c Merge branch 'fix-docs' of https://github.com/stash86/freqtrade into fix-docs 2022-01-22 06:54:57 +00:00
Stefano Ariestasia
05046b9eef Add more info on status message 2022-01-22 06:54:49 +00:00
Matthias
a43c088448 Allow @informative in webserver mode 2022-01-22 07:11:59 +01:00
Matthias
3d94d7df5c Update migrations for mariadb 2022-01-21 19:31:11 +01:00
Matthias
c265f39323 Update sequences for postgres 2022-01-21 17:19:39 +01:00
Matthias
19948a6f89 Try fix sequence migrations 2022-01-21 16:49:08 +01:00
Matthias
5dca183b7b Combine order and Trade migrations to better facilitate migrations in advanced DB systems 2022-01-21 16:49:08 +01:00
Matthias
bb1d8fb54f Improve message when no hyperopt fie is found
closes #6266
2022-01-21 15:24:26 +01:00
Stefano Ariestasia
3249f9fb98 Add max buys on status table 2022-01-21 08:27:54 +00:00
Stefano Ariestasia
f3a152a5a2 Merge branch 'freqtrade:develop' into pos_adjust 2022-01-21 17:11:36 +09:00
Matthias
730d2e3574 Merge pull request #6259 from stash86/fix-docs
add "# Buys" column to status table
2022-01-21 07:49:21 +01:00
Matthias
d02acb21c2 Add simple test for #buy header 2022-01-21 07:04:25 +01:00
Matthias
f4487c7711 Merge pull request #6264 from italodamato/plot-trade-buytag
add buy_tag to trade tooltip in plots
2022-01-21 06:51:44 +01:00
Stefano Ariestasia
748381c5cd Update based on flake8 2022-01-21 00:35:22 +00:00
Italo
e35a1e4a01 fix flake8 2022-01-20 21:00:33 +00:00
Italo
a9f14ac119 show buy_tag only if not None 2022-01-20 18:44:09 +00:00
Italo
8ce5536dd8 fix tests
added buy_tag to first ADA/USDT trade
2022-01-20 18:37:17 +00:00
Italo
4e9f0d89af add buy_tag to trade tooltip in plots 2022-01-20 17:17:58 +00:00
Matthias
d549905856 Api-backtest to test new functionality 2022-01-20 07:11:48 +01:00
Matthias
a6c7f45545 Update webserver backtseting to reuse prior results 2022-01-20 06:51:48 +01:00
Matthias
e9baabce6f Store results when backtesting via API 2022-01-20 06:35:18 +01:00
Stefano Ariestasia
f30580e5f2 Update freqtradebot.py 2022-01-20 11:40:29 +09:00
Stefano Ariestasia
5fb9511556 fix typo 2022-01-20 10:34:35 +09:00
Stefano Ariestasia
62ea1a445e add lines to show_config message 2022-01-20 10:03:26 +09:00
Stefano Ariestasia
2e537df358 Update strategy_resolver.py 2022-01-20 09:07:59 +09:00
Matthias
847e8977ca Merge pull request #6255 from rokups/rk/backtest-result-caching-2
Rework backtesting --no-cahche to --cache=[none, day, week, month].
2022-01-19 21:01:24 +01:00
Matthias
afe46a55f7 Add documentation for --cache backtest option 2022-01-19 20:19:17 +01:00
Matthias
d319204dea Add note about legacy metadata format 2022-01-19 20:08:09 +01:00
Stefano Ariestasia
7c010b3058 Update strategy-callbacks.md 2022-01-19 22:16:42 +09:00
Stefano Ariestasia
ac93eea585 update 2022-01-19 21:58:24 +09:00
Rokas Kupstys
5fffc5033a Rework backtesting --no-cahche to --cache=[none, day, week, month].
Fix an issue where config modification during runtime would prevent use of cached results.
2022-01-19 11:44:35 +02:00
Stefano Ariestasia
5525fdae1a add max_buy_position_adjustment as attribute 2022-01-19 16:50:13 +09:00
Stefano Ariestasia
3925e8a7e3 add "# Buys" column to status table 2022-01-19 16:14:21 +09:00
Italo
a4dbdb549d added type spec 2022-01-19 01:37:47 +00:00
Italo
a6a127f596 Update .gitignore 2022-01-19 01:31:14 +00:00
Italo
407c20412d Pass dimensions to generate_estimator
It's needed in order to create isotropic kernels for the GaussianProcessRegressor
2022-01-19 01:07:41 +00:00
Matthias
301b2e8a0f Merge pull request #6254 from SmartManoj/patch-2
Spreadfilter log % fix
2022-01-18 09:55:02 +01:00
மனோஜ்குமார் பழனிச்சாமி
d918d24f08 Spreadfilter log % fix
Both the following same
print(f'{3:.3%}') 
print(f'{3 *100 :.3}%')
# 300.000%
2022-01-18 14:05:03 +05:30
Matthias
3c06d31bbf Merge pull request #6238 from stash86/fix-docs
Add position adjustment On or Off on startup message
2022-01-17 20:32:27 +01:00
Matthias
d813fef95b Add asyncio_mode setting for pytest 2022-01-17 20:02:59 +01:00
Matthias
9c9c9f0171 Readd trailing white line 2022-01-17 20:00:35 +01:00
Matthias
91236c1876 Merge pull request #6244 from freqtrade/dependabot/pip/develop/uvicorn-0.17.0
Bump uvicorn from 0.16.0 to 0.17.0
2022-01-17 19:01:49 +01:00
Matthias
a156101d5c Merge pull request #6252 from xataxxx/dca
Fix eager-loading trade.orders
2022-01-17 13:17:01 +01:00
Reigo Reinmets
3de843ab2c Add eager-loading for orders. This allows access to trade.orders in all callbacks. 2022-01-17 13:23:37 +02:00
Matthias
8d67caafb3 Merge pull request #6240 from freqtrade/dependabot/pip/develop/time-machine-2.6.0
Bump time-machine from 2.5.0 to 2.6.0
2022-01-17 08:41:35 +01:00
Stefano Ariestasia
f9a935b9a3 Update rpc_manager.py 2022-01-17 16:37:06 +09:00
dependabot[bot]
d0dc9e26b0 Bump uvicorn from 0.16.0 to 0.17.0
Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.16.0 to 0.17.0.
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.16.0...0.17.0)

---
updated-dependencies:
- dependency-name: uvicorn
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 07:10:59 +00:00
Matthias
3a5841bc03 Merge pull request #6246 from freqtrade/dependabot/pip/develop/fastapi-0.72.0
Bump fastapi from 0.71.0 to 0.72.0
2022-01-17 08:10:05 +01:00
Matthias
cf41f71f39 Merge pull request #6245 from freqtrade/dependabot/pip/develop/pytest-asyncio-0.17.1
Bump pytest-asyncio from 0.16.0 to 0.17.1
2022-01-17 08:08:52 +01:00
dependabot[bot]
f2984e9d0e Bump time-machine from 2.5.0 to 2.6.0
Bumps [time-machine](https://github.com/adamchainz/time-machine) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/adamchainz/time-machine/releases)
- [Changelog](https://github.com/adamchainz/time-machine/blob/main/HISTORY.rst)
- [Commits](https://github.com/adamchainz/time-machine/compare/2.5.0...2.6.0)

---
updated-dependencies:
- dependency-name: time-machine
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 07:06:07 +00:00
Matthias
fa605e6a50 Merge pull request #6251 from freqtrade/dependabot/pip/develop/types-python-dateutil-2.8.7
Bump types-python-dateutil from 2.8.6 to 2.8.7
2022-01-17 08:05:20 +01:00
Matthias
0f51192575 Merge pull request #6250 from freqtrade/dependabot/pip/develop/types-cachetools-4.2.9
Bump types-cachetools from 4.2.8 to 4.2.9
2022-01-17 08:04:59 +01:00
Matthias
0629dc866d Merge pull request #6243 from freqtrade/dependabot/pip/develop/jsonschema-4.4.0
Bump jsonschema from 4.3.3 to 4.4.0
2022-01-17 06:40:26 +01:00
dependabot[bot]
da134d3ad1 Bump types-cachetools from 4.2.8 to 4.2.9
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.8 to 4.2.9.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 05:32:38 +00:00
Matthias
4f9af81b50 Merge pull request #6248 from freqtrade/dependabot/pip/develop/types-requests-2.27.7
Bump types-requests from 2.27.5 to 2.27.7
2022-01-17 06:31:46 +01:00
Matthias
543a561019 Merge pull request #6249 from freqtrade/dependabot/pip/develop/ccxt-1.68.20
Bump ccxt from 1.66.66 to 1.68.20
2022-01-17 06:30:27 +01:00
dependabot[bot]
9092596a1f Bump pytest-asyncio from 0.16.0 to 0.17.1
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.16.0 to 0.17.1.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.16.0...v0.17.1)

---
updated-dependencies:
- dependency-name: pytest-asyncio
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 05:28:33 +00:00
Matthias
096d2d7313 Merge pull request #6241 from freqtrade/dependabot/pip/develop/numpy-1.22.1
Bump numpy from 1.22.0 to 1.22.1
2022-01-17 06:28:15 +01:00
dependabot[bot]
81b8008047 Bump types-python-dateutil from 2.8.6 to 2.8.7
Bumps [types-python-dateutil](https://github.com/python/typeshed) from 2.8.6 to 2.8.7.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 05:27:54 +00:00
Matthias
7073b36421 Merge pull request #6247 from freqtrade/dependabot/pip/develop/flake8-tidy-imports-4.6.0
Bump flake8-tidy-imports from 4.5.0 to 4.6.0
2022-01-17 06:27:39 +01:00
Matthias
108f79ad39 Merge pull request #6242 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.7
Bump mkdocs-material from 8.1.5 to 8.1.7
2022-01-17 06:27:21 +01:00
dependabot[bot]
d384184784 Bump ccxt from 1.66.66 to 1.68.20
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.66.66 to 1.68.20.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.66.66...1.68.20)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 03:02:28 +00:00
dependabot[bot]
9fbb9332f9 Bump types-requests from 2.27.5 to 2.27.7
Bumps [types-requests](https://github.com/python/typeshed) from 2.27.5 to 2.27.7.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 03:02:21 +00:00
dependabot[bot]
c403464bb4 Bump flake8-tidy-imports from 4.5.0 to 4.6.0
Bumps [flake8-tidy-imports](https://github.com/adamchainz/flake8-tidy-imports) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/adamchainz/flake8-tidy-imports/releases)
- [Changelog](https://github.com/adamchainz/flake8-tidy-imports/blob/main/HISTORY.rst)
- [Commits](https://github.com/adamchainz/flake8-tidy-imports/compare/4.5.0...4.6.0)

---
updated-dependencies:
- dependency-name: flake8-tidy-imports
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 03:02:17 +00:00
dependabot[bot]
3d9f34b064 Bump fastapi from 0.71.0 to 0.72.0
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.71.0 to 0.72.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.71.0...0.72.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 03:02:14 +00:00
dependabot[bot]
e4af162f38 Bump jsonschema from 4.3.3 to 4.4.0
Bumps [jsonschema](https://github.com/Julian/jsonschema) from 4.3.3 to 4.4.0.
- [Release notes](https://github.com/Julian/jsonschema/releases)
- [Changelog](https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/Julian/jsonschema/compare/v4.3.3...v4.4.0)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 03:02:02 +00:00
dependabot[bot]
5afa975839 Bump mkdocs-material from 8.1.5 to 8.1.7
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.5 to 8.1.7.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.5...8.1.7)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 03:01:57 +00:00
dependabot[bot]
6be6515ecc Bump numpy from 1.22.0 to 1.22.1
Bumps [numpy](https://github.com/numpy/numpy) from 1.22.0 to 1.22.1.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.22.0...v1.22.1)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 03:01:53 +00:00
Stefano Ariestasia
b6ad0f52e9 Merge branch 'freqtrade:develop' into fix-docs 2022-01-17 10:59:16 +09:00
Stefano Ariestasia
edd2ea3699 Update rpc_manager.py 2022-01-17 10:57:10 +09:00
Matthias
3cdb672ac3 Improve test coverage 2022-01-16 19:11:20 +01:00
Matthias
c02497e4b8 Merge pull request #6172 from rokups/rk/backtest-results-caching
Backtest result reuse
2022-01-16 19:09:37 +01:00
Matthias
2bcfc0c90c Add warning about cache problems 2022-01-16 18:01:05 +01:00
Matthias
d08885ed92 Fix empty "/log" endpoint in certain moments 2022-01-16 15:37:00 +01:00
Matthias
69c00db7cd Only show /balance % improvement if trades have been made 2022-01-16 13:39:50 +01:00
Matthias
b96b0f89bd improved unfilledtimeout defaults 2022-01-16 13:17:12 +01:00
Stefano Ariestasia
acda9571d1 Revert "add position_adjustment_enable to config_full.example"
This reverts commit eabeb87ceb.
2022-01-16 19:10:32 +09:00
Matthias
6c4b261469 Convert nan to None in get_signal. 2022-01-16 08:04:39 +01:00
Stefano Ariestasia
eabeb87ceb add position_adjustment_enable to config_full.example 2022-01-16 10:00:13 +09:00
Matthias
39184e1f95 Fix random test-fail around midnight 2022-01-16 00:19:21 +01:00
Matthias
270d7ebbf5 Simplify test strategy 2022-01-15 17:36:42 +01:00
Rokas Kupstys
062d00e8f2 Fix @informative decorator failing with edge. 2022-01-15 17:31:16 +02:00
Rokas Kupstys
2b7405470a Fix timerange check. 2022-01-15 17:30:40 +02:00
Matthias
9becce9897 Update failing test 2022-01-15 17:30:40 +02:00
Rokas Kupstys
526ed7fa9a Add test_backtest_start_multi_strat_caching test flexing backtest result caching. 2022-01-15 17:30:40 +02:00
Rokas Kupstys
16861db653 Implement previous backtest result reuse when config and strategy did not change. 2022-01-15 17:30:40 +02:00
Matthias
6684bff963 Dry-run orders should have filled set correctly 2022-01-15 15:25:16 +01:00
Matthias
caea8967d5 Merge pull request #6079 from xataxxx/dca
Initial position adjustment support (DCA)
2022-01-15 15:24:42 +01:00
Matthias
66a479c26a Small doc improvements 2022-01-15 15:11:13 +01:00
Reigo Reinmets
6c0eef94bb Fix typo. 2022-01-14 21:05:05 +02:00
Reigo Reinmets
9f9e2a8722 Remove references to wallets.get_trade_stake_amount 2022-01-14 20:46:16 +02:00
Reigo Reinmets
93adb436f8 Fix flake8 intention issue. 2022-01-14 20:25:29 +02:00
Reigo Reinmets
766c69734d Merge branch 'dca' of github.com:xataxxx/freqtrade into dca 2022-01-14 20:02:47 +02:00
Reigo Reinmets
320c9ccf90 Unify functions and make it easy to get a list of filled buy orders 2022-01-14 20:02:35 +02:00
Reigo Reinmets
1e324d208e Merge branch 'freqtrade:develop' into dca 2022-01-14 17:09:10 +02:00
Reigo Reinmets
08cae6f067 Fix horrible whitespace mistake. 2022-01-13 20:44:03 +02:00
Reigo Reinmets
7699fde380 Update documentation about trade.nr_of_successful_buys 2022-01-13 20:33:40 +02:00
Reigo Reinmets
ffe69535d8 These could be properties. 2022-01-13 20:31:03 +02:00
Reigo Reinmets
13bc5c5d8f Fine, this does look better. 2022-01-13 20:24:21 +02:00
Reigo Reinmets
678be0b773 Slightly move code. 2022-01-13 20:16:45 +02:00
Matthias
faa35cb167 Small minor fixes 2022-01-13 17:18:07 +01:00
Matthias
13651fd3be Downgrade docker-image to 3.9.9 2022-01-13 09:24:13 +01:00
Reigo Reinmets
c826c9c2b9 Merge branch 'freqtrade:develop' into dca 2022-01-13 10:04:39 +02:00
Matthias
814a343ed3 Merge pull request #6217 from Wings22Actual/patch-1
minor spelling correction to build_config_commands.py
2022-01-13 06:51:52 +01:00
Wings22Actual
a22e1b6500 minor spelling correction
line 89 "Tim"->"Time"
2022-01-13 01:48:38 +00:00
Matthias
33cb9e9002 Fix erroneous import in docs 2022-01-12 09:11:42 +01:00
Reigo Reinmets
ffab70d869 Merge branch 'freqtrade:develop' into dca 2022-01-12 09:22:06 +02:00
Reigo Reinmets
7344f88ad5 Add a note about not being called when there's an open order. 2022-01-12 09:21:52 +02:00
Reigo Reinmets
7cd8448656 Fix documentation example. 2022-01-12 06:09:06 +02:00
Reigo Reinmets
8643b20a0e Improve documentation about /stopbuy command 2022-01-12 06:06:23 +02:00
Reigo Reinmets
af3d220ffc Update example method signature. 2022-01-12 05:09:52 +02:00
Reigo Reinmets
db3483c827 Our example should also set position_adjustment_enable 2022-01-12 05:02:42 +02:00
Matthias
775b1201d2 psutil is always required now.
closes #6208
2022-01-11 15:02:21 +01:00
Reigo Reinmets
e50b07ecb4 Make code compatible. 2022-01-11 12:05:57 +02:00
Reigo Reinmets
fec95277bb Merge branch 'dca' of github.com:xataxxx/freqtrade into dca 2022-01-11 11:48:51 +02:00
Reigo Reinmets
94f2c99989 Temporary fix for lazy loading. Probably we can do it better. 2022-01-11 11:43:32 +02:00
Reigo Reinmets
73840e1d91 Merge branch 'freqtrade:develop' into dca 2022-01-11 10:49:32 +02:00
Matthias
58b77bd15f Merge pull request #6205 from freqtrade/dependabot/pip/develop/ta-lib-0.4.24
Bump ta-lib from 0.4.23 to 0.4.24
2022-01-11 08:05:34 +01:00
Matthias
438a083602 Update TA-lib binary files 2022-01-11 07:16:49 +01:00
Reigo Reinmets
fbf026ac43 Fix sorting of imports. 2022-01-10 20:43:57 +02:00
Reigo Reinmets
3b7167ab07 Fix backtesting missing filled amounts in orders. 2022-01-10 20:30:40 +02:00
Reigo Reinmets
26f2db4777 Fix notify_enter attempting to fetch rate during testing. 2022-01-10 20:30:32 +02:00
Reigo Reinmets
30d293bfec Fix bug with None in backtesting. 2022-01-10 20:16:11 +02:00
Reigo Reinmets
0dc7c389a0 Merge branch 'freqtrade:develop' into dca 2022-01-10 20:15:27 +02:00
Matthias
78921824c6 Merge pull request #6197 from freqtrade/dependabot/pip/develop/progressbar2-4.0.0
Bump progressbar2 from 3.55.0 to 4.0.0
2022-01-10 13:22:40 +01:00
dependabot[bot]
0d00da8dab Bump ta-lib from 0.4.23 to 0.4.24
Bumps [ta-lib](https://github.com/mrjbq7/ta-lib) from 0.4.23 to 0.4.24.
- [Release notes](https://github.com/mrjbq7/ta-lib/releases)
- [Changelog](https://github.com/mrjbq7/ta-lib/blob/TA_Lib-0.4.24/CHANGELOG)
- [Commits](https://github.com/mrjbq7/ta-lib/compare/TA_Lib-0.4.23...TA_Lib-0.4.24)

---
updated-dependencies:
- dependency-name: ta-lib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 10:19:41 +00:00
dependabot[bot]
e0b05c4df2 Bump progressbar2 from 3.55.0 to 4.0.0
Bumps [progressbar2](https://github.com/WoLpH/python-progressbar) from 3.55.0 to 4.0.0.
- [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.55.0...v4.0.0)

---
updated-dependencies:
- dependency-name: progressbar2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 10:18:55 +00:00
Matthias
ef06ede3bd Merge pull request #6204 from freqtrade/dependabot/pip/develop/urllib3-1.26.8
Bump urllib3 from 1.26.7 to 1.26.8
2022-01-10 11:17:19 +01:00
Matthias
42b5e8dac6 Merge pull request #6190 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.5
Bump mkdocs-material from 8.1.4 to 8.1.5
2022-01-10 11:16:56 +01:00
Matthias
11d74da1e0 Merge pull request #6201 from freqtrade/dependabot/pip/develop/types-tabulate-0.8.5
Bump types-tabulate from 0.8.4 to 0.8.5
2022-01-10 11:16:46 +01:00
dependabot[bot]
fc1069cfe0 Bump urllib3 from 1.26.7 to 1.26.8
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.7 to 1.26.8.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/1.26.8/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.7...1.26.8)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 09:27:39 +00:00
dependabot[bot]
1e35f54709 Bump types-tabulate from 0.8.4 to 0.8.5
Bumps [types-tabulate](https://github.com/python/typeshed) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-tabulate
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 09:27:22 +00:00
Matthias
d80216ca05 Merge pull request #6192 from freqtrade/dependabot/pip/develop/requests-2.27.1
Bump requests from 2.26.0 to 2.27.1
2022-01-10 10:26:22 +01:00
Matthias
d2c7ff3f0f Merge pull request #6206 from freqtrade/dependabot/pip/develop/mypy-0.931
Bump mypy from 0.930 to 0.931
2022-01-10 10:26:07 +01:00
Matthias
d90745651a Merge pull request #6202 from freqtrade/dependabot/pip/develop/types-filelock-3.2.4
Bump types-filelock from 3.2.1 to 3.2.4
2022-01-10 10:25:46 +01:00
dependabot[bot]
130275faff Bump mypy from 0.930 to 0.931
Bumps [mypy](https://github.com/python/mypy) from 0.930 to 0.931.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.930...v0.931)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 07:28:13 +00:00
dependabot[bot]
29457078e7 Bump requests from 2.26.0 to 2.27.1
Bumps [requests](https://github.com/psf/requests) from 2.26.0 to 2.27.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.26.0...v2.27.1)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 07:27:43 +00:00
dependabot[bot]
8d554585f1 Bump types-filelock from 3.2.1 to 3.2.4
Bumps [types-filelock](https://github.com/python/typeshed) from 3.2.1 to 3.2.4.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-filelock
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 07:27:35 +00:00
Matthias
000e29113f Merge pull request #6203 from freqtrade/dependabot/pip/develop/types-python-dateutil-2.8.6
Bump types-python-dateutil from 2.8.4 to 2.8.6
2022-01-10 08:27:02 +01:00
Matthias
8057929817 Merge pull request #6200 from freqtrade/dependabot/pip/develop/types-requests-2.27.5
Bump types-requests from 2.26.3 to 2.27.5
2022-01-10 08:26:22 +01:00
Matthias
858a65e308 Merge pull request #6196 from freqtrade/dependabot/pip/develop/fastapi-0.71.0
Bump fastapi from 0.70.1 to 0.71.0
2022-01-10 06:40:15 +01:00
dependabot[bot]
fe067994e3 Bump types-requests from 2.26.3 to 2.27.5
Bumps [types-requests](https://github.com/python/typeshed) from 2.26.3 to 2.27.5.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 05:39:59 +00:00
Matthias
d349d2743a Merge pull request #6191 from freqtrade/dependabot/pip/develop/python-telegram-bot-13.10
Bump python-telegram-bot from 13.9 to 13.10
2022-01-10 06:39:37 +01:00
dependabot[bot]
2d930d081c Bump types-python-dateutil from 2.8.4 to 2.8.6
Bumps [types-python-dateutil](https://github.com/python/typeshed) from 2.8.4 to 2.8.6.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 05:38:50 +00:00
Matthias
96f8338496 Merge pull request #6195 from freqtrade/dependabot/pip/develop/types-cachetools-4.2.8
Bump types-cachetools from 4.2.7 to 4.2.8
2022-01-10 06:38:35 +01:00
Matthias
7bc50dff7a Merge pull request #6199 from freqtrade/dependabot/pip/develop/ccxt-1.66.66
Bump ccxt from 1.66.32 to 1.66.66
2022-01-10 06:38:13 +01:00
Matthias
a4d2cf2f06 Merge pull request #6194 from freqtrade/dependabot/pip/develop/nbconvert-6.4.0
Bump nbconvert from 6.3.0 to 6.4.0
2022-01-10 06:37:57 +01:00
dependabot[bot]
af60b9db59 Bump ccxt from 1.66.32 to 1.66.66
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.66.32 to 1.66.66.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.66.32...1.66.66)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 03:02:11 +00:00
dependabot[bot]
bc95e1e151 Bump fastapi from 0.70.1 to 0.71.0
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.70.1 to 0.71.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.70.1...0.71.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 03:01:59 +00:00
dependabot[bot]
626970b32e Bump types-cachetools from 4.2.7 to 4.2.8
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.7 to 4.2.8.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 03:01:56 +00:00
dependabot[bot]
a0d378fb7e Bump nbconvert from 6.3.0 to 6.4.0
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.3.0...6.4.0)

---
updated-dependencies:
- dependency-name: nbconvert
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 03:01:52 +00:00
dependabot[bot]
b8e8a31f84 Bump python-telegram-bot from 13.9 to 13.10
Bumps [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) from 13.9 to 13.10.
- [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.9...v13.10)

---
updated-dependencies:
- dependency-name: python-telegram-bot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 03:01:43 +00:00
dependabot[bot]
3fc44aa1bd Bump mkdocs-material from 8.1.4 to 8.1.5
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.4 to 8.1.5.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.4...8.1.5)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 03:01:38 +00:00
Matthias
59ffb98779 Merge pull request #6189 from jay-tau/patch-1
Remove non-decimal numerical separators
2022-01-09 17:06:19 +01:00
Joel Tony
cbd449f710 Remove non-decimal numerical separators 2022-01-09 14:21:57 +05:30
Reigo Reinmets
91b89c8c42 Improve docs, fix telegram message to show current rate. 2022-01-08 21:30:42 +02:00
Reigo Reinmets
0424b44667 Merge branch 'freqtrade:develop' into dca 2022-01-08 17:42:17 +02:00
Reigo Reinmets
195d601b8e Fix notification message showing "Current rate" as the initial buy order desired rate. 2022-01-08 17:41:59 +02:00
Reigo Reinmets
c929d428b2 Remove blank line. 2022-01-08 17:21:32 +02:00
Reigo Reinmets
0bca07a32a Added min_stake, max_stake. Removed pair as its included in trade. 2022-01-08 17:20:02 +02:00
Reigo Reinmets
813a2cd23b Add useful helper methods for adjust_trade_position implementation 2022-01-08 17:18:37 +02:00
Matthias
cf077b15c2 Fix random test failure 2022-01-08 14:54:39 +01:00
Reigo Reinmets
94631c7d64 Add performance warnings for backtesting and implementation. 2022-01-08 15:06:05 +02:00
Reigo Reinmets
8e424f7c73 Merge branch 'freqtrade:develop' into dca 2022-01-08 14:57:15 +02:00
Matthias
43f8087f32 Bitvavo does not support USDT stake 2022-01-08 10:44:07 +01:00
Matthias
827b8d3e4c Don't use test_datadir as userdata dir
use tmpdir
2022-01-07 20:00:20 +01:00
Matthias
04976658da Fix crash when using backtesting-show on a old backtestresult 2022-01-07 17:34:47 +01:00
Matthias
b82e63cb62 Merge pull request #6182 from rokups/rk/fix-6179
Fix #6179
2022-01-07 17:25:09 +01:00
Rokas Kupstys
11ace0f867 Instead of clearing processed dict, store df_analyzed (one with buy/sell signals) dataframe in it.
It still saves memory because this dataframe is kept by DataProvider.
Fixes #6179.
Amends #6133 (a715083fc0).
2022-01-07 12:07:49 +02:00
Matthias
7f20f6834b Merge pull request #6181 from freqtrade/simplify_optimizereports
Simplify optimizereports
2022-01-07 09:43:57 +01:00
Matthias
cd144cdfc9 Add bitvavo to compatibility tests
#6166
2022-01-07 09:30:50 +01:00
Matthias
e540959c27 Remove btdata from generate_strategy_stats 2022-01-07 09:27:07 +01:00
Matthias
1203d08d1e generate_pair_metrics does not need processed dict 2022-01-07 09:27:07 +01:00
Matthias
b77943af0d Merge pull request #6173 from freqtrade/volume_quote_workaround
Selectively convert quote to base volume in volumepairlist
2022-01-07 09:07:16 +01:00
Matthias
560b3d5dbe Merge pull request #6177 from freqtrade/remove_old_bt_format
Remove old bt format
2022-01-07 08:36:26 +01:00
Matthias
d64f9030c1 Remove now unused codesegment 2022-01-07 08:04:01 +01:00
Matthias
9a3d0528a3 Versionbump ccxt to 1.66.32
closes #6166
2022-01-07 07:55:11 +01:00
Matthias
b3a4ecaf77 Remove old backtest format support 2022-01-06 19:49:25 +01:00
Matthias
28011a3907 Update bt_results filename to new.json 2022-01-06 19:28:04 +01:00
Matthias
72f486289a Update Volumepairlist test 2022-01-06 19:07:47 +01:00
Matthias
24ec78b11c Quote-volumelist fix for gateio 2022-01-06 19:07:47 +01:00
Matthias
326e3d1f8e Selectively convert quote to base volume in volumepairlist 2022-01-06 19:07:43 +01:00
Matthias
bb29c44462 Merge pull request #6174 from frosty00/okex-candle-limit
increase okex candle limit
2022-01-06 15:59:59 +01:00
Carlo Revelli
7451b60501 increase okex candle limit 2022-01-06 05:31:23 -08:00
Matthias
a0f9c1bf7b Avoid failure when calculating max-drawdown
occurs if if no winning trade is recorded.
2022-01-06 13:51:15 +01:00
Matthias
e88a1ab209 Improve VolumePairlist behaviour
Filter pairs before downloading ohlcv candles - this will greatly speed up some instances.
2022-01-06 13:49:27 +01:00
Matthias
addba6597a Merge pull request #6165 from freqtrade/drawdown_fixes
Improved drawdown calculation
2022-01-06 09:56:05 +01:00
Matthias
5451972456 Success-messages should use success coloring 2022-01-06 09:29:08 +01:00
Matthias
2a2392fd73 Update parameter name in docstring 2022-01-06 09:15:30 +01:00
Matthias
33d95d245e Fix unbounderror
closes #6169
2022-01-06 08:48:30 +01:00
Matthias
a9a6cf13f8 Add exit_tag to detail-sells
closes #6159
2022-01-06 08:22:15 +01:00
Matthias
4e2b9203d7 Remove no longer used BT_DATA_COLUMNS_MID 2022-01-05 20:40:59 +01:00
Matthias
2ca90577a6 Update strategy-comparison test 2022-01-05 20:29:40 +01:00
Matthias
2ecaf9f8b4 Update backtest-result test-files to latest format 2022-01-05 20:26:24 +01:00
Matthias
6abd6bceb9 Avoid recalculating statistics for comparison line 2022-01-05 20:16:48 +01:00
Matthias
67e4dda5b3 Fix missing DataFrame in advanced docs 2022-01-04 19:54:50 +01:00
Matthias
8373a4e713 Small Adjustments to improve compatibility 2022-01-04 19:17:08 +01:00
Matthias
4d9b4ddc28 Update hyperopt-tools to use account drawdown 2022-01-04 17:43:39 +01:00
Matthias
09fae25c94 Fix some tests after drawdown calculation change 2022-01-04 17:07:31 +01:00
Matthias
7a2b50ce8b Update drawdown calculation to account drawdown 2022-01-04 17:07:31 +01:00
Matthias
42579c0268 Drop hyperopt results legacy mode 2022-01-04 17:06:40 +01:00
Matthias
7bf735dbfc Update deprecated dynamic-whitelist docs with reference to new method 2022-01-04 17:06:40 +01:00
Matthias
937f5e3d0f No longer use legacy mode for tests 2022-01-04 17:06:40 +01:00
Matthias
7ea5b0e359 Simplify hyperopt test setup 2022-01-04 17:06:40 +01:00
Matthias
15cb3792cf Merge pull request #6161 from stash86/fix-docs
Add ignore_buying_expired_candle to config_full example
2022-01-04 15:37:15 +01:00
Stefano Ariestasia
fa620d3f7b Merge branch 'freqtrade:develop' into fix-docs 2022-01-04 13:44:03 +08:00
Matthias
7adb7f90a6 Merge pull request #6154 from freqtrade/dependabot/pip/develop/ta-lib-0.4.23
Bump ta-lib from 0.4.22 to 0.4.23
2022-01-03 19:08:59 +01:00
Matthias
5536410ed0 Update ta-lib wheels 2022-01-03 17:58:53 +01:00
Matthias
de2a7c1956 Merge pull request #6153 from freqtrade/dependabot/pip/develop/psutil-5.9.0
Bump psutil from 5.8.0 to 5.9.0
2022-01-03 17:55:05 +01:00
Matthias
079dbc7997 Remove duplicate psutil dependency 2022-01-03 17:41:55 +01:00
Reigo Reinmets
05ac09b38e Merge branch 'freqtrade:develop' into dca 2022-01-03 11:41:33 +02:00
Matthias
028636b4a9 Merge pull request #6150 from freqtrade/dependabot/pip/develop/types-tabulate-0.8.4
Bump types-tabulate from 0.8.3 to 0.8.4
2022-01-03 09:20:56 +01:00
dependabot[bot]
8ed30fc9c1 Bump psutil from 5.8.0 to 5.9.0
Bumps [psutil](https://github.com/giampaolo/psutil) from 5.8.0 to 5.9.0.
- [Release notes](https://github.com/giampaolo/psutil/releases)
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](https://github.com/giampaolo/psutil/compare/release-5.8.0...release-5.9.0)

---
updated-dependencies:
- dependency-name: psutil
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 06:32:27 +00:00
dependabot[bot]
2469dc0424 Bump types-tabulate from 0.8.3 to 0.8.4
Bumps [types-tabulate](https://github.com/python/typeshed) from 0.8.3 to 0.8.4.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-tabulate
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 06:30:53 +00:00
Matthias
33991e8de9 Merge pull request #6157 from freqtrade/dependabot/pip/develop/types-cachetools-4.2.7
Bump types-cachetools from 4.2.6 to 4.2.7
2022-01-03 07:30:04 +01:00
dependabot[bot]
5407a06254 Bump ta-lib from 0.4.22 to 0.4.23
Bumps [ta-lib](https://github.com/mrjbq7/ta-lib) from 0.4.22 to 0.4.23.
- [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/commits)

---
updated-dependencies:
- dependency-name: ta-lib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 06:07:58 +00:00
Matthias
616d5bbaed Merge pull request #6151 from freqtrade/dependabot/pip/develop/jsonschema-4.3.3
Bump jsonschema from 4.3.2 to 4.3.3
2022-01-03 07:07:05 +01:00
dependabot[bot]
3f4c5a7902 Bump types-cachetools from 4.2.6 to 4.2.7
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.6 to 4.2.7.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 06:06:26 +00:00
Matthias
a253ad5ec1 Merge pull request #6156 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.4
Bump mkdocs-material from 8.1.3 to 8.1.4
2022-01-03 07:06:09 +01:00
Matthias
ce1780ca3f Merge pull request #6155 from freqtrade/dependabot/pip/develop/types-requests-2.26.3
Bump types-requests from 2.26.2 to 2.26.3
2022-01-03 07:05:46 +01:00
Matthias
6d3747d9e6 Merge pull request #6152 from freqtrade/dependabot/pip/develop/ccxt-1.66.20
Bump ccxt from 1.65.25 to 1.66.20
2022-01-03 07:05:19 +01:00
dependabot[bot]
0da31cff72 Bump mkdocs-material from 8.1.3 to 8.1.4
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.3 to 8.1.4.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.3...8.1.4)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 03:01:51 +00:00
dependabot[bot]
f7d3c50213 Bump types-requests from 2.26.2 to 2.26.3
Bumps [types-requests](https://github.com/python/typeshed) from 2.26.2 to 2.26.3.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 03:01:47 +00:00
dependabot[bot]
6b0a7a81a9 Bump ccxt from 1.65.25 to 1.66.20
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.65.25 to 1.66.20.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.65.25...1.66.20)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 03:01:37 +00:00
dependabot[bot]
8c0f7321c3 Bump jsonschema from 4.3.2 to 4.3.3
Bumps [jsonschema](https://github.com/Julian/jsonschema) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/Julian/jsonschema/releases)
- [Changelog](https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/Julian/jsonschema/compare/v4.3.2...v4.3.3)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 03:01:28 +00:00
Matthias
fac6956eeb Fix test failure after merge 2022-01-02 22:25:40 +01:00
Matthias
711a6a6dbc Merge branch 'develop' into pr/xataxxx/6079 2022-01-02 22:21:41 +01:00
Matthias
2116b0729f Integration-test for DCA order 2022-01-02 20:20:56 +01:00
Matthias
209ecc8732 Fix typo in bt_progress 2022-01-02 19:38:03 +01:00
Matthias
f3784f2149 Merge pull request #6147 from freqtrade/plot_parallel
Plot parallel and underwater
2022-01-01 19:27:42 +01:00
Matthias
08ba5b0451 Update docs to include underwaterplot 2022-01-01 16:55:08 +01:00
Matthias
fb06a673e0 Add Underwater plot 2022-01-01 14:40:20 +01:00
Matthias
78ba2d3fc7 Add underwaterplot calculation to btanalysis 2022-01-01 14:39:58 +01:00
Matthias
a2d97eecfe Add trade parallelism plot
closes #6142
2022-01-01 14:11:51 +01:00
Matthias
45a02beea8 Merge pull request #6145 from freqtrade/test_evict_cache
Fix CI failures
2022-01-01 14:07:21 +01:00
Matthias
8b49bec649 Use Version-dependent requirements
Bump numpy to 1.22.0
2022-01-01 13:51:13 +01:00
Matthias
c29469decf Version bump numpy to 1.22.0 2022-01-01 10:43:45 +01:00
Matthias
9becd20f20 Improve "Missing data" messages 2022-01-01 10:37:58 +01:00
Matthias
713b884d9b Fix failing monthly test 2022-01-01 10:37:43 +01:00
Matthias
515e1040c2 Merge pull request #6144 from freqtrade/asyncio_warns
Remove asyncio warnings due to deprecation on 3.10
2022-01-01 10:04:27 +01:00
Matthias
670aed06bf Remove loop for hyperopt. 2021-12-31 17:35:08 +01:00
Matthias
0277d93a64 don't use deprecated asyncio.get_event_loop() 2021-12-31 17:27:42 +01:00
Matthias
c9296dc9a0 Uvloop_helper should use "get_running_loop" 2021-12-31 17:27:42 +01:00
Matthias
550a1eef91 Reduce "cleanup" slowdown in telegram 2021-12-31 12:54:15 +01:00
Matthias
880ee016a4 Merge pull request #6133 from rokups/rk/reduce-memory-usage
Reduce memory usage by not holding on to no longer needed data
2021-12-31 11:36:52 +01:00
Matthias
39f8c5719b Fix exception on exchange shutdown 2021-12-31 11:24:56 +01:00
Rokas Kupstys
a715083fc0 Reduce memory usage by not holding on to no longer needed data. 2021-12-31 12:10:01 +02:00
Matthias
78ccaae318 Merge pull request #6140 from freqtrade/sell_before_roi
Change sequence of ROI/sell signal to favor sell-signal
2021-12-31 10:32:19 +01:00
Matthias
ee774f12bd Merge pull request #5677 from freqtrade/python_10
Update CI to run on python 3.10
2021-12-31 10:23:52 +01:00
Matthias
b1b2eebd11 Change sequence of ROI/sell signal to favor sell-signal 2021-12-30 20:00:58 +01:00
Matthias
b63491fb9c Update ROI_if_buy_signal tests to not use sell signal 2021-12-30 19:51:49 +01:00
Matthias
1bc2c71757 Update documentation with support for python 3.10 2021-12-30 16:33:01 +01:00
Matthias
6b22f84d30 Add windows ta wheel 2021-12-30 16:25:57 +01:00
Matthias
505d4bacd5 Update dockerfile to 3.10 2021-12-30 11:10:51 +01:00
Matthias
5b2a1b9e7a Update CI to run on python 3.10 2021-12-30 11:10:38 +01:00
Matthias
8edc84bf25 Exclude virtual environment from isort fixing 2021-12-30 10:19:06 +01:00
Matthias
bd98637ae9 Fail gracefully from plot-profit when no data is provided
closes #6132
2021-12-30 10:14:45 +01:00
Matthias
77afb7b5e2 Merge pull request #6114 from cdimauro/reduce_kucoin_logs
Reduce kucoin logs
2021-12-29 17:33:21 +01:00
Matthias
2b94fbfa74 Avoid using singleton where not necessary 2021-12-29 17:05:53 +01:00
Matthias
b530600718 Merge pull request #6134 from freqtrade/new_release
New release 2021.12
2021-12-29 17:00:19 +01:00
Matthias
043218cc7e Version bump to 2021.12 2021-12-29 16:18:14 +01:00
Matthias
c3e9ef27f6 Merge branch 'stable' into new_release 2021-12-29 16:17:56 +01:00
Reigo Reinmets
3d336a736e Improve documentation. 2021-12-29 14:51:57 +02:00
Matthias
24807515c1 Fix random test failure 2021-12-28 09:04:14 +01:00
Matthias
5a546855e6 Import TTLCache from cachetools
Importing from cachetools.ttl is deprecated, and will be removed in 5.0
2021-12-27 19:30:17 +01:00
Reigo Reinmets
f965e9177c Fix title 2021-12-27 19:56:45 +02:00
Reigo Reinmets
4b654b2713 Reduce logging. 2021-12-27 19:48:18 +02:00
Reigo Reinmets
093f98d368 Merge branch 'freqtrade:develop' into dca 2021-12-27 19:41:47 +02:00
Reigo Reinmets
2a728c676e Improve documentation. Fix bug. 2021-12-27 19:41:33 +02:00
Matthias
05a488a7a0 Further reduce log verbosity for kucoin 429000 exception 2021-12-27 17:15:30 +01:00
Matthias
bb65621134 Simplify test, simplify "log_*" selection 2021-12-27 17:14:59 +01:00
Matthias
df53873dab Merge pull request #6119 from freqtrade/dependabot/pip/develop/scikit-learn-1.0.2
Bump scikit-learn from 1.0.1 to 1.0.2
2021-12-27 16:48:48 +01:00
Matthias
ef2b326262 Reduce retrier message repetition
by combining messages, we can provide the same information in fewer log messages
2021-12-27 16:47:34 +01:00
Matthias
54858a0bbb Simplify test to only initialize and mock once. 2021-12-27 16:39:47 +01:00
Matthias
314e10596b Remove checking against logger_name in num_log_has 2021-12-27 16:39:31 +01:00
Reigo Reinmets
53ef37d5fc Merge branch 'freqtrade:develop' into dca 2021-12-27 17:12:26 +02:00
Matthias
17f037cec6 Extract order_fee handling from update_trade_state 2021-12-27 16:07:43 +01:00
Matthias
1b739acc08 Merge pull request #6118 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.29
Bump sqlalchemy from 1.4.28 to 1.4.29
2021-12-27 10:03:06 +01:00
dependabot[bot]
3804a17775 Bump scikit-learn from 1.0.1 to 1.0.2
Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/scikit-learn/scikit-learn/releases)
- [Commits](https://github.com/scikit-learn/scikit-learn/compare/1.0.1...1.0.2)

---
updated-dependencies:
- dependency-name: scikit-learn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 08:45:22 +00:00
Matthias
c8253790b6 Merge pull request #6125 from freqtrade/dependabot/pip/develop/filelock-3.4.2
Bump filelock from 3.4.0 to 3.4.2
2021-12-27 09:44:48 +01:00
Matthias
a215e29d2a Merge pull request #6117 from freqtrade/dependabot/pip/develop/ccxt-1.65.25
Bump ccxt from 1.64.44 to 1.65.25
2021-12-27 09:42:40 +01:00
Matthias
d58ed0e242 Merge pull request #6122 from freqtrade/dependabot/pip/develop/types-python-dateutil-2.8.4
Bump types-python-dateutil from 2.8.3 to 2.8.4
2021-12-27 08:45:01 +01:00
Matthias
2ab8f467dd Merge pull request #6121 from freqtrade/dependabot/pip/develop/jsonschema-4.3.2
Bump jsonschema from 4.3.1 to 4.3.2
2021-12-27 08:44:11 +01:00
Matthias
c1ec368c0c Merge pull request #6123 from freqtrade/dependabot/pip/develop/mypy-0.930
Bump mypy from 0.920 to 0.930
2021-12-27 08:43:54 +01:00
Matthias
29fff65598 Merge pull request #6120 from freqtrade/dependabot/pip/develop/plotly-5.5.0
Bump plotly from 5.4.0 to 5.5.0
2021-12-27 08:43:36 +01:00
dependabot[bot]
3cba405b2e Bump filelock from 3.4.0 to 3.4.2
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.4.0 to 3.4.2.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/py-filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.4.0...3.4.2)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 03:54:13 +00:00
dependabot[bot]
24d16d7dab Bump mypy from 0.920 to 0.930
Bumps [mypy](https://github.com/python/mypy) from 0.920 to 0.930.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.920...v0.930)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 03:54:06 +00:00
dependabot[bot]
2e84b8f0d5 Bump types-python-dateutil from 2.8.3 to 2.8.4
Bumps [types-python-dateutil](https://github.com/python/typeshed) from 2.8.3 to 2.8.4.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 03:54:03 +00:00
dependabot[bot]
470ef7c160 Bump jsonschema from 4.3.1 to 4.3.2
Bumps [jsonschema](https://github.com/Julian/jsonschema) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/Julian/jsonschema/releases)
- [Changelog](https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/Julian/jsonschema/compare/v4.3.1...v4.3.2)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 03:53:58 +00:00
dependabot[bot]
1093f22b80 Bump plotly from 5.4.0 to 5.5.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 5.4.0 to 5.5.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/v5.4.0...v5.5.0)

---
updated-dependencies:
- dependency-name: plotly
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 03:53:54 +00:00
dependabot[bot]
e085058621 Bump sqlalchemy from 1.4.28 to 1.4.29
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.28 to 1.4.29.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 03:53:47 +00:00
dependabot[bot]
81b383fe5c Bump ccxt from 1.64.44 to 1.65.25
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.64.44 to 1.65.25.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.64.44...1.65.25)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 03:53:41 +00:00
cdimauro
f77b8cbb7a Reduce KuCoin logs only for 429000 error
Only KuCoin messages for 429000 error code are logged once.

Logs functions are also simplified and optimized.

test_remove_logs_for_pairs_already_in_blacklist is simplified as well.
2021-12-26 21:09:25 +01:00
Reigo Reinmets
bc8fc3ab09 We can actually call recalc_open_trade_value less since it's being called eventually anyway. 2021-12-26 20:09:18 +02:00
Reigo Reinmets
bd5520bee2 Adjust comments, fix stoploss_on_exchange for slower closed orders. 2021-12-26 20:03:10 +02:00
Reigo Reinmets
099dc07baf No longer needed since recalc_trade_from_orders always calls it. 2021-12-26 20:02:20 +02:00
Reigo Reinmets
817a65b656 This is not needed since backtesting does not have open orders. 2021-12-26 20:01:48 +02:00
Matthias
045225beef Slightly improve doc formatting 2021-12-26 15:34:37 +01:00
Matthias
d3f3c49b13 Fix minor "gotchas" 2021-12-26 15:29:10 +01:00
cdimauro
6509c38717 Introduce new test functions to check logs
New functions log_contains, num_log_contains, num_log_has and num_log_has_re
are introduced in the conftest module to help and simplify checking:
- if logs contain a string;
- count how many messages contain a string;
- count how many messages are the given string;
- count how many messages matchs a regex.

A couple of existing tests are changed using the new functions.
2021-12-26 09:49:14 +01:00
cdimauro
fbaf46901e Reduce more KuCoin logs on retrier decorator
More logs are reduced, for KuCoin, on the retrier_async decorator:

_async_get_candle_history() returned exception
retrying _async_get_candle_history() still for
Giving up retrying: _async_get_candle_history()
Applying DDosProtection backoff delay
2021-12-26 09:06:26 +01:00
cdimauro
96fbf63d0b Reduce KuCoin logs on DDosProtection error messages
KuCoin APIs generate A LOT of error messages.
Consequently, logs are flooded with lines like:
2021-12-25 22:30:23 freqtrade.exchange.common: WARNING -
_async_get_candle_history() returned exception:
"kucoin GET https://openapi-v2.kucoin.com/api/v1/market/candles?
symbol=PDEX-USDT&type=5min&startAt=1640317818&endAt=1640467818
429 Too Many Requests {"code":"429000","msg":"Too Many Requests"}"
2021-12-25 22:30:23 freqtrade.exchange.common: WARNING -
retrying _async_get_candle_history() still for 3 times
2021-12-25 22:30:23 freqtrade.exchange.common: WARNING -
Kucoin 429 error, avoid triggering DDosProtection backoff delay.
2 tries left before giving up
2021-12-25 22:30:24 freqtrade.exchange.common: WARNING -
_async_get_candle_history() returned exception:
"kucoin GET https://openapi-v2.kucoin.com/api/v1/market/candles?
symbol=UBX-USDT&type=5min&startAt=1640317821&endAt=1640467821
429 Too Many Requests {"code":"429000","msg":"Too Many Requests"}"

Messages like:
Kucoin 429 error, avoid triggering DDosProtection backoff delay.
are logged only once for a certain period of time (default is 3600 seconds).
2021-12-25 22:32:22 +01:00
Reigo Reinmets
aa54592ec7 Merge branch 'freqtrade:develop' into dca 2021-12-25 21:06:26 +02:00
Matthias
2917cc1f2e Bitpanda's "fetch_my_trades" requires "to" argument
closes #4938
2021-12-25 14:28:22 +01:00
Matthias
6fdad8c6bd Prevent exception, ensure deletion occurs 2021-12-25 14:03:44 +01:00
Matthias
356b2d3d91 Reestablish backward compatibility 2021-12-25 13:47:28 +01:00
Matthias
b1feb69ca9 Use Pathlib to delete testfile 2021-12-25 10:30:59 +01:00
Matthias
49aa34c6f3 Merge pull request #6112 from xataxxx/develop
Fix test not running when user_data contains historical data.
2021-12-25 10:11:15 +01:00
Reigo Reinmets
ea79eb55e9 Remove this test change from DCA branch. 2021-12-25 10:43:25 +02:00
Reigo Reinmets
d11a8928d4 Fix test not running when user_data contains historical data. 2021-12-25 10:39:27 +02:00
Reigo Reinmets
3cbb2ff31f Fix up documentation. 2021-12-25 10:35:08 +02:00
Stefano Ariestasia
e3181748dc Add ignore_buying_expired_candle to config_full example 2021-12-25 12:24:12 +09:00
Reigo Reinmets
f61aaa8c0d Improve documentation example 2021-12-24 19:02:39 +02:00
Reigo Reinmets
ad247b2f07 Merge branch 'freqtrade:develop' into dca 2021-12-24 12:39:09 +02:00
Reigo Reinmets
de79d25caf Refactoring to use strategy based configuration 2021-12-24 12:38:43 +02:00
Matthias
58663180e0 Merge pull request #6107 from freqtrade/remove_slack
Update CI to notify on discord only
2021-12-23 21:50:49 +01:00
Matthias
98f6d2d722 Update CI to notify on discord only 2021-12-23 21:27:30 +01:00
Matthias
110e48c541 Remove travis config file
Travisci seems to no longer offer a free plan for open source
repositories, and other repositories report the need to get in touch
with support again and again.

This complication is not necessary with github actions, which covers our
CI needs well.
2021-12-23 20:38:07 +01:00
Matthias
61dbb6206f Slightly reduce verbosity when reload_conf is issued
part of #6095
2021-12-23 20:33:13 +01:00
Reigo Reinmets
ac690e9215 Remove unnecessary returns. 2021-12-23 18:49:11 +02:00
Matthias
9a9cc31d83 Update docs regarding multiarch builds 2021-12-23 17:01:44 +01:00
Reigo Reinmets
0c4664e8f4 Lock file is not always left behind so handle it. 2021-12-23 17:39:43 +02:00
Reigo Reinmets
bc60139ae3 I really should make this flake8 / isort check automatic before commit. 2021-12-23 16:40:47 +02:00
Reigo Reinmets
8393c99b62 Whoops, missing a line. 2021-12-23 16:25:27 +02:00
Reigo Reinmets
8bf1001b33 Fix test failing when user_data already contains data... 2021-12-23 12:41:37 +02:00
Reigo Reinmets
ace0a83c0c Allow forcebuy to also buy more when trade is already open. 2021-12-23 11:57:53 +02:00
Reigo Reinmets
2e23e88fc1 Re-add back the log i accidentally removed. 2021-12-22 11:49:43 +02:00
Reigo Reinmets
d70ddeef9a Remove whitespace. Darn IntelliJ. 2021-12-22 11:43:48 +02:00
Reigo Reinmets
e439ae1fea Update wallet balance on every order close, not only trade close 2021-12-22 11:20:03 +02:00
Reigo Reinmets
da2e07b7fe Unittest base_stake_amount_ratio 2021-12-22 02:42:44 +02:00
Reigo Reinmets
76e7bf6cd2 Merge branch 'freqtrade:develop' into dca 2021-12-22 02:24:21 +02:00
Reigo Reinmets
7df3e7ada4 Add base_stake_amount_ratio config param to support unlimited stakes. 2021-12-22 02:19:11 +02:00
Reigo Reinmets
fa01cbf546 iSort 2021-12-21 22:23:01 +02:00
Matthias
f88b6af26f Merge pull request #6070 from cdimauro/suppress_logs
Suppress additional logs for pairs in blacklist
2021-12-21 21:07:15 +01:00
Matthias
e5aaef6440 Fix CI failure 2021-12-21 19:20:09 +01:00
cdimauro
6ba8b17fdd Use LoggingMixin.log_once to remove/reduce logs on pairlists 2021-12-21 09:11:57 +01:00
Reigo Reinmets
4862cdb296 Improve documentation. 2021-12-21 00:11:01 +02:00
Reigo Reinmets
c9243fb4f6 Use buy side for price since mostly used for DCA. 2021-12-20 22:45:46 +02:00
Reigo Reinmets
f6d36ce56b Fix the dca order not being counted bug. 2021-12-20 22:07:42 +02:00
Reigo Reinmets
d9f5694965 Merge branch 'freqtrade:develop' into dca 2021-12-20 22:05:58 +02:00
Matthias
40036bc710 Force dry-run for webserver backtest mode
closes #6094
2021-12-20 19:41:33 +01:00
Matthias
afad9be53f Merge pull request #6093 from freqtrade/dependabot/pip/develop/cryptography-36.0.1
Bump cryptography from 36.0.0 to 36.0.1
2021-12-20 09:01:25 +01:00
Matthias
6fe09b6dee Merge pull request #6090 from freqtrade/dependabot/pip/develop/mypy-0.920
Bump mypy from 0.910 to 0.920
2021-12-20 07:16:21 +01:00
dependabot[bot]
21da01f777 Bump cryptography from 36.0.0 to 36.0.1
Bumps [cryptography](https://github.com/pyca/cryptography) from 36.0.0 to 36.0.1.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/36.0.0...36.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 05:39:04 +00:00
Matthias
260c627e99 Merge pull request #6091 from freqtrade/dependabot/pip/develop/time-machine-2.5.0
Bump time-machine from 2.4.1 to 2.5.0
2021-12-20 06:38:46 +01:00
Matthias
d47167c9c4 Merge pull request #6087 from freqtrade/dependabot/pip/develop/numpy-1.21.5
Bump numpy from 1.21.4 to 1.21.5
2021-12-20 06:38:25 +01:00
dependabot[bot]
b6f8765d3b Bump mypy from 0.910 to 0.920
Bumps [mypy](https://github.com/python/mypy) from 0.910 to 0.920.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.910...v0.920)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 05:38:03 +00:00
Matthias
5b608c9005 Merge pull request #6088 from freqtrade/dependabot/pip/develop/ccxt-1.64.44
Bump ccxt from 1.63.65 to 1.64.44
2021-12-20 06:37:59 +01:00
Matthias
cfad873ea7 Merge pull request #6092 from freqtrade/dependabot/pip/develop/jsonschema-4.3.1
Bump jsonschema from 4.2.1 to 4.3.1
2021-12-20 06:37:41 +01:00
Matthias
480eb55721 Merge pull request #6086 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.3
Bump mkdocs-material from 8.1.0 to 8.1.3
2021-12-20 06:37:23 +01:00
Matthias
e754cc09fc Merge pull request #6089 from freqtrade/dependabot/pip/develop/types-requests-2.26.2
Bump types-requests from 2.26.1 to 2.26.2
2021-12-20 06:36:46 +01:00
dependabot[bot]
cde35509db Bump jsonschema from 4.2.1 to 4.3.1
Bumps [jsonschema](https://github.com/Julian/jsonschema) from 4.2.1 to 4.3.1.
- [Release notes](https://github.com/Julian/jsonschema/releases)
- [Changelog](https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/Julian/jsonschema/compare/v4.2.1...v4.3.1)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 03:01:52 +00:00
dependabot[bot]
5a3a5e98d6 Bump time-machine from 2.4.1 to 2.5.0
Bumps [time-machine](https://github.com/adamchainz/time-machine) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/adamchainz/time-machine/releases)
- [Changelog](https://github.com/adamchainz/time-machine/blob/main/HISTORY.rst)
- [Commits](https://github.com/adamchainz/time-machine/compare/2.4.1...2.5.0)

---
updated-dependencies:
- dependency-name: time-machine
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 03:01:47 +00:00
dependabot[bot]
44ac002cf0 Bump types-requests from 2.26.1 to 2.26.2
Bumps [types-requests](https://github.com/python/typeshed) from 2.26.1 to 2.26.2.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 03:01:41 +00:00
dependabot[bot]
56d96d6cff Bump ccxt from 1.63.65 to 1.64.44
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.63.65 to 1.64.44.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.63.65...1.64.44)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 03:01:40 +00:00
dependabot[bot]
36632b48c7 Bump numpy from 1.21.4 to 1.21.5
Bumps [numpy](https://github.com/numpy/numpy) from 1.21.4 to 1.21.5.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.21.4...v1.21.5)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 03:01:34 +00:00
dependabot[bot]
1b3aaffef4 Bump mkdocs-material from 8.1.0 to 8.1.3
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.0 to 8.1.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.0...8.1.3)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 03:01:26 +00:00
Reigo Reinmets
b8b5e93000 Merge branch 'freqtrade:develop' into dca 2021-12-19 18:25:53 +02:00
Reigo Reinmets
f28d95ffb5 Add test for position adjust 2021-12-19 12:27:17 +02:00
Reigo Reinmets
5da38f3613 Fix typo. Make sure trade is market open. 2021-12-19 10:36:47 +02:00
Matthias
1cbc4da72b Merge pull request #6082 from Rikj000/docs/hyperopt-import-any
📝 Docs - Added `Any` import
2021-12-19 07:54:49 +01:00
Rik Helsen
58c3d69d14 📝 Docs - Added Any import 2021-12-18 23:29:55 +01:00
Reigo Reinmets
3aca3a7133 Use parentheses instead of backslash 2021-12-18 18:55:47 +02:00
Reigo Reinmets
1eb83f9a62 Fix documentation formatting. 2021-12-18 18:55:12 +02:00
Reigo Reinmets
db2f0660fa Some more compatibility fixes. 2021-12-18 11:15:59 +02:00
Reigo Reinmets
b094430c26 Restructure for less complexity. Flake8 2021-12-18 11:01:06 +02:00
Reigo Reinmets
30673f84f9 Flake8 compatibility 2021-12-18 11:00:25 +02:00
Reigo Reinmets
cc28f73d7f Hopefully fix orders being left lingering and trade not updating once they are complete 2021-12-17 22:29:41 +02:00
Reigo Reinmets
d10fb95fce Fix typo 2021-12-17 22:27:10 +02:00
Reigo Reinmets
cea023399e Merge branch 'freqtrade:develop' into dca 2021-12-17 21:59:58 +02:00
Reigo Reinmets
462270bc5a Fix a case where the amount was not recalculated. Added additional temporary logging. 2021-12-16 22:57:56 +02:00
Matthias
ea38b58081 Add base_currency to allowed webhook fields
closes #6075
2021-12-16 20:18:01 +01:00
Reigo Reinmets
337af44901 Merge branch 'freqtrade:develop' into dca 2021-12-16 20:02:14 +02:00
Matthias
b2fc3e814e Merge pull request #6055 from freqtrade/blacklist_delete
Add Blacklist delete
2021-12-16 13:41:18 +01:00
Matthias
39f0a17e62 Fix formatting 2021-12-16 07:11:35 +01:00
Reigo Reinmets
7200659b35 Merge branch 'freqtrade:develop' into dca 2021-12-15 23:17:44 +02:00
Matthias
f9aa36f291 Don't hard-fail when executing emergency sell fails
closes #6068
2021-12-15 19:37:35 +01:00
Matthias
b80b5ed1ad Improve uri_logging test
part of #6069
2021-12-15 19:25:30 +01:00
Reigo Reinmets
a7c67e8c7c Merge branch 'freqtrade:develop' into dca 2021-12-15 08:32:12 +02:00
cdimauro
9d8646072c Add test case for checking removal of logs for pains in blacklist 2021-12-14 06:23:40 +01:00
Matthias
dda302eea2 Merge pull request #6026 from freqtrade/dependabot/pip/develop/ta-lib-0.4.22
Bump ta-lib from 0.4.21 to 0.4.22
2021-12-13 19:44:46 +01:00
Reigo Reinmets
9be29c6e92 Theoretically fix second order timeout/canceling deleting the whole order. 2021-12-13 20:44:18 +02:00
Reigo Reinmets
468076cf54 This has to be reset since otherwise it will not handle live limit orders after first buy. 2021-12-13 20:32:13 +02:00
Matthias
793d090561 Improve log message wording for rejected stake amounts
closes #6064
2021-12-13 19:29:07 +01:00
Matthias
95949bd466 Update windows wheels to ta-lib 0.4.22 2021-12-13 19:05:35 +01:00
Reigo Reinmets
d4b31263ca Fix open rate being None formatting error. 2021-12-13 13:54:01 +02:00
Reigo Reinmets
6f6e7467f5 Fix potential problem. 2021-12-13 11:17:24 +02:00
Matthias
1d0af074ac Merge pull request #6061 from freqtrade/dependabot/pip/develop/ccxt-1.63.65
Bump ccxt from 1.63.55 to 1.63.65
2021-12-13 06:51:17 +01:00
Matthias
f2d55a91cd Merge pull request #6063 from freqtrade/dependabot/pip/develop/fastapi-0.70.1
Bump fastapi from 0.70.0 to 0.70.1
2021-12-13 06:51:05 +01:00
Matthias
5371458c99 Merge pull request #6062 from freqtrade/dependabot/pip/develop/pandas-1.3.5
Bump pandas from 1.3.4 to 1.3.5
2021-12-13 06:50:32 +01:00
dependabot[bot]
884a04c7fe Bump fastapi from 0.70.0 to 0.70.1
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.70.0 to 0.70.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.70.0...0.70.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 03:01:49 +00:00
dependabot[bot]
172b9383c0 Bump pandas from 1.3.4 to 1.3.5
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.3.4 to 1.3.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.3.4...v1.3.5)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 03:01:44 +00:00
dependabot[bot]
ec4a24649c Bump ccxt from 1.63.55 to 1.63.65
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.63.55 to 1.63.65.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.63.55...1.63.65)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 03:01:38 +00:00
Reigo Reinmets
1362bd9626 Fix potential problem. 2021-12-13 02:46:37 +02:00
Reigo Reinmets
2c3e5fa080 Remove extra logging. 2021-12-13 02:30:29 +02:00
Reigo Reinmets
1017b68af9 Fix some unit-tests. Use common trade entry code. 2021-12-13 02:27:09 +02:00
Reigo Reinmets
98255c18cf Merge branch 'freqtrade:develop' into dca 2021-12-13 02:10:13 +02:00
Matthias
3398469e55 Update PerformanceFilter to have min_profit as ratio again.
closes #6056
2021-12-12 13:21:36 +01:00
cdimauro
8dd3128ed4 Add type annotation to new logs suppression code 2021-12-12 12:32:09 +01:00
cdimauro
5b998aeca7 Remove unused import
Remove the import from copy, since deepcopy() isn't used anymore
(list.copy() is used instead).
2021-12-12 10:21:54 +01:00
cdimauro
878e16545d Suppress additional logs for pairs in blacklist
Every time that there's freqtrade "ticks", pairs in the blacklist are
checked and a warning message is displayed.
So, the logs are continuously flooded with the same warnings.

For example:
2021-07-26 06:24:45 freqtrade.plugins.pairlistmanager: WARNING -
Pair XTZUP/USDT in your blacklist. Removing it from whitelist...
2021-07-26 06:24:45 freqtrade.plugins.pairlistmanager: WARNING -
Pair SUSHIUP/USDT in your blacklist. Removing it from whitelist...
2021-07-26 06:24:45 freqtrade.plugins.pairlistmanager: WARNING -
Pair XTZDOWN/USDT in your blacklist. Removing it from whitelist...
2021-07-26 06:24:50 freqtrade.plugins.pairlistmanager: WARNING -
Pair XTZUP/USDT in your blacklist. Removing it from whitelist...
2021-07-26 06:24:50 freqtrade.plugins.pairlistmanager: WARNING -
Pair SUSHIUP/USDT in your blacklist. Removing it from whitelist...
2021-07-26 06:24:50 freqtrade.plugins.pairlistmanager: WARNING -
Pair XTZDOWN/USDT in your blacklist. Removing it from whitelist...

This patch shows the warning only the first time, by keeping track
of which pairs in the blacklist were already logged.
2021-12-12 10:20:08 +01:00
Reigo Reinmets
c6256aba35 Improve documentation. 2021-12-12 08:37:03 +02:00
Reigo Reinmets
8dacd987b9 Merge branch 'freqtrade:develop' into dca 2021-12-12 08:31:38 +02:00
Matthias
c12f2378db Merge pull request #6045 from freqtrade/trade_fee_fallback_value
Add unknown_fee_rate parameter
2021-12-11 20:00:01 +01:00
Matthias
1a4b403792 Merge pull request #6047 from freqtrade/dependabot/pip/develop/uvicorn-0.16.0
Bump uvicorn from 0.15.0 to 0.16.0
2021-12-11 19:50:18 +01:00
Matthias
b90c5e56fb Fix webserver schema bug when running in webserver mode 2021-12-11 19:46:35 +01:00
Matthias
8fdef2900e Increment API version to let clients know this is now available 2021-12-11 19:41:30 +01:00
Matthias
2918032dac Merge pull request #6046 from freqtrade/dependabot/pip/develop/python-telegram-bot-13.9
Bump python-telegram-bot from 13.8.1 to 13.9
2021-12-11 19:41:14 +01:00
Reigo Reinmets
64558e60d3 Fix bug in example. 2021-12-11 19:45:30 +02:00
Reigo Reinmets
2e13893341 Merge branch 'freqtrade:develop' into dca 2021-12-11 18:28:05 +02:00
Matthias
06bd8a1540 Merge pull request #6052 from freqtrade/dependabot/github_actions/develop/peter-evans/dockerhub-description-2.4.3
Bump peter-evans/dockerhub-description from 2.1.0 to 2.4.3
2021-12-11 17:26:43 +01:00
Reigo Reinmets
9176e2f1f6 Merge branch 'freqtrade:develop' into dca 2021-12-11 18:26:11 +02:00
Reigo Reinmets
71147d2899 Attempt to support limit orders for position adjustment. 2021-12-11 18:25:05 +02:00
dependabot[bot]
58cd91bd80 Bump python-telegram-bot from 13.8.1 to 13.9
Bumps [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) from 13.8.1 to 13.9.
- [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.8.1...v13.9)

---
updated-dependencies:
- dependency-name: python-telegram-bot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-11 16:00:35 +00:00
Matthias
dbe97bcdb1 Merge pull request #6053 from freqtrade/dependabot/github_actions/develop/crazy-max/ghaction-docker-buildx-3.3.1
Bump crazy-max/ghaction-docker-buildx from 1 to 3.3.1
2021-12-11 16:59:56 +01:00
Matthias
843eec63f0 Merge pull request #6051 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.28
Bump sqlalchemy from 1.4.27 to 1.4.28
2021-12-11 16:59:42 +01:00
Matthias
0df8786af6 Merge pull request #6048 from freqtrade/dependabot/pip/develop/prompt-toolkit-3.0.24
Bump prompt-toolkit from 3.0.23 to 3.0.24
2021-12-11 16:35:07 +01:00
Matthias
b4ed90788b Merge pull request #6050 from freqtrade/dependabot/pip/develop/ccxt-1.63.55
Bump ccxt from 1.63.1 to 1.63.55
2021-12-11 16:34:36 +01:00
Matthias
c871e51dcc Merge pull request #6049 from freqtrade/dependabot/pip/develop/mkdocs-material-8.1.0
Bump mkdocs-material from 8.0.4 to 8.1.0
2021-12-11 16:34:28 +01:00
Matthias
857f4ec125 Remove exception-handlers which catch exceptions that are never raised 2021-12-11 16:20:09 +01:00
Reigo Reinmets
7d42f42405 Merge branch 'freqtrade:develop' into dca 2021-12-11 17:14:50 +02:00
Reigo Reinmets
f11a40f144 Improve documentation on adjust_trade_position and position_adjustment_enable 2021-12-11 17:14:04 +02:00
dependabot[bot]
783ee633aa Bump crazy-max/ghaction-docker-buildx from 1 to 3.3.1
Bumps [crazy-max/ghaction-docker-buildx](https://github.com/crazy-max/ghaction-docker-buildx) from 1 to 3.3.1.
- [Release notes](https://github.com/crazy-max/ghaction-docker-buildx/releases)
- [Changelog](https://github.com/crazy-max/ghaction-docker-buildx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crazy-max/ghaction-docker-buildx/compare/v1...v3.3.1)

---
updated-dependencies:
- dependency-name: crazy-max/ghaction-docker-buildx
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-11 15:13:10 +00:00
dependabot[bot]
fb134c67a9 Bump peter-evans/dockerhub-description from 2.1.0 to 2.4.3
Bumps [peter-evans/dockerhub-description](https://github.com/peter-evans/dockerhub-description) from 2.1.0 to 2.4.3.
- [Release notes](https://github.com/peter-evans/dockerhub-description/releases)
- [Commits](https://github.com/peter-evans/dockerhub-description/compare/v2.1.0...v2.4.3)

---
updated-dependencies:
- dependency-name: peter-evans/dockerhub-description
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-11 15:13:08 +00:00
Matthias
849ca1ec06 Dependabot - use correct branch 2021-12-11 16:12:36 +01:00
Matthias
8da79d0ab2 Add blacklist-control to telegram 2021-12-11 16:12:24 +01:00
dependabot[bot]
aaf5f4ce39 Bump sqlalchemy from 1.4.27 to 1.4.28
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.27 to 1.4.28.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-11 14:55:27 +00:00
dependabot[bot]
ae92bf56bf Bump ccxt from 1.63.1 to 1.63.55
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.63.1 to 1.63.55.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.63.1...1.63.55)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-11 14:55:21 +00:00
dependabot[bot]
f47cfbd2a9 Bump mkdocs-material from 8.0.4 to 8.1.0
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.0.4 to 8.1.0.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.0.4...8.1.0)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-11 14:55:13 +00:00
dependabot[bot]
c9c683f2b0 Bump prompt-toolkit from 3.0.23 to 3.0.24
Bumps [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) from 3.0.23 to 3.0.24.
- [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.23...3.0.24)

---
updated-dependencies:
- dependency-name: prompt-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-11 14:55:09 +00:00
dependabot[bot]
81cafd090d Bump uvicorn from 0.15.0 to 0.16.0
Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.15.0...0.16.0)

---
updated-dependencies:
- dependency-name: uvicorn
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-11 14:55:05 +00:00
Matthias
671b9903d7 Add github-actions dependabot 2021-12-11 15:54:09 +01:00
Matthias
cc96db76f0 Add possibility to delete pairs from the pairlist via api 2021-12-11 15:53:44 +01:00
Matthias
e729fad99c Add unknown_fee_rate parameter 2021-12-11 15:26:08 +01:00
Matthias
e9c3f0cbbd Add note about python3.10 not being supported
closes #6041
2021-12-11 10:01:55 +01:00
Reigo Reinmets
f97662e816 Add position_adjustment_enable config keyword to enable it. 2021-12-11 00:28:12 +02:00
Reigo Reinmets
b7bf3247b8 Only adjust stoploss if it's set. 2021-12-10 23:17:12 +02:00
Reigo Reinmets
1e3fc5e984 Slight code touchup 2021-12-10 22:48:00 +02:00
Reigo Reinmets
c179951cca Expect stake_amount, not actual amount of pair from strategy for DCA. 2021-12-10 20:42:24 +02:00
Reigo Reinmets
b2c2852f86 Initial backtesting support. This does make it rather slow. 2021-12-09 23:21:35 +02:00
Reigo Reinmets
00366c5c88 Additional unit-tests 2021-12-09 20:03:41 +02:00
Reigo Reinmets
28d0b5165a Add unit-test 2021-12-09 19:47:24 +02:00
Reigo Reinmets
fde6779873 Some code improvements. Still some bugs. 2021-12-09 14:47:44 +02:00
Reigo Reinmets
88792852e4 Merge branch 'develop' of github.com:freqtrade/freqtrade into dca 2021-12-09 14:33:14 +02:00
Matthias
be6b1f6f83 Import from enums, not submodules 2021-12-09 06:18:21 +01:00
Matthias
b79f2f2981 Merge pull request #6035 from freqtrade/revert-6034-dependabot/docker/python-3.10.1-slim-bullseye
Revert "Bump python from 3.9.9-slim-bullseye to 3.10.1-slim-bullseye"
2021-12-09 06:18:11 +01:00
Matthias
facb5b3991 Revert "Bump python from 3.9.9-slim-bullseye to 3.10.1-slim-bullseye" 2021-12-09 06:17:56 +01:00
Matthias
79a87649b9 Merge pull request #6034 from freqtrade/dependabot/docker/python-3.10.1-slim-bullseye
Bump python from 3.9.9-slim-bullseye to 3.10.1-slim-bullseye
2021-12-09 06:15:16 +01:00
dependabot[bot]
7848e17a49 Bump python from 3.9.9-slim-bullseye to 3.10.1-slim-bullseye
Bumps python from 3.9.9-slim-bullseye to 3.10.1-slim-bullseye.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-09 03:01:59 +00:00
Reigo Reinmets
fd875786fd Initial very crude DCA implementation attempt. Very alpha.
No backtesting support.
2021-12-07 11:16:11 +02:00
Matthias
decaa24f81 Merge pull request #6028 from freqtrade/dependabot/pip/develop/mkdocs-material-8.0.4
Bump mkdocs-material from 8.0.1 to 8.0.4
2021-12-06 07:03:50 +01:00
Matthias
f9529c1fb6 Merge pull request #6027 from freqtrade/dependabot/pip/develop/ccxt-1.63.1
Bump ccxt from 1.62.42 to 1.63.1
2021-12-06 06:22:58 +01:00
dependabot[bot]
3dda0ef2ef Bump mkdocs-material from 8.0.1 to 8.0.4
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.0.1 to 8.0.4.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.0.1...8.0.4)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 03:01:35 +00:00
dependabot[bot]
50a6eaea22 Bump ccxt from 1.62.42 to 1.63.1
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.62.42 to 1.63.1.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.62.42...1.63.1)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 03:01:30 +00:00
dependabot[bot]
61211a1194 Bump ta-lib from 0.4.21 to 0.4.22
Bumps [ta-lib](https://github.com/mrjbq7/ta-lib) from 0.4.21 to 0.4.22.
- [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.21...TA_Lib-0.4.22)

---
updated-dependencies:
- dependency-name: ta-lib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 03:01:18 +00:00
Matthias
fbd64d757d Improve doc wording 2021-12-05 09:26:44 +01:00
Matthias
4278c5a24a add note about arm64 installation
closes #6025
2021-12-05 09:24:40 +01:00
Matthias
243e59cabb Merge pull request #5929 from dvdmchl/develop
Telegram and log prints strategy version.
2021-12-04 15:16:42 +01:00
Matthias
210202a797 Merge pull request #5756 from GluTbl/patch-1
add custom entry/exit price support to backtesting
2021-12-04 15:16:15 +01:00
Matthias
c981cc335d Remove wrong comment 2021-12-04 14:51:55 +01:00
Matthias
d0467b30ba Add strategy_version to API response 2021-12-04 14:49:45 +01:00
Matthias
e3190cf8a8 Update documentation 2021-12-04 14:44:03 +01:00
Matthias
848a2d5383 Merge branch 'develop' into pr/dvdmchl/5929 2021-12-04 14:40:15 +01:00
Matthias
2080bf0952 Fix some formatting errors, add test for strategy version 2021-12-04 14:40:05 +01:00
Matthias
68ac8008ec Call custom_exit_price only for sell_signal and custom_sell 2021-12-04 14:14:22 +01:00
Matthias
84ad176287 Improve documentation wording 2021-12-04 13:33:38 +01:00
Matthias
86910b58dc Bracket entry/exit prices to low/high of the candle 2021-12-03 17:44:53 +01:00
Matthias
d1209fe415 Merge branch 'develop' into pr/GluTbl/5756 2021-12-03 17:37:44 +01:00
Matthias
d09a30cc67 OrderTypeValues should be in enums 2021-12-03 15:34:28 +01:00
Matthias
ad5c8f601c Simplify datahandler classes by exploiting commonalities 2021-12-02 20:19:22 +01:00
Matthias
d3ad4fb52e Don't crash dry-run if orderbook side is empty
closes #6018
2021-12-02 19:17:47 +01:00
Matthias
294c98ed5e Document exchange.uid
part of #6016
2021-12-02 06:55:08 +01:00
Matthias
c1fed8a077 Merge pull request #6014 from freqtrade/double_notifications
Double notifications
2021-12-02 06:39:18 +01:00
Matthias
0375a08302 use to_hdf instead of HDFStore 2021-12-01 20:32:23 +01:00
Matthias
5ce1eeecf5 Reorder messages to be sent in correct order
buy first, then buy fill,
sell first, then sell fill.
2021-12-01 19:57:24 +01:00
Matthias
c22f381dfe Fix Schema issue
closes #6010
2021-11-30 20:46:47 +01:00
Matthias
542963c7a6 Reduce code complexity by combining buy and buy_fill methods 2021-11-30 19:45:20 +01:00
Matthias
f0abe218a2 Batch ohlcv requests to not overwelm ccxt's async throttler
closes #6003
2021-11-30 07:10:12 +01:00
Matthias
231b1e2f57 Improve Async error message content 2021-11-30 07:10:12 +01:00
Matthias
de7e1e6bf7 Merge pull request #5980 from incrementby1/ShuffleFilterDetectLiveMode
Shuffle filter use seed only in backtesting mode
2021-11-30 06:37:35 +01:00
incrementby1
85b1f6f6b3 Update pairlists.md 2021-11-29 20:44:51 +01:00
incrementby1
60eca8b1f1 revert to random object 2021-11-29 20:35:43 +01:00
Matthias
06d8217e62 Merge pull request #5983 from PostmanSpat/webhook-raw-retry
Added raw config and retry config to webhook
2021-11-29 20:30:06 +01:00
Matthias
dfb148f8d7 Fix formatting 2021-11-29 19:54:54 +01:00
Matthias
f8cb3d2901 Restore openAPI functioning 2021-11-29 19:52:40 +01:00
Matthias
bd8348451e Merge pull request #5999 from freqtrade/dependabot/pip/develop/mkdocs-material-8.0.1
Bump mkdocs-material from 7.3.6 to 8.0.1
2021-11-29 19:50:59 +01:00
Matthias
0f15340269 Merge pull request #5995 from freqtrade/dependabot/pip/develop/aiofiles-0.8.0
Bump aiofiles from 0.7.0 to 0.8.0
2021-11-29 19:32:45 +01:00
Matthias
2e51477455 Update mkdocs file to 8.0 2021-11-29 19:32:16 +01:00
Spat
018407852a Added missing webhook config params to constants 2021-11-29 18:17:59 +11:00
Matthias
56b4457a9c Merge pull request #5996 from freqtrade/dependabot/pip/develop/time-machine-2.4.1
Bump time-machine from 2.4.0 to 2.4.1
2021-11-29 08:07:30 +01:00
Matthias
2db064d8f7 Merge pull request #6000 from stash86/fix-docs
Add few sentences to make clear about backtest + pairlist handlers
2021-11-29 07:09:36 +01:00
Matthias
f0bf9b51dc Merge pull request #5992 from freqtrade/dependabot/pip/develop/ccxt-1.62.42
Bump ccxt from 1.61.92 to 1.62.42
2021-11-29 07:08:46 +01:00
dependabot[bot]
57e55eb938 Bump time-machine from 2.4.0 to 2.4.1
Bumps [time-machine](https://github.com/adamchainz/time-machine) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/adamchainz/time-machine/releases)
- [Changelog](https://github.com/adamchainz/time-machine/blob/main/HISTORY.rst)
- [Commits](https://github.com/adamchainz/time-machine/compare/2.4.0...2.4.1)

---
updated-dependencies:
- dependency-name: time-machine
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 06:00:32 +00:00
Matthias
5ee5600cb9 Merge pull request #5993 from freqtrade/dependabot/pip/develop/scipy-1.7.3
Bump scipy from 1.7.2 to 1.7.3
2021-11-29 06:59:51 +01:00
Matthias
828ab874c1 Merge pull request #5991 from freqtrade/dependabot/pip/develop/prompt-toolkit-3.0.23
Bump prompt-toolkit from 3.0.22 to 3.0.23
2021-11-29 06:59:30 +01:00
Matthias
90892e5a89 Merge pull request #5997 from freqtrade/dependabot/pip/develop/types-python-dateutil-2.8.3
Bump types-python-dateutil from 2.8.2 to 2.8.3
2021-11-29 06:59:14 +01:00
Matthias
180df0514f Merge pull request #5998 from freqtrade/dependabot/pip/develop/types-requests-2.26.1
Bump types-requests from 2.26.0 to 2.26.1
2021-11-29 06:58:55 +01:00
Matthias
731208936f Merge pull request #5994 from freqtrade/dependabot/pip/develop/types-cachetools-4.2.6
Bump types-cachetools from 4.2.5 to 4.2.6
2021-11-29 06:58:41 +01:00
Stefano Ariestasia
3b4051488f Merge branch 'fix-docs' of https://github.com/stash86/freqtrade into fix-docs 2021-11-29 14:32:37 +09:00
Stefano Ariestasia
c126d2530a Add few sentences on docs
- Add warning that PrecisionFilter can't be used on backtest that use multiple strategies
- Add note that not all pairlist handlers can be used on backtest
2021-11-29 14:32:33 +09:00
dependabot[bot]
24997fb36f Bump mkdocs-material from 7.3.6 to 8.0.1
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.3.6 to 8.0.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Upgrade guide](https://github.com/squidfunk/mkdocs-material/blob/master/docs/upgrade.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/7.3.6...8.0.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 03:01:50 +00:00
dependabot[bot]
b81d768eb3 Bump types-requests from 2.26.0 to 2.26.1
Bumps [types-requests](https://github.com/python/typeshed) from 2.26.0 to 2.26.1.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 03:01:45 +00:00
dependabot[bot]
39c3175b69 Bump types-python-dateutil from 2.8.2 to 2.8.3
Bumps [types-python-dateutil](https://github.com/python/typeshed) from 2.8.2 to 2.8.3.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 03:01:43 +00:00
dependabot[bot]
b0b2fdba70 Bump aiofiles from 0.7.0 to 0.8.0
Bumps [aiofiles](https://github.com/Tinche/aiofiles) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/Tinche/aiofiles/releases)
- [Commits](https://github.com/Tinche/aiofiles/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: aiofiles
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 03:01:38 +00:00
dependabot[bot]
c2a7b1930b Bump types-cachetools from 4.2.5 to 4.2.6
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.5 to 4.2.6.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 03:01:36 +00:00
dependabot[bot]
589c9f55e0 Bump scipy from 1.7.2 to 1.7.3
Bumps [scipy](https://github.com/scipy/scipy) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](https://github.com/scipy/scipy/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: scipy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 03:01:33 +00:00
dependabot[bot]
e9e8023d73 Bump ccxt from 1.61.92 to 1.62.42
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.61.92 to 1.62.42.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.61.92...1.62.42)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 03:01:27 +00:00
dependabot[bot]
df09fe5df6 Bump prompt-toolkit from 3.0.22 to 3.0.23
Bumps [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) from 3.0.22 to 3.0.23.
- [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.22...3.0.23)

---
updated-dependencies:
- dependency-name: prompt-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 03:01:20 +00:00
Spat
29180a1d2b Moved retry config to constants 2021-11-29 10:48:35 +11:00
Spat
0fa5bf54cd Changed comment 2021-11-29 10:30:41 +11:00
Matthias
cf5ff9257d Add plotconfig as property documentation and sample 2021-11-28 19:39:43 +01:00
incrementby1
c7d10e2c7e delete unneeded comment 2021-11-28 19:05:02 +01:00
Matthias
2414c0bd9f Merge pull request #5982 from stash86/fix-docs
add weekly and monthly to valid keys
2021-11-28 08:28:13 +01:00
Spat
fb6ae174b9 Added raw config and retry config to webhook 2021-11-28 11:42:57 +11:00
Stefano Ariestasia
fd9bf2adb0 add weekly and monthly to valid keys 2021-11-28 08:23:02 +09:00
Matthias
6429205d39 Improve Notebook documentation to include Dataprovider
fix #5975
2021-11-27 19:53:37 +01:00
Matthias
2b3e7eeb21 Use Enum values within bot code 2021-11-27 19:41:36 +01:00
Matthias
409a801763 Fix caching problem in refresh_ohlcv
closes #5978
2021-11-27 19:31:39 +01:00
incrementby1
b90303c9a3 Update ShuffleFilter.py
random.Random() is deprecated since 3.9
2021-11-27 18:26:30 +01:00
Matthias
4179a1a797 Merge pull request #5977 from freqtrade/new_release
New release 2021.11
2021-11-27 17:01:56 +01:00
Matthias
cb95b362ec Merge pull request #5976 from freqtrade/forcebuy
allow force options with ordertype
2021-11-27 17:01:18 +01:00
incrementby1
62d248d182 Merge pull request #2 from incrementby1/ShuffleFilterDetectLiveModes
Update pairlists.md
2021-11-27 16:30:46 +01:00
incrementby1
2f0f576fce Update pairlists.md
ShuffleFilter will automatically detect runmodes and apply the `seed` only for backtesting modes - if ad `seed` value is set.
2021-11-27 16:28:41 +01:00
incrementby1
8c52ba3360 ShuffleFilterDetectLiveMode
# Apply seed in backtesting mode to get comparable results,
        # but not in live modes to get a non-repeating order of pairs during live modes.
2021-11-27 16:21:23 +01:00
Matthias
7e1eedd7df Version bump to 2021.11 2021-11-27 09:55:00 +01:00
Matthias
eab4bdd274 Merge branch 'stable' into new_release 2021-11-27 09:54:51 +01:00
Matthias
a9cdb428d0 Version bump to 2021.10 2021-11-27 09:53:34 +01:00
Matthias
3f10430eb5 Version bump to 2021.9 2021-11-27 09:53:34 +01:00
Matthias
a629777890 Improve test coverage in telegram module 2021-11-27 09:53:05 +01:00
Matthias
6ca6f62509 Remove duplicate code in optimize_reports 2021-11-27 09:39:10 +01:00
Matthias
bc52b3db56 Properly handle None values via API 2021-11-27 09:26:14 +01:00
Matthias
80ed5283b2 Add forcesell market/limit distinction 2021-11-27 09:10:18 +01:00
Matthias
450293878f Merge pull request #5964 from stash86/fix-docs
Add more words on VolumePairlist backtest error message
2021-11-26 07:48:24 +01:00
Matthias
897788de17 Reformulate exception to be "nicer" 2021-11-26 07:02:50 +01:00
Matthias
f4bc30c927 Update docs to include "vpn/ssh" section 2021-11-26 06:23:29 +01:00
Stefano Ariestasia
5307d2bf3b Trimming the sentence 2021-11-25 17:04:04 +09:00
Stefano Ariestasia
c23d90e2b8 Update test_backtesting.py 2021-11-25 16:56:56 +09:00
Stefano Ariestasia
0c629fc951 Update test_backtesting.py 2021-11-25 16:03:29 +09:00
Stefano Ariestasia
0d1e84cf55 Add more words
Because apparently, we get at least 1 question about this everyday in Discord
2021-11-25 16:00:10 +09:00
Matthias
338fe333a9 Allow forcebuy to specify order_type 2021-11-24 20:20:58 +01:00
Matthias
65906d330f Improve tests for pair_to_filename 2021-11-23 20:07:54 +01:00
Matthias
e8feac3674 Improve tests for pair_to_filename 2021-11-23 20:02:07 +01:00
Matthias
342862a5f3 Merge pull request #5952 from freqtrade/armhf_39
Update ARMHF image to 3.9
2021-11-23 15:37:40 +01:00
Matthias
c23ca35d23 Update ARMHF image to 3.9 2021-11-23 14:04:39 +01:00
Matthias
b8cefd687e Add api_version to botresponse 2021-11-23 07:08:55 +01:00
Matthias
0d082f7b17 Merge pull request #5950 from flozzone/patch-1
fix typo in Volatility filter description.
2021-11-22 20:17:54 +01:00
flozzone
c245a2a897 fix typo in Volatility filter description. 2021-11-22 20:10:26 +01:00
Matthias
2c805e53ee Merge pull request #5945 from ACMCMC/patch-1
Changed the wording of the documentation to be clearer
2021-11-22 19:28:45 +01:00
Matthias
259b95074f Merge pull request #5936 from rokups/rk/decorator-fix
Use market data to get base and quote currencies in @informative() decorator
2021-11-22 19:14:35 +01:00
Aldán Creo
43dab3ee60 Changed the wording of the documentation to be clearer
The sentence I've changed was continued on a different paragraph before, even though they were connected ideas. I have changed it so that they are part of the same paragraph now.
2021-11-22 19:08:06 +01:00
Rokas Kupstys
78a00f2518 Use market data to get base and quote currencies in @informative() decorator. 2021-11-22 09:27:45 +02:00
Matthias
280a0ec17e Merge pull request #5944 from freqtrade/dependabot/pip/develop/ccxt-1.61.92
Bump ccxt from 1.61.24 to 1.61.92
2021-11-22 07:15:53 +01:00
Matthias
64e34f382e Sell-fill should include open-rate 2021-11-22 07:13:22 +01:00
Matthias
ecf2ac3c21 Bump aiohttp to 3.8.1 2021-11-22 06:51:06 +01:00
dependabot[bot]
80946cd9d6 Bump ccxt from 1.61.24 to 1.61.92
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.61.24 to 1.61.92.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.61.24...1.61.92)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 05:47:48 +00:00
Matthias
965ab3848c Merge pull request #5943 from freqtrade/dependabot/pip/develop/plotly-5.4.0
Bump plotly from 5.3.1 to 5.4.0
2021-11-22 06:46:52 +01:00
Matthias
6f93f96f18 Merge pull request #5941 from freqtrade/dependabot/pip/develop/cryptography-36.0.0
Bump cryptography from 35.0.0 to 36.0.0
2021-11-22 06:46:29 +01:00
Matthias
9f1fdc9931 Merge pull request #5942 from freqtrade/dependabot/pip/develop/types-cachetools-4.2.5
Bump types-cachetools from 4.2.4 to 4.2.5
2021-11-22 06:45:09 +01:00
Matthias
e0f21a5e35 Merge pull request #5939 from freqtrade/dependabot/pip/develop/filelock-3.4.0
Bump filelock from 3.3.2 to 3.4.0
2021-11-22 06:44:03 +01:00
dependabot[bot]
0ef99206b0 Bump plotly from 5.3.1 to 5.4.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 5.3.1 to 5.4.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/v5.3.1...v5.4.0)

---
updated-dependencies:
- dependency-name: plotly
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 03:01:56 +00:00
dependabot[bot]
247f855ba9 Bump types-cachetools from 4.2.4 to 4.2.5
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.4 to 4.2.5.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 03:01:52 +00:00
dependabot[bot]
fdc6ca1bd8 Bump cryptography from 35.0.0 to 36.0.0
Bumps [cryptography](https://github.com/pyca/cryptography) from 35.0.0 to 36.0.0.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/35.0.0...36.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 03:01:48 +00:00
dependabot[bot]
ab93e13682 Bump filelock from 3.3.2 to 3.4.0
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/py-filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.3.2...3.4.0)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 03:01:36 +00:00
Dardon
d4fd13bf50 Telegram and log prints strategy version. 2021-11-20 16:26:07 +00:00
Matthias
c0cc3f5f97 Small doc improvements to callback documentation 2021-11-20 16:15:03 +01:00
Matthias
b36fe8fe0f Simplify strategy documentation 2021-11-20 11:48:11 +01:00
Matthias
0bae1471bd Extract callbacks into a separate site 2021-11-20 11:44:56 +01:00
Matthias
ef67a2adfc Improve callback documentation 2021-11-20 11:39:24 +01:00
Matthias
d8ee72554f Improve callback documentation 2021-11-20 11:39:24 +01:00
Matthias
f8f7d81fc2 Update strategy template to use parameters 2021-11-20 11:39:21 +01:00
Matthias
a239e5f725 Add segment on colliding signals 2021-11-20 11:35:48 +01:00
Matthias
06c81b5234 Merge pull request #5919 from mablue/patch-6
indentation problem :)
2021-11-18 11:58:36 +01:00
Masoud Azizi
0b6060dd11 indentation problem :) 2021-11-18 13:28:17 +03:30
Matthias
5fb0f53539 Add curl to install description 2021-11-17 19:36:38 +01:00
Matthias
60cf52aa34 Remove unused test code 2021-11-15 07:10:58 +01:00
Matthias
4d45eb0644 Merge pull request #5896 from freqtrade/dependabot/pip/develop/python-telegram-bot-13.8.1
Bump python-telegram-bot from 13.7 to 13.8.1
2021-11-15 07:01:36 +01:00
Matthias
056f8c72a1 Merge pull request #5895 from freqtrade/dependabot/pip/develop/ccxt-1.61.24
Bump ccxt from 1.60.68 to 1.61.24
2021-11-15 07:01:15 +01:00
Matthias
6a79a04350 Merge pull request #5901 from freqtrade/dependabot/pip/develop/jinja2-3.0.3
Bump jinja2 from 3.0.2 to 3.0.3
2021-11-15 06:28:00 +01:00
dependabot[bot]
d477ccab19 Bump ccxt from 1.60.68 to 1.61.24
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.60.68 to 1.61.24.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.60.68...1.61.24)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 05:27:50 +00:00
dependabot[bot]
e3bb102dc0 Bump python-telegram-bot from 13.7 to 13.8.1
Bumps [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) from 13.7 to 13.8.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.7...v13.8.1)

---
updated-dependencies:
- dependency-name: python-telegram-bot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 05:27:49 +00:00
Matthias
5df5a6f13b Merge pull request #5898 from freqtrade/dependabot/pip/develop/coveralls-3.3.1
Bump coveralls from 3.3.0 to 3.3.1
2021-11-15 06:27:39 +01:00
Matthias
f4fd4ecdb9 Merge pull request #5899 from freqtrade/dependabot/pip/develop/isort-5.10.1
Bump isort from 5.10.0 to 5.10.1
2021-11-15 06:27:20 +01:00
Matthias
c8191c4412 Merge pull request #5893 from freqtrade/dependabot/pip/develop/types-requests-2.26.0
Bump types-requests from 2.25.11 to 2.26.0
2021-11-15 06:26:50 +01:00
Matthias
46de615b50 Merge pull request #5894 from freqtrade/dependabot/pip/develop/pymdown-extensions-9.1
Bump pymdown-extensions from 9.0 to 9.1
2021-11-15 06:26:31 +01:00
Matthias
003e17bbb2 Merge pull request #5902 from freqtrade/dependabot/pip/develop/nbconvert-6.3.0
Bump nbconvert from 6.2.0 to 6.3.0
2021-11-15 06:26:13 +01:00
Matthias
b1618afef3 Merge pull request #5897 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.27
Bump sqlalchemy from 1.4.26 to 1.4.27
2021-11-15 06:25:55 +01:00
dependabot[bot]
7bd384c7fb Bump nbconvert from 6.2.0 to 6.3.0
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.2.0...6.3.0)

---
updated-dependencies:
- dependency-name: nbconvert
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 03:01:45 +00:00
dependabot[bot]
876b59f477 Bump jinja2 from 3.0.2 to 3.0.3
Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 03:01:42 +00:00
dependabot[bot]
8ec5f72be4 Bump isort from 5.10.0 to 5.10.1
Bumps [isort](https://github.com/pycqa/isort) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.10.0...5.10.1)

---
updated-dependencies:
- dependency-name: isort
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 03:01:30 +00:00
dependabot[bot]
178e3ac6af Bump coveralls from 3.3.0 to 3.3.1
Bumps [coveralls](https://github.com/TheKevJames/coveralls-python) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/TheKevJames/coveralls-python/releases)
- [Changelog](https://github.com/TheKevJames/coveralls-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TheKevJames/coveralls-python/compare/3.3.0...3.3.1)

---
updated-dependencies:
- dependency-name: coveralls
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 03:01:27 +00:00
dependabot[bot]
2a1c61fb30 Bump sqlalchemy from 1.4.26 to 1.4.27
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.26 to 1.4.27.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 03:01:22 +00:00
dependabot[bot]
c046790727 Bump pymdown-extensions from 9.0 to 9.1
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 9.0 to 9.1.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/9.0...9.1)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 03:01:04 +00:00
dependabot[bot]
43120e03f9 Bump types-requests from 2.25.11 to 2.26.0
Bumps [types-requests](https://github.com/python/typeshed) from 2.25.11 to 2.26.0.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-15 03:01:00 +00:00
Matthias
4d1d8de9b7 Split /stats messages
closes #5869
2021-11-14 10:20:04 +01:00
Matthias
1dc98cc4d5 Break line 2021-11-14 10:12:19 +01:00
Matthias
c70fdea886 Merge pull request #5847 from stash86/kucoin-api
Hardcoded temp fix for Kucoin API issue
2021-11-14 10:11:02 +01:00
Matthias
5b9cbaf277 Use Close value for trade signal calculation 2021-11-14 09:50:04 +01:00
Matthias
33f00d23b9 Merge pull request #5885 from ethanopp/develop
Include more details in _FILL telegram notifications
2021-11-14 09:37:58 +01:00
Stefano Ariestasia
632c1bc0aa Add static workaround for kucoin 429000 issue
closes #5700
2021-11-14 09:31:38 +01:00
Matthias
7c11619924 avoid using replace in messages 2021-11-14 09:19:21 +01:00
ethan
c4c1b301cd buy notification code consolidation 2021-11-13 15:46:00 -05:00
ethan
0bc9384451 more notification code consolidation 2021-11-13 14:52:59 -05:00
ethan
7412b7ba51 buy/sell fill notification code consolidation 2021-11-13 10:23:47 -05:00
ethan
a177e58dc4 Remove "currency" generating from splitting pair str 2021-11-13 08:49:02 -05:00
Matthias
37d461c6c2 Improve strategy dataframe documentation 2021-11-13 11:48:31 +01:00
Matthias
0e70d23bef Add documentation for exit_tags 2021-11-13 09:13:32 +01:00
Matthias
0e2b5ef6d4 Simplify custom strategy file wording 2021-11-13 09:03:58 +01:00
Matthias
df27499e19 Improve /help output from telegram 2021-11-13 08:46:06 +01:00
ethan
32e3376296 Update buy/sell fill telegram notifications 2021-11-12 21:49:07 -05:00
ethan
a237667bc9 Update buy/sell fill telegram notifications 2021-11-12 16:18:04 -05:00
Matthias
4d1ce51207 Merge pull request #5879 from freqtrade/improve_pct_formatting
Improve pct formatting
2021-11-11 19:30:55 +01:00
Matthias
39bb34cdb3 Fix test loading bug 2021-11-11 16:34:40 +01:00
Matthias
e0fd880c11 Improve some more pct formattings 2021-11-11 16:12:23 +01:00
Matthias
4eb9038358 Some more fixes to % formatting 2021-11-11 15:06:16 +01:00
Matthias
1b271d0840 Improve % outputs to not use explicit "pct" entries 2021-11-11 12:58:38 +01:00
Matthias
ce2aa1dc69 Small formatting upgrades 2021-11-11 12:06:18 +01:00
Matthias
f8d30abd79 Handle order returns that contain trades directly
binance market orders - and potentially other exchanges
2021-11-10 19:43:36 +01:00
Matthias
f7b2c0c5d7 Remove unneeded assignment from tests 2021-11-10 19:16:37 +01:00
Matthias
e7d1630c92 Add space 2021-11-10 16:51:31 +01:00
Matthias
d3d17f9f8b Only allow min-stake adjustments of up to 30%
fix #5856
2021-11-10 06:57:22 +01:00
Matthias
23a566b478 validate_stake_amount should not be a private method 2021-11-10 06:38:24 +01:00
Matthias
c9d974d210 Clarify performancefilter docs
closes #5870
2021-11-09 19:52:05 +01:00
Matthias
e8b4d44881 Add warning about telegram group usage 2021-11-09 15:16:51 +01:00
Matthias
b676868ce6 Merge pull request #5868 from mapreal19/patch-1
docs: removes duplicated "without" in pairlists.md
2021-11-09 14:18:16 +01:00
Mario Pérez Alarcón
6f0a98229f docs: removes duplicated "without" in pairlists.md 2021-11-09 12:27:38 +00:00
Matthias
6267678ca9 Use doublequotes for docstrings 2021-11-09 10:40:01 +00:00
Matthias
f9e5a25b36 Add docstring style to Contributing 2021-11-09 07:48:25 +00:00
Matthias
2bfec7d549 Add small test-case confirming trade object copy 2021-11-08 20:14:32 +01:00
Matthias
ae0e72a945 Provide strategy with copied objects
avoids accidental modification of crucial elements in a trade object
part of #5828
2021-11-08 19:59:29 +01:00
Matthias
e4cca63163 Align sell_reason assignment location
trade mode sets it after "exit confirmation" - so should backtesting
detected in #5828
2021-11-08 19:32:13 +01:00
Matthias
f2be820f73 Merge pull request #5855 from freqtrade/multi_ohlcv_calls
Provide more historic data in trade mode
2021-11-08 19:30:40 +01:00
Matthias
63f4221f70 Fix broken documentation link 2021-11-08 11:29:10 +01:00
Matthias
84261237a0 Improve doc wording 2021-11-08 08:09:33 +01:00
Matthias
bb2b8efef1 Merge pull request #5859 from freqtrade/dependabot/pip/develop/isort-5.10.0
Bump isort from 5.9.3 to 5.10.0
2021-11-08 08:07:40 +01:00
dependabot[bot]
3ce898e4a9 Bump isort from 5.9.3 to 5.10.0
Bumps [isort](https://github.com/pycqa/isort) from 5.9.3 to 5.10.0.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.9.3...5.10.0)

---
updated-dependencies:
- dependency-name: isort
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 05:29:09 +00:00
Matthias
bbd7c6e4fc Merge pull request #5862 from freqtrade/dependabot/pip/develop/ccxt-1.60.68
Bump ccxt from 1.60.11 to 1.60.68
2021-11-08 06:24:50 +01:00
Matthias
d003a2b7a3 Merge pull request #5863 from freqtrade/dependabot/pip/develop/numpy-1.21.4
Bump numpy from 1.21.3 to 1.21.4
2021-11-08 06:24:23 +01:00
Matthias
2b88b3b749 Merge pull request #5864 from freqtrade/dependabot/pip/develop/scipy-1.7.2
Bump scipy from 1.7.1 to 1.7.2
2021-11-08 06:23:51 +01:00
Matthias
d80dda9caa Merge pull request #5858 from freqtrade/dependabot/pip/develop/prompt-toolkit-3.0.22
Bump prompt-toolkit from 3.0.21 to 3.0.22
2021-11-08 06:23:35 +01:00
Matthias
3cfce605de Merge pull request #5860 from freqtrade/dependabot/pip/develop/jsonschema-4.2.1
Bump jsonschema from 4.1.2 to 4.2.1
2021-11-08 06:23:18 +01:00
Matthias
fdc6053633 Merge pull request #5861 from freqtrade/dependabot/pip/develop/coveralls-3.3.0
Bump coveralls from 3.2.0 to 3.3.0
2021-11-08 06:22:51 +01:00
dependabot[bot]
b39794f8d2 Bump scipy from 1.7.1 to 1.7.2
Bumps [scipy](https://github.com/scipy/scipy) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](https://github.com/scipy/scipy/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: scipy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 03:01:38 +00:00
dependabot[bot]
ab06584a3e Bump numpy from 1.21.3 to 1.21.4
Bumps [numpy](https://github.com/numpy/numpy) from 1.21.3 to 1.21.4.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.21.3...v1.21.4)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 03:01:32 +00:00
dependabot[bot]
a2c12f15f1 Bump ccxt from 1.60.11 to 1.60.68
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.60.11 to 1.60.68.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.60.11...1.60.68)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 03:01:25 +00:00
dependabot[bot]
d0199b6014 Bump coveralls from 3.2.0 to 3.3.0
Bumps [coveralls](https://github.com/TheKevJames/coveralls-python) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/TheKevJames/coveralls-python/releases)
- [Changelog](https://github.com/TheKevJames/coveralls-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TheKevJames/coveralls-python/compare/3.2.0...3.3.0)

---
updated-dependencies:
- dependency-name: coveralls
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 03:01:19 +00:00
dependabot[bot]
dbc863bcdf Bump jsonschema from 4.1.2 to 4.2.1
Bumps [jsonschema](https://github.com/Julian/jsonschema) from 4.1.2 to 4.2.1.
- [Release notes](https://github.com/Julian/jsonschema/releases)
- [Changelog](https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/Julian/jsonschema/compare/v4.1.2...v4.2.1)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 03:01:14 +00:00
dependabot[bot]
c54cf63bae Bump prompt-toolkit from 3.0.21 to 3.0.22
Bumps [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) from 3.0.21 to 3.0.22.
- [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.21...3.0.22)

---
updated-dependencies:
- dependency-name: prompt-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 03:01:06 +00:00
Matthias
c11e1a84e4 Fix wrong logging
detected in #5856
2021-11-07 15:41:04 +01:00
Matthias
de4bc7204d Update documentation to clarify new behaviour 2021-11-07 15:36:43 +01:00
Matthias
a08dd17bc1 Use startup_candle-count to determine call count 2021-11-07 13:10:40 +01:00
Matthias
9fa64c2647 Allow multiple calls to get more candles in live-run 2021-11-07 11:31:59 +01:00
Matthias
fb6ba62158 Add default to "is_new_pair" 2021-11-07 11:08:30 +01:00
Matthias
1dd6872b80 Merge pull request #5843 from Theagainmen/patch-2
Update warning message open trades
2021-11-07 11:07:16 +01:00
Matthias
4595c1e73c Slightly reformat to simplify new change 2021-11-07 10:55:11 +01:00
Matthias
25fcab0794 Enhance /show_config endpoint 2021-11-06 16:20:18 +01:00
Matthias
fef7da03b2 Merge pull request #5850 from freqtrade/timeout_forcesell
multiple exit-timeouts can trigger emergencysell
2021-11-06 16:20:06 +01:00
Matthias
66220d6f9f Merge pull request #5846 from Merinorus/5527-show_average_profit_in_overwiew
Add /weekly and /monthly to Telegram (#5527)
2021-11-06 15:43:34 +01:00
Matthias
4f5c5b6982 Clarify timeout documentation 2021-11-06 15:29:05 +01:00
Antoine Merino
d0e192e20f Fix naive timezone for /daily command 2021-11-06 13:14:15 +01:00
Matthias
f7dc47b1c8 Add test for exit_timeout_count 2021-11-06 13:10:41 +01:00
Antoine Merino
d5acd979dc Move dev-only requirement 2021-11-06 13:10:22 +01:00
Antoine Merino
3c33b48fd5 Fix naive timezones 2021-11-06 13:09:15 +01:00
Matthias
7a907a7636 Add Emergencyselling after X timeouts have been reached 2021-11-06 11:48:49 +01:00
Antoine Merino
da4344d216 Remove line breaks
Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-05 22:52:04 +01:00
Antoine Merino
8eabdd659f Fix missing CallbackQueryHandler
Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-05 22:51:35 +01:00
Antoine Merino
77f3dabd15 Merge remote-tracking branch 'origin/5527-show_average_profit_in_overwiew' into 5527-show_average_profit_in_overwiew
# Conflicts:
#	freqtrade/rpc/rpc.py
#	requirements.txt
#	tests/rpc/test_rpc_telegram.py
2021-11-05 22:37:42 +01:00
Antoine Merino
70253258f0 Test /monthly & clean
Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-05 22:33:06 +01:00
Antoine Merino
87634f0409 /weekly and /monthly documentation
Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-05 21:07:29 +01:00
Antoine Merino
459ff9692d Add /weekly and /monthly to Telegram RPC
/weekly now list weeks starting from monday instead of rolling weeks.
/monthly now list months starting from the 1st.

Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-05 21:07:28 +01:00
Antoine Merino
5f40158c0b WIP Add /weekly and /monthly to Telegram RPC
Related to "Show average profit in overview" (#5527)

Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-05 21:07:19 +01:00
Antoine Merino
a8651b0dcd /weekly and /monthly documentation
Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-05 20:44:01 +01:00
Antoine Merino
15616d75ad Add /weekly and /monthly to Telegram RPC
/weekly now list weeks starting from monday instead of rolling weeks.
/monthly now list months starting from the 1st.

Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-05 20:24:40 +01:00
Matthias
d99eaccb5a Fix exception when using okex
closes #5842
2021-11-05 19:47:13 +01:00
Matthias
ae3b53014d Add failing test for OKEX failure
part of #5842
2021-11-05 19:44:02 +01:00
Matthias
60a5ded532 Don't convert telegram chat_id
closes #5840
2021-11-05 19:27:54 +01:00
Theagainmen
2115a3ed12 Update warning message open trades
This shouldn't confuse user when just reloading their bot.
2021-11-05 18:49:10 +01:00
Antoine Merino
ffc2de8d33 WIP Add /weekly and /monthly to Telegram RPC
Related to "Show average profit in overview" (#5527)

Signed-off-by: Antoine Merino <antoine.merino.dev@gmail.com>
2021-11-04 23:02:13 +01:00
Matthias
781f8a059c Merge pull request #5835 from freqtrade/okex_support
Add official Okex support
2021-11-04 20:03:19 +01:00
Matthias
26e5418519 Merge pull request #5834 from raph92/patch-4
Update optimize_reports
2021-11-04 16:56:21 +01:00
raphael
ae2343db93 Update optimize_reports
Update show_backtest_reults() to preserve backwards compatibility by fixing KeyError: 'results_per_buy_tag' for older hyperopt result files.
2021-11-04 10:25:13 -04:00
Matthias
eb280798d8 Merge pull request #5832 from samgermain/setup
setup.sh - Redhat
2021-11-04 15:23:48 +01:00
Sam Germain
10e839c17e Update setup.sh
python versions 3.7 to 3.9
2021-11-04 07:26:17 -06:00
Sam Germain
5b9a168ca9 removed build-essential from redhat install 2021-11-04 00:44:58 -06:00
Matthias
17ecfda2e8 Merge pull request #5710 from theluxaz/freqtrade-development
Added SELL_TAG for trading, backtesting and telegram
2021-11-04 07:13:06 +01:00
Matthias
c061b576a9 OKEX Notes 2021-11-04 06:22:31 +01:00
Matthias
431b96de98 Merge branch 'develop' into pr/theluxaz/5710 2021-11-03 19:43:36 +01:00
Matthias
048db4f509 Enhance "new exchange" documentation 2021-11-03 19:27:17 +01:00
Matthias
437e5f0645 Fix officially supported exchange list 2021-11-03 19:20:39 +01:00
Matthias
6fb0866350 Add OKEX to list of officially supported exchanges 2021-11-03 19:19:27 +01:00
Matthias
a1e8878030 Merge pull request #5826 from Theagainmen/patch-1
[docs] Update RateLimit value [small]
2021-11-03 17:06:01 +01:00
Theagainmen
ce597d12d9 Update exchanges.md
Fix 3100ms to 3.1s in docs, instead of the 0.2s
2021-11-03 15:04:45 +01:00
Matthias
f60d101076 Some finetuning for OKEX 2021-11-03 07:12:42 +01:00
Matthias
1fefb132e0 Improve wording in documentation 2021-11-02 20:26:38 +01:00
Matthias
161a3fac15 Run exchange-enabled tests against okex 2021-11-02 20:08:56 +01:00
Matthias
e78df59e30 Configure candle length for OKEX 2021-11-02 19:49:53 +01:00
Theagainmen
f365e68706 [docs] Update RateLimit value [small]
## Summary
Fix very small mistake in docs, that might confuse people. Let me know if this is the correct value now, there is still another 3100 in there, which I think makes sense there and is correct.

## Quick changelog
Changed the `rateLimit` 3100 value to 200, to match the 200ms and thus 0.2s delay.
2021-11-01 23:07:16 +01:00
Matthias
7ae9b90174 Further clarify backtesting trailing stop logic
part of #5816
2021-11-01 20:12:34 +01:00
Matthias
3056be3a1d document prerequisites for exchange listing 2021-11-01 20:04:52 +01:00
Matthias
74e8b28991 Improve FAQ with outdated history message
closes #5819
2021-11-01 13:54:12 +01:00
Matthias
a16328f372 Don't force timeframe in config in config generator 2021-11-01 13:44:26 +01:00
Matthias
6623dfe7da Improve CORS documentation 2021-11-01 11:07:06 +01:00
Matthias
4249fcefba Merge pull request #5150 from cryptomeisternox/backtesting-filter
Adding command for Filtering and print trades
2021-11-01 09:43:49 +01:00
Matthias
6934f37d16 Merge pull request #5822 from freqtrade/dependabot/pip/develop/mkdocs-material-7.3.6
Bump mkdocs-material from 7.3.4 to 7.3.6
2021-11-01 08:26:10 +01:00
Matthias
27dce9eeea Merge pull request #5820 from freqtrade/dependabot/pip/develop/filelock-3.3.2
Bump filelock from 3.3.1 to 3.3.2
2021-11-01 07:55:09 +01:00
Matthias
e34c62074b Merge pull request #5824 from freqtrade/dependabot/pip/develop/scikit-learn-1.0.1
Bump scikit-learn from 1.0 to 1.0.1
2021-11-01 07:54:53 +01:00
Matthias
2b1373966f Merge pull request #5821 from freqtrade/dependabot/pip/develop/ccxt-1.59.77
Bump ccxt from 1.59.2 to 1.59.77
2021-11-01 07:53:39 +01:00
dependabot[bot]
46d4418e85 Bump scikit-learn from 1.0 to 1.0.1
Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 1.0 to 1.0.1.
- [Release notes](https://github.com/scikit-learn/scikit-learn/releases)
- [Commits](https://github.com/scikit-learn/scikit-learn/compare/1.0...1.0.1)

---
updated-dependencies:
- dependency-name: scikit-learn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 03:01:23 +00:00
dependabot[bot]
45f7093e52 Bump mkdocs-material from 7.3.4 to 7.3.6
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.3.4 to 7.3.6.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/7.3.4...7.3.6)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 03:01:14 +00:00
dependabot[bot]
e2041ddb70 Bump ccxt from 1.59.2 to 1.59.77
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.59.2 to 1.59.77.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.59.2...1.59.77)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 03:01:10 +00:00
dependabot[bot]
3d59289b09 Bump filelock from 3.3.1 to 3.3.2
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/py-filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.3.1...3.3.2)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 03:01:03 +00:00
Matthias
6b90b4a144 Test "get-signal" 2021-10-31 10:53:30 +01:00
Matthias
dffe76f109 Don't double-loop to generate profits 2021-10-31 10:49:56 +01:00
Matthias
c15f73aa1f Rename command to backtesting-show 2021-10-31 10:13:11 +01:00
Matthias
20904f1ca4 Add tests for new command 2021-10-30 19:43:42 +02:00
Matthias
72ecb45d86 Add test for backtest_show logic 2021-10-30 16:53:48 +02:00
Matthias
650d6c276a Add documentation 2021-10-30 16:40:03 +02:00
Matthias
e8f85aed6b Merge pull request #5818 from freqtrade/fix/5816
Fix/5816
2021-10-30 16:36:46 +02:00
Matthias
d60001e886 Stoploss cannot be below candle low
fix #5816
2021-10-30 16:14:13 +02:00
Matthias
459a2239ce Fix candle ranges in backtesting test 2021-10-30 16:13:04 +02:00
Matthias
6cf140f8fb FIx testcases 2021-10-30 16:07:10 +02:00
Matthias
851062ca46 Rename backtest-filter to backtest_show 2021-10-30 10:53:18 +02:00
Matthias
f472709438 Add option to show sorted pairlist
Allows easy copy/pasting of the pairlist to a configuration
2021-10-30 10:50:40 +02:00
Matthias
0f3809345a Remove backtest-path parameter 2021-10-30 10:28:12 +02:00
Matthias
6f1e719216 Merge branch 'develop' into pr/cryptomeisternox/5150 2021-10-30 10:26:05 +02:00
Matthias
c34b8a95d7 Merge pull request #5798 from incrementby1/personal-branch
Add function to unlock PairLocks by reason
2021-10-30 10:15:21 +02:00
Matthias
c579fcfc19 Add tests and documentation for unlock_reason 2021-10-30 09:51:09 +02:00
Matthias
201fe108bc Merge pull request #5607 from TreborNamor/develop
a new hyperopt loss created that uses calmar ratio
2021-10-29 09:20:44 +02:00
Matthias
240923341b Reformat telegram test 2021-10-29 07:05:02 +02:00
Matthias
5cdae2ce3f Remove CalmarDaily hyperopt loss 2021-10-29 06:53:40 +02:00
incrementby1
e9d71f26b3 small changes 2021-10-29 00:03:20 +02:00
incrementby1
658006e7ee removed wrong use of map and filter function 2021-10-28 23:29:26 +02:00
Matthias
dadf015c23 Merge pull request #5805 from freqtrade/new_release
New release 2021.10
2021-10-28 20:49:51 +02:00
theluxaz
560802c326 Added tests for the new rpc/telegram functions 2021-10-28 21:39:42 +03:00
incrementby1
02e69e1667 Changes to unlock_reason:
- introducing filter
	- replaced get_all_locks with a query for speed
	. removed logging in backtesting mode for speed
	. replaced for-loop with map-function for speed

Changes to models.py:
	- changed string representation of Pairlock to also contain reason and active-state
2021-10-28 15:16:07 +02:00
Matthias
335412a3a8 Improve wording of FAQ entry 2021-10-28 07:59:28 +02:00
Matthias
f280397fd7 Add FAQ section about Fees
closes #5807
2021-10-28 07:51:32 +02:00
Matthias
98ed7edb11 Version bump to 2021.10 2021-10-28 06:21:40 +02:00
Matthias
8dd7d134f2 Merge branch 'stable' into new_release 2021-10-28 06:20:33 +02:00
incrementby1
dc605e29aa removed empty lines for flake8 2021-10-27 21:04:08 +02:00
Matthias
92130837a9 Improve and clarify informative pairs documentation 2021-10-27 19:58:29 +02:00
Matthias
892a1ca60c Merge pull request #5804 from JackBananas/patch-1
Update data-download.md
2021-10-27 19:32:37 +02:00
JackBananas
e2b64a750f Update data-download.md
Minor change due to a misleading sentence
2021-10-27 17:14:26 +02:00
incrementby1
2e7d08612e Merge branch 'personal-branch' of https://github.com/incrementby1/freqtrade into personal-branch 2021-10-27 16:03:05 +02:00
incrementby1
2eb33707c9 Undo changes 2021-10-27 15:58:41 +02:00
incrementby1
a50bde10de Merge https://github.com/freqtrade/freqtrade into personal-branch 2021-10-27 15:52:10 +02:00
incrementby1
91b9e5ce68 Delete StackingDemo.py 2021-10-27 12:43:00 +02:00
incrementby1
c1b5dcd756 Delete freqtradebot.py 2021-10-27 12:42:18 +02:00
incrementby1
6b17094c6f Delete configuration.py 2021-10-27 12:41:49 +02:00
incrementby1
51c925f9f3 Delete StackingConfig.json 2021-10-27 12:40:26 +02:00
Matthias
f80d3d48e4 Add default to minimal_roi to avoid failures
closes #5796
2021-10-27 06:33:49 +02:00
theluxaz
21ab83163d Quick import/clarity fix 2021-10-27 01:35:47 +03:00
theluxaz
e4e75d4861 Added test data for buy_tag/sell_reason testing 2021-10-27 01:29:19 +03:00
incrementby1
9c6cbc025a Update StackingDemo.py 2021-10-26 00:34:01 +02:00
incrementby1
9f6e4c6c0e uncomment 2021-10-26 00:31:17 +02:00
incrementby1
ae06899694 removed commenting 2021-10-26 00:29:11 +02:00
incrementby1
c3f3bdaa2a Add "allow_position_stacking" value to config, which allows rebuys of a pair
Add function unlock_reason(str: pair) which removes all PairLocks with reason
Provide demo strategy that allows buying the same pair multiple times
2021-10-26 00:04:40 +02:00
theluxaz
b51f946ee0 Fixed models and rpc performance functions, added skeletons for tests. 2021-10-25 23:43:22 +03:00
Matthias
20a61e03da Merge pull request #5786 from SimonEbner/clean_up_file_handles
Clean up file handles
2021-10-25 19:49:07 +02:00
Sam Germain
d1e2a53267 Added centOS support to setup.sh script 2021-10-25 03:20:41 -06:00
Sam Germain
7ff16997e9 Wrote echo block method for setup script 2021-10-25 03:19:49 -06:00
Robert Roman
88b96d5d1b Update hyperopt_loss_calmar.py 2021-10-25 00:45:10 -05:00
Matthias
029ddd23c1 Merge pull request #5791 from freqtrade/dependabot/pip/develop/numpy-1.21.3
Bump numpy from 1.21.2 to 1.21.3
2021-10-25 07:20:06 +02:00
Matthias
262f186a37 . 2021-10-25 07:19:55 +02:00
Matthias
33d75e9963 Merge pull request #5790 from freqtrade/dependabot/pip/develop/arrow-1.2.1
Bump arrow from 1.2.0 to 1.2.1
2021-10-25 07:07:50 +02:00
Matthias
cea251c83c Clarify documentation for /forcebuy
closes #5783
2021-10-25 06:46:02 +02:00
dependabot[bot]
4e88bd07fa Bump numpy from 1.21.2 to 1.21.3
Bumps [numpy](https://github.com/numpy/numpy) from 1.21.2 to 1.21.3.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.21.2...v1.21.3)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 04:40:30 +00:00
dependabot[bot]
538d9e8b37 Bump arrow from 1.2.0 to 1.2.1
Bumps [arrow](https://github.com/arrow-py/arrow) from 1.2.0 to 1.2.1.
- [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/1.2.0...1.2.1)

---
updated-dependencies:
- dependency-name: arrow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 04:40:24 +00:00
Matthias
478013a306 Merge pull request #5792 from freqtrade/dependabot/pip/develop/ccxt-1.59.2
Bump ccxt from 1.58.47 to 1.59.2
2021-10-25 06:39:25 +02:00
Matthias
0e72a901cc Merge pull request #5789 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.26
Bump sqlalchemy from 1.4.25 to 1.4.26
2021-10-25 06:39:01 +02:00
Matthias
2979679db4 Merge pull request #5793 from freqtrade/dependabot/pip/develop/jsonschema-4.1.2
Bump jsonschema from 4.1.0 to 4.1.2
2021-10-25 06:38:33 +02:00
Matthias
1a40e02ace Merge pull request #5788 from freqtrade/dependabot/pip/develop/prompt-toolkit-3.0.21
Bump prompt-toolkit from 3.0.20 to 3.0.21
2021-10-25 06:38:15 +02:00
dependabot[bot]
826d4eb2f4 Bump jsonschema from 4.1.0 to 4.1.2
Bumps [jsonschema](https://github.com/Julian/jsonschema) from 4.1.0 to 4.1.2.
- [Release notes](https://github.com/Julian/jsonschema/releases)
- [Changelog](https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/Julian/jsonschema/compare/v4.1.0...v4.1.2)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 03:01:33 +00:00
dependabot[bot]
3d90305f8e Bump ccxt from 1.58.47 to 1.59.2
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.58.47 to 1.59.2.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.58.47...1.59.2)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 03:01:29 +00:00
dependabot[bot]
b50b38f049 Bump sqlalchemy from 1.4.25 to 1.4.26
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.25 to 1.4.26.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 03:01:10 +00:00
dependabot[bot]
520c5687aa Bump prompt-toolkit from 3.0.20 to 3.0.21
Bumps [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) from 3.0.20 to 3.0.21.
- [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)

---
updated-dependencies:
- dependency-name: prompt-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 03:01:05 +00:00
Simon Ebner
f7926083ca Clean up unclosed file handles
Close all file handles that are left dangling to avoid warnings such as

```
ResourceWarning: unclosed file <_io.TextIOWrapper
name='...' mode='r' encoding='UTF-8'> params = json_load(filename.open('r'))
```
2021-10-24 23:15:05 +02:00
Matthias
4539170424 Merge pull request #5776 from SimonEbner/performance_decimalspace
Improve performance of decimalspace.py
2021-10-24 19:27:24 +02:00
Simon Ebner
df033d92ef Improve performance of decimalspace.py
decimalspace.py is heavily used in the hyperoptimization. The following
benchmark code runs an optimization which is taken from optimizing a
real strategy (wtc).
The optimized version takes on my machine approx. 11/12s compared to the
original 32s. Results are equivalent in both cases.

```
import freqtrade.optimize.space
import numpy as np
import skopt
import timeit

def init():
    Decimal = freqtrade.optimize.space.decimalspace.SKDecimal
    Integer = skopt.space.space.Integer
    dimensions = [Decimal(low=-1.0,
        high=1.0,
        decimals=4,
        prior='uniform',
        transform='identity')] * 20

    return skopt.Optimizer(
        dimensions,
        base_estimator="ET",
        acq_optimizer="auto",
        n_initial_points=5,
        acq_optimizer_kwargs={'n_jobs': 96},
        random_state=0,
        model_queue_size=10,
    )

def test():
    opt = init()
    actual = opt.ask(n_points=2)
    expected = [[
        0.7515, -0.4723, -0.6941, -0.7988, 0.0448, 0.8605, -0.108, 0.5399,
        0.763, -0.2948, 0.8345, -0.7683, 0.7077, -0.2478, -0.333, 0.8575,
        0.6108, 0.4514, 0.5982, 0.3506
    ], [
        0.5563, 0.7386, -0.6407, 0.9073, -0.5211, -0.8167, -0.3771,
        -0.0318, 0.2861, 0.1176, 0.0943, -0.6077, -0.9317, -0.5372,
        -0.4934, -0.3637, -0.8035, -0.8627, -0.5399, 0.6036
    ]]

    absdiff = np.max(np.abs(np.asarray(expected) - np.asarray(actual)))
    assert absdiff < 1e-5

def time():
    opt = init()
    print('dt', timeit.timeit("opt.ask(n_points=20)", globals=locals()))

if __name__ == "__main__":
    test()
    time()
```
2021-10-24 18:14:24 +02:00
Matthias
22dd2ca003 Fix mypy type errors 2021-10-24 15:18:29 +02:00
Matthias
17432b2823 Improve some stylings 2021-10-24 09:15:05 +02:00
Matthias
5f309627ea Update tests for Calmar ratio 2021-10-24 09:01:13 +02:00
Matthias
dffb4c5d53 Merge branch 'develop' into pr/TreborNamor/5607 2021-10-24 08:55:10 +02:00
Matthias
b4bedc22d7 Merge pull request #5777 from SimonEbner/pathlib_stem
Use pathlib.stem instead of str(x).ends_with
2021-10-23 19:29:18 +02:00
Simon Ebner
fde10f5395 Use pathlib.stem instead of str(x).ends_with 2021-10-23 12:26:07 +02:00
Matthias
78724e304e Merge branch 'develop' into pr/theluxaz/5710 2021-10-21 17:46:39 +02:00
theluxaz
0e085298e9 Fixed test failures. 2021-10-21 17:25:38 +03:00
Matthias
96f99699e0 Merge pull request #4606 from rextea/add_days_breakdown_to_backtesting_summary
Add days breakdown table to backtesting
2021-10-21 13:56:30 +02:00
Matthias
053fb076e4 Add documentation for breakdown command 2021-10-21 10:57:23 +02:00
Matthias
e458c9867a Styling fixes 2021-10-21 07:45:15 +02:00
Matthias
7b5346b984 Add test for breakdown-stats 2021-10-21 07:11:39 +02:00
Matthias
fa028c2134 Support day/week/month breakdowns 2021-10-21 06:58:40 +02:00
Matthias
7197f4ce77 Don't show daily % profit (it's wrong) 2021-10-20 20:01:31 +02:00
Matthias
de5497c766 backtest_days cannot be below 1 2021-10-20 19:39:37 +02:00
Matthias
1267374c8a Small fixes to tests 2021-10-20 19:21:38 +02:00
theluxaz
905f3a1a50 Removed exit_tag from Trade objects. 2021-10-20 17:58:50 +03:00
Matthias
5454460227 Revert initial_points to 30
closes #5760
2021-10-20 07:46:15 +02:00
theluxaz
1fdc4425dd Changed exit_tag to be represented as sell_reason 2021-10-20 01:26:15 +03:00
Matthias
55b0216180 Allow StaticPairlist in non-first position
closes #5754
2021-10-19 19:48:56 +02:00
Matthias
42a4dfed28 Reallow bitstamp
revert #1984, related to #1983
2021-10-19 19:12:35 +02:00
GluTbl
00406ea7d5 Update backtesting.py
Support for custom entry-prices and exit-prices during backtesting.
2021-10-19 17:15:45 +05:30
Matthias
2995f9a347 Merge pull request #5726 from daniila/patch-1
How to run multiple instances with docker
2021-10-19 11:43:12 +02:00
theluxaz
5ecdd1d112 Merge branch 'develop' into freqtrade-development 2021-10-19 00:00:15 +03:00
theluxaz
69a59cdf37 Fixed flake 8, changed sell_tag to exit_tag and fixed telegram functions 2021-10-18 23:56:41 +03:00
daniila
f863f4fdfc Update advanced-setup.md
A note on having to use different database files, ports and telegram configs for each bot.
2021-10-18 23:49:59 +03:00
daniila
5d2e374099 Update docs/advanced-setup.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2021-10-18 23:38:45 +03:00
daniila
f9b1667478 Update docs/advanced-setup.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2021-10-18 23:36:47 +03:00
Matthias
0da5ef16e6 Remove unnecessary dependency 2021-10-18 19:16:56 +02:00
Matthias
ddba4e32d7 Fully remove flake8-type-annotations 2021-10-18 16:04:24 +02:00
Matthias
52bd761111 Merge pull request #5749 from freqtrade/dependabot/pip/develop/types-filelock-3.2.1
Bump types-filelock from 3.2.0 to 3.2.1
2021-10-18 09:51:45 +02:00
Matthias
711897cffa Merge pull request #5737 from freqtrade/dependabot/pip/develop/pytest-asyncio-0.16.0
Bump pytest-asyncio from 0.15.1 to 0.16.0
2021-10-18 09:51:15 +02:00
Matthias
1c6fc068c6 Merge pull request #5741 from freqtrade/dependabot/pip/develop/pandas-1.3.4
Bump pandas from 1.3.3 to 1.3.4
2021-10-18 09:30:25 +02:00
Matthias
925df4dfec Merge pull request #5743 from freqtrade/dependabot/pip/develop/mkdocs-material-7.3.4
Bump mkdocs-material from 7.3.2 to 7.3.4
2021-10-18 09:29:59 +02:00
dependabot[bot]
8a7ea65531 Bump types-filelock from 3.2.0 to 3.2.1
Bumps [types-filelock](https://github.com/python/typeshed) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-filelock
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 07:06:05 +00:00
Matthias
0ef20a5b04 Merge pull request #5744 from freqtrade/dependabot/pip/develop/types-tabulate-0.8.3
Bump types-tabulate from 0.8.2 to 0.8.3
2021-10-18 09:05:06 +02:00
dependabot[bot]
3af55cc8c7 Bump pandas from 1.3.3 to 1.3.4
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.3.3 to 1.3.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.3.3...v1.3.4)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 06:58:47 +00:00
Matthias
0d7be62e62 Merge pull request #5752 from freqtrade/dependabot/pip/develop/ccxt-1.58.47
Bump ccxt from 1.57.94 to 1.58.47
2021-10-18 08:57:52 +02:00
dependabot[bot]
75e6a2d276 Bump mkdocs-material from 7.3.2 to 7.3.4
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.3.2 to 7.3.4.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/7.3.2...7.3.4)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 06:47:32 +00:00
Matthias
e00a71a3db Merge pull request #5751 from freqtrade/dependabot/pip/develop/mkdocs-1.2.3
Bump mkdocs from 1.2.2 to 1.2.3
2021-10-18 08:46:39 +02:00
Matthias
ef70ea3997 Merge pull request #5748 from freqtrade/dependabot/pip/develop/progressbar2-3.55.0
Bump progressbar2 from 3.53.3 to 3.55.0
2021-10-18 08:40:55 +02:00
dependabot[bot]
618f0ffe68 Bump types-tabulate from 0.8.2 to 0.8.3
Bumps [types-tabulate](https://github.com/python/typeshed) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-tabulate
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 06:38:42 +00:00
Matthias
5320ddc382 Merge pull request #5746 from freqtrade/dependabot/pip/develop/types-cachetools-4.2.4
Bump types-cachetools from 4.2.2 to 4.2.4
2021-10-18 08:37:56 +02:00
dependabot[bot]
44e6e13429 Bump ccxt from 1.57.94 to 1.58.47
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.57.94 to 1.58.47.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.57.94...1.58.47)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 06:16:09 +00:00
dependabot[bot]
4b02749019 Bump mkdocs from 1.2.2 to 1.2.3
Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.2.2...1.2.3)

---
updated-dependencies:
- dependency-name: mkdocs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 06:15:52 +00:00
Matthias
ff3bfa3d52 Merge pull request #5747 from freqtrade/dependabot/pip/develop/python-rapidjson-1.5
Bump python-rapidjson from 1.4 to 1.5
2021-10-18 08:15:01 +02:00
Matthias
dccce4855e Merge pull request #5740 from freqtrade/dependabot/pip/develop/pyjwt-2.3.0
Bump pyjwt from 2.2.0 to 2.3.0
2021-10-18 07:40:20 +02:00
Matthias
733d254644 Merge pull request #5742 from freqtrade/dependabot/pip/develop/wrapt-1.13.2
Bump wrapt from 1.13.1 to 1.13.2
2021-10-18 07:39:54 +02:00
dependabot[bot]
82684f5de9 Bump progressbar2 from 3.53.3 to 3.55.0
Bumps [progressbar2](https://github.com/WoLpH/python-progressbar) from 3.53.3 to 3.55.0.
- [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.53.3...v3.55.0)

---
updated-dependencies:
- dependency-name: progressbar2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 05:19:03 +00:00
Matthias
bddbb474aa Merge pull request #5739 from freqtrade/dependabot/pip/develop/filelock-3.3.1
Bump filelock from 3.3.0 to 3.3.1
2021-10-18 07:18:58 +02:00
dependabot[bot]
69c98c4141 Bump python-rapidjson from 1.4 to 1.5
Bumps [python-rapidjson](https://github.com/python-rapidjson/python-rapidjson) from 1.4 to 1.5.
- [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/v1.4...v1.5)

---
updated-dependencies:
- dependency-name: python-rapidjson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 05:18:47 +00:00
dependabot[bot]
035380d8a4 Bump types-cachetools from 4.2.2 to 4.2.4
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.2 to 4.2.4.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 05:18:42 +00:00
Matthias
e6bbfaefe5 Merge pull request #5736 from freqtrade/dependabot/pip/develop/types-requests-2.25.11
Bump types-requests from 2.25.9 to 2.25.11
2021-10-18 07:18:30 +02:00
Matthias
c58126e9c5 Merge pull request #5738 from freqtrade/dependabot/pip/develop/flake8-4.0.1
Bump flake8 from 4.0.0 to 4.0.1
2021-10-18 07:18:06 +02:00
dependabot[bot]
d7756efe8b Bump wrapt from 1.13.1 to 1.13.2
Bumps [wrapt](https://github.com/GrahamDumpleton/wrapt) from 1.13.1 to 1.13.2.
- [Release notes](https://github.com/GrahamDumpleton/wrapt/releases)
- [Changelog](https://github.com/GrahamDumpleton/wrapt/blob/develop/docs/changes.rst)
- [Commits](https://github.com/GrahamDumpleton/wrapt/compare/1.13.1...1.13.2)

---
updated-dependencies:
- dependency-name: wrapt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 03:01:28 +00:00
dependabot[bot]
b60371822f Bump pyjwt from 2.2.0 to 2.3.0
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/commits)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 03:01:19 +00:00
dependabot[bot]
e7a2672f07 Bump filelock from 3.3.0 to 3.3.1
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/py-filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.3.0...3.3.1)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 03:01:17 +00:00
dependabot[bot]
9b0171ef37 Bump flake8 from 4.0.0 to 4.0.1
Bumps [flake8](https://github.com/pycqa/flake8) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/pycqa/flake8/releases)
- [Commits](https://github.com/pycqa/flake8/compare/4.0.0...4.0.1)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 03:01:14 +00:00
dependabot[bot]
12a041b466 Bump pytest-asyncio from 0.15.1 to 0.16.0
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.15.1 to 0.16.0.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.15.1...v0.16.0)

---
updated-dependencies:
- dependency-name: pytest-asyncio
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 03:01:10 +00:00
dependabot[bot]
6be40cb7c3 Bump types-requests from 2.25.9 to 2.25.11
Bumps [types-requests](https://github.com/python/typeshed) from 2.25.9 to 2.25.11.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 03:01:07 +00:00
Matthias
00fc38a5dc Update setup.sh to correctly exit if ta-lib fails
part of #5734
2021-10-17 19:24:09 +02:00
Matthias
e09ec6e6b3 Merge pull request #5733 from freqtrade/download_all
Download all
2021-10-17 16:50:41 +02:00
Matthias
7d8cd736b8 Support days-breakdown also for hyperopt results 2021-10-17 16:49:39 +02:00
Matthias
47bba331c1 Merge branch 'develop' into pr/rextea/4606 2021-10-17 16:29:31 +02:00
Matthias
28483a7952 Fix doc-link in developer docs 2021-10-17 16:10:15 +02:00
Matthias
d4d57f0002 Document expansion of --pairs, add download-inactive 2021-10-17 16:09:56 +02:00
Matthias
9bb2dd1851 Merge pull request #5694 from freqtrade/dependabot/pip/develop/fastapi-0.70.0
Bump fastapi from 0.68.1 to 0.70.0
2021-10-17 15:01:28 +02:00
Matthias
e23eb99abf Disable ability to use lookahead-biased vwap
closes #5782
2021-10-17 11:23:58 +02:00
Matthias
abd5c4f278 Convert additional test to USDT 2021-10-17 10:39:53 +02:00
Matthias
fb2c8f7621 Rollback after each request
This closes the transaction and avoids "sticking" transactions.
2021-10-17 10:30:06 +02:00
Matthias
29ad90f1e3 Merge pull request #5727 from Rikj000/docs/fix-mkdocs-darktheme-toggle
📝 `mkdocs.yml` - Fixed darktheme toggle
2021-10-17 08:37:34 +02:00
Rik Helsen
f61dc6d95a 📝 mkdocs.yml - Fixed darktheme toggle 2021-10-17 00:14:09 +02:00
daniila
5a9983086a How to run multiple instances with docker
Basic guide on how to run multiple instances using docker.
2021-10-17 00:24:00 +03:00
dependabot[bot]
89ca8abea9 Bump fastapi from 0.68.1 to 0.70.0
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.68.1 to 0.70.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.68.1...0.70.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-16 19:31:12 +02:00
Matthias
b1ee56a5ce Merge pull request #5724 from freqtrade/fix/5719
Make sure transactions are reset
2021-10-16 19:30:40 +02:00
Matthias
5ba1d66be7 Make sure transactions are reset
closes #5719
2021-10-16 17:57:51 +02:00
Matthias
dcefb3eb9c Fix delete_Trade api test 2021-10-16 16:48:35 +02:00
Matthias
7f1080368b Commit mock-trades to avoid errors in tests 2021-10-16 16:48:19 +02:00
Matthias
de5657a91b Fix test failing when UI is installed 2021-10-16 16:47:28 +02:00
Matthias
f120e0d256 Merge pull request #5716 from freqtrade/setupsh_fix
Don't build ta-lib in parallel, this causes failures
2021-10-15 10:31:32 +02:00
Matthias
fe9f597eab Don't build ta-lib in parallel, this causes failures 2021-10-15 10:11:25 +02:00
Matthias
794862a35a Merge pull request #5670 from sergeykhliustin/develop
Added min_profit param to PerformanceFilter
2021-10-14 19:57:36 +02:00
Matthias
c02a538187 Add documentation and log to PerformanceFilter 2021-10-14 19:36:34 +02:00
Matthias
0e7d903a6f Merge pull request #5644 from slyons/develop
Add ability to ignore unparameterized spaces
2021-10-14 08:07:07 +02:00
Matthias
fe8374f2a4 Test for non-failing missing hyperopt space 2021-10-14 07:06:51 +02:00
theluxaz
0bb7ea10ab Fixed minor header for backtesting 2021-10-14 01:34:30 +03:00
theluxaz
ed39b8dab0 fixed profit total calculation 2021-10-14 01:18:16 +03:00
theluxaz
8b2c14a6fa Readme fix 2021-10-14 01:15:43 +03:00
theluxaz
d341d85079 Refixed some files for the pull request 2021-10-14 01:13:28 +03:00
theluxaz
96cab22a8c Fixed some bugs for live sell_tags. 2021-10-14 01:03:15 +03:00
Matthias
3279ea568c Add new parameter to hyperopt docs 2021-10-13 19:57:42 +02:00
Matthias
aed919a05f Simplify "no-space-configured" error handling by moving it to hyperopt_auto 2021-10-13 19:54:35 +02:00
theluxaz
7067c43ff4 Merge branch 'main' of https://github.com/theluxaz/freqtrade into main 2021-10-13 02:20:30 +03:00
theluxaz
0f670189eb quick typo fix 2021-10-13 02:14:07 +03:00
theluxaz
3ee9674bb7 Update README.md 2021-10-13 02:07:45 +03:00
theluxaz
af74850e79 Update README.md 2021-10-13 02:07:23 +03:00
theluxaz
b151cf032b Merge branch 'develop' of https://github.com/theluxaz/freqtrade into main
# Conflicts:
#	freqtrade/freqtradebot.py
#	freqtrade/optimize/backtesting.py
2021-10-13 02:01:26 +03:00
theluxaz
02243b1a2b minifix 2021-10-13 01:34:29 +03:00
theluxaz
80b71790bc Added some bigfixes for sell_tag 2021-10-13 01:22:53 +03:00
theluxaz
c9edf3bf4a Updated the gitignore 2021-10-13 00:09:30 +03:00
theluxaz
b898f86364 Added sell_tag and buy/sell telegram performance functions 2021-10-13 00:02:28 +03:00
Matthias
0926beaf73 Merge pull request #5632 from freqtrade/dependabot/pip/develop/scikit-learn-1.0
Bump scikit-learn from 0.24.2 to 1.0
2021-10-12 20:04:29 +02:00
Matthias
8798ae5677 Version bump also scikit-optimize 2021-10-12 19:06:23 +02:00
Matthias
59ed11358f Merge pull request #5708 from freqtrade/ui_version_specify
Add version argument to freqUI installer
2021-10-12 07:16:34 +02:00
Matthias
ce9debe9fd Add version argument to freqUI installer 2021-10-12 06:44:07 +02:00
Matthias
7e958589b3 Merge pull request #5701 from freqtrade/dependabot/pip/develop/flake8-4.0.0
Bump flake8 from 3.9.2 to 4.0.0
2021-10-11 20:34:40 +02:00
Matthias
396bc9b2e3 Version bump flake8-tidy-imports to 4.5.0 2021-10-11 20:00:53 +02:00
Matthias
7b1e81689a Merge pull request #5704 from freqtrade/dependabot/pip/develop/mkdocs-material-7.3.2
Bump mkdocs-material from 7.3.1 to 7.3.2
2021-10-11 10:06:18 +02:00
Matthias
1649c00cb7 Merge pull request #5706 from freqtrade/dependabot/pip/develop/ccxt-1.57.94
Bump ccxt from 1.57.38 to 1.57.94
2021-10-11 10:05:53 +02:00
dependabot[bot]
fa00b52c47 Bump scikit-learn from 0.24.2 to 1.0
Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 0.24.2 to 1.0.
- [Release notes](https://github.com/scikit-learn/scikit-learn/releases)
- [Commits](https://github.com/scikit-learn/scikit-learn/compare/0.24.2...1.0)

---
updated-dependencies:
- dependency-name: scikit-learn
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 07:41:16 +00:00
Matthias
7d629d45c3 Merge pull request #5705 from freqtrade/dependabot/pip/develop/joblib-1.1.0
Bump joblib from 1.0.1 to 1.1.0
2021-10-11 09:40:27 +02:00
Matthias
f5a0e78c1b Merge pull request #5692 from freqtrade/dependabot/pip/develop/jsonschema-4.1.0
Bump jsonschema from 4.0.1 to 4.1.0
2021-10-11 09:39:24 +02:00
dependabot[bot]
802599bdc9 Bump ccxt from 1.57.38 to 1.57.94
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.57.38 to 1.57.94.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.57.38...1.57.94)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 06:15:32 +00:00
dependabot[bot]
29371b2f28 Bump joblib from 1.0.1 to 1.1.0
Bumps [joblib](https://github.com/joblib/joblib) from 1.0.1 to 1.1.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/1.0.1...1.1.0)

---
updated-dependencies:
- dependency-name: joblib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 06:15:03 +00:00
Matthias
c4e967c003 Merge pull request #5696 from freqtrade/dependabot/pip/develop/jinja2-3.0.2
Bump jinja2 from 3.0.1 to 3.0.2
2021-10-11 08:14:59 +02:00
Matthias
8b2bad3366 Merge pull request #5698 from freqtrade/dependabot/pip/develop/arrow-1.2.0
Bump arrow from 1.1.1 to 1.2.0
2021-10-11 08:14:24 +02:00
Matthias
acc2760512 Merge pull request #5703 from freqtrade/dependabot/pip/develop/pyjwt-2.2.0
Bump pyjwt from 2.1.0 to 2.2.0
2021-10-11 08:13:32 +02:00
dependabot[bot]
90ea3d4440 Bump mkdocs-material from 7.3.1 to 7.3.2
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.3.1 to 7.3.2.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/7.3.1...7.3.2)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 05:18:24 +00:00
Matthias
9cb20241d9 Merge pull request #5697 from freqtrade/dependabot/pip/develop/cryptography-35.0.0
Bump cryptography from 3.4.8 to 35.0.0
2021-10-11 07:17:20 +02:00
dependabot[bot]
4921a4caec Bump jinja2 from 3.0.1 to 3.0.2
Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.0.1...3.0.2)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 05:14:19 +00:00
dependabot[bot]
32174f8f90 Bump pyjwt from 2.1.0 to 2.2.0
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.1.0...2.2.0)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 05:14:08 +00:00
Matthias
01e7b08aa9 Merge pull request #5695 from freqtrade/dependabot/pip/develop/blosc-1.10.6
Bump blosc from 1.10.4 to 1.10.6
2021-10-11 07:13:07 +02:00
dependabot[bot]
afc086f33c Bump arrow from 1.1.1 to 1.2.0
Bumps [arrow](https://github.com/arrow-py/arrow) from 1.1.1 to 1.2.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/commits)

---
updated-dependencies:
- dependency-name: arrow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 05:05:30 +00:00
dependabot[bot]
e467491dbe Bump jsonschema from 4.0.1 to 4.1.0
Bumps [jsonschema](https://github.com/Julian/jsonschema) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/Julian/jsonschema/releases)
- [Changelog](https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/Julian/jsonschema/compare/v4.0.1...v4.1.0)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 05:05:23 +00:00
dependabot[bot]
3fdc62d29c Bump flake8 from 3.9.2 to 4.0.0
Bumps [flake8](https://github.com/pycqa/flake8) from 3.9.2 to 4.0.0.
- [Release notes](https://github.com/pycqa/flake8/releases)
- [Commits](https://github.com/pycqa/flake8/compare/3.9.2...4.0.0)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 05:05:14 +00:00
Matthias
a51084f7a7 Merge pull request #5693 from freqtrade/dependabot/pip/develop/wrapt-1.13.1
Bump wrapt from 1.12.1 to 1.13.1
2021-10-11 07:04:35 +02:00
dependabot[bot]
5fb0401dca Bump cryptography from 3.4.8 to 35.0.0
Bumps [cryptography](https://github.com/pyca/cryptography) from 3.4.8 to 35.0.0.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/3.4.8...35.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 03:01:39 +00:00
dependabot[bot]
7323ffa25a Bump blosc from 1.10.4 to 1.10.6
Bumps [blosc](https://github.com/blosc/python-blosc) from 1.10.4 to 1.10.6.
- [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.10.4...v1.10.6)

---
updated-dependencies:
- dependency-name: blosc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 03:01:31 +00:00
dependabot[bot]
57095d7167 Bump wrapt from 1.12.1 to 1.13.1
Bumps [wrapt](https://github.com/GrahamDumpleton/wrapt) from 1.12.1 to 1.13.1.
- [Release notes](https://github.com/GrahamDumpleton/wrapt/releases)
- [Changelog](https://github.com/GrahamDumpleton/wrapt/blob/develop/docs/changes.rst)
- [Commits](https://github.com/GrahamDumpleton/wrapt/compare/1.12.1...1.13.1)

---
updated-dependencies:
- dependency-name: wrapt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 03:01:22 +00:00
Matthias
50439ac441 Merge pull request #5674 from jonny07/patch-4
Update docker_quickstart.md
2021-10-09 15:49:34 +02:00
Matthias
1a3b41ed97 Rephrase and simplify UI access section in docker quickstart 2021-10-09 15:35:39 +02:00
Matthias
fa9484a06b Merge branch 'develop' into pr/jonny07/5674 2021-10-09 15:29:24 +02:00
Matthias
cae8ff5949 Merge pull request #5623 from froggleston/rest_sysinfo
Add CPU,RAM sysinfo support to the REST API to help with bot system m…
2021-10-09 15:17:21 +02:00
Matthias
4d61e3866c Merge pull request #5684 from SmartManoj/patch-1
pypi installation
2021-10-09 10:49:39 +02:00
Matthias
2c68342140 Move pypi installation to documentation 2021-10-09 10:37:33 +02:00
Matthias
91ceaef02f Merge pull request #5678 from sidml/develop
Hyperopt loss function using max drawdown
2021-10-09 10:26:40 +02:00
Matthias
7b1c888665 Add FAQ entry for incomplete candles
closes #5687
2021-10-09 08:39:32 +02:00
sid
30bc96cf3f simplify expression 2021-10-09 06:36:23 +05:30
Matthias
11ec1d9b06 Revert previous commit 2021-10-08 20:22:07 +02:00
Matthias
482f4418c6 Clarify "required candle" message 2021-10-08 14:36:52 +02:00
மனோஜ்குமார் பழனிச்சாமி
1327c21d01 Update README.md 2021-10-07 19:12:09 +05:30
Robert Davey
f07eeddda0 Update api_schemas.py
Fix api schema for cpu_pct float List.
2021-10-07 12:04:42 +01:00
Matthias
a1be6124f2 Don't set bid_last_balance if None in tests
part of #5681
2021-10-07 07:15:09 +02:00
Matthias
45b7a0c837 Add Test and docs for MaxDrawDownHyperOptLoss 2021-10-07 07:12:45 +02:00
Matthias
29863ad2bf Fix error when ask_last_balance is not set
closes #5181
2021-10-07 06:51:29 +02:00
sid
46c320513a use profit_abs 2021-10-07 08:07:07 +05:30
sid
93e4cf4006 Merge remote-tracking branch 'upstream/develop' into develop 2021-10-07 08:04:40 +05:30
Matthias
526bdaa2dc Recommend using 0.0.0.0 as listen address for docker 2021-10-06 20:14:59 +02:00
Matthias
65d4df938d Improve docker port api 2021-10-06 20:09:08 +02:00
Matthias
992cef56e6 Add test for sysinfo endpoint 2021-10-06 19:36:51 +02:00
Matthias
57ef25789e Fix style errors 2021-10-06 19:36:41 +02:00
sid
6ba46b38bd fix formatting 2021-10-06 13:46:05 +05:30
sid
c0d01dbc26 add max_drawdown loss 2021-10-06 13:24:27 +05:30
jonny07
949d616082 Update docker_quickstart.md
Got help in the discord chat to get the UI running, I think most people will need this...
2021-10-05 21:33:15 +02:00
froggleston
0db5c07314 Fix issues with sysinfo rpc/API code, add SysInfo api_schema 2021-10-05 00:10:39 +01:00
Matthias
92f8f231af Remove ratelimit from kucoin template 2021-10-04 20:22:41 +02:00
Matthias
7f4baab420 Remove explicit rateLimits, improve docs 2021-10-04 20:14:22 +02:00
Matthias
60e28a30f4 Merge pull request #5664 from freqtrade/dependabot/pip/develop/ccxt-1.57.38
Bump ccxt from 1.57.3 to 1.57.38
2021-10-04 19:29:28 +02:00
Matthias
f15922a168 Fix custom_stoploss in strategy template
closes #5658
2021-10-04 19:11:35 +02:00
Sergey Khliustin
07750518c3 Added min_profit param to PerformanceFilter 2021-10-04 18:49:57 +03:00
Matthias
26d2b5b81f Merge pull request #5666 from freqtrade/dependabot/pip/develop/pytest-cov-3.0.0
Bump pytest-cov from 2.12.1 to 3.0.0
2021-10-04 07:21:20 +02:00
Matthias
ae46b516e6 Merge pull request #5665 from freqtrade/dependabot/pip/develop/mkdocs-material-7.3.1
Bump mkdocs-material from 7.3.0 to 7.3.1
2021-10-04 07:17:44 +02:00
Matthias
222a15922e Merge pull request #5667 from freqtrade/dependabot/pip/develop/types-cachetools-4.2.2
Bump types-cachetools from 4.2.0 to 4.2.2
2021-10-04 07:02:20 +02:00
dependabot[bot]
f41fd4e88d Bump mkdocs-material from 7.3.0 to 7.3.1
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.3.0 to 7.3.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/7.3.0...7.3.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 04:40:24 +00:00
Matthias
5e195bdc0f Merge pull request #5661 from freqtrade/dependabot/pip/develop/pymdown-extensions-9.0
Bump pymdown-extensions from 8.2 to 9.0
2021-10-04 06:39:43 +02:00
dependabot[bot]
949f4fbbbf Bump types-cachetools from 4.2.0 to 4.2.2
Bumps [types-cachetools](https://github.com/python/typeshed) from 4.2.0 to 4.2.2.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-cachetools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 04:36:11 +00:00
Matthias
8f4b598ee2 Merge pull request #5663 from freqtrade/dependabot/pip/develop/jsonschema-4.0.1
Bump jsonschema from 3.2.0 to 4.0.1
2021-10-04 06:35:34 +02:00
Matthias
9491564148 Merge pull request #5662 from freqtrade/dependabot/pip/develop/types-filelock-3.2.0
Bump types-filelock from 0.1.5 to 3.2.0
2021-10-04 06:34:58 +02:00
Matthias
2a4fb992c3 Merge pull request #5659 from freqtrade/dependabot/pip/develop/filelock-3.3.0
Bump filelock from 3.0.12 to 3.3.0
2021-10-04 06:34:31 +02:00
dependabot[bot]
2b41066ab7 Bump pytest-cov from 2.12.1 to 3.0.0
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.12.1 to 3.0.0.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.12.1...v3.0.0)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 03:01:29 +00:00
dependabot[bot]
0071d002b6 Bump ccxt from 1.57.3 to 1.57.38
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.57.3 to 1.57.38.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.57.3...1.57.38)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 03:01:22 +00:00
dependabot[bot]
35c4a0a188 Bump jsonschema from 3.2.0 to 4.0.1
Bumps [jsonschema](https://github.com/Julian/jsonschema) from 3.2.0 to 4.0.1.
- [Release notes](https://github.com/Julian/jsonschema/releases)
- [Changelog](https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/Julian/jsonschema/compare/v3.2.0...v4.0.1)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 03:01:17 +00:00
dependabot[bot]
ff45d52d49 Bump types-filelock from 0.1.5 to 3.2.0
Bumps [types-filelock](https://github.com/python/typeshed) from 0.1.5 to 3.2.0.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-filelock
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 03:01:14 +00:00
dependabot[bot]
d220c55d40 Bump pymdown-extensions from 8.2 to 9.0
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 8.2 to 9.0.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/8.2...9.0)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 03:01:11 +00:00
dependabot[bot]
0d9beaa3f3 Bump filelock from 3.0.12 to 3.3.0
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.0.12 to 3.3.0.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Commits](https://github.com/tox-dev/py-filelock/compare/v3.0.12...3.3.0)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 03:01:04 +00:00
Matthias
1c63d01cec Prevent using market-orders on gateio
GateIo does not support market orders on spot markets
2021-10-03 14:14:16 +02:00
Matthias
f5e5203388 Use "round" to 12 digits for TickSize mode
Avoids float rounding problems, fix #5652
2021-10-03 09:49:55 +02:00
Matthias
e73f5ab480 Add test confirming #5652 2021-10-03 09:49:55 +02:00
Matthias
ad6ca3773d Merge pull request #5592 from samgermain/test-freqtradebot-usdt
Test freqtradebot usdt
2021-10-03 09:41:08 +02:00
Matthias
126c291988 Improve docs
closes #5654
2021-10-03 09:32:53 +02:00
Matthias
9e77a739fa Change usdt stake_amount to 60$ 2021-10-03 09:22:50 +02:00
Sam Germain
058c7b3e99 Fixed odd test_execute_entry where the filled coins were higher than the amount 2021-10-02 20:43:32 -06:00
Sam Germain
908dee961d Changed test values in test_sell_profit_only to usdt like values 2021-10-02 20:37:05 -06:00
Sam Germain
93679db7c4 Removed ... TODOs 2021-10-02 20:33:46 -06:00
Sam Germain
057a187231 Removed uneccessary TODOs 2021-10-02 20:32:51 -06:00
Matthias
3b5cc5f015 Improve dates used for hyperopt tests 2021-10-02 15:37:01 +02:00
Matthias
77388eb423 Improve generate_test_data to make it easier to use 2021-10-02 15:23:48 +02:00
Matthias
66e19f5775 Merge pull request #5651 from freqtrade/simplify_loss_Tests
Combine most hyperopt-loss tests to one
2021-10-02 14:44:46 +02:00
Matthias
5fdeca812d Combine most hyperopt-loss tests to one 2021-10-02 14:30:24 +02:00
Matthias
022839b728 remove unnecessary test 2021-10-02 13:17:10 +02:00
Matthias
e5e1e49f53 Remove some unused test parameters 2021-10-02 13:01:33 +02:00
Sam Germain
96d09b5615 Fixed breaking rpc tests 2021-10-02 01:44:30 -06:00
Sam Germain
6f8e66117b flake8 isort 2021-10-02 01:44:30 -06:00
Sam Germain
107fa911a5 Fixed test_tsl_on_exchange_compatible_with_edge 2021-10-02 01:44:30 -06:00
Rokas Kupstys
c820db4c60 Fix couple more usdt tests which failed due to ticker prices causing roi being hit, but tests did not expect that to happen. 2021-10-02 01:44:30 -06:00
Rokas Kupstys
8961370269 Fix failing test due to not updated expected values. 2021-10-02 01:44:30 -06:00
Rokas Kupstys
2ee87f8c66 Fix failing USDT tests due to not enough open markets. 2021-10-02 01:44:30 -06:00
Sam Germain
43339f1660 A lot of the usdt freqtradebot tests pass now 2021-10-02 01:44:30 -06:00
Sam Germain
ba5d78f005 swapped default_conf for default_conf_usdt and ticker for ticker_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
7eebb6bb2d updated test_create_trade to use default_conf_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
755cc9cda1 Updated test_check_available_stake_amount to use default_conf_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
26fdad8468 Removed edge_conf_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
d0e0d0ee01 Removed init_persistence_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
5ce09c7519 updated test_reupdate_enter_order_fees to usdt 2021-10-02 01:44:30 -06:00
Sam Germain
ffa9a3ac7d changed default_conf_usdt stake_amount to 10 2021-10-02 01:44:30 -06:00
Sam Germain
6fdcf8cd73 created default_conf_usdt and init_persistence_usdt so that these tests pass: test_handle_stoploss_on_exchange_trailing, test_handle_stoploss_on_exchange_custom_stop, test_update_trade_state_withorderdict 2021-10-02 01:44:30 -06:00
Sam Germain
d1e3d48075 changed test_update_trade_state_withorderdict to usdt 2021-10-02 01:44:30 -06:00
Sam Germain
8d7f75c4de Fixed a bunch of freqtradebot tests 2021-10-02 01:44:30 -06:00
Sam Germain
dadd134200 changes some tests to use usdt values 2021-10-02 01:44:30 -06:00
Matthias
f69cb39a17 Fix missing comma in kucoin template
closes #5646
2021-10-01 19:26:51 +02:00
Matthias
bd7d9c0d33 Merge pull request #5648 from froggleston/patch-1
Fix pair_candles to point to correct API call
2021-10-01 19:25:22 +02:00
Robert Davey
15df5fd9c5 Fix pair_candles to point to correct API call
pair_candles pointed to available_pairs RPC call instead of pair_candles
2021-10-01 13:49:16 +01:00
Matthias
99e3450d30 Merge pull request #5642 from freqtrade/add_trade_conversion_command
Add trade conversion command
2021-10-01 06:38:42 +02:00
Scott Lyons
df45f467c6 Adding ability to ignore unparameterized spaces 2021-09-30 01:11:02 -07:00
Scott Lyons
95227376b6 Adding IUS to optimize args 2021-09-30 00:53:46 -07:00
Scott Lyons
08fcd1a0d4 Adding ignore space errors to Hyperopt CLI 2021-09-30 00:46:56 -07:00
Scott Lyons
5dd1088d8d Adding ignore unparameterized spaces flag 2021-09-30 00:44:26 -07:00
Matthias
5f23af5802 Rename update_open_trades to clarify it's only called at startup 2021-09-30 07:24:16 +02:00
Matthias
bd27993e79 Add documentation segment about indicator libraries 2021-09-30 06:42:42 +02:00
Matthias
178db516bf Add documentation for trade-to-ohlcv 2021-09-29 20:00:14 +02:00
Matthias
248c61bb26 Add test for trades-to-ohlcv 2021-09-29 19:39:29 +02:00
Matthias
fc511aac44 don't use %default when no default is defined 2021-09-29 19:21:54 +02:00
Matthias
656526c007 Add trades-to-ohlcv command to simplify adding new timeframes 2021-09-29 16:50:05 +02:00
Matthias
51c6eb2014 Merge pull request #5640 from rokups/rk/tests-static-market
markets_static fixture
2021-09-29 16:20:18 +02:00
Rokas Kupstys
e025576d8c Introduce markets_static fixture serving an immutable list of markets. Adapt pairlist/markets tests to use this new fixture.
This allows freely modifying markets in get_markets() without a need of updating pairlist/markets tests.
2021-09-29 10:15:05 +03:00
Matthias
a0ee490957 Merge pull request #5636 from freqtrade/new_release
New release 2021.9
2021-09-28 19:21:42 +02:00
Robert Roman
ca973c05d1 Merge branch 'freqtrade:develop' into develop 2021-09-28 10:16:36 -05:00
Matthias
5938514e5d Version bump to 2021.9 2021-09-28 07:03:26 +02:00
Matthias
d73f5f75fc Merge branch 'stable' into new_release 2021-09-28 07:02:24 +02:00
Robert Roman
626a40252d resolved mypy error
error: Signature of "hyperopt_loss_function" incompatible with supertype "IHyperOptLoss"
2021-09-27 17:33:29 -05:00
Robert Roman
c3414c3b78 resolved mypy error
error: Signature of "hyperopt_loss_function" incompatible with supertype "IHyperOptLoss"
2021-09-27 17:32:49 -05:00
Matthias
5726886b06 Reduce backtest-noise from "pandas slice" warning 2021-09-27 20:52:19 +02:00
Robert Roman
67e9626da1 fixed isort issue 2021-09-27 12:16:57 -05:00
Robert Roman
a1566fe5d7 updated to latest constant.py file 2021-09-27 11:47:03 -05:00
Robert Roman
bc86cb3280 updated to correct hyperopt.md file 2021-09-27 11:41:38 -05:00
Robert Roman
193b22475d Merge branch 'freqtrade:develop' into develop 2021-09-27 11:35:34 -05:00
Matthias
3fbf716f85 Fix "sticking" timerange in webserver mode 2021-09-27 17:52:00 +02:00
Matthias
6a033bd01e Merge pull request #5633 from freqtrade/dependabot/pip/develop/nbconvert-6.2.0
Bump nbconvert from 6.1.0 to 6.2.0
2021-09-27 12:20:02 +02:00
Matthias
5b7a1f8642 Validate config also in webserver mode 2021-09-27 07:12:40 +02:00
Matthias
37a1cd5d38 Merge pull request #5631 from freqtrade/dependabot/pip/develop/ccxt-1.57.3
Bump ccxt from 1.56.86 to 1.57.3
2021-09-27 07:02:18 +02:00
dependabot[bot]
78096c9eff Bump nbconvert from 6.1.0 to 6.2.0
Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/jupyter/nbconvert/releases)
- [Commits](https://github.com/jupyter/nbconvert/compare/6.1.0...6.2.0)

---
updated-dependencies:
- dependency-name: nbconvert
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-27 04:32:26 +00:00
Matthias
29c6f182f6 Merge pull request #5630 from freqtrade/dependabot/pip/develop/types-requests-2.25.9
Bump types-requests from 2.25.8 to 2.25.9
2021-09-27 06:31:29 +02:00
dependabot[bot]
9059502303 Bump ccxt from 1.56.86 to 1.57.3
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.56.86 to 1.57.3.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.56.86...1.57.3)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-27 03:01:27 +00:00
dependabot[bot]
08b1f04ed5 Bump types-requests from 2.25.8 to 2.25.9
Bumps [types-requests](https://github.com/python/typeshed) from 2.25.8 to 2.25.9.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-27 03:01:18 +00:00
Robert Roman
bdca3e2343 Merge branch 'freqtrade:develop' into develop 2021-09-26 15:37:09 -05:00
Matthias
ec445776e9 Merge pull request #5601 from ferrants/parameterize-tests
parameterize some tests
2021-09-26 19:07:47 +02:00
Matthias
6319c104fe Fix unreliable backtest-result when using webserver mode 2021-09-26 15:07:48 +02:00
Robert Roman
a77ca22026 Merge branch 'freqtrade:develop' into develop 2021-09-26 02:57:02 -05:00
Robert Roman
e1036d6f58 Added Calmar Ratio Daily to hyperopt.md file 2021-09-25 16:40:02 -05:00
Robert Roman
89b7dfda0e Added Calmar Ratio Daily 2021-09-25 16:34:41 -05:00
Robert Roman
24baad7884 Add Calmar Ratio Daily
This hyper opt loss calculates the daily Calmar ratio.
2021-09-25 16:28:36 -05:00
froggleston
097da448e2 Add CPU,RAM sysinfo support to the REST API to help with bot system monitoring 2021-09-25 15:48:42 +01:00
Matthias
f4f204d849 Update test to use cost dict 2021-09-24 20:17:38 +02:00
Matthias
4c268847d4 Add pandas-ta to setup.py 2021-09-24 19:32:30 +02:00
Matthias
4d72632524 Merge pull request #5618 from freqtrade/dependabot/pip/develop/progressbar2-3.53.3
Bump progressbar2 from 3.53.2 to 3.53.3
2021-09-24 19:26:59 +02:00
Matthias
b59906b117 Update minimum for tradable_balance_ratio to 0.0 2021-09-24 19:24:33 +02:00
Matthias
2431c9f195 Merge pull request #5615 from freqtrade/dependabot/pip/develop/ccxt-1.56.86
Bump ccxt from 1.56.30 to 1.56.86
2021-09-24 13:19:00 +02:00
Matthias
9657028633 Merge pull request #5614 from freqtrade/dependabot/pip/develop/mkdocs-material-7.3.0
Bump mkdocs-material from 7.2.6 to 7.3.0
2021-09-24 10:19:03 +02:00
Matthias
c61b2a83c1 Merge pull request #5617 from freqtrade/dependabot/pip/develop/urllib3-1.26.7
Bump urllib3 from 1.26.6 to 1.26.7
2021-09-24 09:45:30 +02:00
dependabot[bot]
72a1e27fc6 Bump ccxt from 1.56.30 to 1.56.86
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.56.30 to 1.56.86.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.56.30...1.56.86)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-24 07:31:20 +00:00
Matthias
a217d84e0f Merge pull request #5616 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.25
Bump sqlalchemy from 1.4.23 to 1.4.25
2021-09-24 09:30:33 +02:00
Matthias
5da218e383 Merge pull request #5613 from freqtrade/dependabot/pip/develop/types-requests-2.25.8
Bump types-requests from 2.25.6 to 2.25.8
2021-09-24 08:42:26 +02:00
Matthias
954c468191 Add pandas-ta to requirements 2021-09-24 07:12:38 +02:00
dependabot[bot]
0353f070f9 Bump progressbar2 from 3.53.2 to 3.53.3
Bumps [progressbar2](https://github.com/WoLpH/python-progressbar) from 3.53.2 to 3.53.3.
- [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.53.2...v3.53.3)

---
updated-dependencies:
- dependency-name: progressbar2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-24 05:06:24 +00:00
dependabot[bot]
90d5af9a35 Bump urllib3 from 1.26.6 to 1.26.7
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.6 to 1.26.7.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/1.26.7/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.6...1.26.7)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-24 05:06:20 +00:00
dependabot[bot]
766ef90b56 Bump sqlalchemy from 1.4.23 to 1.4.25
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.23 to 1.4.25.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-24 05:06:16 +00:00
dependabot[bot]
e85dc63263 Bump mkdocs-material from 7.2.6 to 7.3.0
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.2.6 to 7.3.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/7.2.6...7.3.0)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-24 05:06:01 +00:00
dependabot[bot]
422d560189 Bump types-requests from 2.25.6 to 2.25.8
Bumps [types-requests](https://github.com/python/typeshed) from 2.25.6 to 2.25.8.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-24 05:05:55 +00:00
Robert Roman
ca20e17d40 added CalmarHyperOpt to hyperopt.md
i added CalmarHyperOpt to hyperopt.md and gave a brief description inside the docs
2021-09-23 21:48:08 -05:00
Robert Roman
b2ac039d5c added CalmarHyperOptLoss to HYPEROPT_LOSS_BUILTIN
I added CalmarHyperOptLoss to HYPEROPT_LOSS_BUILTIN variable inside constants.py file
2021-09-23 21:46:07 -05:00
Robert Roman
0f29cbc882 added CalmarHyperOptLoss
I added CalmarHyperOptLoss to HYPEROPT_LOSS_BUILTIN variable inside constants.py file
2021-09-23 21:37:28 -05:00
Robert Roman
3b99c84b0a resolved the total profit issue
I resolved the total profit issue and locally ran flak8 and isort
2021-09-23 21:31:33 -05:00
Matthias
9a6d8977de Merge pull request #5605 from peterwilli/fix-sell-cancel-webhook-error
fixed webhook "unsupported format string passed to NoneType." error
2021-09-23 20:17:35 +02:00
Matthias
ff9c8fe234 Merge pull request #5496 from LoveIsGrief/docs/performance-warning
Docs: Mention Performance Warning for strategies
2021-09-23 20:16:58 +02:00
Peter Willemsen
692e91a26d changed close date from datetime.utcnow() to datetime.now(timezone.utc) 2021-09-23 10:28:15 +02:00
Matthias
d7903f012f Move PerformanceWarning to advanced section
rewrite to use strategy parameters instead of plain range
2021-09-23 07:25:11 +02:00
Matthias
fcca637107 Merge pull request #5599 from freqtrade/notify_trigger_prot
Notify trigger protections
2021-09-23 07:17:26 +02:00
matt ferrante
2bf49445b7 add parameterized names 2021-09-22 16:11:27 -06:00
matt ferrante
30cc69c880 set all to eth for multi test 2021-09-22 11:28:42 -06:00
matt ferrante
8cfb6ddd51 fix long line 2021-09-22 10:48:13 -06:00
matt ferrante
f768bdea50 cleanup based on feedback 2021-09-22 10:32:30 -06:00
Robert Roman
c6b684603c removed trade_count inside if statement
i removed trade_count inside if statement. Even though it helps overfitting, It is not useful when running hyperopt on small datasets.
2021-09-22 09:21:43 -05:00
Robert Roman
b946f8e7f1 I sorted imports with isort 2021-09-22 09:18:17 -05:00
Robert Roman
3834bb86ff updated line 42
I removed the minus sign on max drawdown.
2021-09-21 20:25:17 -05:00
Robert Roman
3845d55186 a new hyperopt loss created that uses calmar ratio
This is a new hyperopt loss file that uses the Calmar Ratio.

Calmar Ratio = average annual rate of return / maximum drawdown
2021-09-21 20:04:23 -05:00
Sam Germain
553c868d7f combined test_order_book_depth_of_market and test_order_book_depth_of_market_high_delta 2021-09-21 16:40:24 -06:00
Peter Willemsen
b0de4d333e fixed webhook error 2021-09-21 23:20:40 +02:00
matt ferrante
707d0ef795 remove trades_for_order3 2021-09-21 12:16:10 -06:00
matt ferrante
277828bf0e parameterize some tests 2021-09-21 07:56:16 -06:00
Matthias
6fc770d97d Add warning about running with docker on windows 2021-09-21 15:12:35 +02:00
Matthias
4237acf5b6 Merge pull request #5598 from SeriousM/patch-1
Add docker troubleshooting information for win10/wsl
2021-09-21 14:54:31 +02:00
Bernhard Millauer
abddb0db66 Fix header indention
Co-authored-by: Matthias <xmatthias@outlook.com>
2021-09-21 10:13:19 +02:00
Matthias
3ce05c0d54 Add "sane" defaults to protection triggers 2021-09-20 20:16:58 +02:00
Matthias
fd23ab3d64 improve formatting, add tests 2021-09-20 19:50:56 +02:00
Matthias
dd0db7ee5d Split protection-notification into global and per-pair 2021-09-20 19:23:40 +02:00
Matthias
a0fb43c6ca Add pairlock-notification 2021-09-20 19:12:59 +02:00
Bernhard Millauer
c91a9a92f2 Add troubleshooting information
The time in wsl docker container shifts over time. Added information how to fix this issue.
2021-09-20 14:22:24 +02:00
Matthias
1da091dea3 ProtectionManager should return the lock just created 2021-09-19 19:41:19 +02:00
Matthias
879bf47b32 Refactor telegram.py to simplify send_msg 2021-09-19 19:25:36 +02:00
Matthias
c46ef637c3 Merge pull request #5593 from samgermain/parametrized-test-freqtradebot
Parametrized test freqtradebot
2021-09-19 13:40:13 +02:00
Matthias
ec03531771 Improve naming of variables 2021-09-19 13:29:09 +02:00
Matthias
ab88217186 Improve /balance output to include starting balance and percentual change
closes #5503
2021-09-19 13:17:34 +02:00
Sam Germain
cee4ed541b parametrized test_update_trade_state_withorderdict 2021-09-18 19:46:46 -06:00
Sam Germain
ec9dbc550e parametrized test_create_trade_minimal_amount 2021-09-18 19:19:53 -06:00
Matthias
c1895a0fc2 Remove warning related to legacy hyperopt 2021-09-18 15:30:33 +02:00
Matthias
73f044d1e2 Merge pull request #5281 from rokups/rk/helpers
A decorator for easy creation of informative pairs
2021-09-18 15:30:20 +02:00
Rokas Kupstys
eab7f8f694 [SQUASH] Doh. 2021-09-18 15:44:21 +03:00
Rokas Kupstys
713e7819f7 [SQUASH] Remove mypy import. 2021-09-18 15:27:58 +03:00
Sam Germain
518a59ad41 parametrized test_edge_overrides_stoploss 2021-09-18 03:20:00 -06:00
Sam Germain
42a2fdc1c5 parametrized test_order_dict 2021-09-18 03:01:08 -06:00
Sam Germain
216f75bbb9 parametrized test_sell_profit_only , test__safe_exit_amount, test_order_book_bid_strategy1 2021-09-18 02:53:34 -06:00
Rokas Kupstys
e4ca42faec [SQUASH] Update stoploss_from_absolute to behave more like stoploss_from_open and add a test for it. 2021-09-18 10:48:53 +03:00
Rokas Kupstys
7e6aa9390a [SQUASH] Unconditionally include quote currency when asset is explicitly specified. Added docs suggesting to use string formatting to make strategy independent of configured stake currency. 2021-09-18 10:48:53 +03:00
Rokas Kupstys
e88c4701bb [SQUASH] Address PR comments. 2021-09-18 10:48:53 +03:00
Matthias
bb6ae682fc Small simplifications 2021-09-18 10:48:53 +03:00
Rokas Kupstys
5dc78a0c66 [SQUASH] Get rid of _initialize() and fix informatives for dynamic pairlists. 2021-09-18 10:48:53 +03:00
Rokas Kupstys
f81df19b93 [TMP] Make tests not fail for now. 2021-09-18 10:48:53 +03:00
Rokas Kupstys
dfa61b7ad2 [SQUASH] Fix informatives for each pair not being created because dataprovider was not available.
Fix not being able to have informative dataframe of a pair in whitelist.
2021-09-18 10:48:53 +03:00
Rokas Kupstys
f2a1d9d2fc [SQUASH] Address PR comments. 2021-09-18 10:48:18 +03:00
Rokas Kupstys
1fdb656334 Add a decorator which can be used to declare populate_indicators() functions for informative pairs. 2021-09-18 10:48:18 +03:00
Rokas Kupstys
d84ef34740 A helper to calculate stoploss value from absolute price. 2021-09-18 10:48:18 +03:00
Matthias
11f08b0053 Merge pull request #5582 from sergeykhliustin/develop
Added days parameter to PerformanceFilter
2021-09-18 09:24:14 +02:00
Matthias
56fb25c5e5 Add test for PerformanceFilter lookback 2021-09-18 09:10:37 +02:00
Matthias
564e0b9a1a Switch performanceFilter to use Minutes lookback resolution
closes #5060
2021-09-18 09:10:25 +02:00
Matthias
12c12d42df Add documentation for days parameter in PerformanceFilter 2021-09-18 08:30:44 +02:00
Matthias
853c3a4433 Merge pull request #5587 from raph92/patch-3
Update prepare_trials_columns() return type
2021-09-18 08:08:18 +02:00
Sergey Khliustin
d7395e873b Removed unused OperationalException 2021-09-17 22:05:57 +03:00
raphael
4b2c1a9b8e Remove trailing whitespace 2021-09-17 14:39:15 -04:00
raphael
e715f2a253 Update formatting
Line 302 was too long
2021-09-17 14:23:26 -04:00
raphael
9525a5b96c Add type to "trials" parameter 2021-09-17 14:10:37 -04:00
Matthias
9c50d0c250 Merge pull request #5589 from Ottavio97/develop
Include Raspberry Pi armv6 (0, 0W,...)
2021-09-17 19:54:35 +02:00
Matthias
6d1604d6fa Merge pull request #5588 from raph92/patch-4
Update HyperoptTools.export_csv_file usage
2021-09-17 19:14:47 +02:00
Ottavio Miele
fb6beb90e8 Include Raspberry Pi armv6 (0, 0W,...) 2021-09-17 18:03:54 +02:00
raphael
124e97f3b9 Remove ununsed variables from export_csv_file 2021-09-17 11:57:36 -04:00
raphael
5fc993231a Update HyperoptTools.export_csv_file usage 2021-09-17 11:51:55 -04:00
raphael
3a98fb72a4 Update prepare_trials_columns() return type
Was returning str, updated to pd.DataFrame
2021-09-17 11:42:33 -04:00
sergeykhliustin
982deeedf0 Update freqtrade/persistence/models.py
Co-authored-by: Matthias <xmatthias@outlook.com>
2021-09-17 18:23:13 +03:00
Sergey Khliustin
54ef36a497 Updates after review to PerformanceFilter days param 2021-09-17 13:45:44 +03:00
Matthias
4ce1375bf3 Merge pull request #5580 from freqtrade/hyperopt_diff_base_estimators
Hyperopt set diff base estimators
2021-09-17 10:32:47 +02:00
Sergey Khliustin
457e738b4a Added days parameter to PerformanceFilter 2021-09-16 14:48:02 +03:00
Matthias
994c3c3a4c Add some errorhandling for custom estimator 2021-09-16 07:13:25 +02:00
Matthias
c0811ae896 Add possibility to override estimator from within hyperopt 2021-09-15 21:36:53 +02:00
Matthias
90ad178932 Remove verbosity of edge 2021-09-15 21:04:25 +02:00
Matthias
57ea0c322f Rename indicator_space to buy_indicator_space 2021-09-15 20:20:31 +02:00
Matthias
f7bae81d96 Dataframe should be copied after populate_indicator
Without that, PerformanceWarnings can appear throughout hyperopt which
are unnecessary and missleading for users

closes #5408
2021-09-15 19:56:12 +02:00
Matthias
e4ec5679a1 Merge pull request #5574 from freqtrade/agefilter_cache
Agefilter cache
2021-09-15 06:33:36 +02:00
Matthias
4e2b1764b8 ccxt_compat_tests must run with dry-run=False 2021-09-14 20:24:44 +02:00
Matthias
315ea1e116 Merge pull request #5566 from freqtrade/remove_hyperopt
Remove legacy hyperopt
2021-09-14 19:20:58 +02:00
Matthias
35eda8c8c7 Improve agefilter test 2021-09-14 07:07:20 +02:00
Matthias
3ce5197e8d Add Tests for AgeFilter caching
closes #5552
2021-09-14 06:45:26 +02:00
Matthias
c9ba52d732 Expire cached pairs in age-filter once per day 2021-09-14 06:30:18 +02:00
Matthias
e8e8ef4872 Merge pull request #5572 from freqtrade/dependabot/pip/develop/ccxt-1.56.30
Bump ccxt from 1.55.83 to 1.56.30
2021-09-13 20:43:10 +02:00
Matthias
a12c3ecc9b Remove credentials whenever dry-run is set from within the exchange 2021-09-13 20:27:32 +02:00
Matthias
8afb3c4b70 Move AgeFilter cache to instance level 2021-09-13 19:33:28 +02:00
Matthias
3cdd06f562 Add PeriodicCache 2021-09-13 19:32:51 +02:00
dependabot[bot]
b13bd87625 Bump ccxt from 1.55.83 to 1.56.30
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.55.83 to 1.56.30.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.55.83...1.56.30)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 04:31:52 +00:00
Matthias
51643ed56c Merge pull request #5571 from freqtrade/dependabot/pip/develop/progressbar2-3.53.2
Bump progressbar2 from 3.53.1 to 3.53.2
2021-09-13 06:31:00 +02:00
Matthias
22e0728ac2 Merge pull request #5569 from freqtrade/dependabot/pip/develop/pandas-1.3.3
Bump pandas from 1.3.2 to 1.3.3
2021-09-13 06:30:37 +02:00
dependabot[bot]
81039fce28 Bump progressbar2 from 3.53.1 to 3.53.2
Bumps [progressbar2](https://github.com/WoLpH/python-progressbar) from 3.53.1 to 3.53.2.
- [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.53.1...v3.53.2)

---
updated-dependencies:
- dependency-name: progressbar2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 03:01:24 +00:00
dependabot[bot]
d8f48cf0e3 Bump pandas from 1.3.2 to 1.3.3
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.3.2 to 1.3.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.3.2...v1.3.3)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 03:01:14 +00:00
Matthias
236dc48000 Update CI to use new hyperopt interface 2021-09-12 08:18:17 +02:00
Matthias
0017b3438e Remove list-hyperopts 2021-09-12 08:18:17 +02:00
Matthias
3675df8344 Update documentation regarding Legacy Hyperopt 2021-09-12 08:18:17 +02:00
Matthias
fd6bf591f8 Update some tests to remove explicit hyperopt interface 2021-09-12 08:18:13 +02:00
Matthias
dad4a49e81 Remove legacy hyperopt interface from hyperopt.py 2021-09-12 08:18:13 +02:00
Matthias
ebb0b8aa3f Remove new-hyperopt command 2021-09-12 08:18:13 +02:00
Matthias
432c3df17e Add documentation for Bittex/Gemini with VolumePairlist
closes #5565
2021-09-12 08:04:22 +02:00
Matthias
50479d0b44 Merge pull request #5560 from freqtrade/fix/5548_1mdl
Don't blindly create coroutines, but fire them off in batches
2021-09-11 08:33:43 +02:00
Matthias
a5f90a409c Small updates to async_history_fetch 2021-09-11 08:18:32 +02:00
Matthias
4c4604f837 Add explicit test for get_historic_ohlcv 2021-09-10 19:47:56 +02:00
Matthias
8c9159f596 Improve comments 2021-09-10 19:46:38 +02:00
Matthias
a19c33ba54 Don't blindly create coroutines, but fire them off in batches 2021-09-10 19:37:07 +02:00
Matthias
7251a3ab19 Merge pull request #5544 from freqtrade/new_pair_download
New pair download improvement
2021-09-10 19:36:45 +02:00
Matthias
982534ddc7 Add gate.io to list of supported exchanges 2021-09-10 19:32:20 +02:00
Matthias
5844f5a7fa Merge pull request #5546 from samgermain/clear-caplog-freqtradebot
freqtradebot-tests-caplog-clears
2021-09-09 21:18:54 +02:00
Sam Germain
366247dff3 removed caplog.clears at end of functions in test_freqtradebot 2021-09-09 02:17:41 -06:00
Matthias
fb376153a2 Merge pull request #5549 from samgermain/name-changes
Name changes
2021-09-09 07:40:39 +02:00
Sam Germain
b2f289e404 Fixed freqtradebot failing tests 2021-09-08 02:16:25 -06:00
Sam Germain
a1c9a4d619 freqtradebot local name changes 2021-09-08 02:09:36 -06:00
Sam Germain
362dc20406 notify_buy -> notify_enter, notify_sell -> notify_exit 2021-09-08 02:06:01 -06:00
Sam Germain
e1f846f22f sell_lock -> exit_lock 2021-09-08 02:04:31 -06:00
Sam Germain
e0092a85e9 handle_cancel_buy/sell -> handle_cancel_enter/exit 2021-09-08 02:04:20 -06:00
Sam Germain
be93c75e44 reupdate_buy_order_fees -> reupdate_enter_order_fees 2021-09-08 02:03:40 -06:00
Sam Germain
aac05029e1 safe_sell_amount -> safe_exit_amount 2021-09-08 02:03:24 -06:00
Sam Germain
93fcaac19f Merge branch 'develop' into clear-caplog-freqtradebot 2021-09-07 21:55:00 -06:00
Sam Germain
79ca6135a2 added caplog clears to freqtradebot tests 2021-09-07 21:53:38 -06:00
Matthias
2d66987ac7 Add test for "pair-startdate" detection 2021-09-07 20:27:49 +02:00
Matthias
8c83c258a5 Move "first-pair_getting" to binance subclass 2021-09-07 19:32:32 +02:00
Matthias
71ff214adf Support "initial_call" for download-data of new pairs 2021-09-07 07:14:40 +02:00
Matthias
880474594e have ftuser use /bin/bash in dockerfile 2021-09-07 06:51:31 +02:00
Matthias
10d0987f49 Fix docs for custom hyperopt space 2021-09-06 19:55:04 +02:00
Matthias
6bd495a32a Fix 0Exception error
happens when wrong stake-currency is selected and /profit
is called
2021-09-06 19:55:04 +02:00
Matthias
fb78caf801 Merge pull request #5538 from EnzovdWetering/patch-1
Update edge.md
2021-09-06 19:22:38 +02:00
EnzovdWetering
a04875eb55 Update edge.md
Typo fix
2021-09-06 17:53:44 +02:00
Matthias
3f0032498e Merge pull request #5537 from freqtrade/dependabot/pip/develop/mkdocs-material-7.2.6
Bump mkdocs-material from 7.2.5 to 7.2.6
2021-09-06 06:44:16 +02:00
Matthias
76a59bf2b6 Merge pull request #5536 from freqtrade/dependabot/pip/develop/ccxt-1.55.83
Bump ccxt from 1.55.56 to 1.55.83
2021-09-06 06:43:47 +02:00
Matthias
8347219990 Merge pull request #5534 from freqtrade/dependabot/pip/develop/pytest-6.2.5
Bump pytest from 6.2.4 to 6.2.5
2021-09-06 06:43:25 +02:00
Matthias
64ec1b6f8c Merge pull request #5535 from freqtrade/dependabot/pip/develop/plotly-5.3.1
Bump plotly from 5.3.0 to 5.3.1
2021-09-06 06:43:08 +02:00
dependabot[bot]
765e72715b Bump mkdocs-material from 7.2.5 to 7.2.6
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.2.5 to 7.2.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/7.2.5...7.2.6)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 03:01:28 +00:00
dependabot[bot]
44f8d7abf2 Bump ccxt from 1.55.56 to 1.55.83
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.55.56 to 1.55.83.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.55.56...1.55.83)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 03:01:23 +00:00
dependabot[bot]
771193cbe4 Bump plotly from 5.3.0 to 5.3.1
Bumps [plotly](https://github.com/plotly/plotly.py) from 5.3.0 to 5.3.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/v5.3.0...v5.3.1)

---
updated-dependencies:
- dependency-name: plotly
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 03:01:19 +00:00
dependabot[bot]
4daa4b9e63 Bump pytest from 6.2.4 to 6.2.5
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.4...6.2.5)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 03:01:10 +00:00
Matthias
01b5fe9f97 Merge pull request #5532 from lazydroid/patch-2
case insensitive blacklist
2021-09-05 19:53:39 +02:00
lenik terenin
1d24d3d5ee case insensitive blacklist
Allow "btc/usdt" pairs in blacklist to match to "BTC/USDT" pairs that come from the exchange.
2021-09-05 22:41:58 +09:00
Matthias
c519ecf8df Exclude more untestable sections from coverage 2021-09-05 15:40:21 +02:00
Matthias
a8f28ffb11 Increase test coverage 2021-09-05 15:34:57 +02:00
Matthias
ea5c7e7ed6 Merge pull request #5531 from freqtrade/exclude_coverage
Exclude some parts from coverage that can't really be tested
2021-09-05 10:01:07 +02:00
Matthias
2173ff0133 Update PR template to not link to issues in changelog 2021-09-05 09:16:19 +02:00
Matthias
4e049f65f2 Exclude some parts from coverage that can't really be tested 2021-09-05 09:14:44 +02:00
Matthias
63f2494936 Merge pull request #5530 from freqtrade/fix_uvicorn
Fix uvicorn not working properly on windows
2021-09-04 08:22:11 +02:00
Matthias
35267de88a Merge pull request #5529 from Rikj000/setup/use-build-helpers-install-ta-lib-script
 `setup.sh` - Use `build_helpers/install_ta-lib.sh` for TA-Lib insta…
2021-09-04 08:15:19 +02:00
Rik Helsen
eb0362c29e ️ ️install_ta-lib.sh - Run ldconfig after make install 2021-09-03 23:52:40 +02:00
Matthias
493fb35073 Fix uvicorn not working properly on windows 2021-09-03 22:05:40 +02:00
Matthias
91779ee0cc Merge pull request #5524 from freqtrade/kucoin_tif
Improve generated configuration templates, support kucoin TIF
2021-09-03 19:46:58 +02:00
Rikj000
103a8e827e setup.sh - Use build_helpers/install_ta-lib.sh for TA-Lib installation 2021-09-03 16:37:36 +02:00
Matthias
2f92838c39 Properly close parenteses in exchange doc 2021-09-03 16:19:27 +02:00
Matthias
b4130dfabb Use volumePairlist instead of staticPairlist in generated config 2021-09-03 09:23:26 +02:00
Matthias
c489e6825c Simplify binance blacklist 2021-09-03 09:18:15 +02:00
Matthias
68f13173bc Update new-config templates to use USDT by default 2021-09-03 08:59:43 +02:00
Matthias
e64ccd8fc1 Add new_config section for kucoin 2021-09-03 08:57:53 +02:00
Matthias
19ad165483 Add time_in_force for kucoin 2021-09-03 08:48:53 +02:00
Matthias
93c1dff71b Allow adding new additional headers 2021-09-02 21:02:45 +02:00
Matthias
f59ba92920 Merge pull request #5413 from freqtrade/feat/backtest_detail
Add backtest-detail to allow intra-candle backtests
2021-09-01 19:48:12 +02:00
Matthias
ab5e63cbdd Merge pull request #5520 from freqtrade/dependabot/docker/python-3.9.7-slim-buster
Bump python from 3.9.6-slim-buster to 3.9.7-slim-buster
2021-09-01 13:40:54 +02:00
Matthias
b65a15d8b4 Merge pull request #5501 from pan-long/hdf5-path
Export HDF5 and CBLOSC paths.
2021-09-01 07:06:28 +02:00
dependabot[bot]
87fa49d529 Bump python from 3.9.6-slim-buster to 3.9.7-slim-buster
Bumps python from 3.9.6-slim-buster to 3.9.7-slim-buster.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 03:01:49 +00:00
Matthias
b0c4f079c2 Merge branch 'develop' into feat/backtest_detail 2021-08-31 20:16:42 +02:00
Matthias
1cbe303434 Add documentation for --detail-timeframe 2021-08-31 19:58:08 +02:00
Matthias
525aa234dc Merge pull request #5516 from yehya-dev/patch-1
Update bot-basics.md
2021-08-31 16:58:01 +02:00
Matthias
da5f8c87ae Add stake_currency to strategy interface
allows type-completion in editors
2021-08-31 07:18:57 +02:00
Yehya
4cc1f2b4a4 Update bot-basics.md
Term usage mistake (The first in the pair is the base and second is the quote)
2021-08-31 10:48:09 +05:30
Matthias
ab9a4375cc Merge pull request #5504 from pan-long/unlimited-quote
Surround "unlimited" by double quotes in build config.
2021-08-30 20:33:21 +02:00
Matthias
2a0c95a2e7 Update freqtrade/commands/build_config_commands.py 2021-08-30 20:00:52 +02:00
Matthias
b25a161e22 Merge pull request #5507 from freqtrade/dependabot/pip/develop/plotly-5.3.0
Bump plotly from 5.2.1 to 5.3.0
2021-08-30 06:42:01 +02:00
Matthias
7f13eec5d3 Merge pull request #5510 from freqtrade/dependabot/pip/develop/mkdocs-material-7.2.5
Bump mkdocs-material from 7.2.4 to 7.2.5
2021-08-30 06:34:03 +02:00
Matthias
bf1e78fcc8 Merge pull request #5509 from freqtrade/dependabot/pip/develop/fastapi-0.68.1
Bump fastapi from 0.68.0 to 0.68.1
2021-08-30 06:33:39 +02:00
Matthias
89d7e36d64 Merge pull request #5506 from freqtrade/dependabot/pip/develop/cryptography-3.4.8
Bump cryptography from 3.4.7 to 3.4.8
2021-08-30 06:32:58 +02:00
Matthias
6682d44f05 Merge pull request #5508 from freqtrade/dependabot/pip/develop/ccxt-1.55.56
Bump ccxt from 1.55.28 to 1.55.56
2021-08-30 06:32:33 +02:00
dependabot[bot]
45c6f90691 Bump mkdocs-material from 7.2.4 to 7.2.5
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.2.4 to 7.2.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/7.2.4...7.2.5)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 03:01:24 +00:00
dependabot[bot]
9e0ab9c2ca Bump fastapi from 0.68.0 to 0.68.1
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.68.0 to 0.68.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.68.0...0.68.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 03:01:19 +00:00
dependabot[bot]
26451e8c01 Bump ccxt from 1.55.28 to 1.55.56
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.55.28 to 1.55.56.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.55.28...1.55.56)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 03:01:14 +00:00
dependabot[bot]
d0504c47ef Bump plotly from 5.2.1 to 5.3.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 5.2.1 to 5.3.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/v5.2.1...v5.3.0)

---
updated-dependencies:
- dependency-name: plotly
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 03:01:09 +00:00
dependabot[bot]
c64ebeb6e2 Bump cryptography from 3.4.7 to 3.4.8
Bumps [cryptography](https://github.com/pyca/cryptography) from 3.4.7 to 3.4.8.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/3.4.7...3.4.8)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 03:01:05 +00:00
LoveIsGrief
c17595b314 Docs: Mention Performance Warning for strategies
Related to #5408
2021-08-29 20:00:59 +02:00
Pan Long
20878290a0 Surround "unlimited" by double quotes in build config. 2021-08-30 01:02:48 +08:00
Pan Long
c14d8ea827 Export HDF5 and CBLOSC paths.
This is needed if homebrew isn't installed in the standard path, say,
/usr/local/.
2021-08-29 16:34:01 +08:00
Matthias
a6b4b8bfd9 Merge pull request #5500 from freqtrade/clarify_exchange_error
Clarify exception on load when markets could not be loaded
2021-08-29 09:42:17 +02:00
Matthias
1895230afe Clarify exception on load when markets could not be loaded
closes #5498
2021-08-29 09:18:46 +02:00
Matthias
89581ad25c Fix typo in protections hyperopt doc
closes #5499
2021-08-29 08:24:31 +02:00
Matthias
0a52d7c24f Merge pull request #5495 from LoveIsGrief/docs/minor-fixes
Docs: Minor grammar fixes
2021-08-28 20:09:24 +02:00
LoveIsGrief
f79b30e886 Docs: Minor fixes 2021-08-28 18:51:43 +02:00
Matthias
19b3e8a8c5 Merge pull request #5493 from pan-long/develop
Remove extra comma after the last element in binance pair_blacklist.
2021-08-28 16:20:26 +02:00
Pan Long
482e65453f Remove extra comma after the last element in binance pair_blacklist. 2021-08-28 21:57:54 +08:00
Matthias
ac0dada962 Update Version to develop again 2021-08-28 10:43:49 +02:00
Matthias
c6f38bc2f3 Merge pull request #5487 from freqtrade/new_release
New release 2021.8
2021-08-28 10:38:48 +02:00
Matthias
fa4ec9f83e Add explicit test for get_sell_trade_entry 2021-08-15 14:52:24 +02:00
Matthias
3406b889b6 First test 2021-08-14 17:06:28 +02:00
Matthias
8405ccc15e Seperate detail data loading from regular backest-data loading 2021-08-14 16:33:01 +02:00
Matthias
88172fab82 Allow "detailed" backtesting timeframe to look into the candle 2021-08-14 16:04:23 +02:00
Cryptomeister Nox
85979c3176 * Adding command for Filtering
* Read latest Backtest file and print trades
2021-06-17 20:35:02 +02:00
rextea
76a02ff70a fix indentations 2021-03-26 18:49:17 +03:00
rextea
2bed41da5d Add days breakdown table to backtesting 2021-03-26 18:40:50 +03:00
255 changed files with 13226 additions and 6840 deletions

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
github: [xmatthias]

View File

@@ -9,7 +9,7 @@ assignees: ''
<!--
Have you searched for similar issues before posting it?
If you have discovered a bug in the bot, please [search our issue tracker](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue).
If you have discovered a bug in the bot, please [search the issue tracker](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue).
If it hasn't been reported, please create a new issue.
Please do not use bug reports to request new features.

View File

@@ -22,4 +22,4 @@ Please do not use the question template to report bugs or to request new feature
## Your question
*Ask the question you have not been able to find an answer in our [Documentation](https://www.freqtrade.io/en/latest/)*
*Ask the question you have not been able to find an answer in the [Documentation](https://www.freqtrade.io/en/latest/)*

View File

@@ -2,14 +2,16 @@ Thank you for sending your pull request. But first, have you included
unit tests, and is your code PEP8 conformant? [More details](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md)
## Summary
Explain in one sentence the goal of this PR
Solve the issue: #___
## Quick changelog
- <change log #1>
- <change log #2>
- <change log 1>
- <change log 1>
## What's new?
*Explain in details what this PR solve or improve. You can include visuals.*

View File

@@ -5,9 +5,17 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
target-branch: develop
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
target-branch: develop

View File

@@ -3,9 +3,9 @@ name: Freqtrade CI
on:
push:
branches:
- master
- stable
- develop
- ci/*
tags:
release:
types: [published]
@@ -20,13 +20,13 @@ jobs:
strategy:
matrix:
os: [ ubuntu-18.04, ubuntu-20.04 ]
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
@@ -39,7 +39,7 @@ jobs:
- name: pip cache (linux)
uses: actions/cache@v2
if: startsWith(matrix.os, 'ubuntu')
if: runner.os == 'Linux'
with:
path: ~/.cache/pip
key: test-${{ matrix.os }}-${{ matrix.python-version }}-pip
@@ -50,8 +50,9 @@ jobs:
cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies/; cd ..
- name: Installation - *nix
if: runner.os == 'Linux'
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel
export LD_LIBRARY_PATH=${HOME}/dependencies/lib:$LD_LIBRARY_PATH
export TA_LIBRARY_PATH=${HOME}/dependencies/lib
export TA_INCLUDE_PATH=${HOME}/dependencies/include
@@ -69,7 +70,7 @@ jobs:
if: matrix.python-version == '3.9'
- name: Coveralls
if: (startsWith(matrix.os, 'ubuntu-20') && matrix.python-version == '3.8')
if: (runner.os == 'Linux' && 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
@@ -87,7 +88,7 @@ jobs:
run: |
cp config_examples/config_bittrex.example.json config.json
freqtrade create-userdir --userdir user_data
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --hyperopt-loss SharpeHyperOptLossDaily --print-all
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
- name: Flake8
run: |
@@ -101,29 +102,26 @@ jobs:
run: |
mypy freqtrade scripts
- name: Slack Notification
uses: lazy-actions/slatify@v3.0.0
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
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 }}
severity: error
details: Freqtrade CI failed on ${{ matrix.os }}
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
build_macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest ]
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
@@ -136,7 +134,7 @@ jobs:
- name: pip cache (macOS)
uses: actions/cache@v2
if: startsWith(matrix.os, 'macOS')
if: runner.os == 'macOS'
with:
path: ~/Library/Caches/pip
key: test-${{ matrix.os }}-${{ matrix.python-version }}-pip
@@ -147,10 +145,11 @@ jobs:
cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies/; cd ..
- name: Installation - macOS
if: runner.os == 'macOS'
run: |
brew update
brew install hdf5 c-blosc
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel
export LD_LIBRARY_PATH=${HOME}/dependencies/lib:$LD_LIBRARY_PATH
export TA_LIBRARY_PATH=${HOME}/dependencies/lib
export TA_INCLUDE_PATH=${HOME}/dependencies/include
@@ -162,7 +161,7 @@ jobs:
pytest --random-order --cov=freqtrade --cov-config=.coveragerc
- name: Coveralls
if: (startsWith(matrix.os, 'ubuntu-20') && matrix.python-version == '3.8')
if: (runner.os == 'Linux' && 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
@@ -180,7 +179,7 @@ jobs:
run: |
cp config_examples/config_bittrex.example.json config.json
freqtrade create-userdir --userdir user_data
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --hyperopt-loss SharpeHyperOptLossDaily --print-all
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
- name: Flake8
run: |
@@ -194,17 +193,13 @@ jobs:
run: |
mypy freqtrade scripts
- name: Slack Notification
uses: lazy-actions/slatify@v3.0.0
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
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 }}
severity: info
details: Test Succeeded!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
build_windows:
@@ -212,19 +207,18 @@ jobs:
strategy:
matrix:
os: [ windows-latest ]
python-version: [3.7, 3.8]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache (Windows)
uses: actions/cache@preview
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip
@@ -247,7 +241,7 @@ jobs:
run: |
cp config_examples/config_bittrex.example.json config.json
freqtrade create-userdir --userdir user_data
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --hyperopt-loss SharpeHyperOptLossDaily --print-all
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
- name: Flake8
run: |
@@ -257,28 +251,25 @@ jobs:
run: |
mypy freqtrade scripts
- name: Slack Notification
uses: lazy-actions/slatify@v3.0.0
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI windows*'
mention: 'here'
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: error
details: Test Failed
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
docs_check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Documentation syntax
run: |
./tests/test_docs.sh
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
@@ -288,14 +279,13 @@ jobs:
pip install mkdocs
mkdocs build
- name: Slack Notification
uses: lazy-actions/slatify@v3.0.0
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade Docs*'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: error
details: Freqtrade doc test failed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
cleanup-prior-runs:
runs-on: ubuntu-20.04
@@ -306,7 +296,7 @@ jobs:
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Notify on slack only once - when CI completes (and after deploy) in case it's successfull
# Notify only once - when CI completes (and after deploy) in case it's successfull
notify-complete:
needs: [ build_linux, build_macos, build_windows, docs_check ]
runs-on: ubuntu-20.04
@@ -320,14 +310,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Slack Notification
uses: lazy-actions/slatify@v3.0.0
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: always() && steps.check.outputs.has-permission && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI*'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: info
details: Test Completed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
deploy:
needs: [ build_linux, build_macos, build_windows, docs_check ]
@@ -336,10 +325,10 @@ jobs:
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
@@ -385,7 +374,7 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
uses: crazy-max/ghaction-docker-buildx@v3.3.1
with:
buildx-version: latest
qemu-version: latest
@@ -400,17 +389,13 @@ jobs:
run: |
build_helpers/publish_docker_multi.sh
- name: Slack Notification
uses: lazy-actions/slatify@v3.0.0
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: always() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI Deploy*'
mention: 'here'
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: info
details: Deploy Succeeded!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
deploy_arm:
@@ -420,7 +405,7 @@ jobs:
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Extract branch name
shell: bash

View File

@@ -8,9 +8,9 @@ jobs:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2.1.0
uses: peter-evans/dockerhub-description@v2.4.3
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

5
.gitignore vendored
View File

@@ -1,6 +1,8 @@
# Freqtrade rules
config*.json
*.sqlite
*.sqlite-shm
*.sqlite-wal
logfile.txt
user_data/*
!user_data/strategy/sample_strategy.py
@@ -10,6 +12,9 @@ freqtrade-plot.html
freqtrade-profit-plot.html
freqtrade/rpc/api_server/ui/*
# Macos related
.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

View File

@@ -1,55 +0,0 @@
os:
- linux
dist: bionic
language: python
python:
- 3.8
services:
- docker
env:
global:
- IMAGE_NAME=freqtradeorg/freqtrade
install:
- cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies; cd ..
- 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 .
jobs:
include:
- stage: tests
script:
- pytest --random-order --cov=freqtrade --cov-config=.coveragerc
# Allow failure for coveralls
# - coveralls || true
name: pytest
- script:
- cp config_examples/config_bittrex.example.json config.json
- freqtrade create-userdir --userdir user_data
- freqtrade backtesting --datadir tests/testdata --strategy SampleStrategy
name: backtest
- script:
- cp config_examples/config_bittrex.example.json config.json
- freqtrade create-userdir --userdir user_data
- freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt --hyperopt-loss SharpeHyperOptLossDaily
name: hyperopt
- script: flake8
name: flake8
- script:
# Test Documentation boxes -
# !!! <TYPE>: is not allowed!
# !!! <TYPE> "title" - Title needs to be quoted!
- grep -Er '^!{3}\s\S+:|^!{3}\s\S+\s[^"]' docs/*; test $? -ne 0
name: doc syntax
- script: mypy freqtrade scripts
name: mypy
notifications:
slack:
secure: bKLXmOrx8e2aPZl7W8DA5BdPAXWGpI5UzST33oc1G/thegXcDVmHBTJrBs4sZak6bgAclQQrdZIsRd2eFYzHLalJEaw6pk7hoAw8SvLnZO0ZurWboz7qg2+aZZXfK4eKl/VUe4sM9M4e/qxjkK+yWG7Marg69c4v1ypF7ezUi1fPYILYw8u0paaiX0N5UX8XNlXy+PBlga2MxDjUY70MuajSZhPsY2pDUvYnMY1D/7XN3cFW0g+3O8zXjF0IF4q1Z/1ASQe+eYjKwPQacE+O8KDD+ZJYoTOFBAPllrtpO1jnOPFjNGf3JIbVMZw4bFjIL0mSQaiSUaUErbU3sFZ5Or79rF93XZ81V7uEZ55vD8KMfR2CB1cQJcZcj0v50BxLo0InkFqa0Y8Nra3sbpV4fV5Oe8pDmomPJrNFJnX6ULQhQ1gTCe0M5beKgVms5SITEpt4/Y0CmLUr6iHDT0CUiyMIRWAXdIgbGh1jfaWOMksybeRevlgDsIsNBjXmYI1Sw2ZZR2Eo2u4R6zyfyjOMLwYJ3vgq9IrACv2w5nmf0+oguMWHf6iWi2hiOqhlAN1W74+3HsYQcqnuM3LGOmuCnPprV1oGBqkPXjIFGpy21gNx4vHfO1noLUyJnMnlu2L7SSuN1CdLsnjJ1hVjpJjPfqB4nn8g12x87TqM1bOm+3Q=
cache:
pip: True
directories:
- $HOME/dependencies

View File

@@ -56,6 +56,13 @@ To help with that, we encourage you to install the git pre-commit
hook that will warn you when you try to commit code that fails these checks.
Guide for installing them is [here](http://flake8.pycqa.org/en/latest/user/using-hooks.html).
##### Additional styles applied
* Have docstrings on all public methods
* Use double-quotes for docstrings
* Multiline docstrings should be indented to the level of the first quote
* Doc-strings should follow the reST format (`:param xxx: ...`, `:return: ...`, `:raises KeyError: ... `)
### 3. Test if all type-hints are correct
#### Run mypy

View File

@@ -1,4 +1,4 @@
FROM python:3.9.6-slim-buster as base
FROM python:3.9.9-slim-bullseye as base
# Setup env
ENV LANG C.UTF-8
@@ -13,7 +13,7 @@ RUN mkdir /freqtrade \
&& apt-get update \
&& apt-get -y install sudo libatlas3-base curl sqlite3 libhdf5-serial-dev \
&& apt-get clean \
&& useradd -u 1000 -G sudo -U -m ftuser \
&& useradd -u 1000 -G sudo -U -m -s /bin/bash ftuser \
&& chown ftuser:ftuser /freqtrade \
# Allow sudoers
&& echo "ftuser ALL=(ALL) NOPASSWD: /bin/chown" >> /etc/sudoers

View File

@@ -5,10 +5,14 @@
[![Documentation](https://readthedocs.org/projects/freqtrade/badge/)](https://www.freqtrade.io)
[![Maintainability](https://api.codeclimate.com/v1/badges/5737e6d668200b7518ff/maintainability)](https://codeclimate.com/github/freqtrade/freqtrade/maintainability)
Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.
Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram or webUI. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.
![freqtrade](https://raw.githubusercontent.com/freqtrade/freqtrade/develop/docs/assets/freqtrade-screenshot.png)
## Sponsored promotion
[![tokenbot-promo](https://raw.githubusercontent.com/freqtrade/freqtrade/develop/docs/assets/TokenBot-Freqtrade-banner.png)](https://tokenbot.com/?utm_source=github&utm_medium=freqtrade&utm_campaign=algodevs)
## Disclaimer
This software is for educational purposes only. Do not risk money which
@@ -26,10 +30,13 @@ hesitate to read the source code and understand the mechanism of this bot.
Please read the [exchange specific notes](docs/exchanges.md) to learn about eventual, special configurations needed for each exchange.
- [X] [Binance](https://www.binance.com/) ([*Note for binance users](docs/exchanges.md#binance-blacklist))
- [X] [Binance](https://www.binance.com/)
- [X] [Bittrex](https://bittrex.com/)
- [X] [FTX](https://ftx.com/#a=2258149)
- [X] [Gate.io](https://www.gate.io/ref/6266643)
- [X] [Huobi](http://huobi.com/)
- [X] [Kraken](https://kraken.com/)
- [X] [FTX](https://ftx.com)
- [X] [OKX](https://okx.com/) (Former OKEX)
- [ ] [potentially many others](https://github.com/ccxt/ccxt/). _(We cannot guarantee they will work)_
### Community tested
@@ -43,34 +50,28 @@ Exchanges confirmed working by the community:
We invite you to read the bot documentation to ensure you understand how the bot is working.
Please find the complete documentation on our [website](https://www.freqtrade.io).
Please find the complete documentation on the [freqtrade website](https://www.freqtrade.io).
## Features
- [x] **Based on Python 3.7+**: For botting on any operating system - Windows, macOS and Linux.
- [x] **Based on Python 3.8+**: For botting on any operating system - Windows, macOS and Linux.
- [x] **Persistence**: Persistence is achieved through sqlite.
- [x] **Dry-run**: Run the bot without paying money.
- [x] **Backtesting**: Run a simulation of your buy/sell strategy.
- [x] **Strategy Optimization by machine learning**: Use machine learning to optimize your buy/sell strategy parameters with real exchange data.
- [x] **Edge position sizing** Calculate your win rate, risk reward ratio, the best stoploss and adjust your position size before taking a position for each specific market. [Learn more](https://www.freqtrade.io/en/latest/edge/).
- [x] **Edge position sizing** Calculate your win rate, risk reward ratio, the best stoploss and adjust your position size before taking a position for each specific market. [Learn more](https://www.freqtrade.io/en/stable/edge/).
- [x] **Whitelist crypto-currencies**: Select which crypto-currency you want to trade or use dynamic whitelists.
- [x] **Blacklist crypto-currencies**: Select which crypto-currency you want to avoid.
- [x] **Builtin WebUI**: Builtin web UI to manage your bot.
- [x] **Manageable via Telegram**: Manage the bot with Telegram.
- [x] **Display profit/loss in fiat**: Display your profit/loss in 33 fiat.
- [x] **Daily summary of profit/loss**: Provide a daily summary of your profit/loss.
- [x] **Display profit/loss in fiat**: Display your profit/loss in fiat currency.
- [x] **Performance status report**: Provide a performance status of your current trades.
## Quick start
Freqtrade provides a Linux/macOS script to install all dependencies and help you to configure the bot.
Please refer to the [Docker Quickstart documentation](https://www.freqtrade.io/en/stable/docker_quickstart/) on how to get started quickly.
```bash
git clone -b develop https://github.com/freqtrade/freqtrade.git
cd freqtrade
./setup.sh --install
```
For any other type of installation please refer to [Installation doc](https://www.freqtrade.io/en/latest/installation/).
For further (native) installation methods, please refer to the [Installation documentation page](https://www.freqtrade.io/en/stable/installation/).
## Basic Usage
@@ -78,22 +79,22 @@ For any other type of installation please refer to [Installation doc](https://ww
```
usage: freqtrade [-h] [-V]
{trade,create-userdir,new-config,new-hyperopt,new-strategy,download-data,convert-data,convert-trade-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-hyperopts,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,plot-dataframe,plot-profit}
{trade,create-userdir,new-config,new-strategy,download-data,convert-data,convert-trade-data,list-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-hyperopts,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,install-ui,plot-dataframe,plot-profit,webserver}
...
Free, open source crypto trading bot
positional arguments:
{trade,create-userdir,new-config,new-hyperopt,new-strategy,download-data,convert-data,convert-trade-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-hyperopts,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,plot-dataframe,plot-profit}
{trade,create-userdir,new-config,new-strategy,download-data,convert-data,convert-trade-data,list-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-hyperopts,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,install-ui,plot-dataframe,plot-profit,webserver}
trade Trade module.
create-userdir Create user-data directory.
new-config Create new config
new-hyperopt Create new hyperopt
new-strategy Create new strategy
download-data Download backtesting data.
convert-data Convert candle (OHLCV) data from one format to
another.
convert-trade-data Convert trade data from one format to another.
list-data List downloaded data.
backtesting Backtesting module.
edge Edge module.
hyperopt Hyperopt module.
@@ -107,8 +108,10 @@ positional arguments:
list-timeframes Print available timeframes for the exchange.
show-trades Show trades.
test-pairlist Test your pairlist configuration.
install-ui Install FreqUI
plot-dataframe Plot candles with indicators.
plot-profit Generate plot showing profits.
webserver Webserver module.
optional arguments:
-h, --help show this help message and exit
@@ -118,7 +121,7 @@ optional arguments:
### Telegram RPC commands
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/)
Telegram is not mandatory. However, this is a great way to control your bot. More details and the full command list on the [documentation](https://www.freqtrade.io/en/latest/telegram-usage/)
- `/start`: Starts the trader.
- `/stop`: Stops the trader.
@@ -149,10 +152,10 @@ For any questions not covered by the documentation or for further information ab
### [Bugs / Issues](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue)
If you discover a bug in the bot, please
[search our issue tracker](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue)
[search the issue tracker](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue)
first. If it hasn't been reported, please
[create a new issue](https://github.com/freqtrade/freqtrade/issues/new/choose) and
ensure you follow the template guide so that our team can assist you as
ensure you follow the template guide so that the team can assist you as
quickly as possible.
### [Feature Requests](https://github.com/freqtrade/freqtrade/labels/enhancement)
@@ -166,13 +169,13 @@ in the bug reports.
### [Pull Requests](https://github.com/freqtrade/freqtrade/pulls)
Feel like our bot is missing a feature? We welcome your pull requests!
Feel like the bot is missing a feature? We welcome your pull requests!
Please read our
Please read the
[Contributing document](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md)
to understand the requirements before sending your pull-requests.
Coding is not a necessity to contribute - maybe start with improving our documentation?
Coding is not a necessity to contribute - maybe start with improving the 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 [discord](https://discord.gg/p7nuUNVfP7) (please use the #dev channel for this). This will ensure that interested parties can give valuable feedback on the feature, and let others know that you are working on it.
@@ -193,7 +196,7 @@ To run this bot we recommend you a cloud instance with a minimum of:
### Software requirements
- [Python 3.7.x](http://docs.python-guide.org/en/latest/starting/installation/)
- [Python >= 3.8](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.

Binary file not shown.

View File

@@ -11,10 +11,18 @@ if [ ! -f "${INSTALL_LOC}/lib/libta_lib.a" ]; then
&& curl 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -o config.guess \
&& curl 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -o config.sub \
&& ./configure --prefix=${INSTALL_LOC}/ \
&& make -j$(nproc) \
&& which sudo && sudo make install || make install \
&& cd ..
&& make
if [ $? -ne 0 ]; then
echo "Failed building ta-lib."
cd .. && rm -rf ./ta-lib/
exit 1
fi
which sudo && sudo make install || make install
if [ -x "$(command -v apt-get)" ]; then
echo "Updating library path using ldconfig"
sudo ldconfig
fi
cd .. && rm -rf ./ta-lib/
else
echo "TA-lib already installed, skipping installation"
fi
# && sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h \

View File

@@ -1,19 +1,18 @@
# Downloads don't work automatically, since the URL is regenerated via javascript.
# Downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel
$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.21-cp37-cp37m-win_amd64.whl
}
if ($pyv -eq '3.8') {
pip install build_helpers\TA_Lib-0.4.21-cp38-cp38-win_amd64.whl
pip install build_helpers\TA_Lib-0.4.24-cp38-cp38-win_amd64.whl
}
if ($pyv -eq '3.9') {
pip install build_helpers\TA_Lib-0.4.21-cp39-cp39-win_amd64.whl
pip install build_helpers\TA_Lib-0.4.24-cp39-cp39-win_amd64.whl
}
if ($pyv -eq '3.10') {
pip install build_helpers\TA_Lib-0.4.24-cp310-cp310-win_amd64.whl
}
pip install -r requirements-dev.txt
pip install -e .

View File

@@ -9,7 +9,9 @@
"cancel_open_orders_on_exit": false,
"unfilledtimeout": {
"buy": 10,
"sell": 30
"sell": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"bid_strategy": {
"ask_last_balance": 0.0,
@@ -28,10 +30,8 @@
"name": "binance",
"key": "your_exchange_key",
"secret": "your_exchange_secret",
"ccxt_config": {"enableRateLimit": true},
"ccxt_config": {},
"ccxt_async_config": {
"enableRateLimit": true,
"rateLimit": 200
},
"pair_whitelist": [
"ALGO/BTC",

View File

@@ -9,7 +9,9 @@
"cancel_open_orders_on_exit": false,
"unfilledtimeout": {
"buy": 10,
"sell": 30
"sell": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"bid_strategy": {
"use_order_book": true,

View File

@@ -9,7 +9,9 @@
"cancel_open_orders_on_exit": false,
"unfilledtimeout": {
"buy": 10,
"sell": 30
"sell": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"bid_strategy": {
"ask_last_balance": 0.0,
@@ -28,11 +30,8 @@
"name": "ftx",
"key": "your_exchange_key",
"secret": "your_exchange_secret",
"ccxt_config": {"enableRateLimit": true},
"ccxt_async_config": {
"enableRateLimit": true,
"rateLimit": 50
},
"ccxt_config": {},
"ccxt_async_config": {},
"pair_whitelist": [
"BTC/USD",
"ETH/USD",

View File

@@ -8,6 +8,7 @@
"amend_last_stake_amount": false,
"last_stake_amount_min_ratio": 0.5,
"dry_run": true,
"dry_run_wallet": 1000,
"cancel_open_orders_on_exit": false,
"timeframe": "5m",
"trailing_stop": false,
@@ -18,6 +19,7 @@
"sell_profit_only": false,
"sell_profit_offset": 0.0,
"ignore_roi_if_buy_signal": false,
"ignore_buying_expired_candle_after": 300,
"minimal_roi": {
"40": 0.0,
"30": 0.01,
@@ -27,7 +29,8 @@
"stoploss": -0.10,
"unfilledtimeout": {
"buy": 10,
"sell": 30,
"sell": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"bid_strategy": {
@@ -53,7 +56,8 @@
"forcebuy": "market",
"stoploss": "market",
"stoploss_on_exchange": false,
"stoploss_on_exchange_interval": 60
"stoploss_on_exchange_interval": 60,
"stoploss_on_exchange_limit_ratio": 0.99
},
"order_time_in_force": {
"buy": "gtc",
@@ -84,12 +88,9 @@
"key": "your_exchange_key",
"secret": "your_exchange_secret",
"password": "",
"ccxt_config": {"enableRateLimit": true},
"ccxt_async_config": {
"enableRateLimit": true,
"rateLimit": 500,
"aiohttp_trust_env": false
},
"log_responses": false,
"ccxt_config": {},
"ccxt_async_config": {},
"pair_whitelist": [
"ALGO/BTC",
"ATOM/BTC",
@@ -149,7 +150,9 @@
},
"sell_fill": "on",
"buy_cancel": "on",
"sell_cancel": "on"
"sell_cancel": "on",
"protection_trigger": "off",
"protection_trigger_global": "on"
},
"reload": true,
"balance_dust_level": 0.01

View File

@@ -9,7 +9,9 @@
"cancel_open_orders_on_exit": false,
"unfilledtimeout": {
"buy": 10,
"sell": 30
"sell": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"bid_strategy": {
"use_order_book": true,
@@ -28,10 +30,8 @@
"name": "kraken",
"key": "your_exchange_key",
"secret": "your_exchange_key",
"ccxt_config": {"enableRateLimit": true},
"ccxt_config": {},
"ccxt_async_config": {
"enableRateLimit": true,
"rateLimit": 1000
},
"pair_whitelist": [
"ADA/EUR",

View File

@@ -15,10 +15,10 @@ services:
volumes:
- "./user_data:/freqtrade/user_data"
# Expose api on port 8080 (localhost only)
# Please read the https://www.freqtrade.io/en/latest/rest-api/ documentation
# Please read the https://www.freqtrade.io/en/stable/rest-api/ documentation
# before enabling this.
# ports:
# - "127.0.0.1:8080:8080"
ports:
- "127.0.0.1:8080:8080"
# Default command used when running `docker compose up`
command: >
trade

View File

@@ -1,4 +1,4 @@
FROM python:3.7.10-slim-buster as base
FROM python:3.9.9-slim-bullseye as base
# Setup env
ENV LANG C.UTF-8

View File

@@ -13,7 +13,7 @@ A sample of this can be found below, which is identical to the Default Hyperopt
``` python
from datetime import datetime
from typing import Dict
from typing import Any, Dict
from pandas import DataFrame
@@ -67,10 +67,10 @@ Currently, the arguments are:
This function needs to return a floating point number (`float`). Smaller numbers will be interpreted as better results. The parameters and balancing for this is up to you.
!!! Note
This function is called once per iteration - so please make sure to have this as optimized as possible to not slow hyperopt down unnecessarily.
This function is called once per epoch - so please make sure to have this as optimized as possible to not slow hyperopt down unnecessarily.
!!! Note
Please keep the arguments `*args` and `**kwargs` in the interface to allow us to extend this interface later.
!!! Note "`*args` and `**kwargs`"
Please keep the arguments `*args` and `**kwargs` in the interface to allow us to extend this interface in the future.
## Overriding pre-defined spaces
@@ -80,10 +80,77 @@ To override a pre-defined space (`roi_space`, `generate_roi_table`, `stoploss_sp
class MyAwesomeStrategy(IStrategy):
class HyperOpt:
# Define a custom stoploss space.
def stoploss_space(self):
def stoploss_space():
return [SKDecimal(-0.05, -0.01, decimals=3, name='stoploss')]
# Define custom ROI space
def roi_space() -> List[Dimension]:
return [
Integer(10, 120, name='roi_t1'),
Integer(10, 60, name='roi_t2'),
Integer(10, 40, name='roi_t3'),
SKDecimal(0.01, 0.04, decimals=3, name='roi_p1'),
SKDecimal(0.01, 0.07, decimals=3, name='roi_p2'),
SKDecimal(0.01, 0.20, decimals=3, name='roi_p3'),
]
```
!!! Note
All overrides are optional and can be mixed/matched as necessary.
### Overriding Base estimator
You can define your own estimator for Hyperopt by implementing `generate_estimator()` in the Hyperopt subclass.
```python
class MyAwesomeStrategy(IStrategy):
class HyperOpt:
def generate_estimator(dimensions: List['Dimension'], **kwargs):
return "RF"
```
Possible values are either one of "GP", "RF", "ET", "GBRT" (Details can be found in the [scikit-optimize documentation](https://scikit-optimize.github.io/)), or "an instance of a class that inherits from `RegressorMixin` (from sklearn) and where the `predict` method has an optional `return_std` argument, which returns `std(Y | x)` along with `E[Y | x]`".
Some research will be necessary to find additional Regressors.
Example for `ExtraTreesRegressor` ("ET") with additional parameters:
```python
class MyAwesomeStrategy(IStrategy):
class HyperOpt:
def generate_estimator(dimensions: List['Dimension'], **kwargs):
from skopt.learning import ExtraTreesRegressor
# Corresponds to "ET" - but allows additional parameters.
return ExtraTreesRegressor(n_estimators=100)
```
The `dimensions` parameter is the list of `skopt.space.Dimension` objects corresponding to the parameters to be optimized. It can be used to create isotropic kernels for the `skopt.learning.GaussianProcessRegressor` estimator. Here's an example:
```python
class MyAwesomeStrategy(IStrategy):
class HyperOpt:
def generate_estimator(dimensions: List['Dimension'], **kwargs):
from skopt.utils import cook_estimator
from skopt.learning.gaussian_process.kernels import (Matern, ConstantKernel)
kernel_bounds = (0.0001, 10000)
kernel = (
ConstantKernel(1.0, kernel_bounds) *
Matern(length_scale=np.ones(len(dimensions)), length_scale_bounds=[kernel_bounds for d in dimensions], nu=2.5)
)
kernel += (
ConstantKernel(1.0, kernel_bounds) *
Matern(length_scale=np.ones(len(dimensions)), length_scale_bounds=[kernel_bounds for d in dimensions], nu=1.5)
)
return cook_estimator("GP", space=dimensions, kernel=kernel, n_restarts_optimizer=2)
```
!!! Note
While custom estimators can be provided, it's up to you as User to do research on possible parameters and analyze / understand which ones should be used.
If you're unsure about this, best use one of the Defaults (`"ET"` has proven to be the most versatile) without further parameters.
## Space options
For the additional spaces, scikit-optimize (in combination with Freqtrade) provides the following space types:
@@ -105,281 +172,3 @@ from freqtrade.optimize.space import Categorical, Dimension, Integer, SKDecimal,
Assuming the definition of a rather small space (`SKDecimal(0.10, 0.15, decimals=2, name='xxx')`) - SKDecimal will have 5 possibilities (`[0.10, 0.11, 0.12, 0.13, 0.14, 0.15]`).
A corresponding real space `Real(0.10, 0.15 name='xxx')` on the other hand has an almost unlimited number of possibilities (`[0.10, 0.010000000001, 0.010000000002, ... 0.014999999999, 0.01500000000]`).
---
## Legacy Hyperopt
This Section explains the configuration of an explicit Hyperopt file (separate to the strategy).
!!! Warning "Deprecated / legacy mode"
Since the 2021.4 release you no longer have to write a separate hyperopt class, but all strategies can be hyperopted.
Please read the [main hyperopt page](hyperopt.md) for more details.
### Prepare hyperopt file
Configuring an explicit hyperopt file is similar to writing your own strategy, and many tasks will be similar.
!!! Tip "About this page"
For this page, we will be using a fictional strategy called `AwesomeStrategy` - which will be optimized using the `AwesomeHyperopt` class.
#### Create a Custom Hyperopt File
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`.
Let assume you want a hyperopt file `AwesomeHyperopt.py`:
``` bash
freqtrade new-hyperopt --hyperopt AwesomeHyperopt
```
#### Legacy Hyperopt checklist
Checklist on all tasks / possibilities in hyperopt
Depending on the space you want to optimize, only some of the below are required:
* fill `buy_strategy_generator` - for buy signal optimization
* fill `indicator_space` - for buy signal optimization
* fill `sell_strategy_generator` - for sell signal optimization
* fill `sell_indicator_space` - for sell signal optimization
!!! Note
`populate_indicators` needs to create all indicators any of thee spaces may use, otherwise hyperopt will not work.
Optional in hyperopt - can also be loaded from a strategy (recommended):
* `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:
* `roi_space` - for custom ROI optimization (if you need the ranges for the ROI parameters in the optimization hyperspace that differ from default)
* `generate_roi_table` - for custom ROI optimization (if you need the ranges for the values in the ROI table that differ from default or the number of entries (steps) in the ROI table which differs from the default 4 steps)
* `stoploss_space` - for custom stoploss optimization (if you need the range for the stoploss parameter in the optimization hyperspace that differs from default)
* `trailing_space` - for custom trailing stop optimization (if you need the ranges for the trailing stop parameters in the optimization hyperspace that differ from default)
#### Defining a buy signal optimization
Let's say you are curious: should you use MACD crossings or lower Bollinger
Bands to trigger your buys. And you also wonder should you use RSI or ADX to
help with those buy decisions. If you decide to use RSI or ADX, which values
should I use for them? So let's use hyperparameter optimization to solve this
mystery.
We will start by defining a search space:
```python
def indicator_space() -> List[Dimension]:
"""
Define your Hyperopt space for searching strategy parameters
"""
return [
Integer(20, 40, name='adx-value'),
Integer(20, 40, name='rsi-value'),
Categorical([True, False], name='adx-enabled'),
Categorical([True, False], name='rsi-enabled'),
Categorical(['bb_lower', 'macd_cross_signal'], name='trigger')
]
```
Above definition says: I have five parameters I want you to randomly combine
to find the best combination. Two of them are integer values (`adx-value` and `rsi-value`) and I want you test in the range of values 20 to 40.
Then we have three category variables. First two are either `True` or `False`.
We use these to either enable or disable the ADX and RSI guards.
The last one we call `trigger` and use it to decide which buy trigger we want to use.
So let's write the buy strategy generator 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, metadata: dict) -> DataFrame:
conditions = []
# GUARDS AND TRENDS
if 'adx-enabled' in params and params['adx-enabled']:
conditions.append(dataframe['adx'] > params['adx-value'])
if 'rsi-enabled' in params and params['rsi-enabled']:
conditions.append(dataframe['rsi'] < params['rsi-value'])
# TRIGGERS
if 'trigger' in params:
if params['trigger'] == 'bb_lower':
conditions.append(dataframe['close'] < dataframe['bb_lowerband'])
if params['trigger'] == 'macd_cross_signal':
conditions.append(qtpylib.crossed_above(
dataframe['macd'], dataframe['macdsignal']
))
# Check that volume is not 0
conditions.append(dataframe['volume'] > 0)
if conditions:
dataframe.loc[
reduce(lambda x, y: x & y, conditions),
'buy'] = 1
return dataframe
return populate_buy_trend
```
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 strategy or hyperopt file.
#### Sell optimization
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.
* 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-`.
### Execute Hyperopt
Once you have updated your hyperopt configuration you can run it.
Because hyperopt tries a lot of combinations to find the best parameters it will take time to get a good result. More time usually results in better results.
We strongly recommend to use `screen` or `tmux` to prevent any connection loss.
```bash
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. 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
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/`.
#### Running Hyperopt using methods from a strategy
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 --hyperopt AwesomeHyperopt --hyperopt-loss SharpeHyperOptLossDaily --strategy AwesomeStrategy
```
### Understand the Hyperopt Result
Once Hyperopt is completed you can use the result to create a new strategy.
Given the following result from hyperopt:
```
Best result:
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722%). Avg duration 180.4 mins. Objective: 1.94367
Buy hyperspace params:
{ 'adx-value': 44,
'rsi-value': 29,
'adx-enabled': False,
'rsi-enabled': True,
'trigger': 'bb_lower'}
```
You should understand this result like:
* The buy trigger that worked best was `bb_lower`.
* You should not use ADX because `adx-enabled: False`)
* You should **consider** using the RSI indicator (`rsi-enabled: True` and the best value is `29.0` (`rsi-value: 29.0`)
You have to look inside your strategy file into `buy_strategy_generator()`
method, what those values match to.
So for example you had `rsi-value: 29.0` so we would look at `rsi`-block, that translates to the following code block:
```python
(dataframe['rsi'] < 29.0)
```
Translating your whole hyperopt result as the new buy-signal would then look like:
```python
def populate_buy_trend(self, dataframe: DataFrame) -> DataFrame:
dataframe.loc[
(
(dataframe['rsi'] < 29.0) & # rsi-value
dataframe['close'] < dataframe['bb_lowerband'] # trigger
),
'buy'] = 1
return dataframe
```
### Validate backtesting results
Once the optimized parameters and conditions have been implemented into your strategy, you should backtest the 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 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`).
### Sharing methods with your strategy
Hyperopt classes provide access to the Strategy via the `strategy` class attribute.
This can be a great way to reduce code duplication if used correctly, but will also complicate usage for inexperienced users.
``` python
from pandas import DataFrame
from freqtrade.strategy.interface import IStrategy
import freqtrade.vendor.qtpylib.indicators as qtpylib
class MyAwesomeStrategy(IStrategy):
buy_params = {
'rsi-value': 30,
'adx-value': 35,
}
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
return self.buy_strategy_generator(self.buy_params, dataframe, metadata)
@staticmethod
def buy_strategy_generator(params, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
qtpylib.crossed_above(dataframe['rsi'], params['rsi-value']) &
dataframe['adx'] > params['adx-value']) &
dataframe['volume'] > 0
)
, 'buy'] = 1
return dataframe
class MyAwesomeHyperOpt(IHyperOpt):
...
@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, metadata: dict) -> DataFrame:
# Call strategy's buy strategy generator
return self.StrategyClass.buy_strategy_generator(params, dataframe, metadata)
return populate_buy_trend
```

View File

@@ -52,6 +52,71 @@ freqtrade trade -c MyConfigUSDT.json -s MyCustomStrategy --db-url sqlite:///user
For more information regarding usage of the sqlite databases, for example to manually enter or remove trades, please refer to the [SQL Cheatsheet](sql_cheatsheet.md).
### Multiple instances using docker
To run multiple instances of freqtrade using docker you will need to edit the docker-compose.yml file and add all the instances you want as separate services. Remember, you can separate your configuration into multiple files, so it's a good idea to think about making them modular, then if you need to edit something common to all bots, you can do that in a single config file.
``` yml
---
version: '3'
services:
freqtrade1:
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: "./docker/Dockerfile.custom"
restart: always
container_name: freqtrade1
volumes:
- "./user_data:/freqtrade/user_data"
# Expose api on port 8080 (localhost only)
# Please read the https://www.freqtrade.io/en/latest/rest-api/ documentation
# before enabling this.
ports:
- "127.0.0.1:8080:8080"
# Default command used when running `docker compose up`
command: >
trade
--logfile /freqtrade/user_data/logs/freqtrade1.log
--db-url sqlite:////freqtrade/user_data/tradesv3_freqtrade1.sqlite
--config /freqtrade/user_data/config.json
--config /freqtrade/user_data/config.freqtrade1.json
--strategy SampleStrategy
freqtrade2:
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: "./docker/Dockerfile.custom"
restart: always
container_name: freqtrade2
volumes:
- "./user_data:/freqtrade/user_data"
# Expose api on port 8080 (localhost only)
# Please read the https://www.freqtrade.io/en/latest/rest-api/ documentation
# before enabling this.
ports:
- "127.0.0.1:8081:8080"
# Default command used when running `docker compose up`
command: >
trade
--logfile /freqtrade/user_data/logs/freqtrade2.log
--db-url sqlite:////freqtrade/user_data/tradesv3_freqtrade2.sqlite
--config /freqtrade/user_data/config.json
--config /freqtrade/user_data/config.freqtrade2.json
--strategy SampleStrategy
```
You can use whatever naming convention you want, freqtrade1 and 2 are arbitrary. Note, that you will need to use different database files, port mappings and telegram configurations for each instance, as mentioned above.
## Configure the bot running as a systemd service
Copy the `freqtrade.service` file to your systemd user directory (usually `~/.config/systemd/user`) and update `WorkingDirectory` and `ExecStart` to match your setup.
@@ -111,12 +176,15 @@ Log messages are send to `syslog` with the `user` facility. So you can see them
On many systems `syslog` (`rsyslog`) fetches data from `journald` (and vice versa), so both `--logfile syslog` or `--logfile journald` can be used and the messages be viewed with both `journalctl` and a syslog viewer utility. You can combine this in any way which suites you better.
For `rsyslog` the messages from the bot can be redirected into a separate dedicated log file. To achieve this, add
```
if $programname startswith "freqtrade" then -/var/log/freqtrade.log
```
to one of the rsyslog configuration files, for example at the end of the `/etc/rsyslog.d/50-default.conf`.
For `syslog` (`rsyslog`), the reduction mode can be switched on. This will reduce the number of repeating messages. For instance, multiple bot Heartbeat messages will be reduced to a single message when nothing else happens with the bot. To achieve this, set in `/etc/rsyslog.conf`:
```
# Filter duplicated messages
$RepeatedMsgReduction on

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
docs/assets/frequi_url.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -18,18 +18,21 @@ usage: freqtrade backtesting [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-p PAIRS [PAIRS ...]] [--eps] [--dmmp]
[--enable-protections]
[--dry-run-wallet DRY_RUN_WALLET]
[--timeframe-detail TIMEFRAME_DETAIL]
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
[--export {none,trades}] [--export-filename PATH]
[--breakdown {day,week,month} [{day,week,month} ...]]
[--cache {none,day,week,month}]
optional arguments:
-h, --help show this help message and exit
-i TIMEFRAME, --timeframe TIMEFRAME, --ticker-interval TIMEFRAME
-i TIMEFRAME, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `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`).
(default: `json`).
--max-open-trades INT
Override the value of the `max_open_trades`
configuration setting.
@@ -55,14 +58,16 @@ optional arguments:
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
Starting balance, used for backtesting / hyperopt and
dry-runs.
--timeframe-detail TIMEFRAME_DETAIL
Specify detail timeframe for backtesting (`1m`, `5m`,
`30m`, `1h`, `1d`).
--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]
Provide a space-separated list of strategies to
backtest. Please note that ticker-interval needs to be
backtest. Please note that timeframe needs to be
set either in config or via command line. When using
this together with `--export trades`, the strategy-
name is injected into the filename (so `backtest-
data.json` becomes `backtest-data-
SampleStrategy.json`
data.json` becomes `backtest-data-SampleStrategy.json`
--export {none,trades}
Export backtest results (default: trades).
--export-filename PATH
@@ -70,6 +75,11 @@ optional arguments:
Requires `--export` to be set as well. Example:
`--export-filename=user_data/backtest_results/backtest
_today.json`
--breakdown {day,week,month} [{day,week,month} ...]
Show backtesting breakdown per [day, week, month].
--cache {none,day,week,month}
Load a cached backtest result no older than specified
age (default: day).
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
@@ -109,7 +119,7 @@ The result of backtesting will confirm if your bot has better odds of making a p
All profit calculations include fees, and freqtrade will use the exchange's default fees for the calculation.
!!! Warning "Using dynamic pairlists for backtesting"
Using dynamic pairlists is possible, however it relies on the current market conditions - which will not reflect the historic status of the pairlist.
Using dynamic pairlists is possible (not all of the handlers are allowed to be used in backtest mode), however it relies on the current market conditions - which will not reflect the historic status of the pairlist.
Also, when using pairlists other than StaticPairlist, reproducibility of backtesting-results cannot be guaranteed.
Please read the [pairlists documentation](plugins.md#pairlists) for more information.
@@ -303,10 +313,11 @@ A backtesting result will look like that:
| Avg. Duration Winners | 4:23:00 |
| Avg. Duration Loser | 6:55:00 |
| Rejected Buy signals | 3089 |
| Entry/Exit Timeouts | 0 / 0 |
| | |
| Min balance | 0.00945123 BTC |
| Max balance | 0.01846651 BTC |
| Drawdown | 50.63% |
| Drawdown (Account) | 13.33% |
| Drawdown | 0.0015 BTC |
| Drawdown high | 0.0013 BTC |
| Drawdown low | -0.0002 BTC |
@@ -390,10 +401,11 @@ It contains some useful key metrics about performance of your strategy on backte
| Avg. Duration Winners | 4:23:00 |
| Avg. Duration Loser | 6:55:00 |
| Rejected Buy signals | 3089 |
| Entry/Exit Timeouts | 0 / 0 |
| | |
| Min balance | 0.00945123 BTC |
| Max balance | 0.01846651 BTC |
| Drawdown | 50.63% |
| Drawdown (Account) | 13.33% |
| Drawdown | 0.0015 BTC |
| Drawdown high | 0.0013 BTC |
| Drawdown low | -0.0002 BTC |
@@ -419,13 +431,53 @@ It contains some useful key metrics about performance of your strategy on backte
- `Days win/draw/lose`: Winning / Losing days (draws are usually days without closed trade).
- `Avg. Duration Winners` / `Avg. Duration Loser`: Average durations for winning and losing trades.
- `Rejected Buy signals`: Buy signals that could not be acted upon due to max_open_trades being reached.
- `Entry/Exit Timeouts`: Entry/exit orders which did not fill (only applicable if custom pricing is used).
- `Min balance` / `Max balance`: Lowest and Highest Wallet balance during the backtest period.
- `Drawdown`: Maximum drawdown experienced. For example, the value of 50% means that from highest to subsequent lowest point, a 50% drop was experienced).
- `Drawdown (Account)`: Maximum Account Drawdown experienced. Calculated as $(Absolute Drawdown) / (DrawdownHigh + startingBalance)$.
- `Drawdown`: Maximum, absolute drawdown experienced. Difference between Drawdown High and Subsequent Low point.
- `Drawdown high` / `Drawdown low`: Profit at the beginning and end of the largest drawdown period. A negative low value means initial capital lost.
- `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
### Daily / Weekly / Monthly breakdown
You can get an overview over daily / weekly or monthly results by using the `--breakdown <>` switch.
To visualize daily and weekly breakdowns, you can use the following:
``` bash
freqtrade backtesting --strategy MyAwesomeStrategy --breakdown day month
```
``` output
======================== DAY BREAKDOWN =========================
| Day | Tot Profit USDT | Wins | Draws | Losses |
|------------+-------------------+--------+---------+----------|
| 03/07/2021 | 200.0 | 2 | 0 | 0 |
| 04/07/2021 | -50.31 | 0 | 0 | 2 |
| 05/07/2021 | 220.611 | 3 | 2 | 0 |
| 06/07/2021 | 150.974 | 3 | 0 | 2 |
| 07/07/2021 | -70.193 | 1 | 0 | 2 |
| 08/07/2021 | 212.413 | 2 | 0 | 3 |
```
The output will show a table containing the realized absolute Profit (in stake currency) for the given timeperiod, as well as wins, draws and losses that materialized (closed) on this day.
### Backtest result caching
To save time, by default backtest will reuse a cached result from within the last day when the backtested strategy and config match that of a previous backtest. To force a new backtest despite existing result for an identical run specify `--cache none` parameter.
!!! Warning
Caching is automatically disabled for open-ended timeranges (`--timerange 20210101-`), as freqtrade cannot ensure reliably that the underlying data didn't change. It can also use cached results where it shouldn't if the original backtest had missing data at the end, which was fixed by downloading more data.
In this instance, please use `--cache none` once to force a fresh backtest.
### Further backtest-result analysis
To further analyze your backtest results, you can [export the trades](#exporting-trades-to-file).
You can then load the trades to perform further analysis as shown in the [data analysis](data-analysis.md#backtesting) backtesting section.
## Assumptions made by backtesting
Since backtesting lacks some detailed information about what happens within a candle, it needs to take a few assumptions:
@@ -442,13 +494,14 @@ Since backtesting lacks some detailed information about what happens within a ca
- Low happens before high for stoploss, protecting capital first
- Trailing stoploss
- Trailing Stoploss is only adjusted if it's below the candle's low (otherwise it would be triggered)
- On trade entry candles that trigger trailing stoploss, the "minimum offset" (`stop_positive_offset`) is assumed (instead of high) - and the stop is calculated from this point
- 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)
- Evaluation sequence (if multiple signals happen on the same candle)
- ROI (if not stoploss)
- Sell-signal
- ROI (if not stoploss)
- 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.
@@ -456,10 +509,30 @@ Also, keep in mind that past results don't guarantee future success.
In addition to the above assumptions, strategy authors should carefully read the [Common Mistakes](strategy-customization.md#common-mistakes-when-developing-strategies) section, to avoid using data in backtesting which is not available in real market conditions.
### Further backtest-result analysis
### Improved backtest accuracy
To further analyze your backtest results, you can [export the trades](#exporting-trades-to-file).
You can then load the trades to perform further analysis as shown in our [data analysis](data-analysis.md#backtesting) backtesting section.
One big limitation of backtesting is it's inability to know how prices moved intra-candle (was high before close, or viceversa?).
So assuming you run backtesting with a 1h timeframe, there will be 4 prices for that candle (Open, High, Low, Close).
While backtesting does take some assumptions (read above) about this - this can never be perfect, and will always be biased in one way or the other.
To mitigate this, freqtrade can use a lower (faster) timeframe to simulate intra-candle movements.
To utilize this, you can append `--timeframe-detail 5m` to your regular backtesting command.
``` bash
freqtrade backtesting --strategy AwesomeStrategy --timeframe 1h --timeframe-detail 5m
```
This will load 1h data as well as 5m data for the timeframe. The strategy will be analyzed with the 1h timeframe - and for every "open trade candle" (candles where a trade is open) the 5m data will be used to simulate intra-candle movements.
All callback functions (`custom_sell()`, `custom_stoploss()`, ... ) will be running for each 5m candle once the trade is opened (so 12 times in the above example of 1h timeframe, and 5m detailed timeframe).
`--timeframe-detail` must be smaller than the original timeframe, otherwise backtesting will fail to start.
Obviously this will require more memory (5m data is bigger than 1h data), and will also impact runtime (depending on the amount of trades and trade durations).
Also, data must be available / downloaded already.
!!! Tip
You can use this function as the last part of strategy development, to ensure your strategy is not exploiting one of the [backtesting assumptions](#assumptions-made-by-backtesting). Strategies that perform similarly well with this mode have a good chance to perform well in dry/live modes too (although only forward-testing (dry-mode) can really confirm a strategy).
## Backtesting multiple strategies

View File

@@ -7,7 +7,7 @@ This page provides you some basic concepts on how Freqtrade works and operates.
* **Strategy**: Your trading strategy, telling the bot what to do.
* **Trade**: Open position.
* **Open Order**: Order which is currently placed on the exchange, and is not yet complete.
* **Pair**: Tradable pair, usually in the format of Quote/Base (e.g. XRP/USDT).
* **Pair**: Tradable pair, usually in the format of Base/Quote (e.g. XRP/USDT).
* **Timeframe**: Candle length to use (e.g. `"5m"`, `"1h"`, ...).
* **Indicators**: Technical indicators (SMA, EMA, RSI, ...).
* **Limit order**: Limit orders which execute at the defined limit price or better.
@@ -24,7 +24,7 @@ By default, loop runs every few seconds (`internals.process_throttle_secs`) and
* Fetch open trades from persistence.
* Calculate current list of tradable pairs.
* Download ohlcv data for the pairlist including all [informative pairs](strategy-customization.md#get-data-for-non-tradeable-pairs)
* Download OHLCV data for the pairlist including all [informative pairs](strategy-customization.md#get-data-for-non-tradeable-pairs)
This step is only executed once per Candle to avoid unnecessary network traffic.
* Call `bot_loop_start()` strategy callback.
* Analyze strategy per pair.
@@ -38,6 +38,7 @@ By default, loop runs every few seconds (`internals.process_throttle_secs`) and
* Considers stoploss, ROI and sell-signal, `custom_sell()` and `custom_stoploss()`.
* Determine sell-price based on `ask_strategy` configuration setting or by using the `custom_exit_price()` callback.
* Before a sell order is placed, `confirm_trade_exit()` strategy callback is called.
* Check position adjustments for open trades if enabled by calling `adjust_trade_position()` and place additional order if required.
* Check if trade-slots are still available (if `max_open_trades` is reached).
* Verifies buy signal trying to enter new positions.
* Determine buy-price based on `bid_strategy` configuration setting, or by using the `custom_entry_price()` callback.
@@ -56,7 +57,12 @@ This loop will be repeated again and again until the bot is stopped.
* Calculate buy / sell signals (calls `populate_buy_trend()` and `populate_sell_trend()` once per pair).
* Loops per candle simulating entry and exit points.
* Confirm trade buy / sell (calls `confirm_trade_entry()` and `confirm_trade_exit()` if implemented in the strategy).
* Call `custom_entry_price()` (if implemented in the strategy) to determine entry price (Prices are moved to be within the opening candle).
* Determine stake size by calling the `custom_stake_amount()` callback.
* Check position adjustments for open trades if enabled and call `adjust_trade_position()` to determine if an additional order is requested.
* Call `custom_stoploss()` and `custom_sell()` to find custom exit points.
* For sells based on sell-signal and custom-sell: Call `custom_exit_price()` to determine exit price (Prices are moved to be within the closing candle).
* Check for Order timeouts, either via the `unfilledtimeout` configuration, or via `check_buy_timeout()` / `check_sell_timeout()` strategy callbacks.
* Generate backtest report output
!!! Note

View File

@@ -12,22 +12,22 @@ This page explains the different parameters of the bot and how to run it.
```
usage: freqtrade [-h] [-V]
{trade,create-userdir,new-config,new-hyperopt,new-strategy,download-data,convert-data,convert-trade-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-hyperopts,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,plot-dataframe,plot-profit}
{trade,create-userdir,new-config,new-strategy,download-data,convert-data,convert-trade-data,list-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-hyperopts,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,install-ui,plot-dataframe,plot-profit,webserver}
...
Free, open source crypto trading bot
positional arguments:
{trade,create-userdir,new-config,new-hyperopt,new-strategy,download-data,convert-data,convert-trade-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-hyperopts,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,plot-dataframe,plot-profit}
{trade,create-userdir,new-config,new-strategy,download-data,convert-data,convert-trade-data,list-data,backtesting,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-hyperopts,list-markets,list-pairs,list-strategies,list-timeframes,show-trades,test-pairlist,install-ui,plot-dataframe,plot-profit,webserver}
trade Trade module.
create-userdir Create user-data directory.
new-config Create new config
new-hyperopt Create new hyperopt
new-strategy Create new strategy
download-data Download backtesting data.
convert-data Convert candle (OHLCV) data from one format to
another.
convert-trade-data Convert trade data from one format to another.
list-data List downloaded data.
backtesting Backtesting module.
edge Edge module.
hyperopt Hyperopt module.
@@ -41,8 +41,10 @@ positional arguments:
list-timeframes Print available timeframes for the exchange.
show-trades Show trades.
test-pairlist Test your pairlist configuration.
install-ui Install FreqUI
plot-dataframe Plot candles with indicators.
plot-profit Generate plot showing profits.
webserver Webserver module.
optional arguments:
-h, --help show this help message and exit

View File

@@ -37,6 +37,15 @@ Using this scheme, all configuration settings will also be available as environm
Please note that Environment variables will overwrite corresponding settings in your configuration, but command line Arguments will always win.
Common example:
```
FREQTRADE__TELEGRAM__CHAT_ID=<telegramchatid>
FREQTRADE__TELEGRAM__TOKEN=<telegramToken>
FREQTRADE__EXCHANGE__KEY=<yourExchangeKey>
FREQTRADE__EXCHANGE__SECRET=<yourExchangeSecret>
```
!!! Note
Environment variables detected are logged at startup - so if you can't find why a value is not what you think it should be based on the configuration, make sure it's not loaded from an environment variable.
@@ -77,7 +86,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi
| `amend_last_stake_amount` | Use reduced last stake amount if necessary. [More information below](#configuring-amount-per-trade). <br>*Defaults to `false`.* <br> **Datatype:** Boolean
| `last_stake_amount_min_ratio` | Defines minimum stake amount that has to be left and executed. Applies only to the last stake amount when it's amended to a reduced value (i.e. if `amend_last_stake_amount` is set to `true`). [More information below](#configuring-amount-per-trade). <br>*Defaults to `0.5`.* <br> **Datatype:** Float (as ratio)
| `amount_reserve_percent` | Reserve some amount in min pair stake amount. The bot will reserve `amount_reserve_percent` + stoploss value when calculating min pair stake amount in order to avoid possible trade refusals. <br>*Defaults to `0.05` (5%).* <br> **Datatype:** Positive Float as ratio.
| `timeframe` | The timeframe (former ticker interval) to use (e.g `1m`, `5m`, `15m`, `30m`, `1h` ...). [Strategy Override](#parameters-in-the-strategy). <br> **Datatype:** String
| `timeframe` | The timeframe to use (e.g `1m`, `5m`, `15m`, `30m`, `1h` ...). [Strategy Override](#parameters-in-the-strategy). <br> **Datatype:** String
| `fiat_display_currency` | Fiat currency used to show your profits. [More information below](#what-values-can-be-used-for-fiat_display_currency). <br> **Datatype:** String
| `dry_run` | **Required.** Define if the bot must be in Dry Run or production mode. <br>*Defaults to `true`.* <br> **Datatype:** Boolean
| `dry_run_wallet` | Define the starting amount in stake currency for the simulated wallet used by the bot running in Dry Run mode.<br>*Defaults to `1000`.* <br> **Datatype:** Float
@@ -93,6 +102,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi
| `unfilledtimeout.buy` | **Required.** How long (in minutes or seconds) 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 or seconds) 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
| `unfilledtimeout.unit` | Unit to use in unfilledtimeout setting. Note: If you set unfilledtimeout.unit to "seconds", "internals.process_throttle_secs" must be inferior or equal to timeout [Strategy Override](#parameters-in-the-strategy). <br> *Defaults to `minutes`.* <br> **Datatype:** String
| `unfilledtimeout.exit_timeout_count` | How many times can exit orders time out. Once this number of timeouts is reached, an emergency sell is triggered. 0 to disable and allow unlimited order cancels. [Strategy Override](#parameters-in-the-strategy).<br>*Defaults to `0`.* <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.** Interpolate 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
@@ -116,14 +126,16 @@ Mandatory parameters are marked as **Required**, which means that they are requi
| `exchange.key` | API key to use for the exchange. Only required when you are in production mode.<br>**Keep it in secret, do not disclose publicly.** <br> **Datatype:** String
| `exchange.secret` | API secret to use for the exchange. Only required when you are in production mode.<br>**Keep it in secret, do not disclose publicly.** <br> **Datatype:** String
| `exchange.password` | API password to use for the exchange. Only required when you are in production mode and for exchanges that use password for API requests.<br>**Keep it in secret, do not disclose publicly.** <br> **Datatype:** String
| `exchange.uid` | API uid to use for the exchange. Only required when you are in production mode and for exchanges that use uid for API requests.<br>**Keep it in secret, do not disclose publicly.** <br> **Datatype:** String
| `exchange.pair_whitelist` | List of pairs to use by the bot for trading and to check for potential trades during backtesting. Supports regex pairs as `.*/BTC`. Not used by VolumePairList. [More information](plugins.md#pairlists-and-pairlist-handlers). <br> **Datatype:** List
| `exchange.pair_blacklist` | List of pairs the bot must absolutely avoid for trading and backtesting. [More information](plugins.md#pairlists-and-pairlist-handlers). <br> **Datatype:** List
| `exchange.ccxt_config` | Additional CCXT parameters passed to both ccxt instances (sync and async). This is usually the correct place for ccxt configurations. 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_config` | Additional CCXT parameters passed to both ccxt instances (sync and async). This is usually the correct place for additional ccxt configurations. Parameters may differ from exchange to exchange and are documented in the [ccxt documentation](https://ccxt.readthedocs.io/en/latest/manual.html#instantiation). Please avoid adding exchange secrets here (use the dedicated fields instead), as they may be contained in logs. <br> **Datatype:** Dict
| `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
| `exchange.skip_open_order_update` | Skips open order updates on startup should the exchange cause problems. Only relevant in live conditions.<br>*Defaults to `false`<br> **Datatype:** Boolean
| `exchange.unknown_fee_rate` | Fallback value to use when calculating trading fees. This can be useful for exchanges which have fees in non-tradable currencies. The value provided here will be multiplied with the "fee cost".<br>*Defaults to `None`<br> **Datatype:** float
| `exchange.log_responses` | Log relevant exchange responses. For debug mode only - use with care.<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
@@ -160,6 +172,8 @@ Mandatory parameters are marked as **Required**, which means that they are requi
| `user_data_dir` | Directory containing user data. <br> *Defaults to `./user_data/`*. <br> **Datatype:** String
| `dataformat_ohlcv` | Data format to use to store historical candle (OHLCV) data. <br> *Defaults to `json`*. <br> **Datatype:** String
| `dataformat_trades` | Data format to use to store historical trades data. <br> *Defaults to `jsongz`*. <br> **Datatype:** String
| `position_adjustment_enable` | Enables the strategy to use position adjustments (additional buys or sells). [More information here](strategy-callbacks.md#adjust-trade-position). <br> [Strategy Override](#parameters-in-the-strategy). <br>*Defaults to `false`.*<br> **Datatype:** Boolean
| `max_entry_position_adjustment` | Maximum additional order(s) for each open trade on top of the first entry Order. Set it to `-1` for unlimited additional orders. [More information here](strategy-callbacks.md#adjust-trade-position). <br> [Strategy Override](#parameters-in-the-strategy). <br>*Defaults to `-1`.*<br> **Datatype:** Positive Integer or -1
### Parameters in the strategy
@@ -184,6 +198,8 @@ Values set in the configuration file always overwrite values set in the strategy
* `sell_profit_offset`
* `ignore_roi_if_buy_signal`
* `ignore_buying_expired_candle_after`
* `position_adjustment_enable`
* `max_entry_position_adjustment`
### Configuring amount per trade
@@ -192,9 +208,8 @@ There are several methods to configure how much of the stake currency the bot wi
#### Minimum trade stake
The minimum stake amount will depend on exchange and pair and is usually listed in the exchange support pages.
Assuming the minimum tradable amount for XRP/USD is 20 XRP (given by the exchange), and the price is 0.6$.
The minimum stake amount to buy this pair is, therefore, `20 * 0.6 ~= 12`.
Assuming the minimum tradable amount for XRP/USD is 20 XRP (given by the exchange), and the price is 0.6$, the minimum stake amount to buy this pair is `20 * 0.6 ~= 12`.
This exchange has also a limit on USD - where all orders must be > 10$ - which however does not apply in this case.
To guarantee safe execution, freqtrade will not allow buying with a stake-amount of 10.1$, instead, it'll make sure that there's enough space to place a stoploss below the pair (+ an offset, defined by `amount_reserve_percent`, which defaults to 5%).
@@ -204,7 +219,7 @@ With a reserve of 5%, the minimum stake amount would be ~12.6$ (`12 * (1 + 0.05)
To limit this calculation in case of large stoploss values, the calculated minimum stake-limit will never be more than 50% above the real limit.
!!! Warning
Since the limits on exchanges are usually stable and are not updated often, some pairs can show pretty high minimum limits, simply because the price increased a lot since the last limit adjustment by the exchange.
Since the limits on exchanges are usually stable and are not updated often, some pairs can show pretty high minimum limits, simply because the price increased a lot since the last limit adjustment by the exchange. Freqtrade adjusts the stake-amount to this value, unless it's > 30% more than the calculated/desired stake-amount - in which case the trade is rejected.
#### Tradable balance
@@ -291,6 +306,15 @@ To allow the bot to trade all the available `stake_currency` in your account (mi
When using `"stake_amount" : "unlimited",` in combination with Dry-Run, Backtesting or Hyperopt, the balance will be simulated starting with a stake of `dry_run_wallet` which will evolve.
It is therefore important to set `dry_run_wallet` to a sensible value (like 0.05 or 0.01 for BTC and 1000 or 100 for USDT, for example), otherwise, it may simulate trades with 100 BTC (or more) or 0.05 USDT (or less) at once - which may not correspond to your real available balance or is less than the exchange minimal limit for the order amount for the stake currency.
#### Dynamic stake amount with position adjustment
When you want to use position adjustment with unlimited stakes, you must also implement `custom_stake_amount` to a return a value depending on your strategy.
Typical value would be in the range of 25% - 50% of the proposed stakes, but depends highly on your strategy and how much you wish to leave into the wallet as position adjustment buffer.
For example if your position adjustment assumes it can do 2 additional buys with the same stake amounts then your buffer should be 66.6667% of the initially proposed unlimited stake amount.
Or another example if your position adjustment assumes it can do 1 additional buy with 3x the original stake amount then `custom_stake_amount` should return 25% of proposed stake amount and leave 75% for possible later position adjustments.
--8<-- "includes/pricing.md"
### Understand minimal_roi
@@ -444,47 +468,8 @@ The possible values are: `gtc` (default), `fok` or `ioc`.
```
!!! Warning
This is ongoing work. For now, it is supported only for binance.
Please don't change the default value unless you know what you are doing and have researched the impact of using different values.
### Exchange configuration
Freqtrade is based on [CCXT library](https://github.com/ccxt/ccxt) that supports over 100 cryptocurrency
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 these are the only officially supported exchanges:
- [Bittrex](https://bittrex.com/): "bittrex"
- [Binance](https://www.binance.com/): "binance"
- [Kraken](https://kraken.com/): "kraken"
Feel free to test other exchanges and submit your PR to improve the bot.
Some exchanges require special configuration, which can be found on the [Exchange-specific Notes](exchanges.md) documentation page.
#### Sample exchange configuration
A exchange configuration for "binance" would look as follows:
```json
"exchange": {
"name": "binance",
"key": "your_exchange_key",
"secret": "your_exchange_secret",
"ccxt_config": {"enableRateLimit": true},
"ccxt_async_config": {
"enableRateLimit": true,
"rateLimit": 200
},
```
This configuration enables binance, as well as rate-limiting to avoid bans from the exchange.
`"rateLimit": 200` defines a wait-event of 0.2s between each call. This can also be completely disabled by setting `"enableRateLimit"` to false.
!!! Note
Optimal settings for rate-limiting depend on the exchange and the size of the whitelist, so an ideal parameter will vary on many other settings.
We try to provide sensible defaults per exchange where possible, if you encounter bans please make sure that `"enableRateLimit"` is enabled and increase the `"rateLimit"` parameter step by step.
This is ongoing work. For now, it is supported only for binance and kucoin.
Please don't change the default value unless you know what you are doing and have researched the impact of using different values for your particular exchange.
### What values can be used for fiat_display_currency?

View File

@@ -1,6 +1,6 @@
# Analyzing bot data with Jupyter notebooks
# 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/` after initializing the user directory with `freqtrade create-userdir --userdir user_data`.
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`.
## Quick start with docker
@@ -41,32 +41,35 @@ ipython kernel install --user --name=freqtrade
!!! 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
## Recommended workflow
| Task | Tool |
--- | ---
Bot operations | CLI
| Task | Tool |
--- | ---
Bot operations | CLI
Repetitive tasks | Shell scripts
Data analysis & visualization | Notebook
Data analysis & visualization | Notebook
1. Use the CLI to
* download historical data
* run a backtest
* run with real-time data
* export results
* export results
1. Collect these actions in shell scripts
* save complicated commands with arguments
* execute multi-step operations
* execute multi-step operations
* automate testing strategies and preparing data for analysis
1. Use a notebook to
* visualize data
* munge and plot to generate insights
* mangle and plot to generate insights
## Example utility snippets
## Example utility snippets
### Change directory to root
### Change directory to root
Jupyter notebooks execute from the notebook directory. The following snippet searches for the project root, so relative paths remain consistent.

View File

@@ -11,7 +11,7 @@ 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, do not use `--days` or `--timerange` parameters. Freqtrade will keep the available data and only download the missing data.
If you already have backtesting data available in your data-directory and would like to refresh this data up to today, freqtrade will automatically calculate the data missing for the existing pairs and the download will occur from the latest available point until "now", neither --days or --timerange parameters are required. Freqtrade will keep the available data and only download the missing data.
If you are updating existing data after inserting new pairs that you have no data for, use `--new-pairs-days xx` parameter. Specified number of days will be downloaded for new pairs while old pairs will be updated with missing data only.
If you use `--days xx` parameter alone - data for specified number of days will be downloaded for _all_ pairs. Be careful, if specified number of days is smaller than gap between now and last downloaded candle - freqtrade will delete all existing data to avoid gaps in candle data.
@@ -22,6 +22,7 @@ usage: freqtrade download-data [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]] [--pairs-file FILE]
[--days INT] [--new-pairs-days INT]
[--include-inactive-pairs]
[--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} ...]]
@@ -38,6 +39,8 @@ optional arguments:
--days INT Download data for given number of days.
--new-pairs-days INT Download data of new pairs for given number of days.
Default: `None`.
--include-inactive-pairs
Also download data from inactive pairs.
--timerange TIMERANGE
Specify what timerange of data to use.
--dl-trades Download trades instead of OHLCV data. The bot will
@@ -52,10 +55,10 @@ optional arguments:
exchange/pairs/timeframes.
--data-format-ohlcv {json,jsongz,hdf5}
Storage format for downloaded candle (OHLCV) data.
(default: `None`).
(default: `json`).
--data-format-trades {json,jsongz,hdf5}
Storage format for downloaded trades data. (default:
`None`).
`jsongz`).
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
@@ -80,6 +83,82 @@ Common arguments:
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).
### Pairs file
In alternative to the whitelist from `config.json`, a `pairs.json` file can be used.
If you are using Binance for example:
- create a directory `user_data/data/binance` and copy or create the `pairs.json` file in that directory.
- update the `pairs.json` file to contain the currency pairs you are interested in.
```bash
mkdir -p user_data/data/binance
touch user_data/data/binance/pairs.json
```
The format of the `pairs.json` file is a simple json list.
Mixing different stake-currencies is allowed for this file, since it's only used for downloading.
``` json
[
"ETH/BTC",
"ETH/USDT",
"BTC/USDT",
"XRP/ETH"
]
```
!!! Tip "Downloading all data for one quote currency"
Often, you'll want to download data for all pairs of a specific quote-currency. In such cases, you can use the following shorthand:
`freqtrade download-data --exchange binance --pairs .*/USDT <...>`. The provided "pairs" string will be expanded to contain all active pairs on the exchange.
To also download data for inactive (delisted) pairs, add `--include-inactive-pairs` to the command.
??? Note "Permission denied errors"
If your configuration directory `user_data` was made by docker, you may get the following error:
```
cp: cannot create regular file 'user_data/data/binance/pairs.json': Permission denied
```
You can fix the permissions of your user-data directory as follows:
```
sudo chown -R $UID:$GID user_data
```
### Start download
Then run:
```bash
freqtrade download-data --exchange binance
```
This will download historical candle (OHLCV) data for all the currency pairs you defined in `pairs.json`.
Alternatively, specify the pairs directly
```bash
freqtrade download-data --exchange binance --pairs ETH/USDT XRP/USDT BTC/USDT
```
or as regex (to download all active USDT pairs)
```bash
freqtrade download-data --exchange binance --pairs .*/USDT
```
### Other Notes
- To use a different directory than the exchange specific default, use `--datadir user_data/data/some_directory`.
- 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.
### Data format
Freqtrade currently supports 3 data-formats for both OHLCV and trades data:
@@ -204,6 +283,61 @@ 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
```
### Sub-command trades to ohlcv
When you need to use `--dl-trades` (kraken only) to download data, conversion of trades data to ohlcv data is the last step.
This command will allow you to repeat this last step for additional timeframes without re-downloading the data.
```
usage: freqtrade trades-to-ohlcv [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]]
[-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} ...]]
[--exchange EXCHANGE]
[--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 ...]
Limit command to these pairs. Pairs are space-
separated.
-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`.
--exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no
config is provided.
--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.
```
#### Example trade-to-ohlcv conversion
``` bash
freqtrade trades-to-ohlcv --exchange kraken -t 5m 1h 1d --pairs BTC/EUR ETH/EUR
```
### Sub-command list-data
You can get a list of downloaded data using the `list-data` sub-command.
@@ -257,64 +391,6 @@ ETH/BTC 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d
ETH/USDT 5m, 15m, 30m, 1h, 2h, 4h
```
### Pairs file
In alternative to the whitelist from `config.json`, a `pairs.json` file can be used.
If you are using Binance for example:
- create a directory `user_data/data/binance` and copy or create the `pairs.json` file in that directory.
- update the `pairs.json` file to contain the currency pairs you are interested in.
```bash
mkdir -p user_data/data/binance
cp tests/testdata/pairs.json user_data/data/binance
```
If your configuration directory `user_data` was made by docker, you may get the following error:
```
cp: cannot create regular file 'user_data/data/binance/pairs.json': Permission denied
```
You can fix the permissions of your user-data directory as follows:
```
sudo chown -R $UID:$GID user_data
```
The format of the `pairs.json` file is a simple json list.
Mixing different stake-currencies is allowed for this file, since it's only used for downloading.
``` json
[
"ETH/BTC",
"ETH/USDT",
"BTC/USDT",
"XRP/ETH"
]
```
### Start download
Then run:
```bash
freqtrade download-data --exchange binance
```
This will download historical candle (OHLCV) data for all the currency pairs you defined in `pairs.json`.
### Other Notes
- To use a different directory than the exchange specific default, use `--datadir user_data/data/some_directory`.
- 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` sub-command downloads Candles (OHLCV) data. Some exchanges also provide historic trade-data via their API.

View File

@@ -15,8 +15,8 @@ This command line option was deprecated in 2019.7-dev (develop branch) and remov
### The **--dynamic-whitelist** command line option
This command line option was deprecated in 2018 and removed freqtrade 2019.6-dev (develop branch)
and in freqtrade 2019.7.
This command line option was deprecated in 2018 and removed freqtrade 2019.6-dev (develop branch) and in freqtrade 2019.7.
Please refer to [pairlists](plugins.md#pairlists-and-pairlist-handlers) instead.
### the `--live` command line option
@@ -24,6 +24,10 @@ and in freqtrade 2019.7.
Did only download the latest 500 candles, so was ineffective in getting good backtest data.
Removed in 2019-7-dev (develop branch) and in freqtrade 2019.8.
### `ticker_interval` (now `timeframe`)
Support for `ticker_interval` terminology was deprecated in 2020.6 in favor of `timeframe` - and compatibility code was removed in 2022.3.
### Allow running multiple pairlists in sequence
The former `"pairlist"` section in the configuration has been removed, and is replaced by `"pairlists"` - being a list to specify a sequence of pairlists.
@@ -38,3 +42,8 @@ Since only quoteVolume can be compared between assets, the other options (bidVol
Using `order_book_min` and `order_book_max` used to allow stepping the orderbook and trying to find the next ROI slot - trying to place sell-orders early.
As this does however increase risk and provides no benefit, it's been removed for maintainability purposes in 2021.7.
### Legacy Hyperopt mode
Using separate hyperopt files was deprecated in 2021.4 and was removed in 2021.9.
Please switch to the new [Parametrized Strategies](hyperopt.md) to benefit from the new hyperopt interface.

View File

@@ -8,7 +8,7 @@ All contributions, bug reports, bug fixes, documentation improvements, enhanceme
Documentation is available at [https://freqtrade.io](https://www.freqtrade.io/) and needs to be provided with every new feature PR.
Special fields for the documentation (like Note boxes, ...) can be found [here](https://squidfunk.github.io/mkdocs-material/extensions/admonition/).
Special fields for the documentation (like Note boxes, ...) can be found [here](https://squidfunk.github.io/mkdocs-material/reference/admonitions/).
To test the documentation locally use the following commands.
@@ -26,6 +26,8 @@ Alternatively (e.g. if your system is not supported by the setup.sh script), fol
This will install all required tools for development, including `pytest`, `flake8`, `mypy`, and `coveralls`.
Before opening a pull request, please familiarize yourself with our [Contributing Guidelines](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md).
### Devcontainer setup
The fastest and easiest way to get started is to use [VSCode](https://code.visualstudio.com/) with the Remote container extension.
@@ -250,7 +252,23 @@ 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).
Also try to use `freqtrade download-data` for an extended timerange and verify that the data downloaded correctly (no holes, the specified timerange was actually downloaded).
Also try to use `freqtrade download-data` for an extended timerange (multiple months) and verify that the data downloaded correctly (no holes, the specified timerange was actually downloaded).
These are prerequisites to have an exchange listed as either Supported or Community tested (listed on the homepage).
The below are "extras", which will make an exchange better (feature-complete) - but are not absolutely necessary for either of the 2 categories.
Additional tests / steps to complete:
* Verify data provided by `fetch_ohlcv()` - and eventually adjust `ohlcv_candle_limit` for this exchange
* Check L2 orderbook limit range (API documentation) - and eventually set as necessary
* Check if balance shows correctly (*)
* Create market order (*)
* Create limit order (*)
* Complete trade (buy + sell) (*)
* Compare result calculation between exchange and bot
* Ensure fees are applied correctly (check the database against the exchange)
(*) Requires API keys and Balance on the exchange.
### Stoploss On Exchange
@@ -306,9 +324,8 @@ 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 `stable` and `develop`.
* Docker images are build for the branches `stable` and `develop`, and are built as multiarch builds, supporting multiple platforms via the same tag.
* 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.

View File

@@ -70,6 +70,18 @@ docker-compose up -d
!!! Warning "Default configuration"
While the configuration generated will be mostly functional, you will still need to verify that all options correspond to what you want (like Pricing, pairlist, ...) before starting the bot.
#### Accessing the UI
If you've selected to enable FreqUI in the `new-config` step, you will have freqUI available at port `localhost:8080`.
You can now access the UI by typing localhost:8080 in your browser.
??? Note "UI Access on a remote servers"
If you're running on a VPS, you should consider using either a ssh tunnel, or setup a VPN (openVPN, wireguard) to connect to your bot.
This will ensure that freqUI is not directly exposed to the internet, which is not recommended for security reasons (freqUI does not support https out of the box).
Setup of these tools is not part of this tutorial, however many good tutorials can be found on the internet.
Please also read the [API configuration with docker](rest-api.md#configuration-with-docker) section to learn more about this configuration.
#### Monitoring the bot
You can check for running instances with `docker-compose ps`.
@@ -109,10 +121,17 @@ All freqtrade arguments will be available by running `docker-compose run --rm fr
!!! Warning "`docker-compose` for trade commands"
Trade commands (`freqtrade trade <...>`) should not be ran via `docker-compose run` - but should use `docker-compose up -d` instead.
This makes sure that the container is properly started (including port forwardings) and will make sure that the container will restart after a system reboot.
If you intend to use freqUI, please also ensure to adjust the [configuration accordingly](rest-api.md#configuration-with-docker), otherwise the UI will not be available.
!!! Note "`docker-compose run --rm`"
Including `--rm` will remove the container after completion, and is highly recommended for all modes except trading mode (running with `freqtrade trade` command).
??? Note "Using docker without docker-compose"
"`docker-compose run --rm`" will require a compose file to be provided.
Some freqtrade commands that don't require authentication such as `list-pairs` can be run with "`docker run --rm`" instead.
For example `docker run --rm freqtradeorg/freqtrade:stable list-pairs --exchange binance --quote BTC --print-json`.
This can be useful for fetching exchange information to add to your `config.json` without affecting your running containers.
#### 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.
@@ -147,9 +166,9 @@ You'll then also need to modify the `docker-compose.yml` file and uncomment the
dockerfile: "./Dockerfile.<yourextension>"
```
You can then run `docker-compose build` to build the docker image, and run it using the commands described above.
You can then run `docker-compose build --pull` to build the docker image, and run it using the commands described above.
## Plotting with docker-compose
### 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:
@@ -160,7 +179,7 @@ docker-compose run --rm freqtrade plot-dataframe --strategy AwesomeStrategy -p B
The output will be stored in the `user_data/plot` directory, and can be opened with any modern browser.
## Data analysis using docker compose
### Data analysis 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:
@@ -177,3 +196,22 @@ Since part of this image is built on your machine, it is recommended to rebuild
``` bash
docker-compose -f docker/docker-compose-jupyter.yml build --no-cache
```
## Troubleshooting
### Docker on Windows
* Error: `"Timestamp for this request is outside of the recvWindow."`
* The market api requests require a synchronized clock but the time in the docker container shifts a bit over time into the past.
To fix this issue temporarily you need to run `wsl --shutdown` and restart docker again (a popup on windows 10 will ask you to do so).
A permanent solution is either to host the docker container on a linux host or restart the wsl from time to time with the scheduler.
``` bash
taskkill /IM "Docker Desktop.exe" /F
wsl --shutdown
start "" "C:\Program Files\Docker\Docker\Docker Desktop.exe"
```
!!! Warning
Due to the above, we do not recommend the usage of docker on windows for production setups, but only for experimentation, datadownload and backtesting.
Best use a linux-VPS for running freqtrade reliably.

View File

@@ -3,7 +3,7 @@
The `Edge Positioning` module uses probability to calculate your win rate and risk reward ratio. It will use these statistics to control your strategy trade entry points, position size and, stoploss.
!!! Warning
WHen using `Edge positioning` with a dynamic whitelist (VolumePairList), make sure to also use `AgeFilter` and set it to at least `calculate_since_number_of_days` to avoid problems with missing data.
When using `Edge positioning` with a dynamic whitelist (VolumePairList), make sure to also use `AgeFilter` and set it to at least `calculate_since_number_of_days` to avoid problems with missing data.
!!! Note
`Edge Positioning` only considers *its own* buy/sell/stoploss signals. It ignores the stoploss, trailing stoploss, and ROI settings in the strategy configuration file.
@@ -222,7 +222,7 @@ usage: freqtrade edge [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
optional arguments:
-h, --help show this help message and exit
-i TIMEFRAME, --timeframe TIMEFRAME, --ticker-interval TIMEFRAME
-i TIMEFRAME, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--timerange TIMERANGE
Specify what timerange of data to use.

View File

@@ -2,10 +2,62 @@
This page combines common gotchas and informations which are exchange-specific and most likely don't apply to other exchanges.
## Exchange configuration
Freqtrade is based on [CCXT library](https://github.com/ccxt/ccxt) that supports over 100 cryptocurrency
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 a few exchanges.
A current list of these can be found in the "Home" section of this documentation.
Feel free to test other exchanges and submit your feedback or PR to improve the bot or confirm exchanges that work flawlessly..
Some exchanges require special configuration, which can be found below.
### Sample exchange configuration
A exchange configuration for "binance" would look as follows:
```json
"exchange": {
"name": "binance",
"key": "your_exchange_key",
"secret": "your_exchange_secret",
"ccxt_config": {},
"ccxt_async_config": {},
// ...
```
### Setting rate limits
Usually, rate limits set by CCXT are reliable and work well.
In case of problems related to rate-limits (usually DDOS Exceptions in your logs), it's easy to change rateLimit settings to other values.
```json
"exchange": {
"name": "kraken",
"key": "your_exchange_key",
"secret": "your_exchange_secret",
"ccxt_config": {"enableRateLimit": true},
"ccxt_async_config": {
"enableRateLimit": true,
"rateLimit": 3100
},
```
This configuration enables kraken, as well as rate-limiting to avoid bans from the exchange.
`"rateLimit": 3100` defines a wait-event of 3.1s between each call. This can also be completely disabled by setting `"enableRateLimit"` to false.
!!! Note
Optimal settings for rate-limiting depend on the exchange and the size of the whitelist, so an ideal parameter will vary on many other settings.
We try to provide sensible defaults per exchange where possible, if you encounter bans please make sure that `"enableRateLimit"` is enabled and increase the `"rateLimit"` parameter step by step.
## Binance
Binance supports [time_in_force](configuration.md#understand-order_time_in_force).
!!! Tip "Stoploss on Exchange"
Binance supports `stoploss_on_exchange` and uses stop-loss-limit orders. It provides great advantages, so we recommend to benefit from it.
Binance supports `stoploss_on_exchange` and uses `stop-loss-limit` orders. It provides great advantages, so we recommend to benefit from it by enabling stoploss on exchange..
### Binance Blacklist
@@ -56,6 +108,12 @@ Bittrex does not support market orders. If you have a message at the bot startup
Bittrex also does not support `VolumePairlist` due to limited / split API constellation at the moment.
Please use `StaticPairlist`. Other pairlists (other than `VolumePairlist`) should not be affected.
### Volume pairlist
Bittrex does not support the direct usage of VolumePairList. This can however be worked around by using the advanced mode with `lookback_days: 1` (or more), which will emulate 24h volume.
Read more in the [pairlist documentation](plugins.md#volumepairlist-advanced-mode).
### Restricted markets
Bittrex split its exchange into US and International versions.
@@ -113,13 +171,51 @@ Kucoin requires a passphrase for each api key, you will therefore need to add th
"key": "your_exchange_key",
"secret": "your_exchange_secret",
"password": "your_exchange_api_key_password",
// ...
}
```
Kucoin supports [time_in_force](configuration.md#understand-order_time_in_force).
!!! Tip "Stoploss on Exchange"
Kucoin 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 of stoploss shall be used.
### Kucoin Blacklists
For Kucoin, please add `"KCS/<STAKE>"` to your blacklist to avoid issues.
Accounts having KCS accounts use this to pay for fees - if your first trade happens to be on `KCS`, further trades will consume this position and make the initial KCS trade unsellable as the expected amount is not there anymore.
## Huobi
!!! Tip "Stoploss on Exchange"
Huobi supports `stoploss_on_exchange` and uses `stop-limit` orders. It provides great advantages, so we recommend to benefit from it by enabling stoploss on exchange.
## OKX (former OKEX)
OKX requires a passphrase for each api key, you will therefore need to add this key into the configuration so your exchange section looks as follows:
```json
"exchange": {
"name": "okx",
"key": "your_exchange_key",
"secret": "your_exchange_secret",
"password": "your_exchange_api_key_password",
// ...
}
```
!!! Warning
OKX only provides 100 candles per api call. Therefore, the strategy will only have a pretty low amount of data available in backtesting mode.
## Gate.io
!!! Tip "Stoploss on Exchange"
Gate.io supports `stoploss_on_exchange` and uses `stop-loss-limit` orders. It provides great advantages, so we recommend to benefit from it by enabling stoploss on exchange..
Gate.io allows the use of `POINT` to pay for fees. As this is not a tradable currency (no regular market available), automatic fee calculations will fail (and default to a fee of 0).
The configuration parameter `exchange.unknown_fee_rate` can be used to specify the exchange rate between Point and the stake currency. Obviously, changing the stake-currency will also require changes to this value.
## All exchanges
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.
@@ -158,6 +254,8 @@ For example, to test the order type `FOK` with Kraken, and modify candle limit t
"order_time_in_force": ["gtc", "fok"],
"ohlcv_candle_limit": 200
}
//...
}
```
!!! Warning

View File

@@ -42,7 +42,7 @@ position for a trade. Be patient!
### 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
not enough to say anything. If you run backtesting, you can see that the
current algorithm does leave you on the plus side, but that is after
thousands of trades and even there, you will be left with losses on
specific coins that you have traded tens if not hundreds of times. We
@@ -54,9 +54,26 @@ you can't say much from few trades.
Yes. You can edit your config and use the `/reload_config` command to reload the configuration. The bot will stop, reload the configuration and strategy and will restart with the new configuration and strategy.
### I want to improve the bot with a new strategy
### Why does my bot not sell everything it bought?
That's great. We have a nice backtesting and hyperoptimization setup. See the tutorial [here|Testing-new-strategies-with-Hyperopt](bot-usage.md#hyperopt-commands).
This is called "coin dust" and can happen on all exchanges.
It happens because many exchanges subtract fees from the "receiving currency" - so you buy 100 COIN - but you only get 99.9 COIN.
As COIN is trading in full lot sizes (1COIN steps), you cannot sell 0.9 COIN (or 99.9 COIN) - but you need to round down to 99 COIN.
This is not a bot-problem, but will also happen while manual trading.
While freqtrade can handle this (it'll sell 99 COIN), fees are often below the minimum tradable lot-size (you can only trade full COIN, not 0.9 COIN).
Leaving the dust (0.9 COIN) on the exchange makes usually sense, as the next time freqtrade buys COIN, it'll eat into the remaining small balance, this time selling everything it bought, and therefore slowly declining the dust balance (although it most likely will never reach exactly 0).
Where possible (e.g. on binance), the use of the exchange's dedicated fee currency will fix this.
On binance, it's sufficient to have BNB in your account, and have "Pay fees in BNB" enabled in your profile. Your BNB balance will slowly decline (as it's used to pay fees) - but you'll no longer encounter dust (Freqtrade will include the fees in the profit calculations).
Other exchanges don't offer such possibilities, where it's simply something you'll have to accept or move to a different exchange.
### I want to use incomplete candles
Freqtrade will not provide incomplete candles to strategies. Using incomplete candles will lead to repainting and consequently to strategies with "ghost" buys, which are impossible to both backtest, and verify after they happened.
You can use "current" market data by using the [dataprovider](strategy-customization.md#orderbookpair-maximum)'s orderbook or ticker methods - which however cannot be used during backtesting.
### Is there a setting to only SELL the coins being held and not perform anymore BUYS?
@@ -76,17 +93,29 @@ If this happens for all pairs in the pairlist, this might indicate a recent exch
Irrespectively of the reason, Freqtrade will fill up these candles with "empty" candles, where open, high, low and close are set to the previous candle close - and volume is empty. In a chart, this will look like a `_` - and is aligned with how exchanges usually represent 0 volume candles.
### I'm getting "Outdated history for pair xxx" in the log
The bot is trying to tell you that it got an outdated last candle (not the last complete candle).
As a consequence, Freqtrade will not enter a trade for this pair - as trading on old information is usually not what is desired.
This warning can point to one of the below problems:
* Exchange downtime -> Check your exchange status page / blog / twitter feed for details.
* Wrong system time -> Ensure your system-time is correct.
* Barely traded pair -> Check the pair on the exchange webpage, look at the timeframe your strategy uses. If the pair does not have any volume in some candles (usually visualized with a "volume 0" bar, and a "_" as candle), this pair did not have any trades in this timeframe. These pairs should ideally be avoided, as they can cause problems with order-filling.
* API problem -> API returns wrong data (this only here for completeness, and should not happen with supported exchanges).
### I'm getting the "RESTRICTED_MARKET" message in the log
Currently known to happen for US Bittrex users.
Read [the Bittrex section about restricted markets](exchanges.md#restricted-markets) for more information.
### I'm getting the "Exchange Bittrex does not support market orders." message and cannot run my strategy
### I'm getting the "Exchange XXX 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". 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).
As the message says, your exchange 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 and Gate.io).
To fix it for Bittrex, redefine order types in the strategy to use "limit" instead of "market":
To fix this, redefine order types in the strategy to use "limit" instead of "market":
```
order_types = {
@@ -136,6 +165,8 @@ On Windows, the `--logfile` option is also supported by Freqtrade and you can us
> type \path\to\mylogfile.log | findstr "something"
```
## Hyperopt module
### Why does freqtrade not have GPU support?
First of all, most indicator libraries don't have GPU support - as such, there would be little benefit for indicator calculations.
@@ -152,22 +183,20 @@ The benefit of using GPU would therefore be pretty slim - and will not justify t
There is however nothing preventing you from using GPU-enabled indicators within your strategy if you think you must have this - you will however probably be disappointed by the slim gain that will give you (compared to the complexity).
## Hyperopt module
### 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 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
have to run it for 10000 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 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.
It's therefore recommended to run between 500-1000 epochs over and over until you hit at least 10000 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 --hyperopt SampleHyperopt --hyperopt-loss SharpeHyperOptLossDaily --strategy SampleStrategy -e 1000
freqtrade hyperopt --hyperopt-loss SharpeHyperOptLossDaily --strategy SampleStrategy -e 1000
```
### Why does it take a long time to run hyperopt?
@@ -188,9 +217,9 @@ 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 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.
* 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 100000 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.
Example: 4% profit 650 times vs 0,3% profit a trade 10000 times in a year. If we assume you set the --timerange to 365 days.
Example:
`freqtrade --config config.json --strategy SampleStrategy --hyperopt SampleHyperopt -e 1000 --timerange 20190601-20200601`

View File

@@ -44,24 +44,24 @@ usage: freqtrade hyperopt [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
[--data-format-ohlcv {json,jsongz,hdf5}]
[--max-open-trades INT]
[--stake-amount STAKE_AMOUNT] [--fee FLOAT]
[-p PAIRS [PAIRS ...]] [--hyperopt NAME]
[--hyperopt-path PATH] [--eps] [--dmmp]
[--enable-protections]
[-p PAIRS [PAIRS ...]] [--hyperopt-path PATH]
[--eps] [--dmmp] [--enable-protections]
[--dry-run-wallet DRY_RUN_WALLET] [-e INT]
[--spaces {all,buy,sell,roi,stoploss,trailing,protection,default} [{all,buy,sell,roi,stoploss,trailing,protection,default} ...]]
[--print-all] [--no-color] [--print-json] [-j JOBS]
[--random-state INT] [--min-trades INT]
[--hyperopt-loss NAME] [--disable-param-export]
[--ignore-missing-spaces]
optional arguments:
-h, --help show this help message and exit
-i TIMEFRAME, --timeframe TIMEFRAME, --ticker-interval TIMEFRAME
-i TIMEFRAME, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `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`).
(default: `json`).
--max-open-trades INT
Override the value of the `max_open_trades`
configuration setting.
@@ -73,10 +73,8 @@ optional arguments:
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--hyperopt NAME Specify hyperopt class name which will be used by the
bot.
--hyperopt-path PATH Specify additional lookup path for Hyperopt and
Hyperopt Loss functions.
--hyperopt-path PATH Specify additional lookup path for Hyperopt Loss
functions.
--eps, --enable-position-stacking
Allow buying the same pair multiple times (position
stacking).
@@ -117,9 +115,13 @@ optional arguments:
Hyperopt-loss-functions are:
ShortTradeDurHyperOptLoss, OnlyProfitHyperOptLoss,
SharpeHyperOptLoss, SharpeHyperOptLossDaily,
SortinoHyperOptLoss, SortinoHyperOptLossDaily
SortinoHyperOptLoss, SortinoHyperOptLossDaily,
CalmarHyperOptLoss, MaxDrawDownHyperOptLoss, ProfitDrawDownHyperOptLoss
--disable-param-export
Disable automatic hyperopt parameter export.
--ignore-missing-spaces, --ignore-unparameterized-spaces
Suppress errors for any requested Hyperopt spaces that
do not contain any parameters.
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
@@ -456,7 +458,7 @@ class MyAwesomeStrategy(IStrategy):
"only_per_pair": False
})
return protection
return prot
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# ...
@@ -506,6 +508,46 @@ class MyAwesomeStrategy(IStrategy):
You will then obviously also change potential interesting entries to parameters to allow hyper-optimization.
### Optimizing `max_entry_position_adjustment`
While `max_entry_position_adjustment` is not a separate space, it can still be used in hyperopt by using the property approach shown above.
``` python
from pandas import DataFrame
from functools import reduce
import talib.abstract as ta
from freqtrade.strategy import (BooleanParameter, CategoricalParameter, DecimalParameter,
IStrategy, IntParameter)
import freqtrade.vendor.qtpylib.indicators as qtpylib
class MyAwesomeStrategy(IStrategy):
stoploss = -0.05
timeframe = '15m'
# Define the parameter spaces
max_epa = CategoricalParameter([-1, 0, 1, 3, 5, 10], default=1, space="buy", optimize=True)
@property
def max_entry_position_adjustment(self):
return self.max_epa.value
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# ...
```
??? Tip "Using `IntParameter`"
You can also use the `IntParameter` for this optimization, but you must explicitly return an integer:
``` python
max_epa = IntParameter(-1, 10, default=1, space="buy", optimize=True)
@property
def max_entry_position_adjustment(self):
return int(self.max_epa.value)
```
## 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.
@@ -515,12 +557,15 @@ This class should be in its own file within the `user_data/hyperopts/` directory
Currently, the following loss functions are builtin:
* `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)
* `SortinoHyperOptLoss` (optimizes Sortino Ratio calculated on trade returns relative to **downside** standard deviation)
* `SortinoHyperOptLossDaily` (optimizes Sortino Ratio calculated on **daily** trade returns relative to **downside** standard deviation)
* `ShortTradeDurHyperOptLoss` - (default legacy Freqtrade hyperoptimization loss function) - Mostly for short trade duration and avoiding losses.
* `OnlyProfitHyperOptLoss` - 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.
* `SortinoHyperOptLoss` - optimizes Sortino Ratio calculated on trade returns relative to **downside** standard deviation.
* `SortinoHyperOptLossDaily` - optimizes Sortino Ratio calculated on **daily** trade returns relative to **downside** standard deviation.
* `MaxDrawDownHyperOptLoss` - Optimizes Maximum drawdown.
* `CalmarHyperOptLoss` - Optimizes Calmar Ratio calculated on trade returns relative to max drawdown.
* `ProfitDrawDownHyperOptLoss` - Optimizes by max Profit & min Drawdown objective. `DRAWDOWN_MULT` variable within the hyperoptloss file can be adjusted to be stricter or more flexible on drawdown purposes.
Creation of a custom loss function is covered in the [Advanced Hyperopt](advanced-hyperopt.md) part of the documentation.
@@ -558,7 +603,7 @@ For example, to use one month of data, pass `--timerange 20210101-20210201` (fro
Full command:
```bash
freqtrade hyperopt --hyperopt <hyperoptname> --strategy <strategyname> --timerange 20210101-20210201
freqtrade hyperopt --strategy <strategyname> --timerange 20210101-20210201
```
### Running Hyperopt with Smaller Search Space
@@ -680,11 +725,11 @@ If you are optimizing ROI, Freqtrade creates the 'roi' optimization hyperspace f
These ranges should be sufficient in most cases. The minutes in the steps (ROI dict keys) are scaled linearly depending on the timeframe used. The ROI values in the steps (ROI dict values) are scaled logarithmically depending on the timeframe used.
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.
If you have the `generate_roi_table()` and `roi_space()` methods in your custom hyperopt, 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 [sample_hyperopt_advanced.py](https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/templates/sample_hyperopt_advanced.py).
A sample for these methods can be found in the [overriding pre-defined spaces section](advanced-hyperopt.md#overriding-pre-defined-spaces).
!!! Note "Reduced search space"
To limit the search space further, Decimals are limited to 3 decimal places (a precision of 0.001). This is usually sufficient, every value more precise than this will usually result in overfitted results. You can however [overriding pre-defined spaces](advanced-hyperopt.md#pverriding-pre-defined-spaces) to change this to your needs.
@@ -726,7 +771,7 @@ If you are optimizing stoploss values, Freqtrade creates the 'stoploss' optimiza
If you have the `stoploss_space()` method in your custom hyperopt file, remove it in order to utilize Stoploss hyperoptimization space generated by Freqtrade by default.
Override the `stoploss_space()` method and define the desired range in it if you need stoploss values to vary in other range during hyperoptimization. A sample for this method 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 `stoploss_space()` method and define the desired range in it if you need stoploss values to vary in other range during hyperoptimization. A sample for this method can be found in the [overriding pre-defined spaces section](advanced-hyperopt.md#overriding-pre-defined-spaces).
!!! Note "Reduced search space"
To limit the search space further, Decimals are limited to 3 decimal places (a precision of 0.001). This is usually sufficient, every value more precise than this will usually result in overfitted results. You can however [overriding pre-defined spaces](advanced-hyperopt.md#pverriding-pre-defined-spaces) to change this to your needs.
@@ -764,10 +809,10 @@ As stated in the comment, you can also use it as the values of the corresponding
If you are optimizing trailing stop values, Freqtrade creates the 'trailing' optimization hyperspace for you. By default, the `trailing_stop` parameter is always set to True in that hyperspace, the value of the `trailing_only_offset_is_reached` vary between True and False, the values of the `trailing_stop_positive` and `trailing_stop_positive_offset` parameters vary in the ranges 0.02...0.35 and 0.01...0.1 correspondingly, which is sufficient in most cases.
Override the `trailing_space()` method and define the desired range in it if you need values of the trailing stop parameters to vary in other ranges during hyperoptimization. A sample for this method 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 `trailing_space()` method and define the desired range in it if you need values of the trailing stop parameters to vary in other ranges during hyperoptimization. A sample for this method can be found in the [overriding pre-defined spaces section](advanced-hyperopt.md#overriding-pre-defined-spaces).
!!! Note "Reduced search space"
To limit the search space further, Decimals are limited to 3 decimal places (a precision of 0.001). This is usually sufficient, every value more precise than this will usually result in overfitted results. You can however [overriding pre-defined spaces](advanced-hyperopt.md#pverriding-pre-defined-spaces) to change this to your needs.
To limit the search space further, Decimals are limited to 3 decimal places (a precision of 0.001). This is usually sufficient, every value more precise than this will usually result in overfitted results. You can however [overriding pre-defined spaces](advanced-hyperopt.md#overriding-pre-defined-spaces) to change this to your needs.
### Reproducible results
@@ -827,8 +872,8 @@ After you run Hyperopt for the desired amount of epochs, you can later list all
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 configuration and parameters (timerange, timeframe, ...) used for hyperopt `--dmmp`/`--disable-max-market-positions` and `--eps`/`--enable-position-stacking` for Backtesting.
To achieve same the results (number of trades, their durations, profit, etc.) as during Hyperopt, please use the 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.
Should results not 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`).

View File

@@ -52,6 +52,8 @@ To skip pair validation against active markets, set `"allow_inactive": true` wit
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.
When used in a "follow-up" position (e.g. after VolumePairlist), all pairs in `'pair_whitelist'` will be added to the end of the pairlist.
#### 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`).
@@ -82,6 +84,8 @@ Filtering instances (not the first position in the list) will not apply any cach
You can define a minimum volume with `min_value` - which will filter out pairs with a volume lower than the specified value in the specified timerange.
### VolumePairList Advanced mode
`VolumePairList` can also operate in an advanced mode to build volume over a given timerange of specified candle size. It utilizes exchange historical candle data, builds a typical price (calculated by (open+high+low)/3) and multiplies the typical price with every candle's volume. The sum is the `quoteVolume` over the given range. This allows different scenarios, for a more smoothened volume, when using longer ranges with larger candle sizes, or the opposite when using a short range with small candles.
For convenience `lookback_days` can be specified, which will imply that 1d candles will be used for the lookback. In the example below the pairlist would be created based on the last 7 days:
@@ -105,6 +109,24 @@ For convenience `lookback_days` can be specified, which will imply that 1d candl
!!! Warning "Performance implications when using lookback range"
If used in first position in combination with lookback, the computation of the range based volume can be time and resource consuming, as it downloads candles for all tradable pairs. Hence it's highly advised to use the standard approach with `VolumeFilter` to narrow the pairlist down for further range volume calculation.
??? Tip "Unsupported exchanges (Bittrex, Gemini)"
On some exchanges (like Bittrex and Gemini), regular VolumePairList does not work as the api does not natively provide 24h volume. This can be worked around by using candle data to build the volume.
To roughly simulate 24h volume, you can use the following configuration.
Please note that These pairlists will only refresh once per day.
```json
"pairlists": [
{
"method": "VolumePairList",
"number_assets": 20,
"sort_key": "quoteVolume",
"min_value": 0,
"refresh_period": 86400,
"lookback_days": 1
}
],
```
More sophisticated approach can be used, by using `lookback_timeframe` for candle size and `lookback_period` which specifies the amount of candles. This example will build the volume pairs based on a rolling period of 3 days of 1h candles:
```json
@@ -145,6 +167,7 @@ Example to remove the first 10 pairs from the pairlist:
```json
"pairlists": [
// ...
{
"method": "OffsetFilter",
"offset": 10
@@ -170,13 +193,36 @@ Sorts pairs by past trade performance, as follows:
Trade count is used as a tie breaker.
!!! Note
You can use the `minutes` parameter to only consider performance of the past X minutes (rolling window).
Not defining this parameter (or setting it to 0) will use all-time performance.
The optional `min_profit` (as ratio -> a setting of `0.01` corresponds to 1%) parameter defines the minimum profit a pair must have to be considered.
Pairs below this level will be filtered out.
Using this parameter without `minutes` is highly discouraged, as it can lead to an empty pairlist without a way to recover.
```json
"pairlists": [
// ...
{
"method": "PerformanceFilter",
"minutes": 1440, // rolling 24h
"min_profit": 0.01 // minimal profit 1%
}
],
```
As this Filter uses past performance of the bot, it'll have some startup-period - and should only be used after the bot has a few 100 trades in the database.
!!! Warning "Backtesting"
`PerformanceFilter` does not support backtesting mode.
#### PrecisionFilter
Filters low-value coins which would not allow setting stoplosses.
!!! Warning "Backtesting"
`PrecisionFilter` does not support backtesting mode using multiple strategies.
#### PriceFilter
The `PriceFilter` allows filtering of pairs by price. Currently the following price filters are supported:
@@ -200,7 +246,7 @@ On exchanges that deduct fees from the receiving currency (e.g. FTX) - this can
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.
For `PriceFilter` at least one of its `min_price`, `max_price` or `low_price_ratio` settings must be applied.
Calculation example:
@@ -214,7 +260,7 @@ Min price precision for SHITCOIN/BTC is 8 decimals. If its price is 0.00000011 -
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.
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. ShuffleFilter will automatically detect runmodes and apply the `seed` only for backtesting modes - if a `seed` value is set.
#### SpreadFilter
@@ -249,7 +295,7 @@ If the trading range over the last 10 days is <1% or >99%, remove the pair from
#### VolatilityFilter
Volatility is the degree of historical variation of a pairs over time, is is measured by the standard deviation of logarithmic daily returns. Returns are assumed to be normally distributed, although actual distribution might be different. In a normal distribution, 68% of observations fall within one standard deviation and 95% of observations fall within two standard deviations. Assuming a volatility of 0.05 means that the expected returns for 20 out of 30 days is expected to be less than 5% (one standard deviation). Volatility is a positive ratio of the expected deviation of return and can be greater than 1.00. Please refer to the wikipedia definition of [`volatility`](https://en.wikipedia.org/wiki/Volatility_(finance)).
Volatility is the degree of historical variation of a pairs over time, it is measured by the standard deviation of logarithmic daily returns. Returns are assumed to be normally distributed, although actual distribution might be different. In a normal distribution, 68% of observations fall within one standard deviation and 95% of observations fall within two standard deviations. Assuming a volatility of 0.05 means that the expected returns for 20 out of 30 days is expected to be less than 5% (one standard deviation). Volatility is a positive ratio of the expected deviation of return and can be greater than 1.00. Please refer to the wikipedia definition of [`volatility`](https://en.wikipedia.org/wiki/Volatility_(finance)).
This filter removes pairs if the average volatility over a `lookback_days` days is below `min_volatility` or above `max_volatility`. Since this is a filter that requires additional data, the results are cached for `refresh_period`.
@@ -303,5 +349,5 @@ The below example blacklists `BNB/BTC`, uses `VolumePairList` with `20` assets,
"refresh_period": 86400
},
{"method": "ShuffleFilter", "seed": 42}
],
],
```

View File

@@ -51,9 +51,9 @@ When buying with the orderbook enabled (`bid_strategy.use_order_book=True`), Fre
#### Buy price without Orderbook enabled
The following section uses `side` as the configured `bid_strategy.price_side`.
The following section uses `side` as the configured `bid_strategy.price_side` (defaults to `"bid"`).
When not using orderbook (`bid_strategy.use_order_book=False`), Freqtrade uses the best `side` price from the ticker if it's below the `last` traded price from the ticker. Otherwise (when the `side` price is above the `last` price), it calculates a rate between `side` and `last` price.
When not using orderbook (`bid_strategy.use_order_book=False`), Freqtrade uses the best `side` price from the ticker if it's below the `last` traded price from the ticker. Otherwise (when the `side` price is above the `last` price), it calculates a rate between `side` and `last` price based on `bid_strategy.ask_last_balance`..
The `bid_strategy.ask_last_balance` configuration parameter controls this. A value of `0.0` will use `side` price, while `1.0` will use the `last` price and values between those interpolate between ask and last price.
@@ -88,9 +88,9 @@ When selling with the orderbook enabled (`ask_strategy.use_order_book=True`), Fr
#### Sell price without Orderbook enabled
When not using orderbook (`ask_strategy.use_order_book=False`), the price at the `ask_strategy.price_side` side (defaults to `"ask"`) from the ticker will be used as the sell price.
The following section uses `side` as the configured `ask_strategy.price_side` (defaults to `"ask"`).
When not using orderbook (`ask_strategy.use_order_book=False`), Freqtrade uses the best `side` price from the ticker if it's below the `last` traded price from the ticker. Otherwise (when the `side` price is above the `last` price), it calculates a rate between `side` and `last` price.
When not using orderbook (`ask_strategy.use_order_book=False`), Freqtrade uses the best `side` price from the ticker if it's above the `last` traded price from the ticker. Otherwise (when the `side` price is below the `last` price), it calculates a rate between `side` and `last` price based on `ask_strategy.bid_last_balance`.
The `ask_strategy.bid_last_balance` configuration parameter controls this. A value of `0.0` will use `side` price, while `1.0` will use the last price and values between those interpolate between `side` and last price.

View File

@@ -11,7 +11,7 @@
## Introduction
Freqtrade is a crypto-currency algorithmic trading software developed in python (3.7+) and supported on Windows, macOS and Linux.
Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram or webUI. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.
!!! 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.
@@ -20,6 +20,12 @@ Freqtrade is a crypto-currency algorithmic trading software developed in python
We strongly recommend you to have basic coding skills and Python knowledge. Do not hesitate to read the source code and understand the mechanisms of this bot, algorithms and techniques implemented in it.
![freqtrade screenshot](assets/freqtrade-screenshot.png)
## Sponsored promotion
[![tokenbot-promo](assets/TokenBot-Freqtrade-banner.png)](https://tokenbot.com/?utm_source=github&utm_medium=freqtrade&utm_campaign=algodevs)
## Features
- Develop your Strategy: Write your strategy in python, using [pandas](https://pandas.pydata.org/). Example strategies to inspire you are available in the [strategy repository](https://github.com/freqtrade/freqtrade-strategies).
@@ -29,17 +35,20 @@ Freqtrade is a crypto-currency algorithmic trading software developed in python
- Select markets: Create your static list or use an automatic one based on top traded volumes and/or prices (not available during backtesting). You can also explicitly blacklist markets you don't want to trade.
- Run: Test your strategy with simulated money (Dry-Run mode) or deploy it with real money (Live-Trade mode).
- Run using Edge (optional module): The concept is to find the best historical [trade expectancy](edge.md#expectancy) by markets based on variation of the stop-loss and then allow/reject markets to trade. The sizing of the trade is based on a risk of a percentage of your capital.
- Control/Monitor: Use Telegram or a REST API (start/stop the bot, show profit/loss, daily summary, current open trades results, etc.).
- Control/Monitor: Use Telegram or a WebUI (start/stop the bot, show profit/loss, daily summary, current open trades results, etc.).
- Analyse: Further analysis can be performed on either Backtesting data or Freqtrade trading history (SQL database), including automated standard plots, and methods to load the data into [interactive environments](data-analysis.md).
## Supported exchange marketplaces
Please read the [exchange specific notes](exchanges.md) to learn about eventual, special configurations needed for each exchange.
- [X] [Binance](https://www.binance.com/) ([*Note for binance users](docs/exchanges.md#binance-blacklist))
- [X] [Binance](https://www.binance.com/)
- [X] [Bittrex](https://bittrex.com/)
- [X] [FTX](https://ftx.com)
- [X] [FTX](https://ftx.com/#a=2258149)
- [X] [Gate.io](https://www.gate.io/ref/6266643)
- [X] [Huobi](http://huobi.com/)
- [X] [Kraken](https://kraken.com/)
- [X] [OKX](https://okx.com/) (Former OKEX)
- [ ] [potentially many others through <img alt="ccxt" width="30px" src="assets/ccxt-logo.svg" />](https://github.com/ccxt/ccxt/). _(We cannot guarantee they will work)_
### Community tested
@@ -65,7 +74,7 @@ To run this bot we recommend you a linux cloud instance with a minimum of:
Alternatively
- Python 3.7+
- Python 3.8+
- pip (pip3)
- git
- TA-Lib
@@ -79,4 +88,4 @@ For any questions not covered by the documentation or for further information ab
## Ready to try?
Begin by reading our installation guide [for docker](docker_quickstart.md) (recommended), or for [installation without docker](installation.md).
Begin by reading the installation guide [for docker](docker_quickstart.md) (recommended), or for [installation without docker](installation.md).

View File

@@ -24,7 +24,7 @@ The easiest way to install and run Freqtrade is to clone the bot Github reposito
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.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.
Python3.8 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.
Also, python headers (`python<yourversion>-dev` / `python<yourversion>-devel`) must be available for the installation to complete successfully.
!!! Warning "Up-to-date clock"
@@ -36,9 +36,13 @@ The easiest way to install and run Freqtrade is to clone the bot Github reposito
These requirements apply to both [Script Installation](#script-installation) and [Manual Installation](#manual-installation).
!!! Note "ARM64 systems"
If you are running an ARM64 system (like a MacOS M1 or an Oracle VM), please use [docker](docker_quickstart.md) to run freqtrade.
While native installation is possible with some manual effort, this is not supported at the moment.
### Install guide
* [Python >= 3.7.x](http://docs.python-guide.org/en/latest/starting/installation/)
* [Python >= 3.8.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)
@@ -50,7 +54,7 @@ We've included/collected install instructions for Ubuntu, MacOS, and Windows. Th
OS Specific steps are listed first, the [Common](#common) section below is necessary for all systems.
!!! Note
Python3.7 or higher and the corresponding pip are assumed to be available.
Python3.8 or higher and the corresponding pip are assumed to be available.
=== "Debian/Ubuntu"
#### Install necessary dependencies
@@ -60,18 +64,18 @@ OS Specific steps are listed first, the [Common](#common) section below is neces
sudo apt-get update
# install packages
sudo apt install -y python3-pip python3-venv python3-dev python3-pandas git
sudo apt install -y python3-pip python3-venv python3-dev python3-pandas git curl
```
=== "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.
This image comes with python3.9 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 cmake
sudo apt-get install python3-venv libatlas-base-dev cmake curl
# Use pywheels.org to speed up installation
sudo echo "[global]\nextra-index-url=https://www.piwheels.org/simple" > tee /etc/pip.conf
@@ -113,6 +117,13 @@ git checkout develop
You may later switch between branches at any time with the `git checkout stable`/`git checkout develop` commands.
??? Note "Install from pypi"
An alternative way to install Freqtrade is from [pypi](https://pypi.org/project/freqtrade/). The downside is that this method requires ta-lib to be correctly installed beforehand, and is therefore currently not the recommended way to install Freqtrade.
``` bash
pip install freqtrade
```
------
## Script Installation
@@ -158,7 +169,7 @@ You can as well update, configure and reset the codebase of your bot with `./scr
** --install **
With this option, the script will install the bot and most dependencies:
You will need to have git and python3.7+ installed beforehand for this to work.
You will need to have git and python3.8+ installed beforehand for this to work.
* Mandatory software as: `ta-lib`
* Setup your virtualenv under `.env/`
@@ -409,16 +420,3 @@ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10
```
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.
### MacOS installation error with python 3.9
When using python 3.9 on macOS, it's currently necessary to install some os-level modules to allow dependencies to compile.
The errors you'll see happen during installation and are related to the installation of `tables` or `blosc`.
You can install the necessary libraries with the following command:
```bash
brew install hdf5 c-blosc
```
After this, please run the installation (script) again.

View File

@@ -65,7 +65,7 @@ optional arguments:
_today.json`
--timerange TIMERANGE
Specify what timerange of data to use.
-i TIMEFRAME, --timeframe TIMEFRAME, --ticker-interval TIMEFRAME
-i TIMEFRAME, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--no-trades Skip using trades from backtesting file and DB.
@@ -164,16 +164,17 @@ The resulting plot will have the following elements:
An advanced plot configuration can be specified in the strategy in the `plot_config` parameter.
Additional features when using plot_config include:
Additional features when using `plot_config` include:
* Specify colors per indicator
* Specify additional subplots
* Specify indicator pairs to fill area in between
* 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 color schemes each time, making comparisons difficult.
It also allows multiple subplots to display both MACD and RSI at the same time.
Plot type can be configured using `type` key. Possible types are:
* `scatter` corresponding to `plotly.graph_objects.Scatter` class (default).
* `bar` corresponding to `plotly.graph_objects.Bar` class.
@@ -182,40 +183,89 @@ Extra parameters to `plotly.graph_objects.*` constructor can be specified in `pl
Sample configuration with inline comments explaining the process:
``` python
plot_config = {
'main_plot': {
# Configuration for main plot indicators.
# Specifies `ema10` to be red, and `ema50` to be a shade of gray
'ema10': {'color': 'red'},
'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': {}
@property
def plot_config(self):
"""
There are a lot of solutions how to build the return dictionary.
The only important point is the return value.
Example:
plot_config = {'main_plot': {}, 'subplots': {}}
"""
plot_config = {}
plot_config['main_plot'] = {
# Configuration for main plot indicators.
# Assumes 2 parameters, emashort and emalong to be specified.
f'ema_{self.emashort.value}': {'color': 'red'},
f'ema_{self.emalong.value}': {'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
},
'subplots': {
# Create subplot MACD
"MACD": {
'macd': {'color': 'blue', 'fill_to': 'macdhist'},
'macdsignal': {'color': 'orange'},
'macdhist': {'type': 'bar', 'plotly': {'opacity': 0.9}}
},
# Additional subplot RSI
"RSI": {
'rsi': {'color': 'red'}
}
# plot senkou_b, too. Not only the area to it.
'senkou_b': {}
}
plot_config['subplots'] = {
# Create subplot MACD
"MACD": {
'macd': {'color': 'blue', 'fill_to': 'macdhist'},
'macdsignal': {'color': 'orange'},
'macdhist': {'type': 'bar', 'plotly': {'opacity': 0.9}}
},
# Additional subplot RSI
"RSI": {
'rsi': {'color': 'red'}
}
}
return plot_config
```
??? Note "As attribute (former method)"
Assigning plot_config is also possible as Attribute (this used to be the default way).
This has the disadvantage that strategy parameters are not available, preventing certain configurations from working.
``` python
plot_config = {
'main_plot': {
# Configuration for main plot indicators.
# Specifies `ema10` to be red, and `ema50` to be a shade of gray
'ema10': {'color': 'red'},
'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', 'fill_to': 'macdhist'},
'macdsignal': {'color': 'orange'},
'macdhist': {'type': 'bar', 'plotly': {'opacity': 0.9}}
},
# Additional subplot RSI
"RSI": {
'rsi': {'color': 'red'}
}
}
}
```
!!! Note
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.
@@ -223,6 +273,9 @@ Sample configuration with inline comments explaining the process:
!!! Warning
`plotly` arguments are only supported with plotly library and will not work with freq-ui.
!!! Note "Trade position adjustments"
If `position_adjustment_enable` / `adjust_trade_position()` is used, the trade initial buy price is averaged over multiple orders and the trade start price will most likely appear outside the candle range.
## Plot profit
![plot-profit](assets/plot-profit.png)
@@ -233,6 +286,8 @@ The `plot-profit` subcommand shows an interactive graph with three plots:
* The summarized profit made by backtesting.
Note that this is not the real-world profit, but more of an estimate.
* Profit for each individual pair.
* Parallelism of trades.
* Underwater (Periods of drawdown).
The first graph is good to get a grip of how the overall market progresses.
@@ -242,6 +297,8 @@ This graph will also highlight the start (and end) of the Max drawdown period.
The third graph can be useful to spot outliers, events in pairs that cause profit spikes.
The forth graph can help you analyze trade parallelism, showing how often max_open_trades have been maxed out.
Possible options for the `freqtrade plot-profit` subcommand:
```
@@ -261,8 +318,8 @@ optional arguments:
Specify what timerange of data to use.
--export EXPORT Export backtest results, argument are: trades.
Example: `--export=trades`
--export-filename PATH
Save backtest results to the file with this filename.
--export-filename PATH, --backtest-filename PATH
Use backtest results from this filename.
Requires `--export` to be set as well. Example:
`--export-filename=user_data/backtest_results/backtest
_today.json`
@@ -273,7 +330,7 @@ optional arguments:
--trade-source {DB,file}
Specify the source for trades (Can be DB or file
(backtest file)) Default: file
-i TIMEFRAME, --timeframe TIMEFRAME, --ticker-interval TIMEFRAME
-i TIMEFRAME, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--auto-open Automatically open generated plot.

View File

@@ -1,4 +1,5 @@
mkdocs==1.2.2
mkdocs-material==7.2.4
mkdocs==1.2.3
mkdocs-material==8.2.5
mdx_truly_sane_lists==1.2
pymdown-extensions==8.2
pymdown-extensions==9.3
jinja2==3.0.3

View File

@@ -38,6 +38,11 @@ Sample configuration:
!!! Danger "Security warning"
By default, the configuration listens on localhost only (so it's not reachable from other systems). We strongly recommend to not expose this API to the internet and choose a strong, unique password, since others will potentially be able to control your bot.
??? Note "API/UI Access on a remote servers"
If you're running on a VPS, you should consider using either a ssh tunnel, or setup a VPN (openVPN, wireguard) to connect to your bot.
This will ensure that freqUI is not directly exposed to the internet, which is not recommended for security reasons (freqUI does not support https out of the box).
Setup of these tools is not part of this tutorial, however many good tutorials can be found on the internet.
You can then access the API by going to `http://127.0.0.1:8080/api/v1/ping` in a browser to check if the API is running correctly.
This should return the response:
@@ -78,7 +83,7 @@ If you run your bot using docker, you'll need to have the bot listen to incoming
},
```
Uncomment the following from your docker-compose file:
Make sure that the following 2 lines are available in your docker-compose file:
```yml
ports:
@@ -330,12 +335,15 @@ Since the access token has a short timeout (15 min) - the `token/refresh` reques
### CORS
All web-based front-ends are subject to [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) - Cross-Origin Resource Sharing.
Since most of the requests to the Freqtrade API must be authenticated, a proper CORS policy is key to avoid security problems.
Also, the standard disallows `*` CORS policies for requests with credentials, so this setting must be set appropriately.
This whole section is only necessary in cross-origin cases (where you multiple bot API's running on `localhost:8081`, `localhost:8082`, ...), and want to combine them into one FreqUI instance.
Users can configure this themselves via the `CORS_origins` configuration setting.
It consists of a list of allowed sites that are allowed to consume resources from the bot's API.
??? info "Technical explanation"
All web-based front-ends are subject to [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) - Cross-Origin Resource Sharing.
Since most of the requests to the Freqtrade API must be authenticated, a proper CORS policy is key to avoid security problems.
Also, the standard disallows `*` CORS policies for requests with credentials, so this setting must be set appropriately.
Users can allow access from different origin URL's to the bot API via the `CORS_origins` configuration setting.
It consists of a list of allowed URL's that are allowed to consume resources from the bot's API.
Assuming your application is deployed as `https://frequi.freqtrade.io/home/` - this would mean that the following configuration becomes necessary:
@@ -348,5 +356,19 @@ Assuming your application is deployed as `https://frequi.freqtrade.io/home/` - t
}
```
In the following (pretty common) case, FreqUI is accessible on `http://localhost:8080/trade` (this is what you see in your navbar when navigating to freqUI).
![freqUI url](assets/frequi_url.png)
The correct configuration for this case is `http://localhost:8080` - the main part of the URL including the port.
```jsonc
{
//...
"jwt_secret_key": "somethingrandom",
"CORS_origins": ["http://localhost:8080"],
//...
}
```
!!! Note
We strongly recommend to also set `jwt_secret_key` to something random and known only to yourself to avoid unauthorized access to your bot.

View File

@@ -2,6 +2,7 @@
The `stoploss` configuration parameter is loss as ratio that should trigger a sale.
For example, value `-0.10` will cause immediate sell if the profit dips below -10% for a given trade. This parameter is optional.
Stoploss calculations do include fees, so a stoploss of -10% is placed exactly 10% below the entry point.
Most of the strategy files already include the optimal `stoploss` value.
@@ -23,14 +24,14 @@ These modes can be configured with these values:
```
!!! Note
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.
Stoploss on exchange is only supported for Binance (stop-loss-limit), Huobi (stop-limit), Kraken (stop-loss-market, stop-loss-limit), FTX (stop limit and stop-market) Gateio (stop-limit), and Kucoin (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.
If the stoploss is *on exchange* it means a stoploss limit order is placed on the exchange immediately after buy order fills. This will protect you against sudden crashes in market, as the order execution happens purely within the exchange, and has no potential network overhead.
If `stoploss_on_exchange` uses limit orders, the exchange needs 2 prices, the stoploss_price and the Limit price.
`stoploss` defines the stop-price where the limit order is placed - and limit should be slightly below this.
@@ -182,7 +183,7 @@ 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$
* stoploss will remain at 90$ unless asset increases to or above our configured offset
* stoploss will remain at 90$ unless asset increases to or above the 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$

View File

@@ -77,43 +77,6 @@ class AwesomeStrategy(IStrategy):
***
## Custom sell signal
It is possible to define custom sell signals, indicating that specified position should be sold. This is very useful when we need to customize sell conditions for each individual trade, or if you need the trade profit to take the sell decision.
For example you could implement a 1:2 risk-reward ROI with `custom_sell()`.
Using custom_sell() signals in place of stoploss though *is not recommended*. It is a inferior method to using `custom_stoploss()` in this regard - which also allows you to keep the stoploss on exchange.
!!! Note
Returning a `string` or `True` from this method is equal to setting sell signal on a candle at specified time. This method is not called when sell signal is set already, or if sell signals are disabled (`use_sell_signal=False` or `sell_profit_only=True` while profit is below `sell_profit_offset`). `string` max length is 64 characters. Exceeding this limit will cause the message to be truncated to 64 characters.
An example of how we can use different indicators depending on the current profit and also sell trades that were open longer than one day:
``` python
class AwesomeStrategy(IStrategy):
def custom_sell(self, pair: str, trade: 'Trade', current_time: 'datetime', current_rate: float,
current_profit: float, **kwargs):
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
last_candle = dataframe.iloc[-1].squeeze()
# Above 20% profit, sell when rsi < 80
if current_profit > 0.2:
if last_candle['rsi'] < 80:
return 'rsi_below_80'
# Between 2% and 10%, sell if EMA-long above EMA-short
if 0.02 < current_profit < 0.1:
if last_candle['emalong'] > last_candle['emashort']:
return 'ema_long_below_80'
# Sell any positions at a loss if they are held for more than one day.
if current_profit < 0.0 and (current_time - trade.open_date_utc).days >= 1:
return 'unclog'
```
See [Dataframe access](#dataframe-access) for more information about dataframe use in strategy callbacks.
## Buy Tag
When your strategy has multiple buy signals, you can name the signal that triggered.
@@ -143,506 +106,47 @@ def custom_sell(self, pair: str, trade: Trade, current_time: datetime, current_r
!!! Note
`buy_tag` is limited to 100 characters, remaining data will be truncated.
## Exit tag
## Custom stoploss
The stoploss price can only ever move upwards - if the stoploss value returned from `custom_stoploss` would result in a lower stoploss price than was previously set, it will be ignored. The traditional `stoploss` value serves as an absolute lower level and will be instated as the initial stoploss.
The usage of the custom stoploss method must be enabled by setting `use_custom_stoploss=True` on the strategy object.
The method must return a stoploss value (float / number) as a percentage of the current price.
E.g. If the `current_rate` is 200 USD, then returning `0.02` will set the stoploss price 2% lower, at 196 USD.
The absolute value of the return value is used (the sign is ignored), so returning `0.05` or `-0.05` have the same result, a stoploss 5% below the current price.
To simulate a regular trailing stoploss of 4% (trailing 4% behind the maximum reached price) you would use the following very simple method:
Similar to [Buy Tagging](#buy-tag), you can also specify a sell tag.
``` python
# additional imports required
from datetime import datetime
from freqtrade.persistence import Trade
def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['rsi'] > 70) &
(dataframe['volume'] > 0)
),
['sell', 'exit_tag']] = (1, 'exit_rsi')
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
"""
Custom stoploss logic, returning the new distance relative to current_rate (as ratio).
e.g. returning -0.05 would create a stoploss 5% below current_rate.
The custom stoploss can never be below self.stoploss, which serves as a hard maximum loss.
For full documentation please go to https://www.freqtrade.io/en/latest/strategy-advanced/
When not implemented by a strategy, returns the initial stoploss value
Only called when use_custom_stoploss is set to True.
:param pair: Pair that's currently analyzed
:param trade: trade object.
:param current_time: datetime object, containing the current datetime
:param current_rate: Rate, calculated based on pricing settings in ask_strategy.
:param current_profit: Current profit (as ratio), calculated based on current_rate.
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return float: New stoploss value, relative to the current rate
"""
return -0.04
return dataframe
```
Stoploss on exchange works similar to `trailing_stop`, and the stoploss on exchange is updated as configured in `stoploss_on_exchange_interval` ([More details about stoploss on exchange](stoploss.md#stop-loss-on-exchange-freqtrade)).
!!! Note "Use of dates"
All time-based calculations should be done based on `current_time` - using `datetime.now()` or `datetime.utcnow()` is discouraged, as this will break backtesting support.
!!! Tip "Trailing stoploss"
It's recommended to disable `trailing_stop` when using custom stoploss values. Both can work in tandem, but you might encounter the trailing stop to move the price higher while your custom function would not want this, causing conflicting behavior.
### Custom stoploss examples
The next section will show some examples on what's possible with the custom stoploss function.
Of course, many more things are possible, and all examples can be combined at will.
#### Time based trailing stop
Use the initial stoploss for the first 60 minutes, after this change to 10% trailing stoploss, and after 2 hours (120 minutes) we use a 5% trailing stoploss.
``` python
from datetime import datetime, timedelta
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
# Make sure you have the longest interval first - these conditions are evaluated from top to bottom.
if current_time - timedelta(minutes=120) > trade.open_date_utc:
return -0.05
elif current_time - timedelta(minutes=60) > trade.open_date_utc:
return -0.10
return 1
```
#### Different stoploss per pair
Use a different stoploss depending on the pair.
In this example, we'll trail the highest price with 10% trailing stoploss for `ETH/BTC` and `XRP/BTC`, with 5% trailing stoploss for `LTC/BTC` and with 15% for all other pairs.
``` python
from datetime import datetime
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
if pair in ('ETH/BTC', 'XRP/BTC'):
return -0.10
elif pair in ('LTC/BTC'):
return -0.05
return -0.15
```
#### Trailing stoploss with positive offset
Use the initial stoploss until the profit is above 4%, then use a trailing stoploss of 50% of the current profit with a minimum of 2.5% and a maximum of 5%.
Please note that the stoploss can only increase, values lower than the current stoploss are ignored.
``` python
from datetime import datetime, timedelta
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
if current_profit < 0.04:
return -1 # return a value bigger than the initial stoploss to keep using the initial stoploss
# After reaching the desired offset, allow the stoploss to trail by half the profit
desired_stoploss = current_profit / 2
# Use a minimum of 2.5% and a maximum of 5%
return max(min(desired_stoploss, 0.05), 0.025)
```
#### Calculating stoploss relative to open price
Stoploss values returned from `custom_stoploss()` always specify a percentage relative to `current_rate`. In order to set a stoploss relative to the *open* price, we need to use `current_profit` to calculate what percentage relative to the `current_rate` will give you the same result as if the percentage was specified from the open price.
The helper function [`stoploss_from_open()`](strategy-customization.md#stoploss_from_open) can be used to convert from an open price relative stop, to a current price relative stop which can be returned from `custom_stoploss()`.
#### Stepped stoploss
Instead of continuously trailing behind the current price, this example sets fixed stoploss price levels based on the current profit.
* Use the regular stoploss until 20% profit is reached
* Once profit is > 20% - set stoploss to 7% above open price.
* Once profit is > 25% - set stoploss to 15% above open price.
* Once profit is > 40% - set stoploss to 25% above open price.
``` python
from datetime import datetime
from freqtrade.persistence import Trade
from freqtrade.strategy import stoploss_from_open
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
# evaluate highest to lowest, so that highest possible stop is used
if current_profit > 0.40:
return stoploss_from_open(0.25, current_profit)
elif current_profit > 0.25:
return stoploss_from_open(0.15, current_profit)
elif current_profit > 0.20:
return stoploss_from_open(0.07, current_profit)
# return maximum stoploss value, keeping current stoploss price unchanged
return 1
```
#### Custom stoploss using an indicator from dataframe example
Absolute stoploss value may be derived from indicators stored in dataframe. Example uses parabolic SAR below the price as stoploss.
``` python
class AwesomeStrategy(IStrategy):
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# <...>
dataframe['sar'] = ta.SAR(dataframe)
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
last_candle = dataframe.iloc[-1].squeeze()
# Use parabolic sar as absolute stoploss price
stoploss_price = last_candle['sar']
# Convert absolute price to percentage relative to current_rate
if stoploss_price < current_rate:
return (stoploss_price / current_rate) - 1
# return maximum stoploss value, keeping current stoploss price unchanged
return 1
```
See [Dataframe access](#dataframe-access) for more information about dataframe use in strategy callbacks.
---
## Custom order price rules
By default, freqtrade use the orderbook to automatically set an order price([Relevant documentation](configuration.md#prices-used-for-orders)), you also have the option to create custom order prices based on your strategy.
You can use this feature by creating a `custom_entry_price()` function in your strategy file to customize entry prices and `custom_exit_price()` for exits.
The provided exit-tag is then used as sell-reason - and shown as such in backtest results.
!!! Note
If your custom pricing function return None or an invalid value, price will fall back to `proposed_rate`, which is based on the regular pricing configuration.
`sell_reason` is limited to 100 characters, remaining data will be truncated.
### Custom order entry and exit price example
## Strategy version
You can implement custom strategy versioning by using the "version" method, and returning the version you would like this strategy to have.
``` python
from datetime import datetime, timedelta, timezone
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
def custom_entry_price(self, pair: str, current_time: datetime,
proposed_rate, **kwargs) -> float:
dataframe, last_updated = self.dp.get_analyzed_dataframe(pair=pair,
timeframe=self.timeframe)
new_entryprice = dataframe['bollinger_10_lowerband'].iat[-1]
return new_entryprice
def custom_exit_price(self, pair: str, trade: Trade,
current_time: datetime, proposed_rate: float,
current_profit: float, **kwargs) -> float:
dataframe, last_updated = self.dp.get_analyzed_dataframe(pair=pair,
timeframe=self.timeframe)
new_exitprice = dataframe['bollinger_10_upperband'].iat[-1]
return new_exitprice
```
!!! Warning
Modifying entry and exit prices will only work for limit orders. Depending on the price chosen, this can result in a lot of unfilled orders. By default the maximum allowed distance between the current price and the custom price is 2%, this value can be changed in config with the `custom_price_max_distance_ratio` parameter.
!!! Example
If the new_entryprice is 97, the proposed_rate is 100 and the `custom_price_max_distance_ratio` is set to 2%, The retained valid custom entry price will be 98.
!!! Warning "No backtesting support"
Custom entry-prices are currently not supported during backtesting.
## Custom order timeout rules
Simple, time-based order-timeouts can be configured either via strategy or in the configuration in the `unfilledtimeout` section.
However, freqtrade also offers a custom callback for both order types, which allows you to decide based on custom criteria if an order did time out or not.
!!! Note
Unfilled order timeouts are not relevant during backtesting or hyperopt, and are only relevant during real (live) trading. Therefore these methods are only called in these circumstances.
### Custom order timeout example
A simple example, which applies different unfilled-timeouts depending on the price of the asset can be seen below.
It applies a tight timeout for higher priced assets, while allowing more time to fill on cheap coins.
The function must return either `True` (cancel order) or `False` (keep order alive).
``` python
from datetime import datetime, timedelta, timezone
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
# Set unfilledtimeout to 25 hours, since our maximum timeout from below is 24 hours.
unfilledtimeout = {
'buy': 60 * 25,
'sell': 60 * 25
}
def check_buy_timeout(self, pair: str, trade: 'Trade', order: dict, **kwargs) -> bool:
if trade.open_rate > 100 and trade.open_date_utc < datetime.now(timezone.utc) - timedelta(minutes=5):
return True
elif trade.open_rate > 10 and trade.open_date_utc < datetime.now(timezone.utc) - timedelta(minutes=3):
return True
elif trade.open_rate < 1 and trade.open_date_utc < datetime.now(timezone.utc) - timedelta(hours=24):
return True
return False
def check_sell_timeout(self, pair: str, trade: 'Trade', order: dict, **kwargs) -> bool:
if trade.open_rate > 100 and trade.open_date_utc < datetime.now(timezone.utc) - timedelta(minutes=5):
return True
elif trade.open_rate > 10 and trade.open_date_utc < datetime.now(timezone.utc) - timedelta(minutes=3):
return True
elif trade.open_rate < 1 and trade.open_date_utc < datetime.now(timezone.utc) - timedelta(hours=24):
return True
return False
def version(self) -> str:
"""
Returns version of the strategy.
"""
return "1.1"
```
!!! Note
For the above example, `unfilledtimeout` must be set to something bigger than 24h, otherwise that type of timeout will apply first.
### Custom order timeout example (using additional data)
``` python
from datetime import datetime
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
# Set unfilledtimeout to 25 hours, since our maximum timeout from below is 24 hours.
unfilledtimeout = {
'buy': 60 * 25,
'sell': 60 * 25
}
def check_buy_timeout(self, pair: str, trade: Trade, order: dict, **kwargs) -> bool:
ob = self.dp.orderbook(pair, 1)
current_price = ob['bids'][0][0]
# Cancel buy order if price is more than 2% above the order.
if current_price > order['price'] * 1.02:
return True
return False
def check_sell_timeout(self, pair: str, trade: Trade, order: dict, **kwargs) -> bool:
ob = self.dp.orderbook(pair, 1)
current_price = ob['asks'][0][0]
# Cancel sell order if price is more than 2% below the order.
if current_price < order['price'] * 0.98:
return True
return False
```
---
## Bot loop start callback
A simple callback which is called once at the start of every bot throttling iteration.
This can be used to perform calculations which are pair independent (apply to all pairs), loading of external data, etc.
``` python
import requests
class AwesomeStrategy(IStrategy):
# ... populate_* methods
def bot_loop_start(self, **kwargs) -> None:
"""
Called at the start of the bot iteration (one loop).
Might be used to perform pair-independent tasks
(e.g. gather some remote resource for comparison)
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
"""
if self.config['runmode'].value in ('live', 'dry_run'):
# Assign this to the class by using self.*
# can then be used by populate_* methods
self.remote_data = requests.get('https://some_remote_source.example.com')
```
## Bot order confirmation
### Trade entry (buy order) confirmation
`confirm_trade_entry()` can be used to abort a trade entry at the latest second (maybe because the price is not what we expect).
``` python
class AwesomeStrategy(IStrategy):
# ... populate_* methods
def confirm_trade_entry(self, pair: str, order_type: str, amount: float, rate: float,
time_in_force: str, current_time: datetime, **kwargs) -> bool:
"""
Called right before placing a buy order.
Timing for this function is critical, so avoid doing heavy computations or
network requests in this method.
For full documentation please go to https://www.freqtrade.io/en/latest/strategy-advanced/
When not implemented by a strategy, returns True (always confirming).
:param pair: Pair that's about to be bought.
:param order_type: Order type (as configured in order_types). usually limit or market.
:param amount: Amount in target (quote) currency that's going to be traded.
:param rate: Rate that's going to be used when using limit orders
:param time_in_force: Time in force. Defaults to GTC (Good-til-cancelled).
:param current_time: datetime object, containing the current datetime
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return bool: When True is returned, then the buy-order is placed on the exchange.
False aborts the process
"""
return True
```
### Trade exit (sell order) confirmation
`confirm_trade_exit()` can be used to abort a trade exit (sell) at the latest second (maybe because the price is not what we expect).
``` python
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
def confirm_trade_exit(self, pair: str, trade: Trade, order_type: str, amount: float,
rate: float, time_in_force: str, sell_reason: str,
current_time: datetime, **kwargs) -> bool:
"""
Called right before placing a regular sell order.
Timing for this function is critical, so avoid doing heavy computations or
network requests in this method.
For full documentation please go to https://www.freqtrade.io/en/latest/strategy-advanced/
When not implemented by a strategy, returns True (always confirming).
:param pair: Pair that's about to be sold.
:param order_type: Order type (as configured in order_types). usually limit or market.
:param amount: Amount in quote currency.
:param rate: Rate that's going to be used when using limit orders
:param time_in_force: Time in force. Defaults to GTC (Good-til-cancelled).
:param sell_reason: Sell reason.
Can be any of ['roi', 'stop_loss', 'stoploss_on_exchange', 'trailing_stop_loss',
'sell_signal', 'force_sell', 'emergency_sell']
:param current_time: datetime object, containing the current datetime
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return bool: When True is returned, then the sell-order is placed on the exchange.
False aborts the process
"""
if sell_reason == 'force_sell' and trade.calc_profit_ratio(rate) < 0:
# Reject force-sells with negative profit
# This is just a sample, please adjust to your needs
# (this does not necessarily make sense, assuming you know when you're force-selling)
return False
return True
```
### Stake size management
It is possible to manage your risk by reducing or increasing stake amount when placing a new trade.
```python
class AwesomeStrategy(IStrategy):
def custom_stake_amount(self, pair: str, current_time: datetime, current_rate: float,
proposed_stake: float, min_stake: float, max_stake: float,
**kwargs) -> float:
dataframe, _ = self.dp.get_analyzed_dataframe(pair=pair, timeframe=self.timeframe)
current_candle = dataframe.iloc[-1].squeeze()
if current_candle['fastk_rsi_1h'] > current_candle['fastd_rsi_1h']:
if self.config['stake_amount'] == 'unlimited':
# Use entire available wallet during favorable conditions when in compounding mode.
return max_stake
else:
# Compound profits during favorable conditions instead of using a static stake.
return self.wallets.get_total_stake_amount() / self.config['max_open_trades']
# Use default stake amount.
return proposed_stake
```
Freqtrade will fall back to the `proposed_stake` value should your code raise an exception. The exception itself will be logged.
!!! Tip
You do not _have_ to ensure that `min_stake <= returned_value <= max_stake`. Trades will succeed as the returned value will be clamped to supported range and this acton will be logged.
!!! Tip
Returning `0` or `None` will prevent trades from being placed.
---
You should make sure to implement proper version control (like a git repository) alongside this, as freqtrade will not keep historic versions of your strategy, so it's up to the user to be able to eventually roll back to a prior version of the strategy.
## Derived strategies
The strategies can be derived from other strategies. This avoids duplication of your custom strategy code. You can use this technique to override small parts of your main strategy, leaving the rest untouched:
``` python
``` python title="user_data/strategies/myawesomestrategy.py"
class MyAwesomeStrategy(IStrategy):
...
stoploss = 0.13
@@ -651,6 +155,10 @@ class MyAwesomeStrategy(IStrategy):
# should be in any custom strategy...
...
```
``` python title="user_data/strategies/MyAwesomeStrategy2.py"
from myawesomestrategy import MyAwesomeStrategy
class MyAwesomeStrategy2(MyAwesomeStrategy):
# Override something
stoploss = 0.08
@@ -659,16 +167,7 @@ class MyAwesomeStrategy2(MyAwesomeStrategy):
Both attributes and methods may be overridden, altering behavior of the original strategy in a way you need.
!!! Note "Parent-strategy in different files"
If you have the parent-strategy in a different file, you'll need to add the following to the top of your "child"-file to ensure proper loading, otherwise freqtrade may not be able to load the parent strategy correctly.
``` python
import sys
from pathlib import Path
sys.path.append(str(Path(__file__).parent))
from myawesomestrategy import MyAwesomeStrategy
```
While keeping the subclass in the same file is technically possible, it can lead to some problems with hyperopt parameter files, we therefore recommend to use separate strategy files, and import the parent strategy as shown above.
## Embedding Strategies
@@ -695,3 +194,33 @@ The variable 'content', will contain the strategy file in a BASE64 encoded form.
```
Please ensure that 'NameOfStrategy' is identical to the strategy name!
## Performance warning
When executing a strategy, one can sometimes be greeted by the following in the logs
> PerformanceWarning: DataFrame is highly fragmented.
This is a warning from [`pandas`](https://github.com/pandas-dev/pandas) and as the warning continues to say:
use `pd.concat(axis=1)`.
This can have slight performance implications, which are usually only visible during hyperopt (when optimizing an indicator).
For example:
```python
for val in self.buy_ema_short.range:
dataframe[f'ema_short_{val}'] = ta.EMA(dataframe, timeperiod=val)
```
should be rewritten to
```python
frames = [dataframe]
for val in self.buy_ema_short.range:
frames.append(DataFrame({
f'ema_short_{val}': ta.EMA(dataframe, timeperiod=val)
}))
# Append columns to existing dataframe
merged_frame = pd.concat(frames, axis=1)
```

684
docs/strategy-callbacks.md Normal file
View File

@@ -0,0 +1,684 @@
# Strategy Callbacks
While the main strategy functions (`populate_indicators()`, `populate_buy_trend()`, `populate_sell_trend()`) should be used in a vectorized way, and are only called [once during backtesting](bot-basics.md#backtesting-hyperopt-execution-logic), callbacks are called "whenever needed".
As such, you should avoid doing heavy calculations in callbacks to avoid delays during operations.
Depending on the callback used, they may be called when entering / exiting a trade, or throughout the duration of a trade.
Currently available callbacks:
* [`bot_loop_start()`](#bot-loop-start)
* [`custom_stake_amount()`](#custom-stake-size)
* [`custom_sell()`](#custom-sell-signal)
* [`custom_stoploss()`](#custom-stoploss)
* [`custom_entry_price()` and `custom_exit_price()`](#custom-order-price-rules)
* [`check_buy_timeout()` and `check_sell_timeout()](#custom-order-timeout-rules)
* [`confirm_trade_entry()`](#trade-entry-buy-order-confirmation)
* [`confirm_trade_exit()`](#trade-exit-sell-order-confirmation)
* [`adjust_trade_position()`](#adjust-trade-position)
!!! Tip "Callback calling sequence"
You can find the callback calling sequence in [bot-basics](bot-basics.md#bot-execution-logic)
## Bot loop start
A simple callback which is called once at the start of every bot throttling iteration (roughly every 5 seconds, unless configured differently).
This can be used to perform calculations which are pair independent (apply to all pairs), loading of external data, etc.
``` python
import requests
class AwesomeStrategy(IStrategy):
# ... populate_* methods
def bot_loop_start(self, **kwargs) -> None:
"""
Called at the start of the bot iteration (one loop).
Might be used to perform pair-independent tasks
(e.g. gather some remote resource for comparison)
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
"""
if self.config['runmode'].value in ('live', 'dry_run'):
# Assign this to the class by using self.*
# can then be used by populate_* methods
self.remote_data = requests.get('https://some_remote_source.example.com')
```
## Custom Stake size
Called before entering a trade, makes it possible to manage your position size when placing a new trade.
```python
class AwesomeStrategy(IStrategy):
def custom_stake_amount(self, pair: str, current_time: datetime, current_rate: float,
proposed_stake: float, min_stake: float, max_stake: float,
entry_tag: Optional[str], **kwargs) -> float:
dataframe, _ = self.dp.get_analyzed_dataframe(pair=pair, timeframe=self.timeframe)
current_candle = dataframe.iloc[-1].squeeze()
if current_candle['fastk_rsi_1h'] > current_candle['fastd_rsi_1h']:
if self.config['stake_amount'] == 'unlimited':
# Use entire available wallet during favorable conditions when in compounding mode.
return max_stake
else:
# Compound profits during favorable conditions instead of using a static stake.
return self.wallets.get_total_stake_amount() / self.config['max_open_trades']
# Use default stake amount.
return proposed_stake
```
Freqtrade will fall back to the `proposed_stake` value should your code raise an exception. The exception itself will be logged.
!!! Tip
You do not _have_ to ensure that `min_stake <= returned_value <= max_stake`. Trades will succeed as the returned value will be clamped to supported range and this action will be logged.
!!! Tip
Returning `0` or `None` will prevent trades from being placed.
## Custom sell signal
Called for open trade every throttling iteration (roughly every 5 seconds) until a trade is closed.
Allows to define custom sell signals, indicating that specified position should be sold. This is very useful when we need to customize sell conditions for each individual trade, or if you need trade data to make an exit decision.
For example you could implement a 1:2 risk-reward ROI with `custom_sell()`.
Using custom_sell() signals in place of stoploss though *is not recommended*. It is a inferior method to using `custom_stoploss()` in this regard - which also allows you to keep the stoploss on exchange.
!!! Note
Returning a (none-empty) `string` or `True` from this method is equal to setting sell signal on a candle at specified time. This method is not called when sell signal is set already, or if sell signals are disabled (`use_sell_signal=False` or `sell_profit_only=True` while profit is below `sell_profit_offset`). `string` max length is 64 characters. Exceeding this limit will cause the message to be truncated to 64 characters.
An example of how we can use different indicators depending on the current profit and also sell trades that were open longer than one day:
``` python
class AwesomeStrategy(IStrategy):
def custom_sell(self, pair: str, trade: 'Trade', current_time: 'datetime', current_rate: float,
current_profit: float, **kwargs):
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
last_candle = dataframe.iloc[-1].squeeze()
# Above 20% profit, sell when rsi < 80
if current_profit > 0.2:
if last_candle['rsi'] < 80:
return 'rsi_below_80'
# Between 2% and 10%, sell if EMA-long above EMA-short
if 0.02 < current_profit < 0.1:
if last_candle['emalong'] > last_candle['emashort']:
return 'ema_long_below_80'
# Sell any positions at a loss if they are held for more than one day.
if current_profit < 0.0 and (current_time - trade.open_date_utc).days >= 1:
return 'unclog'
```
See [Dataframe access](strategy-advanced.md#dataframe-access) for more information about dataframe use in strategy callbacks.
## Custom stoploss
Called for open trade every throttling iteration (roughly every 5 seconds) until a trade is closed.
The usage of the custom stoploss method must be enabled by setting `use_custom_stoploss=True` on the strategy object.
The stoploss price can only ever move upwards - if the stoploss value returned from `custom_stoploss` would result in a lower stoploss price than was previously set, it will be ignored. The traditional `stoploss` value serves as an absolute lower level and will be instated as the initial stoploss (before this method is called for the first time for a trade).
The method must return a stoploss value (float / number) as a percentage of the current price.
E.g. If the `current_rate` is 200 USD, then returning `0.02` will set the stoploss price 2% lower, at 196 USD.
The absolute value of the return value is used (the sign is ignored), so returning `0.05` or `-0.05` have the same result, a stoploss 5% below the current price.
To simulate a regular trailing stoploss of 4% (trailing 4% behind the maximum reached price) you would use the following very simple method:
``` python
# additional imports required
from datetime import datetime
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
"""
Custom stoploss logic, returning the new distance relative to current_rate (as ratio).
e.g. returning -0.05 would create a stoploss 5% below current_rate.
The custom stoploss can never be below self.stoploss, which serves as a hard maximum loss.
For full documentation please go to https://www.freqtrade.io/en/latest/strategy-advanced/
When not implemented by a strategy, returns the initial stoploss value
Only called when use_custom_stoploss is set to True.
:param pair: Pair that's currently analyzed
:param trade: trade object.
:param current_time: datetime object, containing the current datetime
:param current_rate: Rate, calculated based on pricing settings in ask_strategy.
:param current_profit: Current profit (as ratio), calculated based on current_rate.
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return float: New stoploss value, relative to the current rate
"""
return -0.04
```
Stoploss on exchange works similar to `trailing_stop`, and the stoploss on exchange is updated as configured in `stoploss_on_exchange_interval` ([More details about stoploss on exchange](stoploss.md#stop-loss-on-exchange-freqtrade)).
!!! Note "Use of dates"
All time-based calculations should be done based on `current_time` - using `datetime.now()` or `datetime.utcnow()` is discouraged, as this will break backtesting support.
!!! Tip "Trailing stoploss"
It's recommended to disable `trailing_stop` when using custom stoploss values. Both can work in tandem, but you might encounter the trailing stop to move the price higher while your custom function would not want this, causing conflicting behavior.
### Custom stoploss examples
The next section will show some examples on what's possible with the custom stoploss function.
Of course, many more things are possible, and all examples can be combined at will.
#### Time based trailing stop
Use the initial stoploss for the first 60 minutes, after this change to 10% trailing stoploss, and after 2 hours (120 minutes) we use a 5% trailing stoploss.
``` python
from datetime import datetime, timedelta
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
# Make sure you have the longest interval first - these conditions are evaluated from top to bottom.
if current_time - timedelta(minutes=120) > trade.open_date_utc:
return -0.05
elif current_time - timedelta(minutes=60) > trade.open_date_utc:
return -0.10
return 1
```
#### Different stoploss per pair
Use a different stoploss depending on the pair.
In this example, we'll trail the highest price with 10% trailing stoploss for `ETH/BTC` and `XRP/BTC`, with 5% trailing stoploss for `LTC/BTC` and with 15% for all other pairs.
``` python
from datetime import datetime
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
if pair in ('ETH/BTC', 'XRP/BTC'):
return -0.10
elif pair in ('LTC/BTC'):
return -0.05
return -0.15
```
#### Trailing stoploss with positive offset
Use the initial stoploss until the profit is above 4%, then use a trailing stoploss of 50% of the current profit with a minimum of 2.5% and a maximum of 5%.
Please note that the stoploss can only increase, values lower than the current stoploss are ignored.
``` python
from datetime import datetime, timedelta
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
if current_profit < 0.04:
return -1 # return a value bigger than the initial stoploss to keep using the initial stoploss
# After reaching the desired offset, allow the stoploss to trail by half the profit
desired_stoploss = current_profit / 2
# Use a minimum of 2.5% and a maximum of 5%
return max(min(desired_stoploss, 0.05), 0.025)
```
#### Stepped stoploss
Instead of continuously trailing behind the current price, this example sets fixed stoploss price levels based on the current profit.
* Use the regular stoploss until 20% profit is reached
* Once profit is > 20% - set stoploss to 7% above open price.
* Once profit is > 25% - set stoploss to 15% above open price.
* Once profit is > 40% - set stoploss to 25% above open price.
``` python
from datetime import datetime
from freqtrade.persistence import Trade
from freqtrade.strategy import stoploss_from_open
class AwesomeStrategy(IStrategy):
# ... populate_* methods
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
# evaluate highest to lowest, so that highest possible stop is used
if current_profit > 0.40:
return stoploss_from_open(0.25, current_profit)
elif current_profit > 0.25:
return stoploss_from_open(0.15, current_profit)
elif current_profit > 0.20:
return stoploss_from_open(0.07, current_profit)
# return maximum stoploss value, keeping current stoploss price unchanged
return 1
```
#### Custom stoploss using an indicator from dataframe example
Absolute stoploss value may be derived from indicators stored in dataframe. Example uses parabolic SAR below the price as stoploss.
``` python
class AwesomeStrategy(IStrategy):
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# <...>
dataframe['sar'] = ta.SAR(dataframe)
use_custom_stoploss = True
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
last_candle = dataframe.iloc[-1].squeeze()
# Use parabolic sar as absolute stoploss price
stoploss_price = last_candle['sar']
# Convert absolute price to percentage relative to current_rate
if stoploss_price < current_rate:
return (stoploss_price / current_rate) - 1
# return maximum stoploss value, keeping current stoploss price unchanged
return 1
```
See [Dataframe access](strategy-advanced.md#dataframe-access) for more information about dataframe use in strategy callbacks.
### Common helpers for stoploss calculations
#### Stoploss relative to open price
Stoploss values returned from `custom_stoploss()` always specify a percentage relative to `current_rate`. In order to set a stoploss relative to the *open* price, we need to use `current_profit` to calculate what percentage relative to the `current_rate` will give you the same result as if the percentage was specified from the open price.
The helper function [`stoploss_from_open()`](strategy-customization.md#stoploss_from_open) can be used to convert from an open price relative stop, to a current price relative stop which can be returned from `custom_stoploss()`.
#### Stoploss percentage from absolute price
Stoploss values returned from `custom_stoploss()` always specify a percentage relative to `current_rate`. In order to set a stoploss at specified absolute price level, we need to use `stop_rate` to calculate what percentage relative to the `current_rate` will give you the same result as if the percentage was specified from the open price.
The helper function [`stoploss_from_absolute()`](strategy-customization.md#stoploss_from_absolute) can be used to convert from an absolute price, to a current price relative stop which can be returned from `custom_stoploss()`.
---
## Custom order price rules
By default, freqtrade use the orderbook to automatically set an order price([Relevant documentation](configuration.md#prices-used-for-orders)), you also have the option to create custom order prices based on your strategy.
You can use this feature by creating a `custom_entry_price()` function in your strategy file to customize entry prices and `custom_exit_price()` for exits.
Each of these methods are called right before placing an order on the exchange.
!!! Note
If your custom pricing function return None or an invalid value, price will fall back to `proposed_rate`, which is based on the regular pricing configuration.
### Custom order entry and exit price example
``` python
from datetime import datetime, timedelta, timezone
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
def custom_entry_price(self, pair: str, current_time: datetime, proposed_rate: float,
entry_tag: Optional[str], **kwargs) -> float:
dataframe, last_updated = self.dp.get_analyzed_dataframe(pair=pair,
timeframe=self.timeframe)
new_entryprice = dataframe['bollinger_10_lowerband'].iat[-1]
return new_entryprice
def custom_exit_price(self, pair: str, trade: Trade,
current_time: datetime, proposed_rate: float,
current_profit: float, **kwargs) -> float:
dataframe, last_updated = self.dp.get_analyzed_dataframe(pair=pair,
timeframe=self.timeframe)
new_exitprice = dataframe['bollinger_10_upperband'].iat[-1]
return new_exitprice
```
!!! Warning
Modifying entry and exit prices will only work for limit orders. Depending on the price chosen, this can result in a lot of unfilled orders. By default the maximum allowed distance between the current price and the custom price is 2%, this value can be changed in config with the `custom_price_max_distance_ratio` parameter.
**Example**:
If the new_entryprice is 97, the proposed_rate is 100 and the `custom_price_max_distance_ratio` is set to 2%, The retained valid custom entry price will be 98, which is 2% below the current (proposed) rate.
!!! Warning "Backtesting"
Custom prices are supported in backtesting (starting with 2021.12), and orders will fill if the price falls within the candle's low/high range.
Orders that don't fill immediately are subject to regular timeout handling, which happens once per (detail) candle.
`custom_exit_price()` is only called for sells of type Sell_signal and Custom sell. All other sell-types will use regular backtesting prices.
## Custom order timeout rules
Simple, time-based order-timeouts can be configured either via strategy or in the configuration in the `unfilledtimeout` section.
However, freqtrade also offers a custom callback for both order types, which allows you to decide based on custom criteria if an order did time out or not.
!!! Note
Backtesting fills orders if their price falls within the candle's low/high range.
The below callbacks will be called once per (detail) candle for orders that don't fill immediately (which use custom pricing).
### Custom order timeout example
Called for every open order until that order is either filled or cancelled.
`check_buy_timeout()` is called for trade entries, while `check_sell_timeout()` is called for trade exit orders.
A simple example, which applies different unfilled-timeouts depending on the price of the asset can be seen below.
It applies a tight timeout for higher priced assets, while allowing more time to fill on cheap coins.
The function must return either `True` (cancel order) or `False` (keep order alive).
``` python
from datetime import datetime, timedelta
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
# Set unfilledtimeout to 25 hours, since the maximum timeout from below is 24 hours.
unfilledtimeout = {
'buy': 60 * 25,
'sell': 60 * 25
}
def check_buy_timeout(self, pair: str, trade: 'Trade', order: dict,
current_time: datetime, **kwargs) -> bool:
if trade.open_rate > 100 and trade.open_date_utc < current_time - timedelta(minutes=5):
return True
elif trade.open_rate > 10 and trade.open_date_utc < current_time - timedelta(minutes=3):
return True
elif trade.open_rate < 1 and trade.open_date_utc < current_time - timedelta(hours=24):
return True
return False
def check_sell_timeout(self, pair: str, trade: Trade, order: dict,
current_time: datetime, **kwargs) -> bool:
if trade.open_rate > 100 and trade.open_date_utc < current_time - timedelta(minutes=5):
return True
elif trade.open_rate > 10 and trade.open_date_utc < current_time - timedelta(minutes=3):
return True
elif trade.open_rate < 1 and trade.open_date_utc < current_time - timedelta(hours=24):
return True
return False
```
!!! Note
For the above example, `unfilledtimeout` must be set to something bigger than 24h, otherwise that type of timeout will apply first.
### Custom order timeout example (using additional data)
``` python
from datetime import datetime
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
# Set unfilledtimeout to 25 hours, since the maximum timeout from below is 24 hours.
unfilledtimeout = {
'buy': 60 * 25,
'sell': 60 * 25
}
def check_buy_timeout(self, pair: str, trade: Trade, order: dict,
current_time: datetime, **kwargs) -> bool:
ob = self.dp.orderbook(pair, 1)
current_price = ob['bids'][0][0]
# Cancel buy order if price is more than 2% above the order.
if current_price > order['price'] * 1.02:
return True
return False
def check_sell_timeout(self, pair: str, trade: Trade, order: dict,
current_time: datetime, **kwargs) -> bool:
ob = self.dp.orderbook(pair, 1)
current_price = ob['asks'][0][0]
# Cancel sell order if price is more than 2% below the order.
if current_price < order['price'] * 0.98:
return True
return False
```
---
## Bot order confirmation
Confirm trade entry / exits.
This are the last methods that will be called before an order is placed.
### Trade entry (buy order) confirmation
`confirm_trade_entry()` can be used to abort a trade entry at the latest second (maybe because the price is not what we expect).
``` python
class AwesomeStrategy(IStrategy):
# ... populate_* methods
def confirm_trade_entry(self, pair: str, order_type: str, amount: float, rate: float,
time_in_force: str, current_time: datetime, entry_tag: Optional[str],
**kwargs) -> bool:
"""
Called right before placing a buy order.
Timing for this function is critical, so avoid doing heavy computations or
network requests in this method.
For full documentation please go to https://www.freqtrade.io/en/latest/strategy-advanced/
When not implemented by a strategy, returns True (always confirming).
:param pair: Pair that's about to be bought.
:param order_type: Order type (as configured in order_types). usually limit or market.
:param amount: Amount in target (quote) currency that's going to be traded.
:param rate: Rate that's going to be used when using limit orders
:param time_in_force: Time in force. Defaults to GTC (Good-til-cancelled).
:param current_time: datetime object, containing the current datetime
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return bool: When True is returned, then the buy-order is placed on the exchange.
False aborts the process
"""
return True
```
### Trade exit (sell order) confirmation
`confirm_trade_exit()` can be used to abort a trade exit (sell) at the latest second (maybe because the price is not what we expect).
``` python
from freqtrade.persistence import Trade
class AwesomeStrategy(IStrategy):
# ... populate_* methods
def confirm_trade_exit(self, pair: str, trade: Trade, order_type: str, amount: float,
rate: float, time_in_force: str, sell_reason: str,
current_time: datetime, **kwargs) -> bool:
"""
Called right before placing a regular sell order.
Timing for this function is critical, so avoid doing heavy computations or
network requests in this method.
For full documentation please go to https://www.freqtrade.io/en/latest/strategy-advanced/
When not implemented by a strategy, returns True (always confirming).
:param pair: Pair that's about to be sold.
:param order_type: Order type (as configured in order_types). usually limit or market.
:param amount: Amount in quote currency.
:param rate: Rate that's going to be used when using limit orders
:param time_in_force: Time in force. Defaults to GTC (Good-til-cancelled).
:param sell_reason: Sell reason.
Can be any of ['roi', 'stop_loss', 'stoploss_on_exchange', 'trailing_stop_loss',
'sell_signal', 'force_sell', 'emergency_sell']
:param current_time: datetime object, containing the current datetime
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return bool: When True is returned, then the sell-order is placed on the exchange.
False aborts the process
"""
if sell_reason == 'force_sell' and trade.calc_profit_ratio(rate) < 0:
# Reject force-sells with negative profit
# This is just a sample, please adjust to your needs
# (this does not necessarily make sense, assuming you know when you're force-selling)
return False
return True
```
## Adjust trade position
The `position_adjustment_enable` strategy property enables the usage of `adjust_trade_position()` callback in the strategy.
For performance reasons, it's disabled by default and freqtrade will show a warning message on startup if enabled.
`adjust_trade_position()` can be used to perform additional orders, for example to manage risk with DCA (Dollar Cost Averaging).
`max_entry_position_adjustment` property is used to limit the number of additional buys per trade (on top of the first buy) that the bot can execute. By default, the value is -1 which means the bot have no limit on number of adjustment buys.
The strategy is expected to return a stake_amount (in stake currency) between `min_stake` and `max_stake` if and when an additional buy order should be made (position is increased).
If there are not enough funds in the wallet (the return value is above `max_stake`) then the signal will be ignored.
Additional orders also result in additional fees and those orders don't count towards `max_open_trades`.
This callback is **not** called when there is an open order (either buy or sell) waiting for execution, or when you have reached the maximum amount of extra buys that you have set on `max_entry_position_adjustment`.
`adjust_trade_position()` is called very frequently for the duration of a trade, so you must keep your implementation as performant as possible.
!!! Note "About stake size"
Using fixed stake size means it will be the amount used for the first order, just like without position adjustment.
If you wish to buy additional orders with DCA, then make sure to leave enough funds in the wallet for that.
Using 'unlimited' stake amount with DCA orders requires you to also implement the `custom_stake_amount()` callback to avoid allocating all funds to the initial order.
!!! Warning
Stoploss is still calculated from the initial opening price, not averaged price.
!!! Warning "/stopbuy"
While `/stopbuy` command stops the bot from entering new trades, the position adjustment feature will continue buying new orders on existing trades.
!!! Warning "Backtesting"
During backtesting this callback is called for each candle in `timeframe` or `timeframe_detail`, so performance will be affected.
``` python
from freqtrade.persistence import Trade
class DigDeeperStrategy(IStrategy):
position_adjustment_enable = True
# Attempts to handle large drops with DCA. High stoploss is required.
stoploss = -0.30
# ... populate_* methods
# Example specific variables
max_entry_position_adjustment = 3
# This number is explained a bit further down
max_dca_multiplier = 5.5
# This is called when placing the initial order (opening trade)
def custom_stake_amount(self, pair: str, current_time: datetime, current_rate: float,
proposed_stake: float, min_stake: float, max_stake: float,
entry_tag: Optional[str], **kwargs) -> float:
# We need to leave most of the funds for possible further DCA orders
# This also applies to fixed stakes
return proposed_stake / self.max_dca_multiplier
def adjust_trade_position(self, trade: Trade, current_time: datetime,
current_rate: float, current_profit: float, min_stake: float,
max_stake: float, **kwargs):
"""
Custom trade adjustment logic, returning the stake amount that a trade should be increased.
This means extra buy orders with additional fees.
:param trade: trade object.
:param current_time: datetime object, containing the current datetime
:param current_rate: Current buy rate.
:param current_profit: Current profit (as ratio), calculated based on current_rate.
:param min_stake: Minimal stake size allowed by exchange.
:param max_stake: Balance available for trading.
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
:return float: Stake amount to adjust your trade
"""
if current_profit > -0.05:
return None
# Obtain pair dataframe (just to show how to access it)
dataframe, _ = self.dp.get_analyzed_dataframe(trade.pair, self.timeframe)
# Only buy when not actively falling price.
last_candle = dataframe.iloc[-1].squeeze()
previous_candle = dataframe.iloc[-2].squeeze()
if last_candle['close'] < previous_candle['close']:
return None
filled_buys = trade.select_filled_orders('buy')
count_of_buys = trade.nr_of_successful_buys
# Allow up to 3 additional increasingly larger buys (4 in total)
# Initial buy is 1x
# If that falls to -5% profit, we buy 1.25x more, average profit should increase to roughly -2.2%
# If that falls down to -5% again, we buy 1.5x more
# If that falls once again down to -5%, we buy 1.75x more
# Total stake for this trade would be 1 + 1.25 + 1.5 + 1.75 = 5.5x of the initial allowed stake.
# That is why max_dca_multiplier is 5.5
# Hope you have a deep wallet!
try:
# This returns first order stake size
stake_amount = filled_buys[0].cost
# This then calculates current safety order size
stake_amount = stake_amount * (1 + (count_of_buys * 0.25))
return stake_amount
except Exception as exception:
return None
return None
```

View File

@@ -4,33 +4,23 @@ This page explains how to customize your strategies, add new indicators and set
Please familiarize yourself with [Freqtrade basics](bot-basics.md) first, which provides overall info on how the bot operates.
## Install a custom strategy file
This is very simple. Copy paste your strategy file into the directory `user_data/strategies`.
Let assume you have a class called `AwesomeStrategy` in the file `AwesomeStrategy.py`:
1. Move your file into `user_data/strategies` (you should have `user_data/strategies/AwesomeStrategy.py`
2. Start the bot with the param `--strategy AwesomeStrategy` (the parameter is the class name)
```bash
freqtrade trade --strategy AwesomeStrategy
```
## Develop your own strategy
The bot includes a default strategy file.
Also, several other strategies are available in the [strategy repository](https://github.com/freqtrade/freqtrade-strategies).
You will however most likely have your own idea for a strategy.
This document intends to help you develop one for yourself.
This document intends to help you convert your strategy idea into your own strategy.
To get started, use `freqtrade new-strategy --strategy AwesomeStrategy`.
To get started, use `freqtrade new-strategy --strategy AwesomeStrategy` (you can obviously use your own naming for your strategy).
This will create a new strategy file from a template, which will be located under `user_data/strategies/AwesomeStrategy.py`.
!!! Note
This is just a template file, which will most likely not be profitable out of the box.
??? Hint "Different template levels"
`freqtrade new-strategy` has an additional parameter, `--template`, which controls the amount of pre-build information you get in the created strategy. Use `--template minimal` to get an empty strategy without any indicator examples, or `--template advanced` to get a template with most callbacks defined.
### Anatomy of a strategy
A strategy file contains all the information needed to build a good strategy:
@@ -67,6 +57,46 @@ file as reference.**
needs to take care to avoid having the strategy utilize data from the future.
Some common patterns for this are listed in the [Common Mistakes](#common-mistakes-when-developing-strategies) section of this document.
### Dataframe
Freqtrade uses [pandas](https://pandas.pydata.org/) to store/provide the candlestick (OHLCV) data.
Pandas is a great library developed for processing large amounts of data.
Each row in a dataframe corresponds to one candle on a chart, with the latest candle always being the last in the dataframe (sorted by date).
``` output
> dataframe.head()
date open high low close volume
0 2021-11-09 23:25:00+00:00 67279.67 67321.84 67255.01 67300.97 44.62253
1 2021-11-09 23:30:00+00:00 67300.97 67301.34 67183.03 67187.01 61.38076
2 2021-11-09 23:35:00+00:00 67187.02 67187.02 67031.93 67123.81 113.42728
3 2021-11-09 23:40:00+00:00 67123.80 67222.40 67080.33 67160.48 78.96008
4 2021-11-09 23:45:00+00:00 67160.48 67160.48 66901.26 66943.37 111.39292
```
Pandas provides fast ways to calculate metrics. To benefit from this speed, it's advised to not use loops, but use vectorized methods instead.
Vectorized operations perform calculations across the whole range of data and are therefore, compared to looping through each row, a lot faster when calculating indicators.
As a dataframe is a table, simple python comparisons like the following will not work
``` python
if dataframe['rsi'] > 30:
dataframe['buy'] = 1
```
The above section will fail with `The truth value of a Series is ambiguous. [...]`.
This must instead be written in a pandas-compatible way, so the operation is performed across the whole dataframe.
``` python
dataframe.loc[
(dataframe['rsi'] > 30)
, 'buy'] = 1
```
With this section, you have a new column in your dataframe, which has `1` assigned whenever RSI is above 30.
### Customize Indicators
Buy and sell strategies need indicators. You can add more indicators by extending the list contained in the method `populate_indicators()` from your strategy file.
@@ -122,9 +152,19 @@ def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame
Look into the [user_data/strategies/sample_strategy.py](https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/templates/sample_strategy.py).
Then uncomment indicators you need.
#### Indicator libraries
Out of the box, freqtrade installs the following technical libraries:
* [ta-lib](http://mrjbq7.github.io/ta-lib/)
* [pandas-ta](https://twopirllc.github.io/pandas-ta/)
* [technical](https://github.com/freqtrade/technical/)
Additional technical libraries can be installed as necessary, or custom indicators may be written / invented by the strategy author.
### Strategy startup period
Most indicators have an instable startup period, in which they are either not available, or the calculation is incorrect. This can lead to inconsistencies, since Freqtrade does not know how long this instable period should be.
Most indicators have an instable startup period, in which they are either not available (NaN), or the calculation is incorrect. This can lead to inconsistencies, since Freqtrade does not know how long this instable period should be.
To account for this, the strategy can be assigned the `startup_candle_count` attribute.
This should be set to the maximum number of candles that the strategy requires to calculate stable indicators.
@@ -136,8 +176,14 @@ In this example strategy, this should be set to 100 (`startup_candle_count = 100
By letting the bot know how much history is needed, backtest trades can start at the specified timerange during backtesting and hyperopt.
!!! Warning "Using x calls to get OHLCV"
If you receive a warning like `WARNING - Using 3 calls to get OHLCV. This can result in slower operations for the bot. Please check if you really need 1500 candles for your strategy` - you should consider if you really need this much historic data for your signals.
Having this will cause Freqtrade to make multiple calls for the same pair, which will obviously be slower than one network request.
As a consequence, Freqtrade will take longer to refresh candles - and should therefore be avoided if possible.
This is capped to 5 total calls to avoid overloading the exchange, or make freqtrade too slow.
!!! Warning
`startup_candle_count` should be below `ohlcv_candle_limit` (which is 500 for most exchanges) - since only this amount of candles will be available during Dry-Run/Live Trade operations.
`startup_candle_count` should be below `ohlcv_candle_limit * 5` (which is 500 * 5 for most exchanges) - since only this amount of candles will be available during Dry-Run/Live Trade operations.
#### Example
@@ -271,21 +317,15 @@ class AwesomeStrategy(IStrategy):
Setting a stoploss is highly recommended to protect your capital from strong moves against you.
Sample:
Sample of setting a 10% stoploss:
``` python
stoploss = -0.10
```
This would signify a stoploss of -10%.
For the full documentation on stoploss features, look at the dedicated [stoploss page](stoploss.md).
If your exchange supports it, it's recommended to also set `"stoploss_on_exchange"` in the order_types dictionary, so your stoploss is on the exchange and cannot be missed due to network problems, high load or other reasons.
For more information on order_types please look [here](configuration.md#understand-order_types).
### Timeframe (formerly ticker interval)
### Timeframe
This is the set of candles the bot should download and use for the analysis.
Common values are `"1m"`, `"5m"`, `"15m"`, `"1h"`, however all values supported by your exchange should work.
@@ -300,9 +340,22 @@ The metadata-dict (available for `populate_buy_trend`, `populate_sell_trend`, `p
Currently this is `pair`, which can be accessed using `metadata['pair']` - and will return a pair in the format `XRP/BTC`.
The Metadata-dict should not be modified and does not persist information across multiple calls.
Instead, have a look at the section [Storing information](strategy-advanced.md#Storing-information)
Instead, have a look at the [Storing information](strategy-advanced.md#Storing-information) section.
## Additional data (informative_pairs)
## Strategy file loading
By default, freqtrade will attempt to load strategies from all `.py` files within `user_data/strategies`.
Assuming your strategy is called `AwesomeStrategy`, stored in the file `user_data/strategies/AwesomeStrategy.py`, then you can start freqtrade with `freqtrade trade --strategy AwesomeStrategy`.
Note that we're using the class-name, not the file name.
You can use `freqtrade list-strategies` to see a list of all strategies Freqtrade is able to load (all strategies in the correct folder).
It will also include a "status" field, highlighting potential problems.
??? Hint "Customize strategy directory"
You can use a different directory by using `--strategy-path user_data/otherPath`. This parameter is available to all commands that require a strategy.
## Informative Pairs
### Get data for non-tradeable pairs
@@ -331,6 +384,133 @@ A full sample can be found [in the DataProvider section](#complete-data-provider
***
### Informative pairs decorator (`@informative()`)
In most common case it is possible to easily define informative pairs by using a decorator. All decorated `populate_indicators_*` methods run in isolation,
not having access to data from other informative pairs, in the end all informative dataframes are merged and passed to main `populate_indicators()` method.
When hyperopting, use of hyperoptable parameter `.value` attribute is not supported. Please use `.range` attribute. See [optimizing an indicator parameter](hyperopt.md#optimizing-an-indicator-parameter)
for more information.
??? info "Full documentation"
``` python
def informative(timeframe: str, asset: str = '',
fmt: Optional[Union[str, Callable[[KwArg(str)], str]]] = None,
ffill: bool = True) -> Callable[[PopulateIndicators], PopulateIndicators]:
"""
A decorator for populate_indicators_Nn(self, dataframe, metadata), allowing these functions to
define informative indicators.
Example usage:
@informative('1h')
def populate_indicators_1h(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
return dataframe
:param timeframe: Informative timeframe. Must always be equal or higher than strategy timeframe.
:param asset: Informative asset, for example BTC, BTC/USDT, ETH/BTC. Do not specify to use
current pair.
:param fmt: Column format (str) or column formatter (callable(name, asset, timeframe)). When not
specified, defaults to:
* {base}_{quote}_{column}_{timeframe} if asset is specified.
* {column}_{timeframe} if asset is not specified.
Format string supports these format variables:
* {asset} - full name of the asset, for example 'BTC/USDT'.
* {base} - base currency in lower case, for example 'eth'.
* {BASE} - same as {base}, except in upper case.
* {quote} - quote currency in lower case, for example 'usdt'.
* {QUOTE} - same as {quote}, except in upper case.
* {column} - name of dataframe column.
* {timeframe} - timeframe of informative dataframe.
:param ffill: ffill dataframe after merging informative pair.
"""
```
??? Example "Fast and easy way to define informative pairs"
Most of the time we do not need power and flexibility offered by `merge_informative_pair()`, therefore we can use a decorator to quickly define informative pairs.
``` python
from datetime import datetime
from freqtrade.persistence import Trade
from freqtrade.strategy import IStrategy, informative
class AwesomeStrategy(IStrategy):
# This method is not required.
# def informative_pairs(self): ...
# Define informative upper timeframe for each pair. Decorators can be stacked on same
# method. Available in populate_indicators as 'rsi_30m' and 'rsi_1h'.
@informative('30m')
@informative('1h')
def populate_indicators_1h(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
return dataframe
# Define BTC/STAKE informative pair. Available in populate_indicators and other methods as
# 'btc_rsi_1h'. Current stake currency should be specified as {stake} format variable
# instead of hardcoding actual stake currency. Available in populate_indicators and other
# methods as 'btc_usdt_rsi_1h' (when stake currency is USDT).
@informative('1h', 'BTC/{stake}')
def populate_indicators_btc_1h(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
return dataframe
# Define BTC/ETH informative pair. You must specify quote currency if it is different from
# stake currency. Available in populate_indicators and other methods as 'eth_btc_rsi_1h'.
@informative('1h', 'ETH/BTC')
def populate_indicators_eth_btc_1h(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
return dataframe
# Define BTC/STAKE informative pair. A custom formatter may be specified for formatting
# column names. A callable `fmt(**kwargs) -> str` may be specified, to implement custom
# formatting. Available in populate_indicators and other methods as 'rsi_upper'.
@informative('1h', 'BTC/{stake}', '{column}')
def populate_indicators_btc_1h_2(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['rsi_upper'] = ta.RSI(dataframe, timeperiod=14)
return dataframe
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# Strategy timeframe indicators for current pair.
dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
# Informative pairs are available in this method.
dataframe['rsi_less'] = dataframe['rsi'] < dataframe['rsi_1h']
return dataframe
```
!!! Note
Do not use `@informative` decorator if you need to use data of one informative pair when generating another informative pair. Instead, define informative pairs
manually as described [in the DataProvider section](#complete-data-provider-sample).
!!! Note
Use string formatting when accessing informative dataframes of other pairs. This will allow easily changing stake currency in config without having to adjust strategy code.
``` python
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
stake = self.config['stake_currency']
dataframe.loc[
(
(dataframe[f'btc_{stake}_rsi_1h'] < 35)
&
(dataframe['volume'] > 0)
),
['buy', 'buy_tag']] = (1, 'buy_signal_rsi')
return dataframe
```
Alternatively column renaming may be used to remove stake currency from column names: `@informative('1h', 'BTC/{stake}', fmt='{base}_{column}_{timeframe}')`.
!!! Warning "Duplicate method names"
Methods tagged with `@informative()` decorator must always have unique names! Re-using same name (for example when copy-pasting already defined informative method)
will overwrite previously defined method and not produce any errors due to limitations of Python programming language. In such cases you will find that indicators
created in earlier-defined methods are not available in the dataframe. Carefully review method names and make sure they are unique!
## Additional data (DataProvider)
The strategy provides access to the `DataProvider`. This allows you to get additional data to use in your strategy.
@@ -374,9 +554,9 @@ The strategy might look something like this:
*Scan through the top 10 pairs by volume using the `VolumePairList` every 5 minutes and use a 14 day RSI to buy and sell.*
Due to the limited available data, it's very difficult to resample our `5m` candles into daily candles for use in a 14 day RSI. Most exchanges limit us to just 500 candles which effectively gives us around 1.74 daily candles. We need 14 days at least!
Due to the limited available data, it's very difficult to resample `5m` candles into daily candles for use in a 14 day RSI. Most exchanges limit us to just 500 candles which effectively gives us around 1.74 daily candles. We need 14 days at least!
Since we can't resample our data we will have to use an informative pair; and since our whitelist will be dynamic we don't know which pair(s) to use.
Since we can't resample the data we will have to use an informative pair; and since the whitelist will be dynamic we don't know which pair(s) to use.
This is where calling `self.dp.current_whitelist()` comes in handy.
@@ -639,6 +819,42 @@ Stoploss values returned from `custom_stoploss` must specify a percentage relati
Full examples can be found in the [Custom stoploss](strategy-advanced.md#custom-stoploss) section of the Documentation.
!!! Note
Providing invalid input to `stoploss_from_open()` may produce "CustomStoploss function did not return valid stoploss" warnings.
This may happen if `current_profit` parameter is below specified `open_relative_stop`. Such situations may arise when closing trade
is blocked by `confirm_trade_exit()` method. Warnings can be solved by never blocking stop loss sells by checking `sell_reason` in
`confirm_trade_exit()`, or by using `return stoploss_from_open(...) or 1` idiom, which will request to not change stop loss when
`current_profit < open_relative_stop`.
### *stoploss_from_absolute()*
In some situations it may be confusing to deal with stops relative to current rate. Instead, you may define a stoploss level using an absolute price.
??? Example "Returning a stoploss using absolute price from the custom stoploss function"
If we want to trail a stop price at 2xATR below current proce we can call `stoploss_from_absolute(current_rate - (candle['atr'] * 2), current_rate)`.
``` python
from datetime import datetime
from freqtrade.persistence import Trade
from freqtrade.strategy import IStrategy, stoploss_from_absolute
class AwesomeStrategy(IStrategy):
use_custom_stoploss = True
def populate_indicators_1h(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['atr'] = ta.ATR(dataframe, timeperiod=14)
return dataframe
def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime,
current_rate: float, current_profit: float, **kwargs) -> float:
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
candle = dataframe.iloc[-1].squeeze()
return stoploss_from_absolute(current_rate - (candle['atr'] * 2), current_rate)
```
## Additional data (Wallets)
@@ -723,7 +939,8 @@ Sometimes it may be desired to lock a pair after certain events happen (e.g. mul
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)`.
Locks can also be lifted manually, by calling `self.unlock_pair(pair)` or `self.unlock_reason(<reason>)` - providing reason the pair was locked with.
`self.unlock_reason(<reason>)` will unlock all pairs currently locked with the provided reason.
To verify if a pair is currently locked, use `self.is_pair_locked(pair)`.
@@ -781,6 +998,8 @@ Printing more than a few rows is also possible (simply use `print(dataframe)` i
## Common mistakes when developing strategies
### Peeking into the future while backtesting
Backtesting analyzes the whole time-range at once for performance reasons. Because of this, strategy authors need to make sure that strategies do not look-ahead into the future.
This is a common pain-point, which can cause huge differences between backtesting and dry/live run methods, since they all use data which is not available during dry/live runs, so these strategies will perform well during backtesting, but will fail / perform badly in real conditions.
@@ -791,9 +1010,13 @@ The following lists some common patterns which should be avoided to prevent frus
- don't use `dataframe['volume'].mean()`. This uses the full DataFrame for backtesting, including data from the future. Use `dataframe['volume'].rolling(<window>).mean()` instead
- don't use `.resample('1h')`. This uses the left border of the interval, so moves data from an hour to the start of the hour. Use `.resample('1h', label='right')` instead.
### Colliding signals
When buy and sell signals collide (both `'buy'` and `'sell'` are 1), freqtrade will do nothing and ignore the entry (buy) signal. This will avoid trades that buy, and sell immediately. Obviously, this can potentially lead to missed entries.
## Further strategy ideas
To get additional Ideas for strategies, head over to our [strategy repository](https://github.com/freqtrade/freqtrade-strategies). Feel free to use them as they are - but results will depend on the current market situation, pairs used etc. - therefore please backtest the strategy for your exchange/desired pairs first, evaluate carefully, use at your own risk.
To get additional Ideas for strategies, head over to the [strategy repository](https://github.com/freqtrade/freqtrade-strategies). Feel free to use them as they are - but results will depend on the current market situation, pairs used etc. - therefore please backtest the strategy for your exchange/desired pairs first, evaluate carefully, use at your own risk.
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.

View File

@@ -50,7 +50,9 @@ candles.head()
```python
# Load strategy using values set above
from freqtrade.resolvers import StrategyResolver
from freqtrade.data.dataprovider import DataProvider
strategy = StrategyResolver.load_strategy(config)
strategy.dp = DataProvider(config, None, None)
# Generate buy/sell signals using strategy
df = strategy.analyze_ticker(candles, {'pair': pair})
@@ -228,7 +230,7 @@ graph = generate_candlestick_graph(pair=pair,
# Show graph inline
# graph.show()
# Render graph in a separate window
# Render graph in a seperate window
graph.show(renderer="browser")
```

View File

@@ -58,6 +58,8 @@ For the Freqtrade configuration, you can then use the the full value (including
```json
"chat_id": "-1001332619709"
```
!!! Warning "Using telegram groups"
When using telegram groups, you're giving every member of the telegram group access to your freqtrade bot and to all commands possible via telegram. Please make sure that you can trust everyone in the telegram group to avoid unpleasent surprises.
## Control telegram noise
@@ -93,7 +95,9 @@ Example configuration showing the different settings:
"buy_cancel": "silent",
"sell_cancel": "on",
"buy_fill": "off",
"sell_fill": "off"
"sell_fill": "off",
"protection_trigger": "off",
"protection_trigger_global": "on"
},
"reload": true,
"balance_dust_level": 0.01
@@ -103,6 +107,7 @@ Example configuration showing the different settings:
`buy` notifications are sent when the order is placed, while `buy_fill` notifications are sent when the order is filled on the exchange.
`sell` notifications are sent when the order is placed, while `sell_fill` notifications are sent when the order is filled on the exchange.
`*_fill` notifications are off by default and must be explicitly enabled.
`protection_trigger` notifications are sent when a protection triggers and `protection_trigger_global` notifications trigger when global protections are triggered.
`balance_dust_level` will define what the `/balance` command takes as "dust" - Currencies with a balance below this will be shown.
@@ -168,10 +173,12 @@ official commands. You can ask at any moment for help with `/help`.
| `/profit [<n>]` | Display a summary of your profit/loss from close trades and some stats about your performance, over the last n days (all trades by default)
| `/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)
| `/forcebuy <pair> [rate]` | Instantly buys the given pair. Rate is optional and only applies to limit orders. (`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)
| `/weekly <n>` | Shows profit or loss per week, over the last n weeks (n defaults to 8)
| `/monthly <n>` | Shows profit or loss per month, over the last n months (n defaults to 6)
| `/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.
@@ -270,6 +277,7 @@ Starting capital is either taken from the `available_capital` setting, or calcul
> **BITTREX:** Buying ETH/BTC with limit `0.03400000` (`1.000000 ETH`, `225.290 USD`)
Omitting the pair will open a query asking for the pair to buy (based on the current whitelist).
Trades crated through `/forcebuy` will have the buy-tag of `forceentry`.
![Telegram force-buy screenshot](assets/telegram_forcebuy.png)
@@ -304,8 +312,7 @@ Return the balance of all crypto-currency your have on the exchange.
### /daily <n>
Per default `/daily` will return the 7 last days.
The example below if for `/daily 3`:
Per default `/daily` will return the 7 last days. The example below if for `/daily 3`:
> **Daily Profit over the last 3 days:**
```
@@ -316,6 +323,34 @@ Day Profit BTC Profit USD
2018-01-01 0.00269130 BTC 34.986 USD
```
### /weekly <n>
Per default `/weekly` will return the 8 last weeks, including the current week. Each week starts
from Monday. The example below if for `/weekly 3`:
> **Weekly Profit over the last 3 weeks (starting from Monday):**
```
Monday Profit BTC Profit USD
---------- -------------- ------------
2018-01-03 0.00224175 BTC 29,142 USD
2017-12-27 0.00033131 BTC 4,307 USD
2017-12-20 0.00269130 BTC 34.986 USD
```
### /monthly <n>
Per default `/monthly` will return the 6 last months, including the current month. The example below
if for `/monthly 3`:
> **Monthly Profit over the last 3 months:**
```
Month Profit BTC Profit USD
---------- -------------- ------------
2018-01 0.00224175 BTC 29,142 USD
2017-12 0.00033131 BTC 4,307 USD
2017-11 0.00269130 BTC 34.986 USD
```
### /whitelist
Shows the current whitelist

View File

@@ -26,9 +26,7 @@ optional arguments:
├── data
├── hyperopt_results
├── hyperopts
│   ├── sample_hyperopt_advanced.py
│   ├── sample_hyperopt_loss.py
│   └── sample_hyperopt.py
├── notebooks
│   └── strategy_analysis_example.ipynb
├── plot
@@ -61,7 +59,7 @@ $ freqtrade new-config --config config_binance.json
? Do you want to enable Dry-run (simulated trades)? Yes
? Please insert your stake currency: BTC
? Please insert your stake amount: 0.05
? Please insert max_open_trades (Integer or 'unlimited'): 3
? Please insert max_open_trades (Integer or -1 for unlimited open trades): 3
? Please insert your desired timeframe (e.g. 5m): 5m
? Please insert your display Currency (for reporting): USD
? Select exchange binance
@@ -111,46 +109,11 @@ Using the advanced template (populates all optional functions and methods)
freqtrade new-strategy --strategy AwesomeStrategy --template advanced
```
## Create new hyperopt
## List Strategies
Creates a new hyperopt from a template similar to SampleHyperopt.
The file will be named inline with your class name, and will not overwrite existing files.
Use the `list-strategies` subcommand to see all strategies in one particular directory.
Results will be located in `user_data/hyperopts/<classname>.py`.
``` output
usage: freqtrade new-hyperopt [-h] [--userdir PATH] [--hyperopt NAME]
[--template {full,minimal,advanced}]
optional arguments:
-h, --help show this help message and exit
--userdir PATH, --user-data-dir PATH
Path to userdata directory.
--hyperopt NAME Specify hyperopt class name which will be used by the
bot.
--template {full,minimal,advanced}
Use a template which is either `minimal`, `full`
(containing multiple sample indicators) or `advanced`.
Default: `full`.
```
### Sample usage of new-hyperopt
```bash
freqtrade new-hyperopt --hyperopt AwesomeHyperopt
```
With custom user directory
```bash
freqtrade new-hyperopt --userdir ~/.freqtrade/ --hyperopt AwesomeHyperopt
```
## List Strategies and List Hyperopts
Use the `list-strategies` subcommand to see all strategies in one particular directory and the `list-hyperopts` subcommand to list custom Hyperopts.
These subcommands are useful for finding problems in your environment with loading strategies or hyperopt classes: modules with strategies or hyperopt classes that contain errors and failed to load are printed in red (LOAD FAILED), while strategies or hyperopt classes with duplicate names are printed in yellow (DUPLICATE NAME).
This subcommand is useful for finding problems in your environment with loading strategies: modules with strategies that contain errors and failed to load are printed in red (LOAD FAILED), while strategies with duplicate names are printed in yellow (DUPLICATE NAME).
```
usage: freqtrade list-strategies [-h] [-v] [--logfile FILE] [-V] [-c PATH]
@@ -164,34 +127,6 @@ optional arguments:
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
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.
```
```
usage: freqtrade list-hyperopts [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH]
[--hyperopt-path PATH] [-1] [--no-color]
optional arguments:
-h, --help show this help message and exit
--hyperopt-path PATH Specify additional lookup path for Hyperopt and
Hyperopt Loss functions.
-1, --one-column Print output in one column.
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--logfile FILE Log to the file specified. Special values are:
@@ -211,18 +146,16 @@ Common arguments:
!!! Warning
Using these commands will try to load all python files from a directory. This can be a security risk if untrusted files reside in this directory, since all module-level code is executed.
Example: Search default strategies and hyperopts directories (within the default userdir).
Example: Search default strategies directories (within the default userdir).
``` bash
freqtrade list-strategies
freqtrade list-hyperopts
```
Example: Search strategies and hyperopts directory within the userdir.
Example: Search strategies directory within the userdir.
``` bash
freqtrade list-strategies --userdir ~/.freqtrade/
freqtrade list-hyperopts --userdir ~/.freqtrade/
```
Example: Search dedicated strategy path.
@@ -231,12 +164,6 @@ Example: Search dedicated strategy path.
freqtrade list-strategies --strategy-path ~/.freqtrade/strategies/
```
Example: Search dedicated hyperopt path.
``` bash
freqtrade list-hyperopt --hyperopt-path ~/.freqtrade/hyperopts/
```
## List Exchanges
Use the `list-exchanges` subcommand to see the exchanges available for the bot.
@@ -354,7 +281,7 @@ bitmax True missing opt: fetchMyTrades
bitmex False Various reasons.
bitpanda True
bitso False missing: fetchOHLCV
bitstamp False Does not provide history. Details in https://github.com/freqtrade/freqtrade/issues/1983
bitstamp True missing opt: fetchTickers
bitstamp1 False missing: fetchOrder, fetchOHLCV
bittrex True
bitvavo True
@@ -590,20 +517,25 @@ Requires a configuration with specified `pairlists` attribute.
Can be used to generate static pairlists to be used during backtesting / hyperopt.
```
usage: freqtrade test-pairlist [-h] [-c PATH]
usage: freqtrade test-pairlist [-h] [-v] [-c PATH]
[--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]]
[-1] [--print-json]
[-1] [--print-json] [--exchange EXCHANGE]
optional arguments:
-h, --help show this help message and exit
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
-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.
--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]
Specify quote currency(-ies). Space-separated list.
-1, --one-column Print output in one column.
--print-json Print list of pairs or market symbols in JSON format.
--exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no
config is provided.
```
### Examples
@@ -650,6 +582,46 @@ Common arguments:
```
## Show previous Backtest results
Allows you to show previous backtest results.
Adding `--show-pair-list` outputs a sorted pair list you can easily copy/paste into your configuration (omitting bad pairs).
??? Warning "Strategy overfitting"
Only using winning pairs can lead to an overfitted strategy, which will not work well on future data. Make sure to extensively test your strategy in dry-run before risking real money.
```
usage: freqtrade backtesting-show [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH]
[--export-filename PATH] [--show-pair-list]
optional arguments:
-h, --help show this help message and exit
--export-filename PATH
Save backtest results to the file with this filename.
Requires `--export` to be set as well. Example:
`--export-filename=user_data/backtest_results/backtest
_today.json`
--show-pair-list Show backtesting pairlist sorted by profit.
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.
```
## List Hyperopt results
You can list the hyperoptimization epochs the Hyperopt module evaluated previously with the `hyperopt-list` sub-command.
@@ -740,6 +712,7 @@ usage: freqtrade hyperopt-show [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[--profitable] [-n INT] [--print-json]
[--hyperopt-filename FILENAME] [--no-header]
[--disable-param-export]
[--breakdown {day,week,month} [{day,week,month} ...]]
optional arguments:
-h, --help show this help message and exit
@@ -753,6 +726,8 @@ optional arguments:
--no-header Do not print epoch details header.
--disable-param-export
Disable automatic hyperopt parameter export.
--breakdown {day,week,month} [{day,week,month} ...]
Show backtesting breakdown per [day, week, month].
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).

View File

@@ -48,9 +48,9 @@ Sample configuration (tested using IFTTT).
},
```
The url in `webhook.url` should point to the correct url for your webhook. If you're using [IFTTT](https://ifttt.com) (as shown in the sample above) please insert our event and key to the url.
The url in `webhook.url` should point to the correct url for your webhook. If you're using [IFTTT](https://ifttt.com) (as shown in the sample above) please insert your event and key to the url.
You can set the POST body format to Form-Encoded (default) or JSON-Encoded. Use `"format": "form"` or `"format": "json"` respectively. Example configuration for Mattermost Cloud integration:
You can set the POST body format to Form-Encoded (default), JSON-Encoded, or raw data. Use `"format": "form"`, `"format": "json"`, or `"format": "raw"` respectively. Example configuration for Mattermost Cloud integration:
```json
"webhook": {
@@ -63,7 +63,36 @@ You can set the POST body format to Form-Encoded (default) or JSON-Encoded. Use
},
```
The result would be POST request with e.g. `{"text":"Status: running"}` body and `Content-Type: application/json` header which results `Status: running` message in the Mattermost channel.
The result would be a POST request with e.g. `{"text":"Status: running"}` body and `Content-Type: application/json` header which results `Status: running` message in the Mattermost channel.
When using the Form-Encoded or JSON-Encoded configuration you can configure any number of payload values, and both the key and value will be ouput in the POST request. However, when using the raw data format you can only configure one value and it **must** be named `"data"`. In this instance the data key will not be output in the POST request, only the value. For example:
```json
"webhook": {
"enabled": true,
"url": "https://<YOURHOOKURL>",
"format": "raw",
"webhookstatus": {
"data": "Status: {status}"
}
},
```
The result would be a POST request with e.g. `Status: running` body and `Content-Type: text/plain` header.
Optional parameters are available to enable automatic retries for webhook messages. The `webhook.retries` parameter can be set for the maximum number of retries the webhook request should attempt if it is unsuccessful (i.e. HTTP response status is not 200). By default this is set to `0` which is disabled. An additional `webhook.retry_delay` parameter can be set to specify the time in seconds between retry attempts. By default this is set to `0.1` (i.e. 100ms). Note that increasing the number of retries or retry delay may slow down the trader if there are connectivity issues with the webhook. Example configuration for retries:
```json
"webhook": {
"enabled": true,
"url": "https://<YOURHOOKURL>",
"retries": 3,
"retry_delay": 0.2,
"webhookstatus": {
"status": "Status: {status}"
}
},
```
Different payloads can be configured for different events. Not all fields are necessary, but you should configure at least one of the dicts, otherwise the webhook will never be called.
@@ -75,11 +104,13 @@ Possible parameters are:
* `trade_id`
* `exchange`
* `pair`
* `limit`
* ~~`limit` # Deprecated - should no longer be used.~~
* `open_rate`
* `amount`
* `open_date`
* `stake_amount`
* `stake_currency`
* `base_currency`
* `fiat_currency`
* `order_type`
* `current_rate`
@@ -98,6 +129,7 @@ Possible parameters are:
* `open_date`
* `stake_amount`
* `stake_currency`
* `base_currency`
* `fiat_currency`
* `order_type`
* `current_rate`
@@ -116,7 +148,10 @@ Possible parameters are:
* `open_date`
* `stake_amount`
* `stake_currency`
* `base_currency`
* `fiat_currency`
* `order_type`
* `current_rate`
* `buy_tag`
### Webhooksell
@@ -134,6 +169,7 @@ Possible parameters are:
* `profit_amount`
* `profit_ratio`
* `stake_currency`
* `base_currency`
* `fiat_currency`
* `sell_reason`
* `order_type`
@@ -156,6 +192,7 @@ Possible parameters are:
* `profit_amount`
* `profit_ratio`
* `stake_currency`
* `base_currency`
* `fiat_currency`
* `sell_reason`
* `order_type`
@@ -178,6 +215,7 @@ Possible parameters are:
* `profit_amount`
* `profit_ratio`
* `stake_currency`
* `base_currency`
* `fiat_currency`
* `sell_reason`
* `order_type`

View File

@@ -23,9 +23,9 @@ git clone https://github.com/freqtrade/freqtrade.git
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 pre-compiled windows Wheels [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib), which need to be downloaded and installed using `pip install TA_Lib-0.4.21-cp38-cp38-win_amd64.whl` (make sure to use the version matching your python version).
As compiling from source on windows has heavy dependencies (requires a partial visual studio installation), there is also a repository of unofficial pre-compiled windows Wheels [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib), which need to be downloaded and installed using `pip install TA_Lib-0.4.24-cp38-cp38-win_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.
Freqtrade provides these dependencies for the latest 3 Python versions (3.8, 3.9 and 3.10) and for 64bit Windows.
Other versions must be downloaded from the above link.
``` powershell
@@ -54,6 +54,8 @@ error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++
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 compose](docker_quickstart.md) first.
You can download the Visual C++ build tools from [here](https://visualstudio.microsoft.com/visual-cpp-build-tools/) and install "Desktop development with C++" in it's default configuration. Unfortunately, this is a heavy download / dependency so you might want to consider WSL2 or [docker compose](docker_quickstart.md) first.
![Windows installation](assets/windows_install.png)
---

View File

@@ -4,7 +4,7 @@ channels:
# - defaults
dependencies:
# 1/4 req main
- python>=3.7,<3.9
- python>=3.8,<=3.10
- numpy
- pandas
- pip
@@ -16,7 +16,6 @@ dependencies:
- cachetools
- requests
- urllib3
- wrapt
- jsonschema
- TA-Lib
- tabulate
@@ -26,9 +25,12 @@ dependencies:
- fastapi
- uvicorn
- pyjwt
- aiofiles
- psutil
- colorama
- questionary
- prompt-toolkit
- python-dateutil
# ============================
@@ -64,7 +66,6 @@ dependencies:
- py_find_1st
- tables
- pytest-random-order
- flake8-type-annotations
- ccxt
- flake8-tidy-imports
- -e .

View File

@@ -1,28 +1,15 @@
""" Freqtrade bot """
__version__ = '2021.8'
if __version__ == 'develop':
__version__ = '2022.3'
if 'dev' in __version__:
try:
import subprocess
__version__ = 'develop-' + subprocess.check_output(
__version__ = __version__ + '-' + subprocess.check_output(
['git', 'log', '--format="%h"', '-n 1'],
stderr=subprocess.DEVNULL).decode("utf-8").rstrip().strip('"')
# from datetime import datetime
# last_release = subprocess.check_output(
# ['git', 'tag']
# ).decode('utf-8').split()[-1].split(".")
# # Releases are in the format "2020.1" - we increment the latest version for dev.
# prefix = f"{last_release[0]}.{int(last_release[1]) + 1}"
# dev_version = int(datetime.now().timestamp() // 1000)
# __version__ = f"{prefix}.dev{dev_version}"
# subprocess.check_output(
# ['git', 'log', '--format="%h"', '-n 1'],
# stderr=subprocess.DEVNULL).decode("utf-8").rstrip().strip('"')
except Exception:
except Exception: # pragma: no cover
# git not available, ignore
try:
# Try Fallback to freqtrade_commit file (created by CI while building docker image)

View File

@@ -3,7 +3,7 @@
__main__.py for Freqtrade
To launch Freqtrade as a module
> python -m freqtrade (with Python >= 3.7)
> python -m freqtrade (with Python >= 3.8)
"""
from freqtrade import main

View File

@@ -8,15 +8,16 @@ 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,
start_list_data)
from freqtrade.commands.data_commands import (start_convert_data, start_convert_trades,
start_download_data, start_list_data)
from freqtrade.commands.deploy_commands import (start_create_userdir, start_install_ui,
start_new_hyperopt, start_new_strategy)
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.list_commands import (start_list_exchanges, start_list_markets,
start_list_strategies, start_list_timeframes,
start_show_trades)
from freqtrade.commands.optimize_commands import (start_backtesting, start_backtesting_show,
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.trade_commands import start_trading

View File

@@ -22,8 +22,9 @@ ARGS_COMMON_OPTIMIZE = ["timeframe", "timerange", "dataformat_ohlcv",
"max_open_trades", "stake_amount", "fee", "pairs"]
ARGS_BACKTEST = ARGS_COMMON_OPTIMIZE + ["position_stacking", "use_max_market_positions",
"enable_protections", "dry_run_wallet",
"strategy_list", "export", "exportfilename"]
"enable_protections", "dry_run_wallet", "timeframe_detail",
"strategy_list", "export", "exportfilename",
"backtest_breakdown", "backtest_cache"]
ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path",
"position_stacking", "use_max_market_positions",
@@ -31,7 +32,8 @@ ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path",
"epochs", "spaces", "print_all",
"print_colorized", "print_json", "hyperopt_jobs",
"hyperopt_random_state", "hyperopt_min_trades",
"hyperopt_loss", "disableparamexport"]
"hyperopt_loss", "disableparamexport",
"hyperopt_ignore_missing_space"]
ARGS_EDGE = ARGS_COMMON_OPTIMIZE + ["stoploss_range"]
@@ -39,6 +41,8 @@ ARGS_LIST_STRATEGIES = ["strategy_path", "print_one_column", "print_colorized"]
ARGS_LIST_HYPEROPTS = ["hyperopt_path", "print_one_column", "print_colorized"]
ARGS_BACKTEST_SHOW = ["exportfilename", "backtest_show_pair_list"]
ARGS_LIST_EXCHANGES = ["print_one_column", "list_exchanges_all"]
ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column"]
@@ -47,7 +51,7 @@ ARGS_LIST_PAIRS = ["exchange", "print_list", "list_pairs_print_json", "print_one
"print_csv", "base_currencies", "quote_currencies", "list_pairs_all"]
ARGS_TEST_PAIRLIST = ["verbosity", "config", "quote_currencies", "print_one_column",
"list_pairs_print_json"]
"list_pairs_print_json", "exchange"]
ARGS_CREATE_USERDIR = ["user_data_dir", "reset"]
@@ -55,25 +59,25 @@ ARGS_BUILD_CONFIG = ["config"]
ARGS_BUILD_STRATEGY = ["user_data_dir", "strategy", "template"]
ARGS_BUILD_HYPEROPT = ["user_data_dir", "hyperopt", "template"]
ARGS_CONVERT_DATA = ["pairs", "format_from", "format_to", "erase"]
ARGS_CONVERT_DATA_OHLCV = ARGS_CONVERT_DATA + ["timeframes"]
ARGS_CONVERT_TRADES = ["pairs", "timeframes", "exchange", "dataformat_ohlcv", "dataformat_trades"]
ARGS_LIST_DATA = ["exchange", "dataformat_ohlcv", "pairs"]
ARGS_DOWNLOAD_DATA = ["pairs", "pairs_file", "days", "new_pairs_days", "timerange",
"download_trades", "exchange", "timeframes", "erase", "dataformat_ohlcv",
"dataformat_trades"]
ARGS_DOWNLOAD_DATA = ["pairs", "pairs_file", "days", "new_pairs_days", "include_inactive",
"timerange", "download_trades", "exchange", "timeframes",
"erase", "dataformat_ohlcv", "dataformat_trades"]
ARGS_PLOT_DATAFRAME = ["pairs", "indicators1", "indicators2", "plot_limit",
"db_url", "trade_source", "export", "exportfilename",
"timerange", "timeframe", "no_trades"]
ARGS_PLOT_PROFIT = ["pairs", "timerange", "export", "exportfilename", "db_url",
"trade_source", "timeframe", "plot_auto_open"]
"trade_source", "timeframe", "plot_auto_open", ]
ARGS_INSTALL_UI = ["erase_ui_only"]
ARGS_INSTALL_UI = ["erase_ui_only", 'ui_version']
ARGS_SHOW_TRADES = ["db_url", "trade_ids", "print_json"]
@@ -88,14 +92,14 @@ ARGS_HYPEROPT_LIST = ["hyperopt_list_best", "hyperopt_list_profitable",
ARGS_HYPEROPT_SHOW = ["hyperopt_list_best", "hyperopt_list_profitable", "hyperopt_show_index",
"print_json", "hyperoptexportfilename", "hyperopt_show_no_header",
"disableparamexport"]
"disableparamexport", "backtest_breakdown"]
NO_CONF_REQURIED = ["convert-data", "convert-trade-data", "download-data", "list-timeframes",
"list-markets", "list-pairs", "list-strategies", "list-data",
"list-hyperopts", "hyperopt-list", "hyperopt-show",
"plot-dataframe", "plot-profit", "show-trades"]
"hyperopt-list", "hyperopt-show", "backtest-filter",
"plot-dataframe", "plot-profit", "show-trades", "trades-to-ohlcv"]
NO_CONF_ALLOWED = ["create-userdir", "list-exchanges", "new-hyperopt", "new-strategy"]
NO_CONF_ALLOWED = ["create-userdir", "list-exchanges", "new-strategy"]
class Arguments:
@@ -171,15 +175,15 @@ 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_backtesting, start_convert_data, start_create_userdir,
start_download_data, start_edge, start_hyperopt,
start_hyperopt_list, start_hyperopt_show, start_install_ui,
start_list_data, start_list_exchanges, start_list_hyperopts,
from freqtrade.commands import (start_backtesting, start_backtesting_show,
start_convert_data, start_convert_trades,
start_create_userdir, start_download_data, start_edge,
start_hyperopt, start_hyperopt_list, start_hyperopt_show,
start_install_ui, start_list_data, start_list_exchanges,
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_test_pairlist, start_trading,
start_webserver)
start_list_timeframes, start_new_config, start_new_strategy,
start_plot_dataframe, start_plot_profit, start_show_trades,
start_test_pairlist, start_trading, start_webserver)
subparsers = self.parser.add_subparsers(dest='command',
# Use custom message when no subhandler is added
@@ -206,12 +210,6 @@ class Arguments:
build_config_cmd.set_defaults(func=start_new_config)
self._build_args(optionlist=ARGS_BUILD_CONFIG, parser=build_config_cmd)
# add new-hyperopt subcommand
build_hyperopt_cmd = subparsers.add_parser('new-hyperopt',
help="Create new hyperopt")
build_hyperopt_cmd.set_defaults(func=start_new_hyperopt)
self._build_args(optionlist=ARGS_BUILD_HYPEROPT, parser=build_hyperopt_cmd)
# add new-strategy subcommand
build_strategy_cmd = subparsers.add_parser('new-strategy',
help="Create new strategy")
@@ -245,6 +243,15 @@ class Arguments:
convert_trade_data_cmd.set_defaults(func=partial(start_convert_data, ohlcv=False))
self._build_args(optionlist=ARGS_CONVERT_DATA, parser=convert_trade_data_cmd)
# Add trades-to-ohlcv subcommand
convert_trade_data_cmd = subparsers.add_parser(
'trades-to-ohlcv',
help='Convert trade data to OHLCV data.',
parents=[_common_parser],
)
convert_trade_data_cmd.set_defaults(func=start_convert_trades)
self._build_args(optionlist=ARGS_CONVERT_TRADES, parser=convert_trade_data_cmd)
# Add list-data subcommand
list_data_cmd = subparsers.add_parser(
'list-data',
@@ -260,6 +267,15 @@ class Arguments:
backtesting_cmd.set_defaults(func=start_backtesting)
self._build_args(optionlist=ARGS_BACKTEST, parser=backtesting_cmd)
# Add backtesting-show subcommand
backtesting_show_cmd = subparsers.add_parser(
'backtesting-show',
help='Show past Backtest results',
parents=[_common_parser],
)
backtesting_show_cmd.set_defaults(func=start_backtesting_show)
self._build_args(optionlist=ARGS_BACKTEST_SHOW, parser=backtesting_show_cmd)
# Add edge subcommand
edge_cmd = subparsers.add_parser('edge', help='Edge module.',
parents=[_common_parser, _strategy_parser])
@@ -300,15 +316,6 @@ class Arguments:
list_exchanges_cmd.set_defaults(func=start_list_exchanges)
self._build_args(optionlist=ARGS_LIST_EXCHANGES, parser=list_exchanges_cmd)
# Add list-hyperopts subcommand
list_hyperopts_cmd = subparsers.add_parser(
'list-hyperopts',
help='Print available hyperopt classes.',
parents=[_common_parser],
)
list_hyperopts_cmd.set_defaults(func=start_list_hyperopts)
self._build_args(optionlist=ARGS_LIST_HYPEROPTS, parser=list_hyperopts_cmd)
# Add list-markets subcommand
list_markets_cmd = subparsers.add_parser(
'list-markets',

View File

@@ -61,27 +61,38 @@ def ask_user_config() -> Dict[str, Any]:
"type": "text",
"name": "stake_currency",
"message": "Please insert your stake currency:",
"default": 'BTC',
"default": 'USDT',
},
{
"type": "text",
"name": "stake_amount",
"message": "Please insert your stake amount:",
"default": "0.01",
"message": f"Please insert your stake amount (Number or '{UNLIMITED_STAKE_AMOUNT}'):",
"default": "100",
"validate": lambda val: val == UNLIMITED_STAKE_AMOUNT or validate_is_float(val),
"filter": lambda val: '"' + UNLIMITED_STAKE_AMOUNT + '"'
if val == UNLIMITED_STAKE_AMOUNT
else val
},
{
"type": "text",
"name": "max_open_trades",
"message": f"Please insert max_open_trades (Integer or '{UNLIMITED_STAKE_AMOUNT}'):",
"message": "Please insert max_open_trades (Integer or -1 for unlimited open trades):",
"default": "3",
"validate": lambda val: val == UNLIMITED_STAKE_AMOUNT or validate_is_int(val)
"validate": lambda val: validate_is_int(val)
},
{
"type": "select",
"name": "timeframe_in_config",
"message": "Time",
"choices": ["Have the strategy define timeframe.", "Override in configuration."]
},
{
"type": "text",
"name": "timeframe",
"message": "Please insert your desired timeframe (e.g. 5m):",
"default": "5m",
"when": lambda x: x["timeframe_in_config"] == 'Override in configuration.'
},
{
"type": "text",
@@ -97,8 +108,12 @@ def ask_user_config() -> Dict[str, Any]:
"binance",
"binanceus",
"bittrex",
"kraken",
"ftx",
"gateio",
"huobi",
"kraken",
"kucoin",
"okx",
Separator(),
"other",
],
@@ -122,6 +137,12 @@ def ask_user_config() -> Dict[str, Any]:
"message": "Insert Exchange Secret",
"when": lambda x: not x['dry_run']
},
{
"type": "password",
"name": "exchange_key_password",
"message": "Insert Exchange API Key password",
"when": lambda x: not x['dry_run'] and x['exchange_name'] in ('kucoin', 'okx')
},
{
"type": "confirm",
"name": "telegram",
@@ -149,7 +170,8 @@ def ask_user_config() -> Dict[str, Any]:
{
"type": "text",
"name": "api_server_listen_addr",
"message": "Insert Api server Listen Address (best left untouched default!)",
"message": ("Insert Api server Listen Address (0.0.0.0 for docker, "
"otherwise best left untouched)"),
"default": "127.0.0.1",
"when": lambda x: x['api_server']
},

View File

@@ -1,7 +1,7 @@
"""
Definition of cli arguments used in arguments.py
"""
from argparse import ArgumentTypeError
from argparse import SUPPRESS, ArgumentTypeError
from freqtrade import __version__, constants
from freqtrade.constants import HYPEROPT_LOSS_BUILTIN
@@ -117,7 +117,7 @@ AVAILABLE_CLI_OPTIONS = {
),
# Optimize common
"timeframe": Arg(
'-i', '--timeframe', '--ticker-interval',
'-i', '--timeframe',
help='Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).',
),
"timerange": Arg(
@@ -135,6 +135,10 @@ AVAILABLE_CLI_OPTIONS = {
help='Override the value of the `stake_amount` configuration setting.',
),
# Backtesting
"timeframe_detail": Arg(
'--timeframe-detail',
help='Specify detail timeframe for backtesting (`1m`, `5m`, `30m`, `1h`, `1d`).',
),
"position_stacking": Arg(
'--eps', '--enable-position-stacking',
help='Allow buying the same pair multiple times (position stacking).',
@@ -148,6 +152,12 @@ AVAILABLE_CLI_OPTIONS = {
action='store_false',
default=True,
),
"backtest_show_pair_list": Arg(
'--show-pair-list',
help='Show backtesting pairlist sorted by profit.',
action='store_true',
default=False,
),
"enable_protections": Arg(
'--enable-protections', '--enableprotections',
help='Enable protections for backtesting.'
@@ -159,7 +169,7 @@ AVAILABLE_CLI_OPTIONS = {
"strategy_list": Arg(
'--strategy-list',
help='Provide a space-separated list of strategies to backtest. '
'Please note that ticker-interval needs to be set either in config '
'Please note that timeframe needs to be set either in config '
'or via command line. When using this together with `--export trades`, '
'the strategy-name is injected into the filename '
'(so `backtest-data.json` becomes `backtest-data-SampleStrategy.json`',
@@ -172,11 +182,12 @@ AVAILABLE_CLI_OPTIONS = {
),
"exportfilename": Arg(
'--export-filename',
help='Save backtest results to the file with this filename. '
'Requires `--export` to be set as well. '
'Example: `--export-filename=user_data/backtest_results/backtest_today.json`',
metavar='PATH',
"--export-filename",
"--backtest-filename",
help="Use this filename for backtest results."
"Requires `--export` to be set as well. "
"Example: `--export-filename=user_data/backtest_results/backtest_today.json`",
metavar="PATH",
),
"disableparamexport": Arg(
'--disable-param-export',
@@ -189,6 +200,18 @@ AVAILABLE_CLI_OPTIONS = {
type=float,
metavar='FLOAT',
),
"backtest_breakdown": Arg(
'--breakdown',
help='Show backtesting breakdown per [day, week, month].',
nargs='+',
choices=constants.BACKTEST_BREAKDOWNS
),
"backtest_cache": Arg(
'--cache',
help='Load a cached backtest result no older than specified age (default: %(default)s).',
default=constants.BACKTEST_CACHE_DEFAULT,
choices=constants.BACKTEST_CACHE_AGE,
),
# Edge
"stoploss_range": Arg(
'--stoplosses',
@@ -199,13 +222,13 @@ AVAILABLE_CLI_OPTIONS = {
# Hyperopt
"hyperopt": Arg(
'--hyperopt',
help='Specify hyperopt class name which will be used by the bot.',
help=SUPPRESS,
metavar='NAME',
required=False,
),
"hyperopt_path": Arg(
'--hyperopt-path',
help='Specify additional lookup path for Hyperopt and Hyperopt Loss functions.',
help='Specify additional lookup path for Hyperopt Loss functions.',
metavar='PATH',
),
"epochs": Arg(
@@ -351,6 +374,11 @@ AVAILABLE_CLI_OPTIONS = {
type=check_int_positive,
metavar='INT',
),
"include_inactive": Arg(
'--include-inactive-pairs',
help='Also download data from inactive pairs.',
action='store_true',
),
"new_pairs_days": Arg(
'--new-pairs-days',
help='Download data of new pairs for given number of days. Default: `%(default)s`.',
@@ -377,12 +405,12 @@ AVAILABLE_CLI_OPTIONS = {
),
"dataformat_ohlcv": Arg(
'--data-format-ohlcv',
help='Storage format for downloaded candle (OHLCV) data. (default: `%(default)s`).',
help='Storage format for downloaded candle (OHLCV) data. (default: `json`).',
choices=constants.AVAILABLE_DATAHANDLERS,
),
"dataformat_trades": Arg(
'--data-format-trades',
help='Storage format for downloaded trades data. (default: `%(default)s`).',
help='Storage format for downloaded trades data. (default: `jsongz`).',
choices=constants.AVAILABLE_DATAHANDLERS,
),
"exchange": Arg(
@@ -410,6 +438,12 @@ AVAILABLE_CLI_OPTIONS = {
action='store_true',
default=False,
),
"ui_version": Arg(
'--ui-version',
help=('Specify a specific version of FreqUI to install. '
'Not specifying this installs the latest version.'),
type=str,
),
# Templating options
"template": Arg(
'--template',
@@ -548,4 +582,10 @@ AVAILABLE_CLI_OPTIONS = {
help='Do not print epoch details header.',
action='store_true',
),
"hyperopt_ignore_missing_space": Arg(
"--ignore-missing-spaces", "--ignore-unparameterized-spaces",
help=("Suppress errors for any requested Hyperopt spaces "
"that do not contain any parameters."),
action="store_true",
),
}

View File

@@ -11,6 +11,7 @@ from freqtrade.data.history import (convert_trades_to_ohlcv, refresh_backtest_oh
from freqtrade.enums import RunMode
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import timeframe_to_minutes
from freqtrade.exchange.exchange import market_is_active
from freqtrade.plugins.pairlist.pairlist_helpers import expand_pairlist
from freqtrade.resolvers import ExchangeResolver
@@ -47,11 +48,13 @@ def start_download_data(args: Dict[str, Any]) -> None:
# Init exchange
exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config, validate=False)
markets = [p for p, m in exchange.markets.items() if market_is_active(m)
or config.get('include_inactive')]
expanded_pairs = expand_pairlist(config['pairs'], markets)
# Manual validations of relevant settings
if not config['exchange'].get('skip_pair_validation', False):
exchange.validate_pairs(config['pairs'])
expanded_pairs = expand_pairlist(config['pairs'], list(exchange.markets))
exchange.validate_pairs(expanded_pairs)
logger.info(f"About to download pairs: {expanded_pairs}, "
f"intervals: {config['timeframes']} to {config['datadir']}")
@@ -89,6 +92,41 @@ def start_download_data(args: Dict[str, Any]) -> None:
f"on exchange {exchange.name}.")
def start_convert_trades(args: Dict[str, Any]) -> None:
config = setup_utils_configuration(args, RunMode.UTIL_EXCHANGE)
timerange = 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. "
"Please check the documentation on how to configure this.")
# Init exchange
exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config, validate=False)
# Manual validations of relevant settings
if not config['exchange'].get('skip_pair_validation', False):
exchange.validate_pairs(config['pairs'])
expanded_pairs = expand_pairlist(config['pairs'], list(exchange.markets))
logger.info(f"About to Convert pairs: {expanded_pairs}, "
f"intervals: {config['timeframes']} to {config['datadir']}")
for timeframe in config['timeframes']:
exchange.validate_timeframes(timeframe)
# Convert downloaded trade data to different timeframes
convert_trades_to_ohlcv(
pairs=expanded_pairs, timeframes=config['timeframes'],
datadir=config['datadir'], timerange=timerange, erase=bool(config.get('erase')),
data_format_ohlcv=config['dataformat_ohlcv'],
data_format_trades=config['dataformat_trades'],
)
def start_convert_data(args: Dict[str, Any], ohlcv: bool = True) -> None:
"""
Convert data from one format to another

View File

@@ -7,7 +7,7 @@ import requests
from freqtrade.configuration import setup_utils_configuration
from freqtrade.configuration.directory_operations import copy_sample_files, create_userdata_dir
from freqtrade.constants import USERPATH_HYPEROPTS, USERPATH_STRATEGIES
from freqtrade.constants import USERPATH_STRATEGIES
from freqtrade.enums import RunMode
from freqtrade.exceptions import OperationalException
from freqtrade.misc import render_template, render_template_with_fallback
@@ -87,56 +87,6 @@ def start_new_strategy(args: Dict[str, Any]) -> None:
raise OperationalException("`new-strategy` requires --strategy to be set.")
def deploy_new_hyperopt(hyperopt_name: str, hyperopt_path: Path, subtemplate: str) -> None:
"""
Deploys a new hyperopt template to hyperopt_path
"""
fallback = 'full'
buy_guards = render_template_with_fallback(
templatefile=f"subtemplates/hyperopt_buy_guards_{subtemplate}.j2",
templatefallbackfile=f"subtemplates/hyperopt_buy_guards_{fallback}.j2",
)
sell_guards = render_template_with_fallback(
templatefile=f"subtemplates/hyperopt_sell_guards_{subtemplate}.j2",
templatefallbackfile=f"subtemplates/hyperopt_sell_guards_{fallback}.j2",
)
buy_space = render_template_with_fallback(
templatefile=f"subtemplates/hyperopt_buy_space_{subtemplate}.j2",
templatefallbackfile=f"subtemplates/hyperopt_buy_space_{fallback}.j2",
)
sell_space = render_template_with_fallback(
templatefile=f"subtemplates/hyperopt_sell_space_{subtemplate}.j2",
templatefallbackfile=f"subtemplates/hyperopt_sell_space_{fallback}.j2",
)
strategy_text = render_template(templatefile='base_hyperopt.py.j2',
arguments={"hyperopt": hyperopt_name,
"buy_guards": buy_guards,
"sell_guards": sell_guards,
"buy_space": buy_space,
"sell_space": sell_space,
})
logger.info(f"Writing hyperopt to `{hyperopt_path}`.")
hyperopt_path.write_text(strategy_text)
def start_new_hyperopt(args: Dict[str, Any]) -> None:
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
if 'hyperopt' in args and args['hyperopt']:
new_path = config['user_data_dir'] / USERPATH_HYPEROPTS / (args['hyperopt'] + '.py')
if new_path.exists():
raise OperationalException(f"`{new_path}` already exists. "
"Please choose another Hyperopt Name.")
deploy_new_hyperopt(args['hyperopt'], new_path, args['template'])
else:
raise OperationalException("`new-hyperopt` requires --hyperopt to be set.")
def clean_ui_subdir(directory: Path):
if directory.is_dir():
logger.info("Removing UI directory content.")
@@ -178,7 +128,7 @@ def download_and_install_ui(dest_folder: Path, dl_url: str, version: str):
f.write(version)
def get_ui_download_url() -> Tuple[str, str]:
def get_ui_download_url(version: Optional[str] = None) -> Tuple[str, str]:
base_url = 'https://api.github.com/repos/freqtrade/frequi/'
# Get base UI Repo path
@@ -186,8 +136,16 @@ def get_ui_download_url() -> Tuple[str, str]:
resp.raise_for_status()
r = resp.json()
latest_version = r[0]['name']
assets = r[0].get('assets', [])
if version:
tmp = [x for x in r if x['name'] == version]
if tmp:
latest_version = tmp[0]['name']
assets = tmp[0].get('assets', [])
else:
raise ValueError("UI-Version not found.")
else:
latest_version = r[0]['name']
assets = r[0].get('assets', [])
dl_url = ''
if assets and len(assets) > 0:
dl_url = assets[0]['browser_download_url']
@@ -206,7 +164,7 @@ def start_install_ui(args: Dict[str, Any]) -> None:
dest_folder = Path(__file__).parents[1] / 'rpc/api_server/ui/installed/'
# First make sure the assets are removed.
dl_url, latest_version = get_ui_download_url()
dl_url, latest_version = get_ui_download_url(args.get('ui_version'))
curr_version = read_ui_version(dest_folder)
if curr_version == latest_version and not args.get('erase_ui_only'):

View File

@@ -53,7 +53,7 @@ def start_hyperopt_list(args: Dict[str, Any]) -> None:
if epochs and export_csv:
HyperoptTools.export_csv_file(
config, epochs, total_epochs, not config.get('hyperopt_list_best', False), export_csv
config, epochs, export_csv
)
@@ -96,7 +96,7 @@ def start_hyperopt_show(args: Dict[str, Any]) -> None:
if 'strategy_name' in metrics:
strategy_name = metrics['strategy_name']
show_backtest_result(strategy_name, metrics,
metrics['stake_currency'])
metrics['stake_currency'], config.get('backtest_breakdown', []))
HyperoptTools.try_export_params(config, strategy_name, val)

View File

@@ -10,7 +10,7 @@ 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.constants import USERPATH_STRATEGIES
from freqtrade.enums import RunMode
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import market_is_active, validate_exchanges
@@ -92,25 +92,6 @@ def start_list_strategies(args: Dict[str, Any]) -> None:
_print_objs_tabular(strategy_objs, config.get('print_colorized', False))
def start_list_hyperopts(args: Dict[str, Any]) -> None:
"""
Print files with HyperOpt custom classes available in the directory
"""
from freqtrade.resolvers.hyperopt_resolver import HyperOptResolver
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
directory = Path(config.get('hyperopt_path', config['user_data_dir'] / USERPATH_HYPEROPTS))
hyperopt_objs = HyperOptResolver.search_all_objects(directory, not args['print_one_column'])
# Sort alphabetically
hyperopt_objs = sorted(hyperopt_objs, key=lambda x: x['name'])
if args['print_one_column']:
print('\n'.join([s['name'] for s in hyperopt_objs]))
else:
_print_objs_tabular(hyperopt_objs, config.get('print_colorized', False))
def start_list_timeframes(args: Dict[str, Any]) -> None:
"""
Print timeframes available on Exchange

View File

@@ -25,12 +25,16 @@ def setup_optimize_configuration(args: Dict[str, Any], method: RunMode) -> Dict[
RunMode.HYPEROPT: 'hyperoptimization',
}
if method in no_unlimited_runmodes.keys():
wallet_size = config['dry_run_wallet'] * config['tradable_balance_ratio']
# tradable_balance_ratio
if (config['stake_amount'] != constants.UNLIMITED_STAKE_AMOUNT
and config['stake_amount'] > config['dry_run_wallet']):
wallet = round_coin_value(config['dry_run_wallet'], config['stake_currency'])
and config['stake_amount'] > wallet_size):
wallet = round_coin_value(wallet_size, config['stake_currency'])
stake = round_coin_value(config['stake_amount'], config['stake_currency'])
raise OperationalException(f"Starting balance ({wallet}) "
f"is smaller than stake_amount {stake}.")
raise OperationalException(
f"Starting balance ({wallet}) is smaller than stake_amount {stake}. "
f"Wallet is calculated as `dry_run_wallet * tradable_balance_ratio`."
)
return config
@@ -54,6 +58,22 @@ def start_backtesting(args: Dict[str, Any]) -> None:
backtesting.start()
def start_backtesting_show(args: Dict[str, Any]) -> None:
"""
Show previous backtest result
"""
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
from freqtrade.data.btanalysis import load_backtest_stats
from freqtrade.optimize.optimize_reports import show_backtest_results, show_sorted_pairlist
results = load_backtest_stats(config['exportfilename'])
show_backtest_results(config, results)
show_sorted_pairlist(config, results)
def start_hyperopt(args: Dict[str, Any]) -> None:
"""
Start hyperopt script

View File

@@ -0,0 +1,19 @@
from datetime import datetime, timezone
from cachetools import TTLCache
class PeriodicCache(TTLCache):
"""
Special cache that expires at "straight" times
A timer with ttl of 3600 (1h) will expire at every full hour (:00).
"""
def __init__(self, maxsize, ttl, getsizeof=None):
def local_timer():
ts = datetime.now(timezone.utc).timestamp()
offset = (ts % ttl)
return ts - offset
# Init with smlight offset
super().__init__(maxsize=maxsize, ttl=ttl-1e-5, timer=local_timer, getsizeof=getsizeof)

View File

@@ -1,7 +1,8 @@
# flake8: noqa: F401
from freqtrade.configuration.check_exchange import check_exchange, remove_credentials
from freqtrade.configuration.check_exchange import check_exchange
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.PeriodicCache import PeriodicCache
from freqtrade.configuration.timerange import TimeRange

View File

@@ -10,19 +10,6 @@ from freqtrade.exchange import (available_exchanges, is_exchange_known_ccxt,
logger = logging.getLogger(__name__)
def remove_credentials(config: Dict[str, Any]) -> None:
"""
Removes exchange keys from the configuration and specifies dry-run
Used for backtesting / hyperopt / edge and utils.
Modifies the input dict!
"""
config['exchange']['key'] = ''
config['exchange']['secret'] = ''
config['exchange']['password'] = ''
config['exchange']['uid'] = ''
config['dry_run'] = True
def check_exchange(config: Dict[str, Any], check_for_bad: bool = True) -> bool:
"""
Check if the exchange name in the config file is supported by Freqtrade

View File

@@ -3,7 +3,6 @@ from typing import Any, Dict
from freqtrade.enums import RunMode
from .check_exchange import remove_credentials
from .config_validation import validate_config_consistency
from .configuration import Configuration
@@ -21,8 +20,8 @@ def setup_utils_configuration(args: Dict[str, Any], method: RunMode) -> Dict[str
configuration = Configuration(args, method)
config = configuration.get_config()
# Ensure we do not use Exchange credentials
remove_credentials(config)
# Ensure these modes are using Dry-run
config['dry_run'] = True
validate_config_consistency(config)
return config

View File

@@ -242,6 +242,13 @@ class Configuration:
except ValueError:
pass
self._args_to_config(config, argname='timeframe_detail',
logstring='Parameter --timeframe-detail detected, '
'using {} for intra-candle backtesting ...')
self._args_to_config(config, argname='backtest_show_pair_list',
logstring='Parameter --show-pair-list detected.')
self._args_to_config(config, argname='stake_amount',
logstring='Parameter --stake-amount detected, '
'overriding stake_amount to: {} ...')
@@ -266,8 +273,15 @@ class Configuration:
self._args_to_config(config, argname='export',
logstring='Parameter --export detected: {} ...')
self._args_to_config(config, argname='backtest_breakdown',
logstring='Parameter --breakdown detected ...')
self._args_to_config(config, argname='backtest_cache',
logstring='Parameter --cache={} detected ...')
self._args_to_config(config, argname='disableparamexport',
logstring='Parameter --disableparamexport detected: {} ...')
# Edge section:
if 'stoploss_range' in self.args and self.args["stoploss_range"]:
txt_range = eval(self.args["stoploss_range"])
@@ -366,6 +380,9 @@ class Configuration:
self._args_to_config(config, argname='hyperopt_show_no_header',
logstring='Parameter --no-header detected: {}')
self._args_to_config(config, argname="hyperopt_ignore_missing_space",
logstring="Paramter --ignore-missing-space detected: {}")
def _process_plot_options(self, config: Dict[str, Any]) -> None:
self._args_to_config(config, argname='pairs',
@@ -401,6 +418,9 @@ class Configuration:
self._args_to_config(config, argname='days',
logstring='Detected --days: {}')
self._args_to_config(config, argname='include_inactive',
logstring='Detected --include-inactive-pairs: {}')
self._args_to_config(config, argname='download_trades',
logstring='Detected --dl-trades: {}')
@@ -411,7 +431,6 @@ class Configuration:
logstring='Using "{}" to store trades data.')
def _process_data_options(self, config: Dict[str, Any]) -> None:
self._args_to_config(config, argname='new_pairs_days',
logstring='Detected --new-pairs-days: {}')

View File

@@ -100,16 +100,11 @@ def process_temporary_deprecated_settings(config: Dict[str, Any]) -> None:
"from the edge configuration."
)
if 'ticker_interval' in config:
logger.warning(
"DEPRECATED: "
raise OperationalException(
"DEPRECATED: 'ticker_interval' detected. "
"Please use 'timeframe' instead of 'ticker_interval."
)
if 'timeframe' in config:
raise OperationalException(
"Both 'timeframe' and 'ticker_interval' detected."
"Please remove 'ticker_interval' from your configuration to continue operating."
)
config['timeframe'] = config['ticker_interval']
if 'protections' in config:
logger.warning("DEPRECATED: Setting 'protections' in the configuration is deprecated.")

View File

@@ -32,6 +32,7 @@ def flat_vars_to_nested_dict(env_dict: Dict[str, Any], prefix: str) -> Dict[str,
:param prefix: Prefix to consider (usually FREQTRADE__)
:return: Nested dict based on available and relevant variables.
"""
no_convert = ['CHAT_ID']
relevant_vars: Dict[str, Any] = {}
for env_var, val in sorted(env_dict.items()):
@@ -39,9 +40,9 @@ def flat_vars_to_nested_dict(env_dict: Dict[str, Any], prefix: str) -> Dict[str,
logger.info(f"Loading variable '{env_var}'")
key = env_var.replace(prefix, '')
for k in reversed(key.split('__')):
val = {k.lower(): get_var_typed(val) if type(val) != dict else val}
val = {k.lower(): get_var_typed(val)
if type(val) != dict and k not in no_convert else val}
relevant_vars = deep_merge_dicts(val, relevant_vars)
return relevant_vars

View File

@@ -24,13 +24,18 @@ ORDERTYPE_POSSIBILITIES = ['limit', 'market']
ORDERTIF_POSSIBILITIES = ['gtc', 'fok', 'ioc']
HYPEROPT_LOSS_BUILTIN = ['ShortTradeDurHyperOptLoss', 'OnlyProfitHyperOptLoss',
'SharpeHyperOptLoss', 'SharpeHyperOptLossDaily',
'SortinoHyperOptLoss', 'SortinoHyperOptLossDaily']
'SortinoHyperOptLoss', 'SortinoHyperOptLossDaily',
'CalmarHyperOptLoss',
'MaxDrawDownHyperOptLoss', 'ProfitDrawDownHyperOptLoss']
AVAILABLE_PAIRLISTS = ['StaticPairList', 'VolumePairList',
'AgeFilter', 'OffsetFilter', 'PerformanceFilter',
'PrecisionFilter', 'PriceFilter', 'RangeStabilityFilter',
'ShuffleFilter', 'SpreadFilter', 'VolatilityFilter']
AVAILABLE_PROTECTIONS = ['CooldownPeriod', 'LowProfitPairs', 'MaxDrawdown', 'StoplossGuard']
AVAILABLE_DATAHANDLERS = ['json', 'jsongz', 'hdf5']
BACKTEST_BREAKDOWNS = ['day', 'week', 'month']
BACKTEST_CACHE_AGE = ['none', 'day', 'week', 'month']
BACKTEST_CACHE_DEFAULT = 'day'
DRY_RUN_WALLET = 1000
DATETIME_PRINT_FORMAT = '%Y-%m-%d %H:%M:%S'
MATH_CLOSE_PREC = 1e-14 # Precision used for float comparisons
@@ -47,11 +52,12 @@ USERPATH_STRATEGIES = 'strategies'
USERPATH_NOTEBOOKS = 'notebooks'
TELEGRAM_SETTING_OPTIONS = ['on', 'off', 'silent']
WEBHOOK_FORMAT_OPTIONS = ['form', 'json', 'raw']
ENV_VAR_PREFIX = 'FREQTRADE__'
NON_OPEN_EXCHANGE_STATES = ('cancelled', 'canceled', 'closed', 'expired')
# Define decimals per coin for outputs
# Only used for outputs.
DECIMAL_PER_COIN_FALLBACK = 3 # Should be low to avoid listing all possible FIAT's
@@ -65,13 +71,10 @@ DUST_PER_COIN = {
'ETH': 0.01
}
# Source files with destination directories within user-directory
USER_DATA_FILES = {
'sample_strategy.py': USERPATH_STRATEGIES,
'sample_hyperopt_advanced.py': USERPATH_HYPEROPTS,
'sample_hyperopt_loss.py': USERPATH_HYPEROPTS,
'sample_hyperopt.py': USERPATH_HYPEROPTS,
'strategy_analysis_example.ipynb': USERPATH_NOTEBOOKS,
}
@@ -112,7 +115,7 @@ CONF_SCHEMA = {
},
'tradable_balance_ratio': {
'type': 'number',
'minimum': 0.1,
'minimum': 0.0,
'maximum': 1,
'default': 0.99
},
@@ -137,7 +140,7 @@ CONF_SCHEMA = {
'minProperties': 1
},
'amount_reserve_percent': {'type': 'number', 'minimum': 0.0, 'maximum': 0.5},
'stoploss': {'type': 'number', 'maximum': 0, 'exclusiveMaximum': True},
'stoploss': {'type': 'number', 'maximum': 0, 'exclusiveMaximum': True, 'minimum': -1},
'trailing_stop': {'type': 'boolean'},
'trailing_stop_positive': {'type': 'number', 'minimum': 0, 'maximum': 1},
'trailing_stop_positive_offset': {'type': 'number', 'minimum': 0, 'maximum': 1},
@@ -147,12 +150,17 @@ CONF_SCHEMA = {
'sell_profit_offset': {'type': 'number'},
'ignore_roi_if_buy_signal': {'type': 'boolean'},
'ignore_buying_expired_candle_after': {'type': 'number'},
'backtest_breakdown': {
'type': 'array',
'items': {'type': 'string', 'enum': BACKTEST_BREAKDOWNS}
},
'bot_name': {'type': 'string'},
'unfilledtimeout': {
'type': 'object',
'properties': {
'buy': {'type': 'number', 'minimum': 1},
'sell': {'type': 'number', 'minimum': 1},
'exit_timeout_count': {'type': 'number', 'minimum': 0, 'default': 0},
'unit': {'type': 'string', 'enum': TIMEOUT_UNITS, 'default': 'minutes'}
}
},
@@ -194,7 +202,7 @@ CONF_SCHEMA = {
'required': ['price_side']
},
'custom_price_max_distance_ratio': {
'type': 'number', 'minimum': 0.0
'type': 'number', 'minimum': 0.0
},
'order_types': {
'type': 'object',
@@ -203,7 +211,10 @@ CONF_SCHEMA = {
'sell': {'type': 'string', 'enum': ORDERTYPE_POSSIBILITIES},
'forcesell': {'type': 'string', 'enum': ORDERTYPE_POSSIBILITIES},
'forcebuy': {'type': 'string', 'enum': ORDERTYPE_POSSIBILITIES},
'emergencysell': {'type': 'string', 'enum': ORDERTYPE_POSSIBILITIES},
'emergencysell': {
'type': 'string',
'enum': ORDERTYPE_POSSIBILITIES,
'default': 'market'},
'stoploss': {'type': 'string', 'enum': ORDERTYPE_POSSIBILITIES},
'stoploss_on_exchange': {'type': 'boolean'},
'stoploss_on_exchange_interval': {'type': 'number'},
@@ -286,6 +297,15 @@ CONF_SCHEMA = {
'enum': TELEGRAM_SETTING_OPTIONS,
'default': 'off'
},
'protection_trigger': {
'type': 'string',
'enum': TELEGRAM_SETTING_OPTIONS,
'default': 'off'
},
'protection_trigger_global': {
'type': 'string',
'enum': TELEGRAM_SETTING_OPTIONS,
},
}
},
'reload': {'type': 'boolean'},
@@ -296,10 +316,16 @@ CONF_SCHEMA = {
'type': 'object',
'properties': {
'enabled': {'type': 'boolean'},
'url': {'type': 'string'},
'format': {'type': 'string', 'enum': WEBHOOK_FORMAT_OPTIONS, 'default': 'form'},
'retries': {'type': 'integer', 'minimum': 0},
'retry_delay': {'type': 'number', 'minimum': 0},
'webhookbuy': {'type': 'object'},
'webhookbuycancel': {'type': 'object'},
'webhookbuyfill': {'type': 'object'},
'webhooksell': {'type': 'object'},
'webhooksellcancel': {'type': 'object'},
'webhooksellfill': {'type': 'object'},
'webhookstatus': {'type': 'object'},
},
},
@@ -338,14 +364,16 @@ CONF_SCHEMA = {
},
'dataformat_ohlcv': {
'type': 'string',
'enum': AVAILABLE_DATAHANDLERS,
'default': 'json'
'enum': AVAILABLE_DATAHANDLERS,
'default': 'json'
},
'dataformat_trades': {
'type': 'string',
'enum': AVAILABLE_DATAHANDLERS,
'default': 'jsongz'
}
'enum': AVAILABLE_DATAHANDLERS,
'default': 'jsongz'
},
'position_adjustment_enable': {'type': 'boolean'},
'max_entry_position_adjustment': {'type': ['integer', 'number'], 'minimum': -1},
},
'definitions': {
'exchange': {
@@ -371,6 +399,7 @@ CONF_SCHEMA = {
},
'uniqueItems': True
},
'unknown_fee_rate': {'type': 'number'},
'outdated_offset': {'type': 'integer', 'minimum': 1},
'markets_refresh_interval': {'type': 'integer'},
'ccxt_config': {'type': 'object'},
@@ -411,7 +440,6 @@ SCHEMA_TRADE_REQUIRED = [
'dry_run_wallet',
'ask_strategy',
'bid_strategy',
'unfilledtimeout',
'stoploss',
'minimal_roi',
'internals',

View File

@@ -2,6 +2,8 @@
Helpers when analyzing backtest data
"""
import logging
from copy import copy
from datetime import datetime, timezone
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple, Union
@@ -9,21 +11,13 @@ import numpy as np
import pandas as pd
from freqtrade.constants import LAST_BT_RESULT_FN
from freqtrade.misc import json_load
from freqtrade.exceptions import OperationalException
from freqtrade.misc import get_backtest_metadata_filename, json_load
from freqtrade.persistence import LocalTrade, Trade, init_db
logger = logging.getLogger(__name__)
# Old format - maybe remove?
BT_DATA_COLUMNS_OLD = ["pair", "profit_percent", "open_date", "close_date", "index",
"trade_duration", "open_rate", "close_rate", "open_at_end", "sell_reason"]
# Mid-term format, created by BacktestResult Named Tuple
BT_DATA_COLUMNS_MID = ['pair', 'profit_percent', 'open_date', 'close_date', 'trade_duration',
'open_rate', 'close_rate', 'open_at_end', 'sell_reason', 'fee_open',
'fee_close', 'amount', 'profit_abs', 'profit_ratio']
# Newest format
BT_DATA_COLUMNS = ['pair', 'stake_amount', 'amount', 'open_date', 'close_date',
'open_rate', 'close_rate',
@@ -106,10 +100,30 @@ def get_latest_hyperopt_file(directory: Union[Path, str], predef_filename: str =
if isinstance(directory, str):
directory = Path(directory)
if predef_filename:
if Path(predef_filename).is_absolute():
raise OperationalException(
"--hyperopt-filename expects only the filename, not an absolute path.")
return directory / predef_filename
return directory / get_latest_hyperopt_filename(directory)
def load_backtest_metadata(filename: Union[Path, str]) -> Dict[str, Any]:
"""
Read metadata dictionary from backtest results file without reading and deserializing entire
file.
:param filename: path to backtest results file.
:return: metadata dict or None if metadata is not present.
"""
filename = get_backtest_metadata_filename(filename)
try:
with filename.open() as fp:
return json_load(fp)
except FileNotFoundError:
return {}
except Exception as e:
raise OperationalException('Unexpected error while loading backtest metadata.') from e
def load_backtest_stats(filename: Union[Path, str]) -> Dict[str, Any]:
"""
Load backtest statistics file.
@@ -126,9 +140,80 @@ def load_backtest_stats(filename: Union[Path, str]) -> Dict[str, Any]:
with filename.open() as file:
data = json_load(file)
# Legacy list format does not contain metadata.
if isinstance(data, dict):
data['metadata'] = load_backtest_metadata(filename)
return data
def _load_and_merge_backtest_result(strategy_name: str, filename: Path, results: Dict[str, Any]):
bt_data = load_backtest_stats(filename)
for k in ('metadata', 'strategy'):
results[k][strategy_name] = bt_data[k][strategy_name]
comparison = bt_data['strategy_comparison']
for i in range(len(comparison)):
if comparison[i]['key'] == strategy_name:
results['strategy_comparison'].append(comparison[i])
break
def find_existing_backtest_stats(dirname: Union[Path, str], run_ids: Dict[str, str],
min_backtest_date: datetime = None) -> Dict[str, Any]:
"""
Find existing backtest stats that match specified run IDs and load them.
:param dirname: pathlib.Path object, or string pointing to the file.
:param run_ids: {strategy_name: id_string} dictionary.
:param min_backtest_date: do not load a backtest older than specified date.
:return: results dict.
"""
# Copy so we can modify this dict without affecting parent scope.
run_ids = copy(run_ids)
dirname = Path(dirname)
results: Dict[str, Any] = {
'metadata': {},
'strategy': {},
'strategy_comparison': [],
}
# Weird glob expression here avoids including .meta.json files.
for filename in reversed(sorted(dirname.glob('backtest-result-*-[0-9][0-9].json'))):
metadata = load_backtest_metadata(filename)
if not metadata:
# Files are sorted from newest to oldest. When file without metadata is encountered it
# is safe to assume older files will also not have any metadata.
break
for strategy_name, run_id in list(run_ids.items()):
strategy_metadata = metadata.get(strategy_name, None)
if not strategy_metadata:
# This strategy is not present in analyzed backtest.
continue
if min_backtest_date is not None:
try:
backtest_date = strategy_metadata['backtest_start_time']
except KeyError:
# TODO: this can be removed starting from feb 2022
# The metadata-file without start_time was only available in develop
# and was never included in an official release.
# Older metadata format without backtest time, too old to consider.
return results
backtest_date = datetime.fromtimestamp(backtest_date, tz=timezone.utc)
if backtest_date < min_backtest_date:
# Do not use a cached result for this strategy as first result is too old.
del run_ids[strategy_name]
continue
if strategy_metadata['run_id'] == run_id:
del run_ids[strategy_name]
_load_and_merge_backtest_result(strategy_name, filename, results)
if len(run_ids) == 0:
break
return results
def load_backtest_data(filename: Union[Path, str], strategy: Optional[str] = None) -> pd.DataFrame:
"""
Load backtest data file.
@@ -167,23 +252,9 @@ def load_backtest_data(filename: Union[Path, str], strategy: Optional[str] = Non
)
else:
# old format - only with lists.
df = pd.DataFrame(data, columns=BT_DATA_COLUMNS_OLD)
if not df.empty:
df['open_date'] = pd.to_datetime(df['open_date'],
unit='s',
utc=True,
infer_datetime_format=True
)
df['close_date'] = pd.to_datetime(df['close_date'],
unit='s',
utc=True,
infer_datetime_format=True
)
# Create compatibility with new format
df['profit_abs'] = df['close_rate'] - df['open_rate']
raise OperationalException(
"Backtest-results with only trades data are no longer supported.")
if not df.empty:
if 'profit_ratio' not in df.columns:
df['profit_ratio'] = df['profit_percent']
df = df.sort_values("open_date").reset_index(drop=True)
return df
@@ -325,6 +396,7 @@ def combine_dataframes_with_mean(data: Dict[str, pd.DataFrame],
:param column: Column in the original dataframes to use
:return: DataFrame with the column renamed to the dict key, and a column
named mean, containing the mean of all pairs.
:raise: ValueError if no data is provided.
"""
df_comb = pd.concat([data[pair].set_index('date').rename(
{column: pair}, axis=1)[pair] for pair in data], axis=1)
@@ -360,9 +432,19 @@ def create_cum_profit(df: pd.DataFrame, trades: pd.DataFrame, col_name: str,
return df
def calculate_max_drawdown(trades: pd.DataFrame, *, date_col: str = 'close_date',
value_col: str = 'profit_ratio'
) -> Tuple[float, pd.Timestamp, pd.Timestamp, float, float]:
def _calc_drawdown_series(profit_results: pd.DataFrame, *, date_col: str, value_col: str
) -> pd.DataFrame:
max_drawdown_df = pd.DataFrame()
max_drawdown_df['cumulative'] = profit_results[value_col].cumsum()
max_drawdown_df['high_value'] = max_drawdown_df['cumulative'].cummax()
max_drawdown_df['drawdown'] = max_drawdown_df['cumulative'] - max_drawdown_df['high_value']
max_drawdown_df['date'] = profit_results.loc[:, date_col]
return max_drawdown_df
def calculate_underwater(trades: pd.DataFrame, *, date_col: str = 'close_date',
value_col: str = 'profit_ratio'
):
"""
Calculate max drawdown and the corresponding close dates
:param trades: DataFrame containing trades (requires columns close_date and profit_ratio)
@@ -375,10 +457,29 @@ def calculate_max_drawdown(trades: pd.DataFrame, *, date_col: str = 'close_date'
if len(trades) == 0:
raise ValueError("Trade dataframe empty.")
profit_results = trades.sort_values(date_col).reset_index(drop=True)
max_drawdown_df = pd.DataFrame()
max_drawdown_df['cumulative'] = profit_results[value_col].cumsum()
max_drawdown_df['high_value'] = max_drawdown_df['cumulative'].cummax()
max_drawdown_df['drawdown'] = max_drawdown_df['cumulative'] - max_drawdown_df['high_value']
max_drawdown_df = _calc_drawdown_series(profit_results, date_col=date_col, value_col=value_col)
return max_drawdown_df
def calculate_max_drawdown(trades: pd.DataFrame, *, date_col: str = 'close_date',
value_col: str = 'profit_abs', starting_balance: float = 0
) -> Tuple[float, pd.Timestamp, pd.Timestamp, float, float, float]:
"""
Calculate max drawdown and the corresponding close dates
:param trades: DataFrame containing trades (requires columns close_date and profit_ratio)
:param date_col: Column in DataFrame to use for dates (defaults to 'close_date')
:param value_col: Column in DataFrame to use for values (defaults to 'profit_abs')
:param starting_balance: Portfolio starting balance - properly calculate relative drawdown.
:return: Tuple (float, highdate, lowdate, highvalue, lowvalue, relative_drawdown)
with absolute max drawdown, high and low time and high and low value,
and the relative account drawdown
:raise: ValueError if trade-dataframe was found empty.
"""
if len(trades) == 0:
raise ValueError("Trade dataframe empty.")
profit_results = trades.sort_values(date_col).reset_index(drop=True)
max_drawdown_df = _calc_drawdown_series(profit_results, date_col=date_col, value_col=value_col)
idxmin = max_drawdown_df['drawdown'].idxmin()
if idxmin == 0:
@@ -388,7 +489,18 @@ def calculate_max_drawdown(trades: pd.DataFrame, *, date_col: str = 'close_date'
high_val = max_drawdown_df.loc[max_drawdown_df.iloc[:idxmin]
['high_value'].idxmax(), 'cumulative']
low_val = max_drawdown_df.loc[idxmin, 'cumulative']
return abs(min(max_drawdown_df['drawdown'])), high_date, low_date, high_val, low_val
max_drawdown_rel = 0.0
if high_val + starting_balance != 0:
max_drawdown_rel = (high_val - low_val) / (high_val + starting_balance)
return (
abs(min(max_drawdown_df['drawdown'])),
high_date,
low_date,
high_val,
low_val,
max_drawdown_rel
)
def calculate_csum(trades: pd.DataFrame, starting_balance: float = 0) -> Tuple[float, float]:

View File

@@ -113,7 +113,7 @@ def ohlcv_fill_up_missing_data(dataframe: DataFrame, timeframe: str, pair: str)
pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0
if len_before != len_after:
message = (f"Missing data fillup for {pair}: before: {len_before} - after: {len_after}"
f" - {round(pct_missing * 100, 2)}%")
f" - {pct_missing:.2%}")
if pct_missing > 0.01:
logger.info(message)
else:

View File

@@ -149,6 +149,8 @@ class DataProvider:
Clear pair dataframe cache.
"""
self.__cached_pairs = {}
self.__cached_pairs_backtesting = {}
self.__slice_index = 0
# Exchange functions

View File

@@ -6,7 +6,6 @@ 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)
@@ -61,10 +60,10 @@ class HDF5DataHandler(IDataHandler):
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()
_data.loc[:, self._columns].to_hdf(
filename, key, mode='a', complevel=9, complib='blosc',
format='table', data_columns=['date']
)
def _ohlcv_load(self, pair: str, timeframe: str,
timerange: Optional[TimeRange] = None) -> pd.DataFrame:
@@ -99,19 +98,6 @@ class HDF5DataHandler(IDataHandler):
'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
@@ -142,11 +128,11 @@ class HDF5DataHandler(IDataHandler):
"""
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()
pd.DataFrame(data, columns=DEFAULT_TRADES_COLUMNS).to_hdf(
self._pair_trades_filename(self._datadir, pair), key,
mode='a', complevel=9, complib='blosc',
format='table', data_columns=['timestamp']
)
def trades_append(self, pair: str, data: TradeList):
"""
@@ -180,17 +166,9 @@ class HDF5DataHandler(IDataHandler):
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 _get_file_extension(cls):
return "h5"
@classmethod
def _pair_ohlcv_key(cls, pair: str, timeframe: str) -> str:
@@ -199,15 +177,3 @@ class HDF5DataHandler(IDataHandler):
@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

@@ -5,7 +5,7 @@ from pathlib import Path
from typing import Dict, List, Optional, Tuple
import arrow
from pandas import DataFrame
from pandas import DataFrame, concat
from freqtrade.configuration import TimeRange
from freqtrade.constants import DEFAULT_DATAFRAME_COLUMNS
@@ -197,7 +197,8 @@ def _download_pair_history(pair: str, *,
timeframe=timeframe,
since_ms=since_ms if since_ms else
arrow.utcnow().shift(
days=-new_pairs_days).int_timestamp * 1000
days=-new_pairs_days).int_timestamp * 1000,
is_new_pair=data.empty
)
# TODO: Maybe move parsing to exchange class (?)
new_dataframe = ohlcv_to_dataframe(new_data, timeframe, pair,
@@ -207,7 +208,7 @@ def _download_pair_history(pair: str, *,
else:
# 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,
data = clean_ohlcv_dataframe(concat([data, new_dataframe], axis=0), timeframe, pair,
fill_missing=False, drop_incomplete=False)
logger.debug("New Start: %s",

View File

@@ -12,6 +12,7 @@ from typing import List, Optional, Type
from pandas import DataFrame
from freqtrade import misc
from freqtrade.configuration import TimeRange
from freqtrade.constants import ListPairsWithTimeframes, TradeList
from freqtrade.data.converter import clean_ohlcv_dataframe, trades_remove_duplicates, trim_dataframe
@@ -26,6 +27,13 @@ class IDataHandler(ABC):
def __init__(self, datadir: Path) -> None:
self._datadir = datadir
@classmethod
def _get_file_extension(cls) -> str:
"""
Get file extension for this particular datahandler
"""
raise NotImplementedError()
@abstractclassmethod
def ohlcv_get_available_data(cls, datadir: Path) -> ListPairsWithTimeframes:
"""
@@ -70,7 +78,6 @@ class IDataHandler(ABC):
:return: DataFrame with ohlcv data, or empty DataFrame
"""
@abstractmethod
def ohlcv_purge(self, pair: str, timeframe: str) -> bool:
"""
Remove data for this pair
@@ -78,6 +85,11 @@ class IDataHandler(ABC):
: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
@abstractmethod
def ohlcv_append(self, pair: str, timeframe: str, data: DataFrame) -> None:
@@ -123,13 +135,17 @@ class IDataHandler(ABC):
:return: List of trades
"""
@abstractmethod
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
def trades_load(self, pair: str, timerange: Optional[TimeRange] = None) -> TradeList:
"""
@@ -141,6 +157,18 @@ class IDataHandler(ABC):
"""
return trades_remove_duplicates(self._trades_load(pair, timerange=timerange))
@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}.{cls._get_file_extension()}')
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.{cls._get_file_extension()}')
return filename
def ohlcv_load(self, pair, timeframe: str,
timerange: Optional[TimeRange] = None,
fill_missing: bool = True,
@@ -173,7 +201,7 @@ class IDataHandler(ABC):
enddate = pairdf.iloc[-1]['date']
if timerange_startup:
self._validate_pairdata(pair, pairdf, timerange_startup)
self._validate_pairdata(pair, pairdf, timeframe, timerange_startup)
pairdf = trim_dataframe(pairdf, timerange_startup)
if self._check_empty_df(pairdf, pair, timeframe, warn_no_data):
return pairdf
@@ -200,7 +228,7 @@ class IDataHandler(ABC):
return True
return False
def _validate_pairdata(self, pair, pairdata: DataFrame, timerange: TimeRange):
def _validate_pairdata(self, pair, pairdata: DataFrame, timeframe: str, timerange: TimeRange):
"""
Validates pairdata for missing data at start end end and logs warnings.
:param pairdata: Dataframe to validate
@@ -210,12 +238,12 @@ class IDataHandler(ABC):
if timerange.starttype == 'date':
start = datetime.fromtimestamp(timerange.startts, tz=timezone.utc)
if pairdata.iloc[0]['date'] > start:
logger.warning(f"Missing data at start for pair {pair}, "
logger.warning(f"Missing data at start for pair {pair} at {timeframe}, "
f"data starts at {pairdata.iloc[0]['date']:%Y-%m-%d %H:%M:%S}")
if timerange.stoptype == 'date':
stop = datetime.fromtimestamp(timerange.stopts, tz=timezone.utc)
if pairdata.iloc[-1]['date'] < stop:
logger.warning(f"Missing data at end for pair {pair}, "
logger.warning(f"Missing data at end for pair {pair} at {timeframe}, "
f"data ends at {pairdata.iloc[-1]['date']:%Y-%m-%d %H:%M:%S}")

View File

@@ -174,34 +174,10 @@ class JsonDataHandler(IDataHandler):
pass
return tradesdata
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_data_filename(cls, datadir: Path, pair: str, timeframe: str) -> Path:
pair_s = misc.pair_to_filename(pair)
filename = datadir.joinpath(f'{pair_s}-{timeframe}.{cls._get_file_extension()}')
return filename
@classmethod
def _get_file_extension(cls):
return "json.gz" if cls._use_zip else "json"
@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.{cls._get_file_extension()}')
return filename
class JsonGzDataHandler(JsonDataHandler):

View File

@@ -119,7 +119,7 @@ class Edge:
)
# Download informative pairs too
res = defaultdict(list)
for p, t in self.strategy.informative_pairs():
for p, t in self.strategy.gather_informative_pairs():
res[t].append(p)
for timeframe, inf_pairs in res.items():
timerange_startup = deepcopy(self._timerange)
@@ -219,9 +219,11 @@ class Edge:
"""
final = []
for pair, info in self._cached_pairs.items():
if info.expectancy > float(self.edge_config.get('minimum_expectancy', 0.2)) and \
info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)) and \
pair in pairs:
if (
info.expectancy > float(self.edge_config.get('minimum_expectancy', 0.2))
and info.winrate > float(self.edge_config.get('minimum_winrate', 0.60))
and pair in pairs
):
final.append(pair)
if self._final_pairs != final:
@@ -246,8 +248,8 @@ class Edge:
"""
final = []
for pair, info in self._cached_pairs.items():
if info.expectancy > float(self.edge_config.get('minimum_expectancy', 0.2)) and \
info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)):
if (info.expectancy > float(self.edge_config.get('minimum_expectancy', 0.2)) and
info.winrate > float(self.edge_config.get('minimum_winrate', 0.60))):
final.append({
'Pair': pair,
'Winrate': info.winrate,

View File

@@ -1,5 +1,6 @@
# flake8: noqa: F401
from freqtrade.enums.backteststate import BacktestState
from freqtrade.enums.ordertypevalue import OrderTypeValues
from freqtrade.enums.rpcmessagetype import RPCMessageType
from freqtrade.enums.runmode import NON_UTIL_MODES, OPTIMIZE_MODES, TRADING_MODES, RunMode
from freqtrade.enums.selltype import SellType

View File

@@ -0,0 +1,6 @@
from enum import Enum
class OrderTypeValues(str, Enum):
limit = 'limit'
market = 'market'

View File

@@ -11,6 +11,8 @@ class RPCMessageType(Enum):
SELL = 'sell'
SELL_FILL = 'sell_fill'
SELL_CANCEL = 'sell_cancel'
PROTECTION_TRIGGER = 'protection_trigger'
PROTECTION_TRIGGER_GLOBAL = 'protection_trigger_global'
def __repr__(self):
return self.value

View File

@@ -14,3 +14,4 @@ class SignalTagType(Enum):
Enum for signal columns
"""
BUY_TAG = "buy_tag"
EXIT_TAG = "exit_tag"

View File

@@ -1,5 +1,3 @@
class FreqtradeException(Exception):
"""
Freqtrade base exception. Handled at the outermost level.

View File

@@ -1,10 +1,11 @@
# flake8: noqa: F401
# isort: off
from freqtrade.exchange.common import MAP_EXCHANGE_CHILDCLASS
from freqtrade.exchange.common import remove_credentials, MAP_EXCHANGE_CHILDCLASS
from freqtrade.exchange.exchange import Exchange
# isort: on
from freqtrade.exchange.bibox import Bibox
from freqtrade.exchange.binance import Binance
from freqtrade.exchange.bitpanda import Bitpanda
from freqtrade.exchange.bittrex import Bittrex
from freqtrade.exchange.bybit import Bybit
from freqtrade.exchange.coinbasepro import Coinbasepro
@@ -17,5 +18,7 @@ from freqtrade.exchange.exchange import (available_exchanges, ccxt_exchanges,
from freqtrade.exchange.ftx import Ftx
from freqtrade.exchange.gateio import Gateio
from freqtrade.exchange.hitbtc import Hitbtc
from freqtrade.exchange.huobi import Huobi
from freqtrade.exchange.kraken import Kraken
from freqtrade.exchange.kucoin import Kucoin
from freqtrade.exchange.okx import Okx

View File

@@ -1,13 +1,10 @@
""" Binance exchange subclass """
import logging
from typing import Dict
from typing import Dict, List, Tuple
import ccxt
import arrow
from freqtrade.exceptions import (DDosProtection, InsufficientFundsError, InvalidOrderException,
OperationalException, TemporaryError)
from freqtrade.exchange import Exchange
from freqtrade.exchange.common import retrier
logger = logging.getLogger(__name__)
@@ -17,7 +14,9 @@ class Binance(Exchange):
_ft_has: Dict = {
"stoploss_on_exchange": True,
"stoploss_order_types": {"limit": "stop_loss_limit"},
"order_time_in_force": ['gtc', 'fok', 'ioc'],
"time_in_force_parameter": "timeInForce",
"ohlcv_candle_limit": 1000,
"trades_pagination": "id",
"trades_pagination_arg": "fromId",
@@ -31,61 +30,21 @@ class Binance(Exchange):
"""
return order['type'] == 'stop_loss_limit' and stop_loss > float(order['info']['stopPrice'])
@retrier(retries=0)
def stoploss(self, pair: str, amount: float, stop_price: float, order_types: Dict) -> Dict:
async def _async_get_historic_ohlcv(self, pair: str, timeframe: str,
since_ms: int, is_new_pair: bool = False,
raise_: bool = False
) -> Tuple[str, str, List]:
"""
creates a stoploss limit order.
this stoploss-limit is binance-specific.
It may work with a limited number of other exchanges, but this has not been tested yet.
Overwrite to introduce "fast new pair" functionality by detecting the pair's listing date
Does not work for other exchanges, which don't return the earliest data when called with "0"
"""
# Limit price threshold: As limit price should always be below stop-price
limit_price_pct = order_types.get('stoploss_on_exchange_limit_ratio', 0.99)
rate = stop_price * limit_price_pct
ordertype = "stop_loss_limit"
stop_price = self.price_to_precision(pair, stop_price)
# Ensure rate is less than stop price
if stop_price <= rate:
raise OperationalException(
'In stoploss limit order, stop price should be more than limit price')
if self._config['dry_run']:
dry_order = self.create_dry_run_order(
pair, ordertype, "sell", amount, stop_price)
return dry_order
try:
params = self._params.copy()
params.update({'stopPrice': stop_price})
amount = self.amount_to_precision(pair, amount)
rate = self.price_to_precision(pair, rate)
order = self._api.create_order(symbol=pair, type=ordertype, side='sell',
amount=amount, price=rate, params=params)
logger.info('stoploss limit order added for %s. '
'stop price: %s. limit: %s', pair, stop_price, rate)
self._log_exchange_response('create_stoploss_order', order)
return order
except ccxt.InsufficientFunds as e:
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
except ccxt.InvalidOrder as e:
# Errors:
# `binance Order would trigger immediately.`
raise InvalidOrderException(
f'Could not create {ordertype} sell order on market {pair}. '
f'Tried to sell amount {amount} at rate {rate}. '
f'Message: {e}') from e
except ccxt.DDoSProtection as e:
raise DDosProtection(e) from e
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
raise TemporaryError(
f'Could not place sell order due to {e.__class__.__name__}. Message: {e}') from e
except ccxt.BaseError as e:
raise OperationalException(e) from e
if is_new_pair:
x = await self._async_get_candle_history(pair, timeframe, 0)
if x and x[2] and x[2][0] and x[2][0][0] > since_ms:
# Set starting date to first available candle.
since_ms = x[2][0][0]
logger.info(f"Candle-data for {pair} available starting with "
f"{arrow.get(since_ms // 1000).isoformat()}.")
return await super()._async_get_historic_ohlcv(
pair=pair, timeframe=timeframe, since_ms=since_ms, is_new_pair=is_new_pair,
raise_=raise_)

View File

@@ -0,0 +1,37 @@
""" Bitpanda exchange subclass """
import logging
from datetime import datetime, timezone
from typing import Dict, List, Optional
from freqtrade.exchange import Exchange
logger = logging.getLogger(__name__)
class Bitpanda(Exchange):
"""
Bitpanda exchange class. Contains adjustments needed for Freqtrade to work
with this exchange.
"""
def get_trades_for_order(self, order_id: str, pair: str, since: datetime,
params: Optional[Dict] = None) -> List:
"""
Fetch Orders using the "fetch_my_trades" endpoint and filter them by order-id.
The "since" argument passed in is coming from the database and is in UTC,
as timezone-native datetime object.
From the python documentation:
> Naive datetime instances are assumed to represent local time
Therefore, calling "since.timestamp()" will get the UTC timestamp, after applying the
transformation from local timezone to UTC.
This works for timezones UTC+ since then the result will contain trades from a few hours
instead of from the last 5 seconds, however fails for UTC- timezones,
since we're then asking for trades with a "since" argument in the future.
:param order_id order_id: Order-id as given when creating the order
:param pair: Pair the order is for
:param since: datetime object of the order creation time. Assumes object is in UTC.
"""
params = {'to': int(datetime.now(timezone.utc).timestamp() * 1000)}
return super().get_trades_for_order(order_id, pair, since, params)

View File

@@ -4,9 +4,20 @@ import time
from functools import wraps
from freqtrade.exceptions import DDosProtection, RetryableOrderError, TemporaryError
from freqtrade.mixins import LoggingMixin
logger = logging.getLogger(__name__)
__logging_mixin = None
def _get_logging_mixin():
# Logging-mixin to cache kucoin responses
# Only to be used in retrier
global __logging_mixin
if not __logging_mixin:
__logging_mixin = LoggingMixin(logger)
return __logging_mixin
# Maximum default retry count.
@@ -16,15 +27,15 @@ API_FETCH_ORDER_RETRY_COUNT = 5
BAD_EXCHANGES = {
"bitmex": "Various reasons.",
"bitstamp": "Does not provide history. "
"Details in https://github.com/freqtrade/freqtrade/issues/1983",
"phemex": "Does not provide history. ",
"phemex": "Does not provide history.",
"probit": "Requires additional, regular calls to `signIn()`.",
"poloniex": "Does not provide fetch_order endpoint to fetch both open and closed orders.",
}
MAP_EXCHANGE_CHILDCLASS = {
'binanceus': 'binance',
'binanceje': 'binance',
'okex': 'okx',
}
@@ -51,6 +62,19 @@ EXCHANGE_HAS_OPTIONAL = [
]
def remove_credentials(config) -> None:
"""
Removes exchange keys from the configuration and specifies dry-run
Used for backtesting / hyperopt / edge and utils.
Modifies the input dict!
"""
if config.get('dry_run', False):
config['exchange']['key'] = ''
config['exchange']['secret'] = ''
config['exchange']['password'] = ''
config['exchange']['uid'] = ''
def calculate_backoff(retrycount, max_retries):
"""
Calculate backoff
@@ -61,21 +85,33 @@ def calculate_backoff(retrycount, max_retries):
def retrier_async(f):
async def wrapper(*args, **kwargs):
count = kwargs.pop('count', API_RETRY_COUNT)
kucoin = args[0].name == "Kucoin" # Check if the exchange is KuCoin.
try:
return await f(*args, **kwargs)
except TemporaryError as ex:
logger.warning('%s() returned exception: "%s"', f.__name__, ex)
msg = f'{f.__name__}() returned exception: "{ex}". '
if count > 0:
logger.warning('retrying %s() still for %s times', f.__name__, count)
msg += f'Retrying still for {count} times.'
count -= 1
kwargs.update({'count': count})
kwargs['count'] = count
if isinstance(ex, DDosProtection):
backoff_delay = calculate_backoff(count + 1, API_RETRY_COUNT)
logger.info(f"Applying DDosProtection backoff delay: {backoff_delay}")
await asyncio.sleep(backoff_delay)
if kucoin and "429000" in str(ex):
# Temporary fix for 429000 error on kucoin
# see https://github.com/freqtrade/freqtrade/issues/5700 for details.
_get_logging_mixin().log_once(
f"Kucoin 429 error, avoid triggering DDosProtection backoff delay. "
f"{count} tries left before giving up", logmethod=logger.warning)
# Reset msg to avoid logging too many times.
msg = ''
else:
backoff_delay = calculate_backoff(count + 1, API_RETRY_COUNT)
logger.info(f"Applying DDosProtection backoff delay: {backoff_delay}")
await asyncio.sleep(backoff_delay)
if msg:
logger.warning(msg)
return await wrapper(*args, **kwargs)
else:
logger.warning('Giving up retrying: %s()', f.__name__)
logger.warning(msg + 'Giving up.')
raise ex
return wrapper
@@ -88,9 +124,9 @@ def retrier(_func=None, retries=API_RETRY_COUNT):
try:
return f(*args, **kwargs)
except (TemporaryError, RetryableOrderError) as ex:
logger.warning('%s() returned exception: "%s"', f.__name__, ex)
msg = f'{f.__name__}() returned exception: "{ex}". '
if count > 0:
logger.warning('retrying %s() still for %s times', f.__name__, count)
logger.warning(msg + f'Retrying still for {count} times.')
count -= 1
kwargs.update({'count': count})
if isinstance(ex, (DDosProtection, RetryableOrderError)):
@@ -100,7 +136,7 @@ def retrier(_func=None, retries=API_RETRY_COUNT):
time.sleep(backoff_delay)
return wrapper(*args, **kwargs)
else:
logger.warning('Giving up retrying: %s()', f.__name__)
logger.warning(msg + 'Giving up.')
raise ex
return wrapper
# Support both @retrier and @retrier(retries=2) syntax

View File

@@ -7,9 +7,9 @@ import http
import inspect
import logging
from copy import deepcopy
from datetime import datetime, timezone
from datetime import datetime, timedelta, timezone
from math import ceil
from typing import Any, Dict, List, Optional, Tuple
from typing import Any, Coroutine, Dict, List, Optional, Tuple
import arrow
import ccxt
@@ -26,9 +26,9 @@ from freqtrade.exceptions import (DDosProtection, ExchangeError, InsufficientFun
InvalidOrderException, OperationalException, PricingError,
RetryableOrderError, TemporaryError)
from freqtrade.exchange.common import (API_FETCH_ORDER_RETRY_COUNT, BAD_EXCHANGES,
EXCHANGE_HAS_OPTIONAL, EXCHANGE_HAS_REQUIRED, retrier,
retrier_async)
from freqtrade.misc import deep_merge_dicts, safe_value_fallback2
EXCHANGE_HAS_OPTIONAL, EXCHANGE_HAS_REQUIRED,
remove_credentials, retrier, retrier_async)
from freqtrade.misc import chunks, deep_merge_dicts, safe_value_fallback2
from freqtrade.plugins.pairlist.pairlist_helpers import expand_pairlist
@@ -54,15 +54,21 @@ class Exchange:
# Parameters to add directly to buy/sell calls (like agreeing to trading agreement)
_params: Dict = {}
# Additional headers - added to the ccxt object
_headers: Dict = {}
# Dict to specify which options each exchange implements
# This defines defaults, which can be selectively overridden by subclasses using _ft_has
# or by specifying them in the configuration.
_ft_has_default: Dict = {
"stoploss_on_exchange": False,
"order_time_in_force": ["gtc"],
"time_in_force_parameter": "timeInForce",
"ohlcv_params": {},
"ohlcv_candle_limit": 500,
"ohlcv_partial_candle": True,
# Check https://github.com/ccxt/ccxt/issues/10767 for removal of ohlcv_volume_currency
"ohlcv_volume_currency": "base", # "base" or "quote"
"trades_pagination": "time", # Possible are "time" or "id"
"trades_pagination_arg": "since",
"l2_limit_range": None,
@@ -79,6 +85,8 @@ class Exchange:
self._api: ccxt.Exchange = None
self._api_async: ccxt_async.Exchange = None
self._markets: Dict = {}
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(self.loop)
self._config.update(config)
@@ -100,6 +108,7 @@ class Exchange:
# Holds all open sell orders for dry_run
self._dry_run_open_orders: Dict[str, Any] = {}
remove_credentials(config)
if config['dry_run']:
logger.info('Instance is running with dry_run enabled')
@@ -150,8 +159,8 @@ class Exchange:
self.validate_pairs(config['exchange']['pair_whitelist'])
self.validate_ordertypes(config.get('order_types', {}))
self.validate_order_time_in_force(config.get('order_time_in_force', {}))
self.validate_required_startup_candles(config.get('startup_candle_count', 0),
config.get('timeframe', ''))
self.required_candle_call_count = self.validate_required_startup_candles(
config.get('startup_candle_count', 0), config.get('timeframe', ''))
# Converts the interval provided in minutes in config to seconds
self.markets_refresh_interval: int = exchange_config.get(
@@ -165,11 +174,13 @@ class Exchange:
def close(self):
logger.debug("Exchange object destroyed, closing async loop")
if self._api_async and inspect.iscoroutinefunction(self._api_async.close):
asyncio.get_event_loop().run_until_complete(self._api_async.close())
if (self._api_async and inspect.iscoroutinefunction(self._api_async.close)
and self._api_async.session):
logger.info("Closing async ccxt session.")
self.loop.run_until_complete(self._api_async.close())
def _init_ccxt(self, exchange_config: Dict[str, Any], ccxt_module: CcxtModuleType = ccxt,
ccxt_kwargs: dict = None) -> ccxt.Exchange:
ccxt_kwargs: Dict = {}) -> ccxt.Exchange:
"""
Initialize ccxt with given config and return valid
ccxt instance.
@@ -188,6 +199,10 @@ class Exchange:
}
if ccxt_kwargs:
logger.info('Applying additional ccxt config: %s', ccxt_kwargs)
if self._headers:
# Inject static headers after the above output to not confuse users.
ccxt_kwargs = deep_merge_dicts({'headers': self._headers}, ccxt_kwargs)
if ccxt_kwargs:
ex_config.update(ccxt_kwargs)
try:
@@ -317,7 +332,7 @@ class Exchange:
def _load_async_markets(self, reload: bool = False) -> None:
try:
if self._api_async:
asyncio.get_event_loop().run_until_complete(
self.loop.run_until_complete(
self._api_async.load_markets(reload=reload))
except (asyncio.TimeoutError, ccxt.BaseError) as e:
@@ -352,9 +367,16 @@ class Exchange:
def validate_stakecurrency(self, stake_currency: str) -> None:
"""
Checks stake-currency against available currencies on the exchange.
Only runs on startup. If markets have not been loaded, there's been a problem with
the connection to the exchange.
:param stake_currency: Stake-currency to validate
:raise: OperationalException if stake-currency is not available.
"""
if not self._markets:
raise OperationalException(
'Could not load markets, therefore cannot start. '
'Please investigate the above error for more details.'
)
quote_currencies = self.get_quote_currencies()
if stake_currency not in quote_currencies:
raise OperationalException(
@@ -455,16 +477,29 @@ class Exchange:
raise OperationalException(
f'Time in force policies are not supported for {self.name} yet.')
def validate_required_startup_candles(self, startup_candles: int, timeframe: str) -> None:
def validate_required_startup_candles(self, startup_candles: int, timeframe: str) -> int:
"""
Checks if required startup_candles is more than ohlcv_candle_limit().
Requires a grace-period of 5 candles - so a startup-period up to 494 is allowed by default.
"""
candle_limit = self.ohlcv_candle_limit(timeframe)
if startup_candles + 5 > candle_limit:
# Require one more candle - to account for the still open candle.
candle_count = startup_candles + 1
# Allow 5 calls to the exchange per pair
required_candle_call_count = int(
(candle_count / candle_limit) + (0 if candle_count % candle_limit == 0 else 1))
if required_candle_call_count > 5:
# Only allow 5 calls per pair to somewhat limit the impact
raise OperationalException(
f"This strategy requires {startup_candles} candles to start. "
f"{self.name} only provides {candle_limit} for {timeframe}.")
f"This strategy requires {startup_candles} candles to start, which is more than 5x "
f"the amount of candles {self.name} provides for {timeframe}.")
if required_candle_call_count > 1:
logger.warning(f"Using {required_candle_call_count} calls to get OHLCV. "
f"This can result in slower operations for the bot. Please check "
f"if you really need {startup_candles} candles for your strategy")
return required_candle_call_count
def exchange_has(self, endpoint: str) -> bool:
"""
@@ -507,7 +542,7 @@ class Exchange:
precision = self.markets[pair]['precision']['price']
missing = price % precision
if missing != 0:
price = price - missing + precision
price = round(price - missing + precision, 10)
else:
symbol_prec = self.markets[pair]['precision']['price']
big_price = price * pow(10, symbol_prec)
@@ -565,7 +600,8 @@ class Exchange:
# Dry-run methods
def create_dry_run_order(self, pair: str, ordertype: str, side: str, amount: float,
rate: float, params: Dict = {}) -> Dict[str, Any]:
rate: float, params: Dict = {},
stop_loss: bool = False) -> Dict[str, Any]:
order_id = f'dry_run_{side}_{datetime.now().timestamp()}'
_amount = self.amount_to_precision(pair, amount)
dry_order: Dict[str, Any] = {
@@ -577,21 +613,26 @@ class Exchange:
'cost': _amount * rate,
'type': ordertype,
'side': side,
'filled': 0,
'remaining': _amount,
'datetime': arrow.utcnow().isoformat(),
'datetime': arrow.utcnow().strftime('%Y-%m-%dT%H:%M:%S.%fZ'),
'timestamp': arrow.utcnow().int_timestamp * 1000,
'status': "closed" if ordertype == "market" else "open",
'status': "closed" if ordertype == "market" and not stop_loss else "open",
'fee': None,
'info': {}
}
if dry_order["type"] in ["stop_loss_limit", "stop-loss-limit"]:
if stop_loss:
dry_order["info"] = {"stopPrice": dry_order["price"]}
dry_order["stopPrice"] = dry_order["price"]
# Workaround to avoid filling stoploss orders immediately
dry_order["ft_order_type"] = "stoploss"
if dry_order["type"] == "market":
if dry_order["type"] == "market" and not dry_order.get("ft_order_type"):
# Update market order pricing
average = self.get_dry_market_fill_price(pair, side, amount, rate)
dry_order.update({
'average': average,
'filled': _amount,
'cost': dry_order['amount'] * average,
})
dry_order = self.add_dry_order_fee(pair, dry_order)
@@ -623,7 +664,8 @@ class Exchange:
max_slippage_val = rate * ((1 + slippage) if side == 'buy' else (1 - slippage))
remaining_amount = amount
filled_amount = 0
filled_amount = 0.0
book_entry_price = 0.0
for book_entry in ob[ob_type]:
book_entry_price = book_entry[0]
book_entry_coin_volume = book_entry[1]
@@ -656,23 +698,29 @@ class Exchange:
if not self.exchange_has('fetchL2OrderBook'):
return True
ob = self.fetch_l2_order_book(pair, 1)
if side == 'buy':
price = ob['asks'][0][0]
logger.debug(f"{pair} checking dry buy-order: price={price}, limit={limit}")
if limit >= price:
return True
else:
price = ob['bids'][0][0]
logger.debug(f"{pair} checking dry sell-order: price={price}, limit={limit}")
if limit <= price:
return True
try:
if side == 'buy':
price = ob['asks'][0][0]
logger.debug(f"{pair} checking dry buy-order: price={price}, limit={limit}")
if limit >= price:
return True
else:
price = ob['bids'][0][0]
logger.debug(f"{pair} checking dry sell-order: price={price}, limit={limit}")
if limit <= price:
return True
except IndexError:
# Ignore empty orderbooks when filling - can be filled with the next iteration.
pass
return False
def check_dry_limit_order_filled(self, order: Dict[str, Any]) -> Dict[str, Any]:
"""
Check dry-run limit order fill and update fee (if it filled).
"""
if order['status'] != "closed" and order['type'] in ["limit"]:
if (order['status'] != "closed"
and order['type'] in ["limit"]
and not order.get('ft_order_type')):
pair = order['symbol']
if self._is_dry_limit_order_filled(pair, order['side'], order['price']):
order.update({
@@ -709,7 +757,8 @@ class Exchange:
params = self._params.copy()
if time_in_force != 'gtc' and ordertype != 'market':
params.update({'timeInForce': time_in_force})
param = self._ft_has.get('time_in_force_parameter', '')
params.update({param: time_in_force})
try:
# Set the precision for amount and price(rate) as accepted by the exchange
@@ -748,25 +797,96 @@ class Exchange:
"""
raise OperationalException(f"stoploss is not implemented for {self.name}.")
def _get_stop_params(self, ordertype: str, stop_price: float) -> Dict:
params = self._params.copy()
# Verify if stopPrice works for your exchange!
params.update({'stopPrice': stop_price})
return params
@retrier(retries=0)
def stoploss(self, pair: str, amount: float, stop_price: float, order_types: Dict) -> Dict:
"""
creates a stoploss order.
requires `_ft_has['stoploss_order_types']` to be set as a dict mapping limit and market
to the corresponding exchange type.
The precise ordertype is determined by the order_types dict or exchange default.
Since ccxt does not unify stoploss-limit orders yet, this needs to be implemented in each
exchange's subclass.
The exception below should never raise, since we disallow
starting the bot in validate_ordertypes()
Note: Changes to this interface need to be applied to all sub-classes too.
"""
raise OperationalException(f"stoploss is not implemented for {self.name}.")
This may work with a limited number of other exchanges, but correct working
needs to be tested individually.
WARNING: setting `stoploss_on_exchange` to True will NOT auto-enable stoploss on exchange.
`stoploss_adjust` must still be implemented for this to work.
"""
if not self._ft_has['stoploss_on_exchange']:
raise OperationalException(f"stoploss is not implemented for {self.name}.")
user_order_type = order_types.get('stoploss', 'market')
if user_order_type in self._ft_has["stoploss_order_types"].keys():
ordertype = self._ft_has["stoploss_order_types"][user_order_type]
else:
# Otherwise pick only one available
ordertype = list(self._ft_has["stoploss_order_types"].values())[0]
user_order_type = list(self._ft_has["stoploss_order_types"].keys())[0]
stop_price_norm = self.price_to_precision(pair, stop_price)
rate = None
if user_order_type == 'limit':
# Limit price threshold: As limit price should always be below stop-price
limit_price_pct = order_types.get('stoploss_on_exchange_limit_ratio', 0.99)
rate = stop_price * limit_price_pct
# Ensure rate is less than stop price
if stop_price_norm <= rate:
raise OperationalException(
'In stoploss limit order, stop price should be more than limit price')
rate = self.price_to_precision(pair, rate)
if self._config['dry_run']:
dry_order = self.create_dry_run_order(
pair, ordertype, "sell", amount, stop_price_norm, stop_loss=True)
return dry_order
try:
params = self._get_stop_params(ordertype=ordertype, stop_price=stop_price_norm)
amount = self.amount_to_precision(pair, amount)
order = self._api.create_order(symbol=pair, type=ordertype, side='sell',
amount=amount, price=rate, params=params)
logger.info(f"stoploss {user_order_type} order added for {pair}. "
f"stop price: {stop_price}. limit: {rate}")
self._log_exchange_response('create_stoploss_order', order)
return order
except ccxt.InsufficientFunds as e:
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
except ccxt.InvalidOrder as e:
# Errors:
# `Order would trigger immediately.`
raise InvalidOrderException(
f'Could not create {ordertype} sell order on market {pair}. '
f'Tried to sell amount {amount} at rate {rate}. '
f'Message: {e}') from e
except ccxt.DDoSProtection as e:
raise DDosProtection(e) from e
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
raise TemporaryError(
f"Could not place stoploss order due to {e.__class__.__name__}. "
f"Message: {e}") from e
except ccxt.BaseError as e:
raise OperationalException(e) from e
@retrier(retries=API_FETCH_ORDER_RETRY_COUNT)
def fetch_order(self, order_id: str, pair: str) -> Dict:
def fetch_order(self, order_id: str, pair: str, params={}) -> Dict:
if self._config['dry_run']:
return self.fetch_dry_run_order(order_id)
try:
order = self._api.fetch_order(order_id, pair)
order = self._api.fetch_order(order_id, pair, params=params)
self._log_exchange_response('fetch_order', order)
return order
except ccxt.OrderNotFound as e:
@@ -809,7 +929,7 @@ class Exchange:
and order.get('filled') == 0.0)
@retrier
def cancel_order(self, order_id: str, pair: str) -> Dict:
def cancel_order(self, order_id: str, pair: str, params={}) -> Dict:
if self._config['dry_run']:
try:
order = self.fetch_dry_run_order(order_id)
@@ -820,7 +940,7 @@ class Exchange:
return {}
try:
order = self._api.cancel_order(order_id, pair)
order = self._api.cancel_order(order_id, pair, params=params)
self._log_exchange_response('cancel_order', order)
return order
except ccxt.InvalidOrder as e:
@@ -910,7 +1030,7 @@ class Exchange:
raise OperationalException(e) from e
@retrier
def get_tickers(self, cached: bool = False) -> Dict:
def get_tickers(self, symbols: List[str] = None, cached: bool = False) -> Dict:
"""
:param cached: Allow cached result
:return: fetch_tickers result
@@ -920,7 +1040,7 @@ class Exchange:
if tickers:
return tickers
try:
tickers = self._api.fetch_tickers()
tickers = self._api.fetch_tickers(symbols)
self._fetch_tickers_cache['fetch_tickers'] = tickers
return tickers
except ccxt.NotSupported as e:
@@ -1041,7 +1161,7 @@ class Exchange:
ticker_rate = ticker[conf_strategy['price_side']]
if ticker['last'] and ticker_rate:
if side == 'buy' and ticker_rate > ticker['last']:
balance = conf_strategy['ask_last_balance']
balance = conf_strategy.get('ask_last_balance', 0.0)
ticker_rate = ticker_rate + balance * (ticker['last'] - ticker_rate)
elif side == 'sell' and ticker_rate < ticker['last']:
balance = conf_strategy.get('bid_last_balance', 0.0)
@@ -1057,7 +1177,8 @@ class Exchange:
# Fee handling
@retrier
def get_trades_for_order(self, order_id: str, pair: str, since: datetime) -> List:
def get_trades_for_order(self, order_id: str, pair: str, since: datetime,
params: Optional[Dict] = None) -> List:
"""
Fetch Orders using the "fetch_my_trades" endpoint and filter them by order-id.
The "since" argument passed in is coming from the database and is in UTC,
@@ -1081,8 +1202,10 @@ class Exchange:
try:
# Allow 5s offset to catch slight time offsets (discovered in #1185)
# since needs to be int in milliseconds
_params = params if params else {}
my_trades = self._api.fetch_my_trades(
pair, int((since.replace(tzinfo=timezone.utc).timestamp() - 5) * 1000))
pair, int((since.replace(tzinfo=timezone.utc).timestamp() - 5) * 1000),
params=_params)
matched_trades = [trade for trade in my_trades if trade['order'] == order_id]
self._log_exchange_response('get_trades_for_order', matched_trades)
@@ -1160,9 +1283,11 @@ class Exchange:
tick = self.fetch_ticker(comb)
fee_to_quote_rate = safe_value_fallback2(tick, tick, 'last', 'ask')
return round((order['fee']['cost'] * fee_to_quote_rate) / order['cost'], 8)
except ExchangeError:
return None
fee_to_quote_rate = self._config['exchange'].get('unknown_fee_rate', None)
if not fee_to_quote_rate:
return None
return round((order['fee']['cost'] * fee_to_quote_rate) / order['cost'], 8)
def extract_cost_curr_rate(self, order: Dict) -> Tuple[float, str, Optional[float]]:
"""
@@ -1178,7 +1303,7 @@ class Exchange:
# Historic data
def get_historic_ohlcv(self, pair: str, timeframe: str,
since_ms: int) -> List:
since_ms: int, is_new_pair: bool = False) -> List:
"""
Get candle history using asyncio and returns the list of candles.
Handles all async work for this.
@@ -1188,9 +1313,11 @@ class Exchange:
:param since_ms: Timestamp in milliseconds to get history from
:return: List with candle (OHLCV) data
"""
return asyncio.get_event_loop().run_until_complete(
pair, timeframe, data = self.loop.run_until_complete(
self._async_get_historic_ohlcv(pair=pair, timeframe=timeframe,
since_ms=since_ms))
since_ms=since_ms, is_new_pair=is_new_pair))
logger.info(f"Downloaded data for {pair} with length {len(data)}.")
return data
def get_historic_ohlcv_as_df(self, pair: str, timeframe: str,
since_ms: int) -> DataFrame:
@@ -1205,11 +1332,13 @@ class Exchange:
return ohlcv_to_dataframe(ticks, timeframe, pair=pair, fill_missing=True,
drop_incomplete=self._ohlcv_partial_candle)
async def _async_get_historic_ohlcv(self, pair: str,
timeframe: str,
since_ms: int) -> List:
async def _async_get_historic_ohlcv(self, pair: str, timeframe: str,
since_ms: int, is_new_pair: bool = False,
raise_: bool = False
) -> Tuple[str, str, List]:
"""
Download historic ohlcv
:param is_new_pair: used by binance subclass to allow "fast" new pair downloading
"""
one_call = timeframe_to_msecs(timeframe) * self.ohlcv_candle_limit(timeframe)
@@ -1222,22 +1351,41 @@ class Exchange:
pair, timeframe, since) for since in
range(since_ms, arrow.utcnow().int_timestamp * 1000, one_call)]
results = await asyncio.gather(*input_coroutines, return_exceptions=True)
# Combine gathered results
data: List = []
for res in results:
if isinstance(res, Exception):
logger.warning("Async code raised an exception: %s", res.__class__.__name__)
continue
# Deconstruct tuple if it's not an exception
p, _, new_data = res
if p == pair:
data.extend(new_data)
# Chunk requests into batches of 100 to avoid overwelming ccxt Throttling
for input_coro in chunks(input_coroutines, 100):
results = await asyncio.gather(*input_coro, return_exceptions=True)
for res in results:
if isinstance(res, Exception):
logger.warning(f"Async code raised an exception: {repr(res)}")
if raise_:
raise
continue
else:
# Deconstruct tuple if it's not an exception
p, _, new_data = res
if p == pair:
data.extend(new_data)
# Sort data again after extending the result - above calls return in "async order"
data = sorted(data, key=lambda x: x[0])
logger.info("Downloaded data for %s with length %s.", pair, len(data))
return data
return pair, timeframe, data
def _build_coroutine(self, pair: str, timeframe: str, since_ms: Optional[int]) -> Coroutine:
if not since_ms and self.required_candle_call_count > 1:
# Multiple calls for one pair - to get more history
one_call = timeframe_to_msecs(timeframe) * self.ohlcv_candle_limit(timeframe)
move_to = one_call * self.required_candle_call_count
now = timeframe_to_next_date(timeframe)
since_ms = int((now - timedelta(seconds=move_to // 1000)).timestamp() * 1000)
if since_ms:
return self._async_get_historic_ohlcv(
pair, timeframe, since_ms=since_ms, raise_=True)
else:
# One call ... "regular" refresh
return self._async_get_candle_history(
pair, timeframe, since_ms=since_ms)
def refresh_latest_ohlcv(self, pair_list: ListPairsWithTimeframes, *,
since_ms: Optional[int] = None, cache: bool = True
@@ -1257,10 +1405,15 @@ class Exchange:
cached_pairs = []
# Gather coroutines to run
for pair, timeframe in set(pair_list):
if (((pair, timeframe) not in self._klines)
if timeframe not in self.timeframes:
logger.warning(
f"Cannot download ({pair}, {timeframe}) combination as this timeframe is "
f"not available on {self.name}. Available timeframes are "
f"{', '.join(self.timeframes)}.")
continue
if ((pair, timeframe) not in self._klines or not cache
or self._now_is_time_to_refresh(pair, timeframe)):
input_coroutines.append(self._async_get_candle_history(pair, timeframe,
since_ms=since_ms))
input_coroutines.append(self._build_coroutine(pair, timeframe, since_ms))
else:
logger.debug(
"Using cached candle (OHLCV) data for pair %s, timeframe %s ...",
@@ -1268,27 +1421,32 @@ class Exchange:
)
cached_pairs.append((pair, timeframe))
results = asyncio.get_event_loop().run_until_complete(
asyncio.gather(*input_coroutines, return_exceptions=True))
results_df = {}
# handle caching
for res in results:
if isinstance(res, Exception):
logger.warning("Async code raised an exception: %s", res.__class__.__name__)
continue
# Deconstruct tuple (has 3 elements)
pair, timeframe, ticks = res
# keeping last candle time as last refreshed time of the pair
if ticks:
self._pairs_last_refresh_time[(pair, timeframe)] = ticks[-1][0] // 1000
# keeping parsed dataframe in cache
ohlcv_df = ohlcv_to_dataframe(
ticks, timeframe, pair=pair, fill_missing=True,
drop_incomplete=self._ohlcv_partial_candle)
results_df[(pair, timeframe)] = ohlcv_df
if cache:
self._klines[(pair, timeframe)] = ohlcv_df
# Chunk requests into batches of 100 to avoid overwelming ccxt Throttling
for input_coro in chunks(input_coroutines, 100):
async def gather_stuff():
return await asyncio.gather(*input_coro, return_exceptions=True)
results = self.loop.run_until_complete(gather_stuff())
# handle caching
for res in results:
if isinstance(res, Exception):
logger.warning(f"Async code raised an exception: {repr(res)}")
continue
# Deconstruct tuple (has 3 elements)
pair, timeframe, ticks = res
# keeping last candle time as last refreshed time of the pair
if ticks:
self._pairs_last_refresh_time[(pair, timeframe)] = ticks[-1][0] // 1000
# keeping parsed dataframe in cache
ohlcv_df = ohlcv_to_dataframe(
ticks, timeframe, pair=pair, fill_missing=True,
drop_incomplete=self._ohlcv_partial_candle)
results_df[(pair, timeframe)] = ohlcv_df
if cache:
self._klines[(pair, timeframe)] = ohlcv_df
# Return cached klines
for pair, timeframe in cached_pairs:
results_df[(pair, timeframe)] = self.klines((pair, timeframe), copy=False)
@@ -1505,7 +1663,7 @@ class Exchange:
if not self.exchange_has("fetchTrades"):
raise OperationalException("This exchange does not support downloading Trades.")
return asyncio.get_event_loop().run_until_complete(
return self.loop.run_until_complete(
self._async_get_trade_history(pair=pair, since=since,
until=until, from_id=from_id))
@@ -1515,7 +1673,7 @@ def is_exchange_known_ccxt(exchange_name: str, ccxt_module: CcxtModuleType = Non
def is_exchange_officially_supported(exchange_name: str) -> bool:
return exchange_name in ['bittrex', 'binance', 'kraken']
return exchange_name in ['binance', 'bittrex', 'ftx', 'gateio', 'huobi', 'kraken', 'okx']
def ccxt_exchanges(ccxt_module: CcxtModuleType = None) -> List[str]:

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