c9s
38767cd2df
move private methods to the bottom
2022-06-30 15:49:17 +08:00
c9s
ee45f154a1
pivotshort: rename bounce short to resistance short
2022-06-30 15:49:17 +08:00
zenix
0141f81086
refactor: ewo use SeriesExtend
2022-06-29 22:02:50 +09:00
zenix
70f4676340
feature: extend indicators, extend seriesbase methods
2022-06-29 21:49:02 +09:00
zenix
69533c0397
feature: add sharpe function implementation
2022-06-29 20:10:20 +09:00
zenix
d8d77cec1e
feature: add skew, covariance and variance
2022-06-29 20:10:20 +09:00
zenix
1e31c4fb04
feature: add correlation for series
2022-06-29 20:10:20 +09:00
zenix
36127a6332
feature: implement omega, sharp, sortino related functions
2022-06-29 20:10:20 +09:00
zenix
b26d3005a3
feature: add pct_change implementation in indicator
2022-06-29 20:10:20 +09:00
Yo-An Lin
ccfaf0e070
Merge pull request #784 from c9s/strategy/pivotshort
...
strategy: pivotshort: fix stopEMA
2022-06-29 17:04:24 +08:00
c9s
4bb2e4a25f
fix stopEMA range check
2022-06-29 16:59:50 +08:00
Andy Cheng
6222ceef9a
Merge pull request #785 from andycheng123/improve/optimizer-progressbar
...
optimizer: add progressbar
2022-06-29 16:28:03 +08:00
Andy Cheng
a029509b63
optimizer: add progressbar
2022-06-29 16:17:43 +08:00
c9s
83d6f4764c
types: fix profit factor calculation
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-29 15:37:18 +08:00
c9s
84083f56b7
bbgo: add ExchangeSession param to the subscribe method
2022-06-29 15:16:56 +08:00
c9s
cb1c5634a2
pivotshort: remove redundant notification
2022-06-29 15:14:24 +08:00
Zenix
6b6686caa8
Merge pull request #778 from zenixls2/feature/series_extend
...
feature: add seriesExtend
2022-06-29 12:35:48 +09:00
c9s
38920dfc7a
pivotshort: fix kline history loading
2022-06-29 11:23:05 +08:00
zenix
0b8441f4a2
rename: ToArray -> Array, ToReverseArray -> Reverse
2022-06-29 11:13:43 +09:00
c9s
fc3e76204a
bbgo: add todo for the reflect Subscribe call
2022-06-29 02:03:00 +08:00
c9s
95c2711b0d
bbgo: call Subscribe method dynamically
2022-06-29 02:02:23 +08:00
c9s
16f2a06b1f
all: move exit methods to the bbgo core
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-29 01:58:15 +08:00
c9s
cfc4fd1f81
add doc for CumulatedVolumeTakeProfit
2022-06-29 01:39:33 +08:00
c9s
3d4f765678
rename protectionStopLoss to protectiveStopLoss
2022-06-29 01:31:56 +08:00
c9s
37413e4355
pivotshort: fix bounce ratio calculation
2022-06-28 23:47:34 +08:00
c9s
b32cfef2fd
backtest: set order price for market order
2022-06-28 23:47:34 +08:00
c9s
609b6a7a50
add ref link to trade stats
2022-06-28 23:47:34 +08:00
c9s
32c76105b0
types: add total net profit field to trade states
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-28 23:47:34 +08:00
c9s
1617005114
pivotshort: fix pivotshort trigger condition
2022-06-28 23:47:34 +08:00
zenix
12757a0458
feature: add seriesExtend
2022-06-28 21:11:07 +09:00
c9s
1156e15cfe
backtest: add order cancel test case
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-28 18:25:51 +08:00
c9s
c0f8bb9a2d
backtest: do not change the backtest order price
...
- apply the last price on the executed trade
- add more tests
2022-06-28 17:43:51 +08:00
c9s
81ed5bff4f
backtest: refactor calculateNativeOrderFee and add test case
2022-06-28 15:29:01 +08:00
c9s
abee61cdc4
backtest: fix stop order backtest, add more test cases and assertions
2022-06-28 14:35:06 +08:00
c9s
09e98eed82
backtest: handle stop market and add test case
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-27 20:49:55 +08:00
c9s
34900776f6
pivotshort: reformat code
2022-06-27 19:54:58 +08:00
c9s
10d5a8a4f2
backtest: fix stop limit order matching
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-27 19:48:14 +08:00
c9s
2784408b8b
add submit order tag
2022-06-27 18:17:57 +08:00
c9s
b97ec7bb1e
pivotshort: remove unused struct
2022-06-27 18:14:12 +08:00
c9s
dfdfd6b85e
types: use pointer receiver for submit order
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-27 15:56:09 +08:00
c9s
94ad8a5096
gross loss and gross profit
2022-06-27 14:40:49 +08:00
Yo-An Lin
fc5a753933
Merge pull request #764 from c9s/strategy/pivotshort
...
strategy/pivotshort: refactor exit methods and add protection stop exit method
2022-06-27 00:20:11 +08:00
c9s
d46954a4b1
fix SimplePriceMatching test
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-27 00:13:57 +08:00
c9s
1557423229
pivotshort: improve useQuantityOrBaseBalance and add bounce short check
2022-06-26 19:45:37 +08:00
c9s
4d862a4286
pivotshort: remove market trade debug
2022-06-26 19:29:01 +08:00
c9s
e1a9df0a2d
pivotshort: add safety check
2022-06-26 19:20:46 +08:00
c9s
3604bae933
pivotshort: pull out stop price check to a single method
2022-06-26 19:06:16 +08:00
c9s
ef31e90728
pivotshort: clean up
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-26 16:32:48 +08:00
c9s
e9b87f6f1e
pivotshort: refactor exit methods
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-26 16:31:48 +08:00
c9s
47677e303f
pivotshort: refactor take profit and stop loss methods
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-26 16:13:58 +08:00
c9s
4c02d8f729
implement QueryOrder on the backtest exchange
2022-06-26 16:10:10 +08:00
c9s
88059016b4
add position roi tests
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-26 16:03:42 +08:00
c9s
0715437cc5
fix lastRecordTime
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-26 13:23:04 +08:00
c9s
25fb684fd1
types: add ROI method on position
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-26 13:11:19 +08:00
なるみ
cbb3effc42
glassnode: add QueryOptions
2022-06-25 20:25:42 +08:00
なるみ
99d6c0550d
glassnode: add Request struct
2022-06-25 19:59:00 +08:00
なるみ
5ce5571b5e
glassnode: delete all requests
2022-06-25 19:59:00 +08:00
c9s
4e670c67a8
pivotshort: change ratio calculation
2022-06-25 18:13:50 +08:00
c9s
66f923ad0d
backtest: add kline fixture generator
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-25 17:55:31 +08:00
c9s
118928d388
implement kline fixture generator
2022-06-25 17:52:37 +08:00
c9s
2e49a95d32
bbgo: remove unused context object
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-25 17:02:53 +08:00
c9s
b25be3d702
add doc comments
2022-06-25 16:55:54 +08:00
c9s
9f0e12dc25
service: fix import
2022-06-25 16:46:40 +08:00
c9s
7dd314703c
service: fix trade test
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-24 19:30:17 +08:00
c9s
751085f8ff
clean up todo comment
2022-06-24 19:24:49 +08:00
c9s
f4bb7bd231
service: drop unused methods
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-24 19:11:21 +08:00
c9s
bd991a7080
service: remove unused QueryLast method
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-24 19:08:51 +08:00
c9s
a9bff7701c
sync: avoid adding the millisecond one to the start time
2022-06-24 18:14:52 +08:00
c9s
cace7c8f97
sync: add more debug logs
2022-06-24 17:14:30 +08:00
c9s
4f42f90b49
service: update id map when inserting record
2022-06-24 16:49:41 +08:00
c9s
54d0a83eee
use local time instead of UTC
2022-06-24 15:42:30 +08:00
c9s
1587630b7b
service: pull out record to a var
2022-06-24 15:27:51 +08:00
c9s
3ad1f0e351
show trade ID in the console
2022-06-24 15:19:12 +08:00
c9s
7b60e34821
revert time range check change, it's the same lol
2022-06-23 17:59:46 +08:00
c9s
a78119b9ca
fix time range checking
2022-06-23 17:51:45 +08:00
c9s
4556e501da
batch: fix time range checking
2022-06-23 17:49:28 +08:00
c9s
8c1198de83
service: use created_at field to sort the orders
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-23 01:35:16 +08:00
c9s
2c96d079b8
skeleton: fix log WithField comment
2022-06-22 23:32:31 +08:00
c9s
2c5b553d21
skeleton: add notation
2022-06-22 23:29:29 +08:00
c9s
2550528f60
skeleton: add notification sample
2022-06-22 23:28:49 +08:00
c9s
dcbeace40e
skeleton: update more comments
2022-06-22 23:24:11 +08:00
c9s
b9cbb9d478
skeleton: add detailed comment to the skeleton
2022-06-22 23:18:11 +08:00
Yo-An Lin
7398afbde7
Merge pull request #758 from c9s/improve/pnl-cmd
...
improve: add pnl cmd options and fix trade query
2022-06-22 18:38:02 +08:00
Yo-An Lin
d1abfcf80b
Merge pull request #757 from iamken1204/improve/totp-user
...
totp-user: add default user 'bbgo'
2022-06-22 18:35:12 +08:00
c9s
8c850c71a2
cmd/pnl: add --sync option
2022-06-22 18:24:34 +08:00
c9s
fa7177426f
cmd/pnl: fix trade table query
2022-06-22 18:19:11 +08:00
c9s
9574a04cce
types: add time alias string to ParseLooseFormatTime
2022-06-22 17:20:10 +08:00
kettan
a0a96abeec
totp-user: add default user 'bbgo'
...
There's no env in alpine image, causes the program throw error 'No USER or USERNAME' in containers.
* Create and assign env in bbgo image
* Fallback to use the default user 'bbgo' when env or was unassigned
2022-06-22 16:45:23 +08:00
c9s
3150480db8
bollmaker: remove stopC
2022-06-22 16:30:29 +08:00
c9s
c26d0d7824
bollmaker: clean up commment
2022-06-22 16:20:59 +08:00
c9s
fa26d5260f
bollmaker: use bbgo.IsBackTesting
2022-06-22 16:18:50 +08:00
c9s
60d2ac1616
ewoDgtrd: clean up embedded struct
2022-06-22 15:37:02 +08:00
c9s
027f1f01cf
improve callID fallback for persistence
2022-06-22 15:19:30 +08:00
c9s
5d72ffaa0f
rsmaker: remove embedded bbgo.Persistence
2022-06-22 13:52:40 +08:00
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