bbgo_origin/config/grid2-max.yaml

93 lines
3.2 KiB
YAML
Raw Normal View History

2022-12-03 03:16:29 +00:00
---
notifications:
slack:
defaultChannel: "dev-bbgo"
errorChannel: "bbgo-error"
switches:
trade: false
2022-12-15 10:39:06 +00:00
orderUpdate: true
submitOrder: true
2022-12-03 03:16:29 +00:00
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 ]
2022-12-03 03:16:29 +00:00
accounts:
binance:
balances:
BTC: 0.0
USDT: 10000.0
exchangeStrategies:
2022-12-03 08:52:58 +00:00
## 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
2022-12-03 03:16:29 +00:00
- on: max
grid2:
symbol: BTCUSDT
2022-12-03 06:58:53 +00:00
upperPrice: 18_000.0
2022-12-05 10:12:38 +00:00
lowerPrice: 16_000.0
2022-12-07 04:24:52 +00:00
gridNumber: 100
2022-12-03 03:16:29 +00:00
2022-12-03 08:49:46 +00:00
## 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
2022-12-03 07:22:15 +00:00
compound: true
2022-12-03 08:49:46 +00:00
## 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
2022-12-04 09:58:32 +00:00
## triggerPrice is used for opening your grid only when the last price touches your pre-set price.
## this is useful when you don't want to create a grid from a higher price.
## for example, when the last price hit 17_000.0 then open a grid with the price range 13_000 to 20_000
2022-12-04 13:43:40 +00:00
# triggerPrice: 16_900.0
2022-12-04 10:17:05 +00:00
## stopLossPrice is used for closing the grid and sell all the inventory to stop loss.
## (optional)
2022-12-04 10:17:05 +00:00
stopLossPrice: 16_000.0
2022-12-04 09:58:32 +00:00
## takeProfitPrice is used for closing the grid and sell all the inventory at higher price to take profit
## (optional)
2022-12-03 08:03:01 +00:00
takeProfitPrice: 20_000.0
2022-12-03 03:16:29 +00:00
## 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
2022-12-07 04:24:52 +00:00
quantity: 0.001
2022-12-03 03:16:29 +00:00
## 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.
2022-12-07 04:24:52 +00:00
# quoteInvestment: 10_000
# baseInvestment: 1.0
feeRate: 0.075%
2022-12-05 11:42:36 +00:00
closeWhenCancelOrder: true
resetPositionWhenStart: true
clearOpenOrdersWhenStart: false
keepOrdersWhenShutdown: false
2022-12-15 10:09:43 +00:00
## skipSpreadCheck skips the minimal spread check for the grid profit
skipSpreadCheck: true