Commit Graph

248 Commits

Author SHA1 Message Date
c9s
e264257d23 implement OrderMap and SyncOrderMap 2020-10-31 20:38:20 +08:00
c9s
2397acd45f fix type casting and assertion by passing pointer 2020-10-31 18:35:48 +08:00
c9s
0f8e9f6df7 add doc comment to Notifiability 2020-10-31 18:35:48 +08:00
c9s
eb05620f99 use Notifiability directly from environment 2020-10-31 18:35:48 +08:00
c9s
49ff9c4dd6 drop legacy trade reporter 2020-10-31 18:35:48 +08:00
c9s
c4d7476212 add submit order routing 2020-10-31 18:35:48 +08:00
c9s
ec9b5230aa refactor trade report and move trade reporter to the environment layer 2020-10-31 18:35:48 +08:00
c9s
8867ceb951 initialize Notifiability for exchange session 2020-10-31 18:35:48 +08:00
c9s
a60207db2a only re-submit the order when the order is filled on the opposite side 2020-10-31 18:33:04 +08:00
c9s
8174b64e21 handle max order update message convertion 2020-10-31 18:29:58 +08:00
c9s
458fa8aa9d add types.OrderStatusFilled 2020-10-31 18:29:58 +08:00
c9s
63df07b815 fix MAX market min price format 2020-10-31 18:29:58 +08:00
c9s
dc547aa818 fix BOLL map allocation 2020-10-31 18:29:58 +08:00
c9s
01699f7268 fix price format 2020-10-31 18:29:58 +08:00
c9s
17a2f74add finalize grid strategy 2020-10-31 18:29:58 +08:00
c9s
9c46ef17b2 handle order update 2020-10-31 18:29:58 +08:00
c9s
551fa4b7fb add grid to built-ins 2020-10-31 18:29:58 +08:00
c9s
60b78979dc fix order id parsing (seems case insensitive) 2020-10-31 18:29:58 +08:00
c9s
c3961024cf implement grid strategy update orders method 2020-10-31 18:29:58 +08:00
c9s
74a9cae38e rename trade callbacks to trade update callbacks 2020-10-31 18:29:58 +08:00
c9s
224acd0ca9 add accessors for last up band and down band values 2020-10-31 18:29:58 +08:00
c9s
e60127090b add GetBOLL access to standard indicator sets 2020-10-31 18:29:58 +08:00
c9s
d49b2be543 add bollinger indicator 2020-10-29 17:51:20 +08:00
c9s
f0681177f9 inject market into the skeleton strategy 2020-10-29 17:06:34 +08:00
c9s
4afabd92ed clean up code 2020-10-29 17:05:01 +08:00
c9s
b0cc128b79 pull out trend types 2020-10-29 17:03:36 +08:00
c9s
a7325e86f0 document swing strategy 2020-10-29 13:42:53 +08:00
c9s
5f45d18ae2 fix struct composition 2020-10-29 13:08:33 +08:00
c9s
19b600bb35 simplify strategy registration api 2020-10-29 07:54:59 +08:00
c9s
c71f013916 let SMA indicator and EWMA indicator use IntervalWindow type 2020-10-29 07:51:23 +08:00
c9s
2f8bffeaca add strict injection check fo pointer only objects 2020-10-29 07:49:06 +08:00
c9s
33257c591e refactor swing strategy with types IntervalWindow 2020-10-29 07:44:22 +08:00
c9s
6d8ec7894e refactor standard indicator set with store 2020-10-29 07:40:02 +08:00
c9s
b1cf9db879 add reflink 2020-10-28 17:50:47 +08:00
c9s
d6553a1155 move strategy subscribe out 2020-10-28 17:49:49 +08:00
c9s
f4474c6a6d add check for sma caluclation 2020-10-28 17:48:16 +08:00
c9s
67446670ac finalize swing strategy and fix trade reporter issue 2020-10-28 17:48:16 +08:00
c9s
c96845ff6a add fields to slack notifier logs 2020-10-28 17:48:16 +08:00
c9s
b22e0370b3 drop legacy OrderProcessor and remove slack debug 2020-10-28 17:48:16 +08:00
c9s
468864302e fix submit order quantity formatting 2020-10-28 17:48:16 +08:00
c9s
2680ad5072 refactor environment, market data store, injection and add swing strategy 2020-10-28 17:48:16 +08:00
c9s
7d7d2c2fc7 assign standard indicator set to the session 2020-10-28 11:15:50 +08:00
c9s
e2df24f31c support standard indicatorset 2020-10-28 09:43:19 +08:00
c9s
50693ae845 implement ewma and sma 2020-10-28 09:13:57 +08:00
c9s
388346b284 move injectStrategyField to a single file 2020-10-27 20:42:48 +08:00
c9s
008e5c83f9 fix notification config check 2020-10-27 20:41:08 +08:00
c9s
e1c2f7cc3d improve notifier signatures and fix slack Notify method 2020-10-27 20:13:10 +08:00
c9s
7905ba09d4 pull out fillStrategyNotifiability 2020-10-27 19:37:11 +08:00
c9s
ccc381143d support pointer type filling 2020-10-27 19:33:11 +08:00
Yo-An Lin
1e5327a5e4 Update strategy.go 2020-10-27 15:51:36 +08:00
c9s
b3eaf832af Add pricealert strategy for demonstrating notification 2020-10-27 13:54:39 +08:00
c9s
ab43de3efd clean up comment for base order executor 2020-10-27 10:00:41 +08:00
c9s
ef598c3a0f assign base order executor descendingly 2020-10-27 09:58:21 +08:00
c9s
8453e95300 configure channel routers 2020-10-27 09:38:29 +08:00
c9s
42f947506c add route methods on Notifiability 2020-10-27 09:24:59 +08:00
c9s
ea05d998f2 load notification conf 2020-10-27 08:57:00 +08:00
c9s
c315b79bd7 add notification config 2020-10-27 08:48:47 +08:00
c9s
284a0676f7 remove unused confg package 2020-10-27 08:19:16 +08:00
c9s
955479486a add symbol channel router and object channel router for notification 2020-10-27 08:19:16 +08:00
c9s
1d8e0bff5a drop legacy NewDefaultEnvironment method 2020-10-27 08:19:16 +08:00
c9s
0fd9e8b95a reset price field when market order is used 2020-10-26 22:08:16 +08:00
c9s
085d02bee4 clean up strategy code since we can loaded from the config 2020-10-26 22:04:48 +08:00
c9s
38c87bfecc drop config dir 2020-10-26 21:46:38 +08:00
c9s
a1eeb55778 refactor and clean up bbgo config 2020-10-26 21:45:02 +08:00
c9s
c324a791f6 refactor and configure risk control order executor 2020-10-26 21:36:47 +08:00
c9s
59aa5c5ee2 implement RiskControlOrderExecutor 2020-10-26 18:28:34 +08:00
c9s
4e7c1a327b pull out order formatter 2020-10-26 18:17:18 +08:00
c9s
a4b6a5f923 load order executor config 2020-10-26 17:57:28 +08:00
c9s
502e5bdc04 load exchange sessions dynamically 2020-10-26 17:00:17 +08:00
c9s
8274f6e97c reformat OrderProcessor code 2020-10-26 16:45:09 +08:00
c9s
c9fa565c24 remove the legacy submit order method 2020-10-26 16:44:05 +08:00
c9s
359b3c56b4 move files 2020-10-26 16:15:30 +08:00
c9s
19f259111d improve config loading by adding unmarshal yaml method 2020-10-26 15:33:25 +08:00
c9s
cd666fdf9e pull out db parameter from the constructor 2020-10-26 15:06:39 +08:00
c9s
3aa40f3aab disable viper config for now 2020-10-26 13:56:48 +08:00
c9s
332ca7ffe8 make trade sync optional 2020-10-26 13:48:59 +08:00
c9s
931c646fde configure notifier and make slack notification optional 2020-10-26 13:40:43 +08:00
c9s
ac0a26b005 add build command 2020-10-26 13:27:07 +08:00
c9s
9017d2a9a7 add go os and arch name to the binary name 2020-10-26 11:41:21 +08:00
c9s
aa6ccbf905 refactor xpuremaker strategy 2020-10-26 10:08:58 +08:00
c9s
fbba9b12ce xpuremaker: final clean up 2020-10-26 10:01:18 +08:00
c9s
145264aae4 cancel orders and re-submit maker orders 2020-10-26 00:26:17 +08:00
c9s
336fb4d25b max: fix order cancel request payload 2020-10-25 22:41:54 +08:00
c9s
de11ef10f5 return created order objects from SubmitOrders method 2020-10-25 19:22:22 +08:00
c9s
fa30f6b52a Support binance order update execution type convertion 2020-10-25 19:22:22 +08:00
c9s
391767953a Fix binance trade transaction time convertion 2020-10-25 19:22:22 +08:00
c9s
308427416a Add more exchange order features
- use uuid for client order id
- add stop limit and stop market order types
- add order convert functions
- improve submit orders
2020-10-25 19:22:22 +08:00
c9s
1e12de28da Add xpuremaker skeleton 2020-10-25 18:32:46 +08:00
c9s
3721714f00 Support json unmarshaller for fixedpoint 2020-10-25 18:32:45 +08:00
c9s
944b673626 Add skeleton strategy 2020-10-25 18:32:43 +08:00
Yo-An Lin
9f416579ec Merge pull request #25 from c9s/feature/go-compile-os-arch
feature: support go build with custom os and arch
2020-10-24 17:45:03 +08:00
c9s
916b3b0eca early return if len of trades == 0 2020-10-24 16:32:54 +08:00
c9s
81653c6451 improve compile function for goos and goarch 2020-10-24 16:29:58 +08:00
c9s
2535a5803e alias logrus into log 2020-10-24 15:43:55 +08:00
c9s
9ce9ecc910 compile local strategies into the wrapper binary 2020-10-24 15:38:13 +08:00
c9s
cd28fb8771 unmarshal imports into config 2020-10-23 14:49:54 +08:00
c9s
e1e8a16f97 rename Run to Execute to avoid confusion 2020-10-23 14:38:24 +08:00
c9s
bcc97c1906 cmd: rename slack-trading-channel to slack-channel 2020-10-23 14:29:02 +08:00
c9s
048374566c move commands into pkg/cmd 2020-10-23 14:28:07 +08:00
c9s
0ec57cf404 add import section 2020-10-23 14:14:07 +08:00