Commit Graph

215 Commits

Author SHA1 Message Date
c9s
bdbc8c2427 use trade service to query and insert trades 2020-08-03 13:17:17 +08:00
c9s
c5969bf879 refactor trade loader 2020-08-02 21:12:43 +08:00
c9s
4a4178286a rename trade volume to quantity and record quote quantity 2020-08-02 21:12:43 +08:00
c9s
da75905aeb insert trades into the mysql database 2020-08-02 21:12:43 +08:00
c9s
3e0a337479 rename QueryTrades to BatchQueryTrades 2020-08-02 21:12:42 +08:00
c9s
4d40afde06 do not calculate stock profit 2020-07-20 13:14:20 +08:00
c9s
099d58f23a print historical high and low 2020-07-20 11:49:20 +08:00
c9s
30e8cad7c8 print side 2020-07-18 20:35:37 +08:00
c9s
2453e2db73 write ping message 2020-07-18 10:43:27 +08:00
c9s
78f1aa59b7 clean up code 2020-07-18 10:15:10 +08:00
c9s
bf150248c0 do not calculate stock 2020-07-18 10:13:11 +08:00
c9s
c94c85d51f show wallet balance and move kline cache 2020-07-18 10:01:10 +08:00
c9s
60efce96b6 fix regression balance handling 2020-07-16 18:25:40 +08:00
c9s
f92108bd23 batch query kline for regression tests 2020-07-16 17:45:21 +08:00
c9s
cf59ffc32f support regression 2020-07-16 15:36:02 +08:00
c9s
9cf95b7c26 implement standard private stream support for regression trader 2020-07-15 21:02:08 +08:00
c9s
7d035d75ea add regression cmd 2020-07-15 12:20:44 +08:00
c9s
b5193ca67d use symbol from the strategy config file 2020-07-14 22:33:47 +08:00
c9s
9d828c99e2 adjust flatness param 2020-07-14 14:54:23 +08:00
c9s
acb0807a37 check min amount and min lot 2020-07-14 01:09:20 +08:00
c9s
79f9d078b6 adjust volume for balance 2020-07-14 00:38:52 +08:00
c9s
ef622b0c7c support balance load and update 2020-07-14 00:20:15 +08:00
c9s
762f965130 sort imports 2020-07-13 16:03:47 +08:00
c9s
923022e87b remove trade filtering 2020-07-13 14:28:20 +08:00
c9s
63dc2e8d55 fix graceful shutdown 2020-07-13 13:31:40 +08:00
c9s
9b042b5e8f fix subscription mech 2020-07-13 13:25:48 +08:00
c9s
79553212a7 add idea vcs file 2020-07-13 12:57:18 +08:00
c9s
d3df1c5082 clean up trader fields 2020-07-13 12:36:04 +08:00
c9s
40c9ea1596 move out slack components to the slack pkg 2020-07-13 12:34:15 +08:00
c9s
4fa8be76ea remove unused Errorf method 2020-07-13 12:31:39 +08:00
c9s
0f2faf315d clean up logger methods 2020-07-13 12:30:35 +08:00
c9s
a4a5231d78 implement account balance query 2020-07-13 12:28:40 +08:00
c9s
791a745951 move stream close call right after the connect 2020-07-13 12:20:09 +08:00
c9s
704c6eed96 fix sub 2020-07-13 01:55:16 +08:00
c9s
a9e25c08d7 fix reconnect close 2020-07-13 01:06:04 +08:00
c9s
906350a5bc fix pnl report and slack notifier 2020-07-13 01:01:33 +08:00
c9s
1f127a367a call notifier reportTrade method 2020-07-13 00:36:26 +08:00
c9s
6660b75dcb rename SlackReporter to SlackNotifier and simplify infof 2020-07-12 22:57:54 +08:00
c9s
f6a1c20cfe more trader refactoring 2020-07-12 22:52:49 +08:00
c9s
c329f6dc86 fix reconnect 2020-07-12 22:52:24 +08:00
c9s
707f96ae08 alias logrus to log 2020-07-12 19:45:03 +08:00
c9s
cdff2cf487 fix import alias 2020-07-12 19:44:05 +08:00
c9s
c0d0aca3b8 fix side issue 2020-07-11 21:44:38 +08:00
c9s
577caab3f5 refactor volume calculator 2020-07-11 20:40:19 +08:00
c9s
cb4afca815 add message for stream closed 2020-07-11 17:02:37 +08:00
c9s
73ae2603d9 drop kline fields from the trading context 2020-07-11 16:40:07 +08:00
c9s
73276996a7 move to stream callbacks 2020-07-11 16:07:09 +08:00
c9s
a105af35ce move strategy to the pkg/strategy 2020-07-11 15:27:26 +08:00
c9s
6c1f214d0f fix import 2020-07-11 15:19:36 +08:00
c9s
a3fa292dc5 move files 2020-07-11 15:18:31 +08:00
c9s
62e27957c1 fix deploy 2020-07-11 13:13:41 +08:00
c9s
ce89835a7d refactor binance exchange factory 2020-07-11 13:08:50 +08:00
c9s
0ae851a085 abstract binance exchange 2020-07-11 13:02:53 +08:00
c9s
5665f6db97 add log label 2020-07-11 12:52:51 +08:00
c9s
2a168031f3 merge connect and read method 2020-07-11 12:51:02 +08:00
c9s
db5b203e9d move trade struct to types 2020-07-11 12:42:28 +08:00
c9s
9288b6801f add binance buyer, maker label 2020-07-11 12:37:09 +08:00
c9s
ea33db5aa1 rename Trade.Market to Symbol 2020-07-11 12:16:42 +08:00
c9s
5cf88af5d6 add QueryAveragePrice api 2020-07-11 12:15:45 +08:00
c9s
0e9bd1547d fix stream issue and pnl issues 2020-07-11 12:07:24 +08:00
c9s
19b225737f refactor pnl calculator 2020-07-11 11:23:48 +08:00
c9s
a177e55172 add more refactoring 2020-07-10 21:34:39 +08:00
c9s
1ca46435c3 parse ResultEvent 2020-06-29 10:55:00 +08:00
c9s
4cd96360b3 parse event from the binance private stream 2020-06-29 03:11:05 +08:00
c9s
338d2443b9 refactor private stream 2020-06-29 03:08:13 +08:00
c9s
778d046820 support config reloading 2020-06-28 13:45:55 +08:00
c9s
e6aca05a51 add precesion in the format message 2020-06-24 22:25:06 +08:00
c9s
14d2cc0faf add min profit price tick 2020-06-24 22:13:18 +08:00
c9s
bdc4161fb3 fix btc volume precision 2020-06-24 21:25:47 +08:00
c9s
fea95d1633 fix format 2020-06-24 19:29:58 +08:00
c9s
c6f1f58b98 rename field 2020-06-20 20:23:26 +08:00
c9s
180e1063b2 adjust parameters 2020-06-19 22:12:41 +08:00
c9s
fc9f34ca97 fix kline window stalck attachment 2020-06-19 16:34:24 +08:00
c9s
ff2d9d5cfd cast 2020-06-19 16:30:32 +08:00
c9s
5d14687af7 improve kline report 2020-06-19 16:03:15 +08:00
c9s
0eeb2382f9 improve messages 2020-06-19 11:24:55 +08:00
c9s
377cf2e0ba improve detector name 2020-06-19 11:21:17 +08:00
c9s
cbd7a3bd21 fix not zero check 2020-06-19 11:16:25 +08:00
c9s
c1e9bc0728 try to fix NotZero 2020-06-19 11:14:11 +08:00
c9s
332893c882 show max change limit 2020-06-19 11:11:16 +08:00
c9s
7b4a2782bb improve message 2020-06-19 10:07:27 +08:00
c9s
bac6a6f327 move kline query into the exchange interface 2020-06-19 09:57:15 +08:00
c9s
b0d0839cd6 fix order info 2020-06-19 09:32:57 +08:00
c9s
1865de3bb8 render order in slack attachment 2020-06-19 09:30:27 +08:00
c9s
a2cf693683 render more kline attributes in the attachment 2020-06-19 09:26:51 +08:00
c9s
9380e10468 render detector as slack attachment 2020-06-19 09:24:22 +08:00
c9s
af76a18deb move query trades to the exchange struct 2020-06-19 08:59:55 +08:00
c9s
b6909e654a change parameters 2020-06-19 00:10:43 +08:00
c9s
9099a4a61b add test case for volume calculator 2020-06-19 00:07:05 +08:00
c9s
a5681b8371 move structs 2020-06-18 23:46:59 +08:00
c9s
b55ab35b42 define BNBUSDT market 2020-06-18 19:01:13 +08:00
c9s
57f4d56ec5 save market object in the trading context 2020-06-18 19:00:03 +08:00
c9s
965ab59580 move exchange and order struct to the bbgo package 2020-06-18 18:56:54 +08:00
c9s
e62f1f2479 add abstract exchange interface 2020-06-18 18:54:14 +08:00
c9s
ed00243734 load recent klines 2020-06-18 08:08:47 +08:00
c9s
7b099b2ede fix kline window get low 2020-06-17 21:57:36 +08:00
c9s
cf7760e72a refactor 1m rule with detector pattern 2020-06-17 13:57:51 +08:00
c9s
ad41c14521 update trade kline red color code 2020-06-16 17:09:14 +08:00
c9s
1102fd0a1e rename Symbol field to Market 2020-06-16 16:55:42 +08:00
c9s
88c7049a99 add reportTrade method 2020-06-16 16:47:15 +08:00
c9s
f4bf79d842 fix color 2020-06-16 15:32:22 +08:00
c9s
d28bec2a05 add kline color and submitMarketOrder method 2020-06-16 15:14:23 +08:00
c9s
884a9730f1 refactor kline attachment 2020-06-16 14:22:02 +08:00
c9s
0153670f78 refactor rule and upper shaodw checker 2020-06-16 14:13:53 +08:00
c9s
fded619772 implement GetUpperShadowHeight and GetLowerShadowHeight 2020-06-16 13:44:50 +08:00
c9s
c089e9a1b5 add 1m kline window protection 2020-06-10 13:53:31 +08:00
c9s
35bb5bda06 ignore selling trades from the beginning 2020-06-10 10:26:14 +08:00
c9s
062fe55b43 add thickness condition in bounce check 2020-06-10 09:51:53 +08:00
c9s
1ca616fb43 fix bounce calculation 2020-06-10 09:44:44 +08:00
c9s
fce3beccd0 refactor pnl updater 2020-06-09 23:27:46 +08:00
c9s
825cefd76d refactor and fix many issues 2020-06-09 22:48:56 +08:00
c9s
71098c9f8b fix: use math.Abs to calculate change 2020-06-09 19:33:44 +08:00
c9s
c30c4e9937 add min profit check 2020-06-09 14:13:02 +08:00
c9s
b191462096 add 1d kline 2020-06-09 13:45:47 +08:00
c9s
3fe812264f update 2020-06-09 10:38:20 +08:00