Commit Graph

30 Commits

Author SHA1 Message Date
c9s
494a270c54 insert trades to db only when backtest service is nil 2021-05-07 01:50:38 +08:00
c9s
859bf35255 set sync-from from config by default 2021-05-05 16:45:17 +08:00
c9s
29f77c2176 add environ.DatabaseService nil check for backtest 2021-03-22 22:48:43 +08:00
c9s
6845db6dd3 refactor database configure method 2021-02-21 00:58:34 +08:00
c9s
ffa001fc29 fix quantity format 2021-02-11 00:21:56 +08:00
c9s
0b657d59f9 make inBaseAsset as private method 2021-02-06 11:34:53 +08:00
c9s
dd9dbee903 refactor database configuration with env vars 2021-02-06 11:33:49 +08:00
c9s
99b56003eb clean up legacy db connection handling with the new database service 2021-02-06 11:22:04 +08:00
c9s
de51eb29e4 refactor db stuff with database service 2021-02-06 11:22:04 +08:00
c9s
17d5e301dc refine setup steps 2021-02-02 17:26:35 +08:00
c9s
a60aeb4771 pull out .Subscribe from trader.Run 2021-02-01 20:44:15 +08:00
c9s
1892d03326 make session trades map thread safe 2021-01-24 14:14:25 +08:00
c9s
d96e6e8ccc use environment to configure database 2021-01-15 10:47:49 +08:00
c9s
d04e1e7816 refactory sync command and upgrade db automatically 2021-01-14 15:10:11 +08:00
c9s
ad567dc360 use mysql reformat dsn function to add parseTime parameters 2021-01-14 14:56:13 +08:00
c9s
275aa9494a support canceling orders on max 2020-12-29 16:00:03 +08:00
c9s
fc9409673f add graceful shutdown 2020-11-12 14:50:21 +08:00
c9s
24e5911140 refactory sync mode into the backtest command 2020-11-11 16:08:24 +08:00
c9s
097b2d30a6 add base-asset-baseline flag for backtest 2020-11-11 14:39:33 +08:00
c9s
04f6da3cb8 add traditional grid strategy 2020-11-10 19:06:20 +08:00
c9s
923fea0d94 improve backtest cmd 2020-11-10 14:19:11 +08:00
c9s
f5b17193c5 move verbose flag detection before we setup the environment 2020-11-09 16:49:03 +08:00
c9s
6c2aef31a3 improve backtest logging 2020-11-09 16:47:29 +08:00
c9s
e7cc79f3cf replace errors.Errorf with fmt.Errorf 2020-11-09 16:34:35 +08:00
c9s
e3a1184d22 fix backtest sync exchange and consider fee rate 2020-11-08 12:47:14 +08:00
c9s
641784e1b1 calculate pnl after the backtest 2020-11-07 20:34:34 +08:00
c9s
6040c69327 add sync flag for backtesting 2020-11-07 20:14:53 +08:00
c9s
f1db12eb10 add done channel for backtest exchange 2020-11-07 20:11:07 +08:00
c9s
b13a2deec5 emit klines and setup account balances 2020-11-07 03:18:05 +08:00
c9s
22a214328d implement backtest command, stream and add backtest config 2020-11-07 02:57:50 +08:00