mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-27 09:15:15 +00:00
25b5eddc03
fix: change doc, since --exchange removed from backtest fix: test for config changes
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
---
|
|
sessions:
|
|
binance:
|
|
exchange: binance
|
|
envVarPrefix: binance
|
|
|
|
#max:
|
|
# exchange: max
|
|
# envVarPrefix: max
|
|
|
|
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:
|
|
BTCUSDT:
|
|
# basic risk control order executor
|
|
basic:
|
|
minQuoteBalance: 100.0
|
|
maxBaseAssetBalance: 3.0
|
|
minBaseAssetBalance: 0.0
|
|
maxOrderAmount: 1000.0
|
|
|
|
# example command:
|
|
# godotenv -f .env.local -- go run ./cmd/bbgo backtest --sync-from 2020-11-01 --config config/grid.yaml --base-asset-baseline
|
|
backtest:
|
|
# for testing max draw down (MDD) at 03-12
|
|
# see here for more details
|
|
# https://www.investopedia.com/terms/m/maximum-drawdown-mdd.asp
|
|
startTime: "2022-01-10"
|
|
endTime: "2022-01-11"
|
|
symbols:
|
|
- BTCUSDT
|
|
account:
|
|
binance:
|
|
balances:
|
|
BTC: 0.0
|
|
USDT: 10000.0
|
|
|
|
exchangeStrategies:
|
|
|
|
- on: binance
|
|
grid:
|
|
symbol: BTCUSDT
|
|
quantity: 0.001
|
|
# scaleQuantity:
|
|
# byPrice:
|
|
# exp:
|
|
# domain: [20_000, 30_000]
|
|
# range: [0.2, 0.001]
|
|
gridNumber: 100
|
|
profitSpread: 1000.0 # The profit price spread that you want to add to your sell order when your buy order is executed
|
|
upperPrice: 50_000.0
|
|
lowerPrice: 20_000.0
|
|
long: true # The sell order is submitted in the same order amount as the filled corresponding buy order, rather than the same quantity.
|
|
|