Commit Graph

468 Commits

Author SHA1 Message Date
hroff-1902
fac0e4e603 more code cleanup in _process() 2019-02-20 16:01:56 +03:00
hroff-1902
199e3d2234 typo in a comment 2019-02-20 15:13:21 +03:00
hroff-1902
5906d37818 code cleanup in _process() 2019-02-20 15:12:04 +03:00
iuvbio
686949b258 Merge branch 'develop' into kraken_support 2019-02-20 00:52:10 +01:00
iuvbio
481cf02db9 add test and fix exchange_resolver 2019-02-19 19:15:22 +01:00
hroff-1902
f9d68d919c move default amount_reserve_percent value into constants 2019-02-19 11:49:49 +03:00
iuvbio
eed1c2344d delete unnecessary arguments 2019-02-18 01:03:09 +01:00
iuvbio
da4faacd6b flake8 2019-02-17 15:34:44 +01:00
iuvbio
dd2522d8d0 Merge branch 'develop' into kraken_support 2019-02-17 15:21:14 +01:00
iuvbio
fe792882b5 load generic class if no subclass exists 2019-02-17 14:42:55 +01:00
iuvbio
d3ead2cd09 exchange import is not needed anymore 2019-02-17 04:25:39 +01:00
iuvbio
c315f63e4b use exchange_resolver in freqbot 2019-02-17 04:18:56 +01:00
hroff-1902
ea6d4a9d36
fetch amount_reserve_percent from config 2019-02-16 19:50:55 +03:00
Matthias
e0c420b93f
Merge pull request #1550 from hroff-1902/patch-2
execute_buy, handle_trade: do not use ticker if use_order_book:true is set in config
2019-02-16 13:55:33 +01:00
hroff-1902
8fc8c985d8
logs: cosmetic changes
"30 seconds" was errorneously hardcoded in the text of the log message, while actually it's RETRY_TIMEOUT which may differ
2019-02-13 12:38:44 +03:00
hroff-1902
69a24c1272
no need for test_ticker parameter just for making current tests happy, tests should be reimplemented 2019-02-13 12:23:22 +03:00
hroff-1902
e8daadfb7e
same approach for the sell side (at handle_trade) 2019-02-13 03:54:57 +03:00
hroff-1902
91629807f7
shame on me 2019-02-13 03:17:54 +03:00
hroff-1902
f551fb5ff7
adjusted for passing tests
Don't like this test_ticker parameter, but it's needed for tests to pass prepared ticker.
Any ideas?
2019-02-13 03:14:24 +03:00
hroff-1902
e8ef36fb6e
execute_buy: do not use ticker if use_order_book:true is set in config
This PR corresponds to:
https://github.com/freqtrade/freqtrade/issues/1377#issue-386200394
in understanfing that pair Ticker is mostly statistics, but on the other side, create_trade/execute_buy.

It resolves problem with some exchanges (BitMex) where ticker structure returned by ccxt does not contain bid and ask values.

1. On exchanges like Bitmex, set use_order_book: true for buys. FT won't request ticker and will use data from order book only.
2. On exchanges where order book is not available, set use_order_book: false, ticker data (including ask/last balance logic) will be used.
3. On other exchanges, either approach may be used in the config.

Performance: current implementation fetches ticker every time even if order book data will be later used. With this change it's eliminated.

Comparison of order book rate and ticker rate is removed (in order to split fetching order book and ticker completely in execute_buy), so some tests that touch this code may require adjustments.
2019-02-13 02:55:55 +03:00
hroff-1902
5e741a0f73
fixed flake 2019-02-10 22:28:40 +03:00
hroff-1902
08d35f3e15
fix checks
Should not make cosmetic changes right in the github editor without local smoketests...
2019-02-10 22:09:11 +03:00
hroff-1902
b91981f0aa
Cosmetic: fix logging
Output stake_amount as it is defined in the config (it may by int) instead of float. In order to avoid unnecessary questions where and why it was converted to float and changed in the last digit while it should be integer for the exchange...

Other small cosmetic improvements to logging in freqtradebot.py
2019-02-10 21:31:13 +03:00
Matthias
0a71ebce68 Remove unneeded pair conversation, add docstring 2019-02-04 06:13:22 +01:00
Matthias
02c3552954 Adjust comment 2019-02-03 13:52:05 +01:00
Matthias
e8ed8a2ea7 Handle orders cancelled on exchange
fix #1527
2019-02-03 13:51:52 +01:00
Samuel Husso
e3ae8d3f69 flake8 3.7.1 fixes 2019-01-31 07:51:03 +02:00
Matthias
ba07348b82 Rename additional_pairs to informative_pairs 2019-01-26 19:22:45 +01:00
Matthias
d136cac181 Merge branch 'develop' into feat/dataprovider 2019-01-23 21:01:19 +01:00
Matthias
13e2f71d30 Add flake8 plugins and implement small improvements 2019-01-22 20:01:12 +01:00
Matthias
e66808bb02 Add additional pairs to refresh call 2019-01-22 07:07:15 +01:00
Matthias
1e749a0f9b Rename variable to be clearer 2019-01-22 07:07:15 +01:00
Matthias
0aa0b1d4fe Store tickers by pair / ticker_interval 2019-01-22 07:07:15 +01:00
Matthias
b981cfcaa0 remove comment which proves untrue now 2019-01-22 07:05:09 +01:00
Matthias
a206777fe5 Rename refresh_tickers to refresh_latest_ohlcv 2019-01-22 07:05:09 +01:00
Matthias
5ecdecd1eb remove unused local variable persistance 2019-01-22 07:04:19 +01:00
Matthias
58f1abf287 Add dp / wallets to strategy interface 2019-01-22 07:04:19 +01:00
Matthias
4ab7edd3d6 small adaptations 2019-01-22 07:04:19 +01:00
Matthias
7206287b00 Use Dataprovider 2019-01-22 07:04:19 +01:00
Matthias
c2578c7321
Merge pull request #1474 from mishaker/tsl_on_exchange
Making trailing stoploss compatible with stoploss on exchange
2019-01-18 19:29:39 +01:00
misagh
70780bb01e using dict.get to fetch interval 2019-01-18 12:02:29 +01:00
misagh
75cedfafb8 unreachable code removed 2019-01-16 20:03:34 +01:00
misagh
611b48dbb9 fix return value from info hash: value is in string 2019-01-16 16:15:36 +01:00
misagh
baa5cc5b9e logs enriched 2019-01-16 15:10:31 +01:00
misagh
aa03a864f7 comments added for TSL on exchange function 2019-01-16 15:00:35 +01:00
misagh
6d588b3b0b trailing stop loss on exchange extracted to a separate function 2019-01-16 14:28:52 +01:00
misagh
bfb7121583 refactoring handle_stoploss_on_exchange 2019-01-16 12:16:32 +01:00
misagh
29439c05d6 adding update beat test 2019-01-16 11:51:54 +01:00
misagh
1cd5abde37 removing unnecessary guard 2019-01-16 11:22:25 +01:00
misagh
12e8108015 checking params of cancel order and stop loss order 2019-01-15 15:36:41 +01:00
misagh
cfe00c2f0c initial test added for TSL on exchange 2019-01-15 11:04:32 +01:00
misagh
e025ad3918 temp test commit 2019-01-09 16:23:13 +01:00
misagh
1a27258469 condition fixed 2019-01-08 16:34:23 +01:00
misagh
9e133eb32e adding guard not to cancel the previous stop loss on exchange if market
is falling quickly
2019-01-08 16:31:02 +01:00
misagh
aed855284c comparing with stopPrice instead of price 2019-01-08 13:44:51 +01:00
misagh
821e299afb adjusting trailing stoploss on exchange 2019-01-06 14:45:29 +01:00
misagh
a5137e4fa4 comparing float instead of int 2018-12-24 11:39:11 +01:00
Misagh
1dbcab0b09
Merge pull request #1413 from freqtrade/feat/data_helpers
Feat/data helpers
2018-12-17 09:14:10 +01:00
Matthias
b3bb98777b
Merge branch 'develop' into time_in_force 2018-12-17 06:37:46 +01:00
Matthias
b38195e9b3 Rename to converter 2018-12-14 06:32:49 +01:00
Matthias
453f62cdfa Adjust imports 2018-12-14 06:32:49 +01:00
Matthias
627ab9f583 pass around dataframe instead of list 2018-12-12 19:17:09 +01:00
misagh
aa1262bea6 typo corrected 2018-12-12 13:33:03 +01:00
misagh
8d8b53f4d1 added tests for IOC and FOK 2018-12-12 13:05:55 +01:00
misagh
6018f2d252 order status handled in case of IOC and FOK 2018-12-10 18:52:24 +01:00
misagh
866b7aee8e tests fixed 2018-12-09 16:22:21 +01:00
misagh
b35199a772 intermediary commit before extracting the logic 2018-12-09 15:59:05 +01:00
misagh
510f78079b conflict with develop resolved 2018-12-09 15:16:38 +01:00
Matthias
2c27736dfe
Merge pull request #1390 from freqtrade/feat/dynamic_provider
Dynamic Pairlist provider
2018-12-09 08:39:53 +01:00
Matthias
aa579bafa4
Merge pull request #1365 from mishaker/edge_position
Fix edge position sizing.
2018-12-06 20:02:31 +01:00
Matthias
3e2fa58029 load pairlists via resolver 2018-12-05 20:44:56 +01:00
misagh
ee26b6bcff Merge branch 'develop' into time_in_force 2018-12-05 10:57:23 +01:00
misagh
d12cc39a5e some visual happyness 2018-12-04 20:59:55 +01:00
misagh
910601ba1d in case exchange doesn’t return order info … 2018-12-04 20:50:35 +01:00
misagh
b7aa77acdd conflict resolved 2018-12-04 20:28:07 +01:00
Matthias
6ab907bef1 Rename config whitelist to pairlist 2018-12-04 20:24:45 +01:00
Matthias
33e9ed5a5e Print sellreason in sell-message 2018-12-04 19:58:26 +01:00
misagh
e7684b446b capital in trade extracted to a separated argument 2018-12-04 17:05:35 +01:00
Matthias
ef1208b366 Fix rpc messages 2018-12-03 20:31:25 +01:00
Matthias
1b3ecb8343 Deprecate --dynamic-whitelist 2018-12-03 20:00:18 +01:00
misagh
108d9a1117 function name refactored 2018-12-03 19:55:37 +01:00
misagh
b5192193fd total amount passed to edge should consider open trades too 2018-12-03 19:45:00 +01:00
Matthias
3360e777a1 Fix flake adn mypy 2018-12-03 19:29:35 +01:00
Matthias
d09dbfe2e6 Add volumePairList - refactor tests to correct file 2018-12-02 22:07:09 +01:00
Matthias
e8fbe77ebc Refactor static whitelist to module 2018-12-02 22:07:09 +01:00
misagh
237dc8290f conflict resolved0 2018-12-01 12:00:03 +01:00
misagh
86d9457ea1 removing unnecessary variable before returning the result 2018-12-01 10:58:05 +01:00
misagh
bf990ec599 test fixed and flake 2018-12-01 10:50:41 +01:00
misagh
f100432fe8 conflict resolved0 2018-12-01 10:43:26 +01:00
Misagh
24f573f3b0 log "Found no sell signal for whitelisted ..." changed (#1378)
* sell log enriched and put modify on debug
2018-12-01 10:01:11 +01:00
Matthias
e31963f6e1
Merge pull request #1341 from mishaker/stoploss_on_exchange
Stoploss on exchange
2018-12-01 09:46:37 +01:00
Matthias
8effcc2de5
Merge pull request #1374 from freqtrade/refactor_startupmessges
refactor startup_messages to rpc_manger
2018-11-30 19:15:00 +01:00
misagh
abd88767f8 Merge branch 'develop' into edge_position 2018-11-30 17:50:06 +01:00
misagh
9d005678c3 Merge branch 'develop' into stoploss_on_exchange 2018-11-30 15:13:43 +01:00
misagh
f554647efd “checking sell” message removed to debug 2018-11-30 14:14:31 +01:00
Matthias
efcec736b5 refactor startup_messages to rpc_manger
this cleans up freqtradebot slightly
2018-11-29 20:02:12 +01:00
misagh
6bedcc5d79 log enriched for time in force 2018-11-29 13:22:41 +01:00
misagh
e9305b6592 position size fixed 2018-11-28 15:36:32 +01:00
misagh
da94e97c60 in case trade is not open, then handle_stoploss_on_exchange should not
be called
2018-11-28 13:58:53 +01:00
misagh
4ffc74d5fa if buy order is rejected or expired the bot should exit the buy loop 2018-11-27 19:05:59 +01:00
misagh
159ac6e657 edge tests fixed for position sizing 2018-11-27 14:02:34 +01:00
misagh
f5a70750f0 edge real position sizing drafted 2018-11-26 21:06:32 +01:00
misagh
86354ed258 conflict resolved 2018-11-26 19:08:58 +01:00
misagh
b2634e8e08 typo corrected 2018-11-26 18:28:13 +01:00
misagh
962b02b079 one last step before tests 2018-11-25 22:02:59 +01:00
misagh
890cef88ab oops, lost in git :/ 2018-11-25 21:02:58 +01:00
misagh
59fc67f85b Merge branch 'develop' of https://github.com/freqtrade/freqtrade into develop 2018-11-25 19:48:51 +01:00
misagh
1ad5ccdfb0 dry run condition when sell occurs 2018-11-25 19:48:46 +01:00
misagh
3e29fbb17a stoploss on exchange added as a parameter to order_types 2018-11-25 17:22:56 +01:00
Matthias
200484ab8b
Merge pull request #1352 from freqtrade/combine_resolvers
Combine resolvers
2018-11-25 13:52:48 +01:00
misagh
dcae3a2644 test of check_consistency added 2018-11-25 11:29:04 +01:00
misagh
266bd7b9b6 error message improved 2018-11-24 21:42:15 +01:00
misagh
519b1f00e2 adding strategy config consistency function 2018-11-24 20:12:50 +01:00
Matthias
21a093bcdb extract resolvers to IResolvers and it's own package 2018-11-24 20:00:02 +01:00
misagh
fe8927136c typo 2018-11-24 18:36:07 +01:00
misagh
870631f324 1) comments added to handle_sl 2) dry-run force price removed 2018-11-24 17:32:25 +01:00
misagh
531d9ecd0c docstring added 2018-11-24 17:10:51 +01:00
misagh
afd0a054b2 typo corrected 2018-11-24 17:08:12 +01:00
misagh
a9ec5c6699 simplifying if conditions 2018-11-24 17:07:35 +01:00
misagh
29347a6931 adding get_free to wallet 2018-11-24 16:37:28 +01:00
misagh
dedf1ff703 refactoring 2018-11-23 20:51:23 +01:00
misagh
89eb3d9f36 blank line removed 2018-11-23 20:49:00 +01:00
misagh
1c2c19b12c the complex in the life of flake8 resolved 2018-11-23 20:47:17 +01:00
misagh
9144a8f79d tests fixed 2018-11-23 20:28:01 +01:00
misagh
5ee2faa182 adding stop loss on exchange after the buy order is fulfilled not
before.
2018-11-23 19:17:36 +01:00
misagh
fea77824d0 handle stop loss on exchange added 2018-11-23 15:17:36 +01:00
misagh
a9f04609d3 tests fixed 2018-11-23 10:17:10 +01:00
misagh
27a6dcf3fc getting available balance from wallet instead of API call. 2018-11-22 21:23:35 +01:00
misagh
2461d86c8d dry run should consider stop loss is hit on limit price 2018-11-22 17:24:45 +01:00
misagh
3a1c378325 typing bugs 2018-11-22 17:14:22 +01:00
misagh
bbe8e4e494 flake8 2018-11-22 17:07:37 +01:00
misagh
da5617624c cancelling stop loss order before selling 2018-11-22 17:02:02 +01:00
misagh
fad7593935 doesn’t have to create another Trade for SL. can be cumulated into the
same.
2018-11-22 16:53:50 +01:00
misagh
3b7e05e07b stop loss order added right after a buy order is executued 2018-11-22 16:26:24 +01:00
Matthias
8e62fc1c03
Merge pull request #1337 from mishaker/wallet
Wallet data structure added. it is initialized on boot then updated right after any trade happens on the exchange.
2018-11-22 06:00:49 +01:00
misagh
5b68940213 update wallet in casse order remaining is zero 2018-11-21 17:48:53 +01:00
misagh
c1673aaba3 Merge branch 'develop' into fix_twice_refresh_ticker_call 2018-11-21 14:01:08 +01:00
misagh
64129897f9 refresh_ticker should be called just once per iteration. 2018-11-21 14:00:15 +01:00
misagh
003480ad90 flake indentation 2018-11-19 13:01:17 +01:00
misagh
b680681b34 updating wallet at handle timeout functions too 2018-11-19 11:16:07 +01:00
misagh
608ce98e1a moving wallets to root 2018-11-18 14:38:31 +01:00
misagh
f4bb203782 removing persistence update 2018-11-17 21:59:21 +01:00
misagh
a0658bb504 comments added 2018-11-17 21:27:42 +01:00
misagh
12f07ee126 space removed 2018-11-17 21:26:41 +01:00
misagh
b815c8fe2d updating wallets whenever a trade happens 2018-11-17 21:22:54 +01:00
misagh
afe52efc8a removing wallet from freq 2018-11-17 21:17:39 +01:00
misagh
69dd56b237 wallet sync drafted 2018-11-17 18:47:13 +01:00
Matthias
ef1e20bfe8 Don't add default value for ordertype
sort parameters to align with ccxt
2018-11-17 13:29:24 +01:00
Matthias
6a71f80a9e Add support for different order types 2018-11-15 06:58:24 +01:00
Matthias
23958ba96a
Merge pull request #1322 from freqtrade/feat/add_whitelist_rpc
Feat/add whitelist rpc
2018-11-14 19:13:00 +01:00
Matthias
62402351b3 Clarify volume selection for dynamic whitelist 2018-11-10 20:14:46 +01:00
misagh
617a58402f putting edge adjust function in _process not in create_trade 2018-11-09 20:52:03 +01:00
misagh
e5c6499706 assigning strategy to edge from FreqtradeBot 2018-11-08 00:22:46 +01:00
misagh
3330d327ed removing reserve keyword “filter”: replaced by “adjust” 2018-11-07 19:03:08 +01:00
misagh
553e5656ac forcestoploss refactored 2018-11-07 18:12:46 +01:00
misagh
1b457e902c config initializer refactored 2018-11-06 19:45:41 +01:00
misagh
714ac6dd08 Merge branch 'develop' into money_mgt 2018-11-04 18:49:21 +01:00
Matthias
7e5fd82f25
Merge pull request #1269 from freqtrade/feat/force_buy
add /forcebuy to telgram handler
2018-11-04 09:25:13 +01:00
misagh
bb791eac7e backtesting remove from import + whitespace removed 2018-11-02 19:19:28 +01:00
misagh
080ecae332 whitelist conflict resolved with develop branch 2018-11-02 18:59:31 +01:00
Matthias
2f55cbde35 fix #1298 2018-10-29 19:23:56 +01:00
Matthias
1121ec0724 don't have nb_assets as parameter - it's a config setting as any other 2018-10-28 14:43:35 +01:00
Matthias
551dc79cf7 Don't overwrite pair_whitelist in config dict
Doing that will result in an empty whitelist after a short Exchange
downtime
2018-10-28 13:15:49 +01:00
Matthias
5029003957 Allow passing price to buy function 2018-10-09 07:06:11 +02:00
misagh
06d75a8bad test cases added: force_stoploss by Edge 2018-10-04 18:05:46 +02:00
misagh
26b3c3f7a8 removing unnecessary typing 2018-10-02 12:20:30 +02:00
misagh
9c4fdc1bc5 initializing Edge in Freqtradebot only if it is enabled 2018-10-02 12:15:54 +02:00
misagh
ad666ac65c autopep8 corrected 2018-10-01 17:33:18 +02:00
misagh
c8d06e2b0e filter pairs according to expectancy + bug at the end of array resolved 2018-09-28 16:40:34 +02:00
misagh
96a0fc88cb Moving Edge before refresh_pairs
see comments on edge (line 129)
2018-09-28 14:19:22 +02:00
misagh
d6415f3499 Merge branch 'develop' into money_mgt 2018-09-27 14:54:18 +02:00
misagh
24364a56ea keeping mypy happy 2018-09-26 17:03:10 +02:00
misagh
75ba6578a3 unused library + trailing whitespaces removed. 2018-09-26 16:36:41 +02:00
Matthias
88ccdc0366 Fix exception when order cannot be found 2018-09-25 20:45:01 +02:00
misagh
027ec4d98e test_sell_profit_only_enable_loss and test_create_trade_limit_reached
fixed
2018-09-24 15:47:07 +02:00
misagh
308428644b test_process_trade_creation log message changed: in reality the buy
signal is actually triggered
2018-09-24 15:27:26 +02:00
misagh
fbc77c1f28 moving stake_currency line back to its initial place 2018-09-21 21:55:36 +02:00
misagh
3b925e46be removing default pair value of _get_trade_stake_amount 2018-09-21 21:48:27 +02:00
misagh
4fd037f83f removing pdb 2018-09-21 18:00:37 +02:00
misagh
ef52c7b510 edge positioning put into package 2018-09-21 17:41:31 +02:00
misagh
5f68834ccc merging develop into money_mgt (updated to async) 2018-09-14 19:20:49 +02:00
Matthias
54ddd908e6 Merge branch 'develop' into ccxt-async 2018-08-29 19:43:09 +02:00
Matthias
9f8e68ce02 Merge branch 'develop' into order-book 2018-08-29 19:32:44 +02:00
Nullart2
b6b89a464f move order_book config out of experimental 2018-08-29 17:38:43 +08:00
misagh
bc6b80ff38 Edge functionality drafted 2018-08-24 11:59:10 +02:00
Matthias
ff8ed564f1 Refactor refresh_pairs to exchange and fix tests 2018-08-16 12:15:09 +02:00
misagh
e6e2799f03 Keeping cached Klines only in exchange and renaming _cached_klines to
klines.
2018-08-16 11:37:31 +02:00
misagh
a2d9126917 Merge branch 'develop' into ccxt-async 2018-08-15 15:09:35 +02:00
Matthias
76914c2c07 remove todo comment as this is actually done 2018-08-15 12:57:27 +02:00
Nullart2
1edbc494ee refactor 2018-08-15 12:37:30 +08:00
Nullart2
b34aa46181 additional tests 2018-08-15 12:05:56 +08:00
Nullart2
2bc7a668a3 informative startup 2018-08-15 10:39:32 +08:00
Matthias
69cc6aa958 Add test to async 2018-08-14 16:02:03 +02:00
Nullart2
78610bb47f mock order_book and additional test 2018-08-14 18:12:44 +08:00
misagh
cb26085229 Moving should_not_update logic to async function per pair. if there is
no new candle, async function will just return the last cached candle
locally and doesn’t hit the API
2018-08-09 12:47:26 +02:00
Nullart2
c9c0e108ab refactor 2018-08-07 18:29:37 +08:00
Matthias
255f303850 Fix tests and flake8 2018-08-07 08:56:06 +02:00
Nullart2
1309c2b14f tests update 2018-08-05 22:56:14 +08:00
Nullart2
7143b64fb7 tests for coverage 2018-08-05 22:41:58 +08:00
Nullart2
26d591ea43 mypy fix 2018-08-05 21:08:07 +08:00