diff --git a/README.md b/README.md index 21c10eb6b..34bb1218d 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,8 @@ Check out the strategy directory [strategy](pkg/strategy) for all built-in strat order [buyandhold](pkg/strategy/pricedrop) - `bollgrid` strategy implements a basic grid strategy with the built-in bollinger indicator [bollgrid](pkg/strategy/bollgrid) -- `grid` strategy implements the fixed price band grid strategy [grid](pkg/strategy/grid) +- `grid` strategy implements the fixed price band grid strategy [grid](pkg/strategy/grid). See + [document](./doc/strategy/grid.md). - `support` strategy implements the fixed price band grid strategy [support](pkg/strategy/support). See [document](./doc/strategy/support.md). - `flashcrash` strategy implements a strategy that catches the flashcrash [flashcrash](pkg/strategy/flashcrash) diff --git a/doc/strategy/grid.md b/doc/strategy/grid.md new file mode 100644 index 000000000..1c10d19a6 --- /dev/null +++ b/doc/strategy/grid.md @@ -0,0 +1,31 @@ +### Grid Strategy + +This strategy places buy and sell orders within the specified price range. The gap between orders are equal, thus they +form `grids`. The price gap is calculated from price range and the number of grids. + + +#### Parameters + +- `symbol` + - The trading pair symbol, e.g., `BTCUSDT`, `ETHUSDT` +- `quantity` + - Quantity per order +- `gridNumber` + - Number of grids, which is the maximum numbers of orders minus one. +- `profitSpread` + - The arbitrage profit amount of a set of buy and sell orders. In other words, the profit you want to add to your + sell order when your buy order is executed. +- `upperPrice` + - The upper bond price +- `lowerPrice` + - The lower bond price +- `long` + - If true, the sell order is submitted in the same order amount as the filled corresponding buy order, rather than + the same quantity, which means the arbitrage profit is accumulated in the base asset rather than the quote asset. +- `catchUp` + - If true, BBGO will try to submit orders for missing grids. + + +#### Examples + +See [grid.yaml](../../config/grid.yaml) \ No newline at end of file