Commit Graph

849 Commits

Author SHA1 Message Date
c9s
51a2f14af7
rsmaker: remove unused vars 2022-06-22 13:52:18 +08:00
c9s
bae685d63d
rsmaker: refactor ClosePosition method 2022-06-22 13:51:36 +08:00
c9s
09d0a9bbc7
pivotshort: clean up ClosePosition method 2022-06-22 13:46:04 +08:00
c9s
dbc6d4fb44
bollmaker: refactor ClosePosition method 2022-06-22 13:46:04 +08:00
c9s
b3160815ff
dca: use order executor to close position 2022-06-22 13:46:04 +08:00
c9s
929ffc3e5e
dca: clean up 2022-06-22 13:46:04 +08:00
c9s
a5cb8355d4
dca: rewrite dca with the new order executor 2022-06-22 13:46:04 +08:00
c9s
5fe0f5a299
pull out bollinger settings 2022-06-22 13:46:04 +08:00
c9s
b75da154a8
rsmaker: remove legacy state struct 2022-06-22 13:46:04 +08:00
c9s
16eeeb852c
rsmaker: drop the legacy persistence state 2022-06-22 13:46:04 +08:00
c9s
3e5d252c10
rsmaker: clean up and remove unused code
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-22 13:46:04 +08:00
c9s
2cd44b194a
pivotshort: remove persistence from pivotshort 2022-06-22 13:46:04 +08:00
c9s
46691d5ae1
strategy/xbalance: update xbalance persistence usage 2022-06-22 13:46:04 +08:00
c9s
3112b40634
support: remove unused const 2022-06-22 13:46:03 +08:00
c9s
6ef54bf2fb
call bbgo.Sync to sync persistence 2022-06-22 13:46:03 +08:00
Yo-An Lin
d53176acdf
Merge pull request #746 from andycheng123/improve/pivotshort-control
pivotshort: add strategy controller
2022-06-21 01:24:47 +08:00
Yo-An Lin
223b3dd95f
Merge pull request #747 from andycheng123/improve/supertrend-strategy
strategy/supertrend: use new order executor api
2022-06-21 01:23:53 +08:00
Yo-An Lin
0e877b789e
Merge pull request #748 from andycheng123/improve/bollmaker
bollmaker: remove redundant code for adapting new order executor api
2022-06-21 00:26:41 +08:00
austin362667
2f18ea230a rsmaker: refactor active OB 2022-06-20 17:23:13 +08:00
austin362667
c227272542 rsmaker: add bulit-in strategy
rsmaker: clean up
2022-06-20 17:23:13 +08:00
Andy Cheng
cc7b8c83ed bollmaker: remove redundant code for adapting new order executor api 2022-06-20 13:47:17 +08:00
Andy Cheng
aa9296e8d5 strategy/supertrend: use new order executor api 2022-06-20 13:39:07 +08:00
Andy Cheng
24844052d2 pivotshort: add strategy controller 2022-06-20 11:39:18 +08:00
c9s
2a1beddba4
support: fix support strategy stop order update 2022-06-19 17:49:38 +08:00
c9s
f035667f37
support: refactor trailing stop order management 2022-06-19 17:23:10 +08:00
c9s
b6d1b4309b
refactor and update the support strategy 2022-06-19 15:57:59 +08:00
c9s
cb9ce753e2
strategy/bollmaker: refactor and clean up 2022-06-19 13:40:10 +08:00
c9s
156219456b
all: clean up bbgo.Notifiability 2022-06-19 13:05:02 +08:00
c9s
88a63df186
all: clean up notifiability usage 2022-06-19 13:01:22 +08:00
c9s
eacd1f1ae6
all: rewrite notification api
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-19 12:29:36 +08:00
c9s
88e83c944c
pivotshort: clean up log 2022-06-19 11:21:07 +08:00
c9s
c80fe1af33
pivotshort: call BindTradeStats 2022-06-18 16:32:53 +08:00
c9s
6cae9e7449
move GeneralOrderExecutor into bbgo package 2022-06-18 16:31:53 +08:00
c9s
d367186f3e
pivotshort: clean up and pull out order executor 2022-06-18 15:27:11 +08:00
c9s
47e76a9eb5
pivotshort: refactor and redesign order executor
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-18 12:30:42 +08:00
c9s
0326c34013
pivotshort: pull out GeneralOrderExecutor 2022-06-18 11:45:24 +08:00
c9s
807a3e125c
pivotshort: split trade collector callbacks 2022-06-18 10:54:06 +08:00
zenix
a5ffca7fe8 fix: gosimple alert 2022-06-17 20:19:51 +09:00
zenix
55fa4cc8f1 fix: apply gofmt on all files, add revive action 2022-06-17 16:06:59 +09:00
Andy Cheng
5c8cc397f9
Merge pull request #720 from andycheng123/fix/supertrend
fix: fix strategy supertrend
2022-06-17 10:26:09 +08:00
Andy Cheng
55f36b2f3e supertrend: add comment to make the condition clearer 2022-06-17 10:15:54 +08:00
Andy Cheng
f6770df50f supertrend: log with symbol 2022-06-16 17:14:50 +08:00
なるみ
50fbf0727e types: move valuemap and floatmap to types 2022-06-16 16:44:27 +08:00
なるみ
5799497a09 marketp: add marketcap strategy 2022-06-16 16:44:02 +08:00
なるみ
8d9faff859 rebalance: validate symbols 2022-06-16 10:44:13 +08:00
なるみ
3d0ad010eb rebalance: replace Float64Slice by ValueMap 2022-06-16 10:44:13 +08:00
なるみ
ad98cf883c rebalance: remove unused subscriptions 2022-06-16 01:33:28 +08:00
なるみ
21a793e16b rebalance: rename variable 2022-06-16 01:33:28 +08:00
なるみ
87adf694b1 rebalance: manage active order book without specifying symbol 2022-06-16 01:33:28 +08:00
なるみ
a4814951d4 rebalance: remove ignoreLock and simplify code 2022-06-16 01:33:28 +08:00
なるみ
f19e1fdf87 rebalance: rename methods 2022-06-16 00:22:19 +08:00
Andy Cheng
91e4003520 strategy: prevent supertrend from open extra position 2022-06-15 12:22:26 +08:00
c9s
5aa2f8a681
xmaker: skip quoting if bb value is zero 2022-06-15 01:18:46 +08:00
c9s
5210b97a23
xmaker: update klines to boll indicator 2022-06-15 01:17:41 +08:00
c9s
b47d103cf8
xmaker: pull out band value to fixedpoint 2022-06-15 01:13:54 +08:00
zenix
bf6726a529 fix: output color output to stderr 2022-06-14 14:41:41 +09:00
zenix
28d01486ee clean: clean code, add comments, add more report on exit 2022-06-14 14:41:41 +09:00
zenix
0ff3d94919 refactor: ewo choose ma 2022-06-14 14:41:41 +09:00
zenix
b5b1719045 feature: filter signal by ewo histogram and 3*atr entry 2022-06-14 14:41:41 +09:00
c9s
a506a00001
xmaker: fix position notify 2022-06-13 12:04:35 +08:00
c9s
5949c7587e
make bounce short optional 2022-06-11 16:41:56 +08:00
c9s
3d0c0717ba
pivotshort: fix bounce short 2022-06-11 16:33:21 +08:00
c9s
ec68dc2f40
reimplement placeBounceSellOrders 2022-06-11 00:26:44 +08:00
c9s
46450c0122
pivotshort: rename pivotLength to window and update indicator manually 2022-06-10 15:34:57 +08:00
c9s
91b9605884
pivotshort: manually update pivot indicator 2022-06-10 15:18:12 +08:00
c9s
a9d2a9e57a
pivotshort: add breakLow.bounceRatio option 2022-06-10 11:36:04 +08:00
Yo-An Lin
aeae2d58c9
Merge pull request #699 from c9s/strategy/pivot
pivotshort: add roiMinTakeProfitPercentage option and cumulatedVolume…
2022-06-10 02:47:13 +08:00
c9s
35a58268cf
pivotshort: add roiMinTakeProfitPercentage option and cumulatedVolume option 2022-06-10 02:39:14 +08:00
Yo-An Lin
449186f460
Merge pull request #697 from andycheng123/fix/supertrend
strategy: remove redundant code
2022-06-10 01:29:45 +08:00
c9s
e575236db8
pivotshort: adjust shadow ratio calculation 2022-06-10 01:21:59 +08:00
c9s
260857b5b1
pivotshort: add TradeStats 2022-06-10 00:49:32 +08:00
c9s
a8134561f5
pivotshort: add stopEMA 2022-06-09 18:16:32 +08:00
c9s
aa2ba265f1
pivotshort: refactor and add more fix 2022-06-09 17:36:22 +08:00
Andy Cheng
2e3badc0da strategy: remove redundant code 2022-06-09 16:37:19 +08:00
c9s
4f9ac6f3fb
pivotshort: move notification message to make log clean 2022-06-09 15:50:43 +08:00
c9s
5a809f60e0
pivotshort: fix order cancel step 2022-06-09 13:26:30 +08:00
c9s
4b08e93758
rename st = store 2022-06-09 12:34:23 +08:00
c9s
e17535e651
pivotshort: fix position close bugs 2022-06-09 12:34:23 +08:00
c9s
1bfc125a52
gracefully cancel order before closing position 2022-06-09 12:34:23 +08:00
c9s
77b704b6ec
move some methods back for refactoring 2022-06-09 12:34:22 +08:00
austin362667
3c40f9e90e
pivotshort: improve market sell when breaks previous pivot low only
pivotshort: improve market sell when breaks previous pivot low only
2022-06-09 12:34:22 +08:00
zenix
7a045a48d4 fix: drift window in factorzoo, order_execution print order, refactor: use defer to mu.Unlock in depth/buffer.go 2022-06-08 12:14:53 +09:00
zenix
9dd8dbbede feature: add drift indicator, split heikinashi's Queue 2022-06-08 01:21:18 +08:00
c9s
9a29843477
add dca strategy 2022-06-07 20:26:44 +08:00
Andy Cheng
9836fbbf82 strategy: rebase 2022-06-07 16:49:43 +08:00
Andy Cheng
34465fac89
Merge pull request #653 from andycheng123/strategy/supertrend
strategy: add supertrend strategy
2022-06-07 16:25:49 +08:00
Andy Cheng
ee26d6ce34 strategy: Persistence.Sync() after position change 2022-06-07 16:04:40 +08:00
Yo-An Lin
037f2949bd
Merge pull request #678 from andycheng123/fix/interact
interact: fix missing make()
2022-06-07 12:31:53 +08:00
c9s
32837d85a0
fix fmaker 2022-06-07 12:31:06 +08:00
Yo-An Lin
16e9535b8c
Merge pull request #638 from austin362667/strategy/f1
strategy: add fmaker
2022-06-07 12:24:26 +08:00
Andy Cheng
8410b1cc33 interact: update interact test 2022-06-06 17:34:39 +08:00
c9s
b209d94a9c
rename active order book constructor function 2022-06-06 06:57:25 +08:00
c9s
4dafa32e97
strategy: should always handle trade even if the strategy status is not running 2022-06-06 06:56:44 +08:00
c9s
3786fc64f1
rename LocalActiveOrderBook to just ActiveOrderBook 2022-06-06 05:43:38 +08:00
c9s
1e27caa5e2
flashcrash: update local active book usage 2022-06-05 21:45:43 +08:00
c9s
1d340256ea
fix and simplify LocalActiveOrderBook 2022-06-05 18:12:26 +08:00
c9s
016ddfd8cd
pivotshort: also check isClosed 2022-06-05 13:14:17 +08:00
c9s
f883d42c58
pivotshort: avoid market sell again if position is already opened 2022-06-05 13:13:23 +08:00
c9s
629ae39095
fix var comparison 2022-06-05 13:09:32 +08:00
c9s
defff9b01d
pivotshort: add new found return value 2022-06-05 13:04:48 +08:00
c9s
f39ba4854d
pivotshort: add notify 2022-06-05 12:58:12 +08:00
c9s
74ee92832b
pivotshort: rename pivotBuffer to pivotLowPrices 2022-06-05 12:56:40 +08:00
c9s
32f324761e
pivotshort: market sell to open short 2022-06-05 12:55:36 +08:00
c9s
4bd322feb4
pivotshort: use notify and always collect trades 2022-06-05 12:51:45 +08:00
c9s
e7078edacd
pivotshort: add kline event handler and a todo 2022-06-05 12:48:54 +08:00
c9s
b20e1335c2
pivotshort: pull out market sell to a single method 2022-06-05 12:47:15 +08:00
c9s
f0578c5fa2
pivotshort: rename place order method 2022-06-05 12:40:41 +08:00
c9s
46b766857a
pivotshort: always collect trades after submitting orders 2022-06-05 12:40:08 +08:00
c9s
b9c32c7f7e
pivotshort: numLayers should be int 2022-06-05 12:37:35 +08:00
c9s
c20e3fee4b
fix persistence unmarshalling issue 2022-06-05 01:48:56 +08:00
c9s
221a2d9dc7
fix persistence: calling type method on z zero value 2022-06-05 01:09:31 +08:00
austin362667
9b8239abba pivotshort: add symbol name 2022-06-04 02:31:04 +08:00
austin362667
fcdc26e188 pivotshort: add init place order 2022-06-04 02:31:04 +08:00
austin362667
5ca651a9b4 pivotshort: clean up field name 2022-06-03 23:28:48 +08:00
austin362667
af2d88d9a3 pivotshort: add immediate market sell 2022-06-03 23:23:26 +08:00
austin362667
9dab39849b pivotshort: clean up 2022-06-03 16:38:06 +08:00
austin362667
30be15dd34 pivotshort: add repay margin side effect 2022-06-03 15:48:49 +08:00
austin362667
2aac5bb273 pivotshort: improve post order & add margin 2022-06-03 15:48:49 +08:00
c9s
6936503cde
bollmaker: fix profit stats notification 2022-06-03 14:46:45 +08:00
c9s
4fc0687cf9
bollmaker: remove debug code 2022-06-03 03:14:19 +08:00
c9s
68d6e9e850
service: fix state loading (use correct ID method) 2022-06-03 03:10:50 +08:00
c9s
7fce6a0fca
bollmaker: call persistence.Sync when position is changed 2022-06-03 02:44:00 +08:00
c9s
50d7d235a4
bollmaker: pull out functions 2022-06-03 02:44:00 +08:00
c9s
1a85299204
bollmaker: make detectPriceTrend simple function 2022-06-03 02:44:00 +08:00
c9s
d7c8b0b127
autoborrow: render balance map as SlackAttachment 2022-06-02 19:50:39 +08:00
c9s
5277098f70
add api .UnrealizedProfit and .IsDust method on Position 2022-06-02 18:05:35 +08:00
c9s
6a25f30b39
add IsLong and IsShort method on Position 2022-06-02 17:58:18 +08:00
c9s
e2f339e641
bollmaker: fix short position order 2022-06-02 17:55:14 +08:00
Andy Cheng
bf385899b9 strategy: use private for non-exported fields and functions 2022-06-02 13:47:16 +08:00
c9s
5527b3c48a
rename Withdrawal to Withdraw since it's a noun 2022-06-02 11:42:03 +08:00
c9s
f87a0ab316
autoborrow: add json tags 2022-06-02 01:53:22 +08:00
c9s
34e1b642d1
autoborrow: add exchange name to the margin action struct 2022-06-02 01:51:03 +08:00
c9s
4f842c521a
fix log message 2022-06-02 01:47:55 +08:00
c9s
78f9c7d569
improve autoborrow checks 2022-06-02 01:27:04 +08:00
Andy Cheng
205921ea42 strategy: remove HasTradableBase() 2022-06-01 10:54:13 +08:00
Andy Cheng
cd96c01131 strategy: use Market.IsDustQuantity instead 2022-06-01 10:51:57 +08:00
Andy Cheng
237d1205e8 strategy: check update balance response in calculateQuantity 2022-06-01 10:26:04 +08:00
Andy Cheng
6285e145a7 strategy: margin side effect 2022-05-31 15:46:55 +08:00
Andy Cheng
3421423cd6 strategy: update balance for exchanges like FTX 2022-05-31 14:30:37 +08:00
Andy Cheng
a5124c743f strategy: supertrend strategy TP/SL 2022-05-31 12:53:14 +08:00
c9s
f29e8bd6d2
service: use reflect to generate insert sql 2022-05-30 18:08:54 +08:00
Andy Cheng
d72a4e8e94 strategy: supertrend strategy config example 2022-05-30 16:48:07 +08:00
Andy Cheng
756284378b strategy: supertrend strategy control 2022-05-30 16:35:10 +08:00
Andy Cheng
44469ed3aa strategy: supertrend position control 2022-05-30 16:26:17 +08:00
Andy Cheng
07fe68d740 strategy: Validate() 2022-05-30 16:22:13 +08:00
Andy Cheng
0e1e5369f2 strategy: leverage parameter 2022-05-30 16:07:36 +08:00
Andy Cheng
1d24379c17 strategy: refactor supertrend sconfig 2022-05-30 14:52:51 +08:00
Zenix
8652b4e043
Merge pull request #633 from zenixls2/fix/ewo_entry
Fix/ewo entry, backtest
2022-05-30 15:47:46 +09:00
zenix
e3a8ef4e69 fix: statistics on entry/exit on signal changes, fix position check 2022-05-30 12:45:52 +09:00
austin362667
c904f9f0f7 strategy: add fmaker
fmaker: cleanup
2022-05-29 21:39:11 +08:00