Commit Graph

3071 Commits

Author SHA1 Message Date
Matthias
a2c9879375 Reset sell-reason if order is cancelled 2022-03-01 19:30:16 +01:00
Matthias
1b07ad92cf Merge branch 'feat/short' into pr/samgermain/6467 2022-02-28 20:07:19 +01:00
Matthias
c39e7368ee Split backtesting test to properly initialize it 2022-02-28 19:58:44 +01:00
Matthias
79538368db Simplify liquidation price calculation 2022-02-28 19:47:21 +01:00
Matthias
ab46476e63 Rename get_liquidation method 2022-02-28 19:42:26 +01:00
Matthias
8e2d3445a7 Move leverage_prep calculations to exchange class 2022-02-28 19:29:42 +01:00
Matthias
68bc2a6107 Add huobi to ccxt compat tests 2022-02-28 07:00:52 +01:00
Sam Germain
1121965c6e liq backtesting tests 2022-02-27 14:28:28 -06:00
Matthias
0ebf40f390 Don't call amount_to_precision twice on entry 2022-02-27 15:57:44 +01:00
Matthias
5c2cca50e5 Minor updates, document no leverage changes 2022-02-27 15:44:23 +01:00
Matthias
f0f5a50975 Update tests to test DCA for shorts 2022-02-27 15:44:23 +01:00
Matthias
eed516a5c6 Update DCA logic to some extend 2022-02-27 15:44:23 +01:00
Matthias
bcfa73d492 Add "nr_of_successfull_entries" 2022-02-27 15:44:23 +01:00
Matthias
7b9880035b Remove wrong TODO-lev comment 2022-02-27 15:11:09 +01:00
Sam Germain
7508f79b6c test_freqtradebot, is_short tests 2022-02-26 13:55:52 -06:00
Sam Germain
b363940baf Add TODO-lev comment in test_handle_stoploss_on_exchange 2022-02-26 13:55:37 -06:00
Sam Germain
499e21517b test_persistence tests for stoploss with leverage adjustements 2022-02-26 13:55:37 -06:00
Matthias
12a1e27708
Merge pull request #6456 from samgermain/lev-tier-update
Lev tier update
2022-02-26 19:55:30 +01:00
Matthias
e9f3f3d859 Fix random test failure (2nd try) 2022-02-26 17:08:35 +01:00
Sam Germain
7dab70f1a5 test_ccxt_compat - ftx["futures"] = false 2022-02-26 09:45:15 -06:00
Sam Germain
64172bc98d removed TODOs in test_CCXT_compat 2022-02-26 09:27:38 -06:00
Sam Germain
fbcd260bf6 flake8 import issues 2022-02-26 09:05:51 -06:00
Sam Germain
af77358d6a updated test_load_leverage_tiers_okx 2022-02-26 09:05:51 -06:00
Sam Germain
f5ea7827e0 removed gateio.get_max_leverage and gateio.get_maint_ratio_and_amt 2022-02-26 09:05:51 -06:00
Sam Germain
b61cfada6d moved okex.load_leverage_tiers to new method 2022-02-26 09:05:51 -06:00
Matthias
79ddc9abaa
Merge pull request #6423 from samgermain/wallet-amt
Futures wallet amount
2022-02-26 15:55:28 +01:00
Matthias
e25929f50a Update test to not fail randomly 2022-02-26 15:53:01 +01:00
Matthias
75868a851b Attempt Fix random test failure 2022-02-26 15:20:56 +01:00
Matthias
14d49e85af Update Huobi stoploss to shared method 2022-02-26 14:57:13 +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
0749199097 Add stoploss tests for kucoin 2022-02-26 08:25:42 +01:00
Matthias
018c620057 Fix 0 Division error on exchanges without average
closes #6461
2022-02-26 08:19:45 +01:00
Matthias
5826698c04 Don't emergencysell partial sold exit
closes #6457
2022-02-25 15:07:35 +01:00
Matthias
3b1b66bee8 Prevent backtest starting when not in webserver mode
#6455
2022-02-25 07:40:49 +01:00
Matthias
1c26ff4c4c Add dry run test 2022-02-24 20:05:56 +01:00
Matthias
9d55621f42 Test fetch_position exchange method 2022-02-24 20:05:56 +01:00
Matthias
9901decf0d Rename get_positions to fetch_positions to align with ccxt naming 2022-02-24 20:05:56 +01:00
Matthias
62c42a73e2 Add initial rpc test 2022-02-24 20:05:56 +01:00
Matthias
d07a24a54f Update tests for new wallet RPC structure 2022-02-24 20:05:56 +01:00
Matthias
fd936e26ae Merge branch 'develop' into feat/short 2022-02-24 19:56:42 +01: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
14b69405a2 Init persistence should be the innermost fixture 2022-02-23 10:43:04 +01:00
Matthias
ec34189f1b Attempt to fix random ci error 2022-02-23 08:47:20 +01:00
Matthias
8952829adc Merge branch 'develop' into feat/short 2022-02-23 06:28:15 +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
70f4305dfa don't allow short trades in spot mode 2022-02-21 19:19:12 +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
c3c815e794
Merge pull request #6425 from samgermain/stake-amount
leverage in trade.stake_amount calculation
2022-02-19 20:11:23 +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
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
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
0bbbe2e96c Add test for #6429 2022-02-19 06:39:43 +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
989edca622 Add test-case for cancel stake update with leverage 2022-02-18 06:41:15 +01:00
Matthias
8bdc77eb4d Add TODO-lev for tests which define is_short but don't use it 2022-02-18 06:38:51 +01:00
Matthias
de8d789962 Fix test missing assert statement 2022-02-17 19:37:24 +01:00
Sam Germain
f452fce4cc Merge branch 'ccxt-compat' into leverage-tiers 2022-02-16 10:07:49 -06:00
Sam Germain
a37287d9ba test__get_params 2022-02-16 10:06:27 -06:00
Sam Germain
2015e9345d test_ccxt_compat maintenanceMarginRatio -> maintenanceMarginRate 2022-02-16 09:25:27 -06:00
Sam Germain
df86300729 test_ccxt_dry_run_liquidation_price 2022-02-16 09:22:22 -06:00
Sam Germain
124532a4b7 maintenanceMarginRatio -> maintenanceMarginRate 2022-02-16 09:04:43 -06:00
Sam Germain
dc73fccd3c removed test_ccxt_get_maintenance_ratio_and_amt 2022-02-16 09:03:50 -06:00
Sam Germain
a1e9e940dd test_ccxt_load_leverage_tiers 2022-02-16 08:51:39 -06:00
Sam Germain
ef5dae2770 ccxt_compat_tests for leverage tiers 2022-02-16 08:08:10 -06:00
Sam Germain
88a8ff2f4e Merge branch 'feat/short' into leverage-tiers 2022-02-16 08:05:51 -06:00
Matthias
e7bfb4fd5c Add test case for "sell below close" case 2022-02-16 13:42:39 +01:00
Matthias
de26844578
Merge pull request #6397 from samgermain/todos
edited todo-lev comments
2022-02-16 13:36:17 +01:00
Sam Germain
6f410d3096 fixed test_load_leverage_tiers 2022-02-16 05:44:11 -06:00
Sam Germain
c70050e750 fixed test_load_leverage_tiers 2022-02-16 05:26:52 -06:00
Sam Germain
183f85efe3 test_execute_entry fixed 2022-02-16 05:08:11 -06:00
Sam Germain
1f3d3d87f6 fixed tests 2022-02-16 04:52:26 -06:00
Sam Germain
3fe0e13bb1 expanded test_load_leverage_tiers 2022-02-16 04:37:11 -06:00
Sam Germain
3bfd9186f7 gateio.get_max_leverage small fix 2022-02-16 04:05:27 -06:00
Sam Germain
dbd2df6406 Merge branch 'leverage-tiers' of https://github.com/samgermain/freqtrade into leverage-tiers 2022-02-16 03:50:24 -06:00
Sam Germain
c9da6f480f gateio get_max_leverage and get_maintenance_ratio_and_amt temporary solution 2022-02-16 03:36:08 -06:00
Matthias
c37f03a638 Update static-markets to include futures pair 2022-02-15 08:04:16 +01:00
Matthias
1bae18c60a Update decorator locations 2022-02-15 07:11:07 +01:00
Matthias
5ee5e0256b Clarify todo 2022-02-15 06:39:55 +01:00
Sam Germain
ae249a0f97 Merge branch 'leverage-tiers' of https://github.com/samgermain/freqtrade into leverage-tiers 2022-02-14 17:36:47 -06:00
Sam Germain
3753df26fc fixed tests 2022-02-14 17:34:59 -06:00
Sam Germain
f4a57b71e7 Filled in test_load_leverage_tiers_okx 2022-02-14 16:53:29 -06: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
Matthias
99e3e26542 Adjust ccxt test naming to align with the other tests 2022-02-14 19:14:44 +01:00
Sam Germain
5cd2501397 Merge branch 'leverage-tiers' of https://github.com/samgermain/freqtrade into leverage-tiers 2022-02-14 09:40:53 -06:00
Sam Germain
cfd438b966 fixed test_get_markets 2022-02-14 09:40:01 -06:00
Sam Germain
c1d08dd03a linting 2022-02-14 09:34:09 -06:00
Sam Germain
16e38592a9 test_get_markets created debugging param test_comment 2022-02-14 09:33:56 -06:00
Matthias
09cc43b533 Test short trade exiting 2022-02-13 16:33:06 +01:00
Matthias
5b65448e56 Fix some todo-lev's in tests 2022-02-13 16:17:41 +01:00
Matthias
ad801e05f7 Filter loadable leverage tiers to stake-currency pairs 2022-02-13 13:05:57 +01:00
Matthias
96df311244 Rename test_okex to test_okx 2022-02-13 13:01:23 +01:00
Matthias
bc855b2a32 Update some missing mocks 2022-02-13 13:00:38 +01:00
Matthias
b98297786c Update failing mock 2022-02-13 12:56:32 +01:00
Sam Germain
8fe3f0c933 fix breaking tests 2022-02-12 23:08:42 -06:00
Sam Germain
531b4d238c removed test_get_maintenance_margin_and_amt_gatio as its no longer relevant 2022-02-12 23:02:16 -06:00
Sam Germain
765c95f875 test_okex.test_get_maintenance_ratio_and_amt_okex change pair names 2022-02-12 23:02:16 -06:00
Sam Germain
e3bd40c3c7 added swap and linear to conftest markets 2022-02-12 23:02:16 -06:00
Sam Germain
7a0f7da128 okex loads all leverage tiers at beginning, removed get tiers for pair 2022-02-12 23:02:16 -06:00
Sam Germain
e7430da5d7 test_ccxt_compat commented out unfinished tests 2022-02-12 23:02:16 -06:00
Sam Germain
03b3756e4b strengthened and fixed leverage_tier tests 2022-02-12 23:02:16 -06:00
Sam Germain
a6043e6a85 get_max_leverage test clean up 2022-02-12 23:02:16 -06:00
Sam Germain
4a1ed01708 get_maintenance_ratio_and_amt tests 2022-02-12 23:02:16 -06:00
Sam Germain
9e599455e7 test_execute_entry mocks get_max_leverage 2022-02-12 23:02:16 -06:00
Sam Germain
3b43d42eaa Updated exchange tests 2022-02-12 23:02:15 -06:00
Sam Germain
e987e0e2a9 exchange minor fixes 2022-02-12 23:02:15 -06:00
Sam Germain
eb72e5cc42 Added some exchange leverage tier tests 2022-02-12 23:02:15 -06:00
Sam Germain
98f32e8964 fixed failing test_get_max_leverage 2022-02-12 23:02:15 -06:00
Sam Germain
3ebda1d29d Added test templated 2022-02-12 23:02:15 -06:00
Sam Germain
a0264f0651 test_get_max_pair_stake_amount with leverage 2022-02-12 23:02:15 -06:00
Sam Germain
fe56c8c91e mock get_max_pair_stake_amount in test_execute_entry 2022-02-12 23:02:15 -06:00
Sam Germain
68a778a983 moved leverage_tiers to a fixture 2022-02-12 23:02:14 -06:00
Sam Germain
42e36f44f8 replaced "leverage" with "tiers" 2022-02-12 23:02:14 -06:00
Sam Germain
6b9915bc73 moved fill_leverage_brackets and get_max_leverage to base exchange class, wrote parse_leverage_tier and load_leverage_brackets 2022-02-12 23:02:14 -06:00
Sam Germain
a99cf2eeed redid get_max_leverage 2022-02-12 23:02:07 -06:00
Sam Germain
720a86778e okex.get_max_pair_stake_amount 2022-02-12 23:01:39 -06:00
Sam Germain
ff915b241c test_okex test_get_maintenance_ratio_and_amt_okex 2022-02-12 23:01:39 -06:00
Sam Germain
a5aba4813d moved get_maintenance_ratio_and_amt to base.exchange. Wrote get_leverage_tiers. Added mmr_key to exchange._ft_has 2022-02-12 23:01:30 -06:00
Sam Germain
fc2d3649a1 edited todos 2022-02-12 16:23:14 -06: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
Sam Germain
19a282ddb4 fixed broken test_get_liquidation_price 2022-02-11 19:38:59 +01:00
Sam Germain
6ae85f9be1 fixed liq-buffer tests 2022-02-11 19:38:59 +01:00
Sam Germain
e5d68f12d2 Added liquidation_buffer to freqtradebot 2022-02-11 19:38:58 +01:00
Matthias
c9cfc246f1 Sort /forcebuy pairs alphabetically, add cancel button
closes #6389
2022-02-11 19:37:35 +01:00
Matthias
0c6d92a7a6 Merge branch 'develop' into feat/short 2022-02-11 17:02:04 +01:00
Matthias
7c66f2776d
Merge pull request #6384 from samgermain/compat-contract
test_ccxt__get_contract_size
2022-02-10 19:07:04 +01:00
Sam Germain
52fed6e779 test_ccxt__get_contract_size 2022-02-10 06:59:43 -06: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
9f47853661
Merge pull request #6235 from freqtrade/backtest_order_timeout
Backtest order timeout
2022-02-09 07:12:35 +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
dcf8ad36f9 Backtesting should not allow unrealistic (automatic-filling) orders. 2022-02-08 19:12:01 +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
Sam Germain
33b04b1992 deleted outdated todos 2022-02-07 02:47:18 -06:00
Stefano Ariestasia
92d1f2b945 fix tests 2022-02-07 07:31:35 +00: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