Last active
March 19, 2021 03:18
-
-
Save c9s/7df61233255a70371159be2cd871bee9 to your computer and use it in GitHub Desktop.
BBGO scaleQuantity, linear scale, exponential scale example on MAXUSDT market
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
notifications: | |
slack: | |
defaultChannel: "dev-bbgo" | |
errorChannel: "bbgo-error" | |
riskControls: | |
# This is the session-based risk controller, which let you configure different risk controller by session. | |
sessionBased: | |
# "max" is the session name that you want to configure the risk control | |
max: | |
# orderExecutor is one of the risk control | |
orderExecutor: | |
# symbol-routed order executor | |
bySymbol: | |
MAXUSDT: | |
# basic risk control order executor | |
basic: | |
minQuoteBalance: 1000.0 | |
maxBaseAssetBalance: 200_000 | |
minBaseAssetBalance: 10_000 | |
maxOrderAmount: 10_000 | |
persistence: | |
json: | |
directory: var/data | |
redis: | |
host: 127.0.0.1 | |
port: 6379 | |
db: 0 | |
exchangeStrategies: | |
- on: max | |
grid: | |
symbol: MAXUSDT | |
scaleQuantity: | |
byPrice: | |
# replace "linear" with "exp" if you want exponential scale | |
linear: | |
# x = 價格變動範圍,從價格 0.300 到價格 0.400 | |
domain: [0.300, 0.400] | |
# f(x) = 量從 1000.0 顆掛價格 0.300 到 200.0 顆掛價格 0.400 | |
range: [1000.0, 200.0] | |
gridNumber: 100 | |
profitSpread: 0.008 | |
upperPrice: 0.400 | |
lowerPrice: 0.300 | |
# 作多 MAX, 獲利留在 MAX token | |
long: true | |
# 一開始只掛買單, 適用 v1.14.0 | |
side: buy | |
# 啟用追價, 適用 v1.14.0 | |
catchUp: true | |
# 把網格掛單存在 redis, 適用 v1.14.0 | |
persistence: | |
type: redis | |
store: dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment