bbgo_origin/config/grid2-max.yaml

75 lines
2.5 KiB
YAML

---
notifications:
slack:
defaultChannel: "dev-bbgo"
errorChannel: "bbgo-error"
switches:
trade: false
orderUpdate: false
submitOrder: false
sessions:
max:
exchange: max
envVarPrefix: max
# example command:
# godotenv -f .env.local -- go run ./cmd/bbgo backtest --config config/grid2-max.yaml --base-asset-baseline
backtest:
startTime: "2022-01-01"
endTime: "2022-11-25"
symbols:
- BTCUSDT
sessions: [ max ]
accounts:
binance:
balances:
BTC: 0.0
USDT: 10000.0
exchangeStrategies:
## You can run the following command to cancel all grid orders if the orders are not successfully canceled:
## go run ./cmd/bbgo --dotenv .env.local.max-staging cancel-order --all --symbol BTCUSDT --config config/grid2-max.yaml
- on: max
grid2:
symbol: BTCUSDT
upperPrice: 18_000.0
lowerPrice: 13_000.0
gridNumber: 100
## compound is used for buying more inventory when the profit is made by the filled SELL order.
## when compound is disabled, fixed quantity is used for each grid order.
## default: false
compound: true
## earnBase is used to profit base quantity instead of quote quantity.
## meaning that earn BTC instead of USDT when trading in the BTCUSDT pair.
# earnBase: true
triggerPrice: 17_000.0
stopLossPrice: 10_000.0
takeProfitPrice: 20_000.0
## profitSpread is the profit spread of the arbitrage order (sell order)
## greater the profitSpread, greater the profit you make when the sell order is filled.
## you can set this instead of the default grid profit spread.
## by default, profitSpread = (upperPrice - lowerPrice) / gridNumber
## that is, greater the gridNumber, lesser the profit of each grid.
# profitSpread: 1000.0
## There are 3 kinds of setup
## NOTICE: you can only choose one, uncomment the config to enable it
##
## 1) fixed amount: amount is the quote unit (e.g. USDT in BTCUSDT)
# amount: 10.0
## 2) fixed quantity: it will use your balance to place orders with the fixed quantity. e.g. 0.001 BTC
# quantity: 0.001
## 3) quoteInvestment and baseInvestment: when using quoteInvestment, the strategy will automatically calculate your best quantity for the whole grid.
## quoteInvestment is required, and baseInvestment is optional (could be zero)
## if you have existing BTC position and want to reuse it you can set the baseInvestment.
quoteInvestment: 10_000
# baseInvestment: 1.0