This bot automates the popular "grid trading" strategy which seeks to profit from volatility of the market by placing multiple buy and sell limit orders on grid lines around the current price.
How the strategy works
Unlike strategies that rely on technical indicators to generate buy/sell signals, grid trading makes use of simple price action of the market to consistently buy low and sell high on every opportunity. This is accomplished by placing multiple orders on both sides of the book.
As the price moves up and down within the grid, filled orders are automatically replaced with the appropriate buy or sell orders to continue trading. If a buy order is filled, a corresponding sell order is placed on the grid line above, and conversely if a sell order is filled, a buy order is placed on the line below. The distance between these lines is the incremental profit made on every buy/sell roundtrip. The longer the price stays within the grid, the more opportunities for profit exist.
If the price continues moving in one direction and leaves the grid, we have a choice between the following:
- 1) Recreate grid around exit price and continue trading
Use this option if you have sufficient balance in quote and base to re-create the grid at the point where the price exits the grid. Note - this involves cancelling all open orders and close open positions with a market order.
- 2) Cancel all orders and stop bot
Use this option if you want to cancel all remain open orders and stop the bot. This option will not close any open positions. A position is open if the bot has bought quantity but has not sold the same amount or conversely if it has sold but has not bought back the same amount.
- 3) Cancel all orders, close all positions and stop bot
Use this option if you want to close all positions in addition to cancelling any remaining open orders.
- 4) Do nothing
Use this option if you would rather wait for all open orders to eventually get filled. As the price reenters the grid, the bot will resume trading. However, if the price never re-enters the grid, the orders will remain open indefinitely until manually cancelled.
Sufficient balance is required for both the base asset and the quote asset.
For example, if you wish to trade BAT/USDT, with the order size 100, and Number of Grids = 10, be sure that you have at least 500 BAT for the sell orders (5 x 100 = 500) and at least 50 USDT for the buy orders (at 0.10 price per unit, 5 x 100 x 0.10 = 50).
Insufficient balance in either asset will result in the exchange rejecting your orders, which will be shown in the logs. We recommend having a minimum of 10% available for each side as a buffer.
- Configuration Name: A name/label for this configuration. You can copy and modify a configuration to run this bot on multiple markets simultaneously.
- Exchange: The exchange to run this bot on. This bot cannot be backtested as it leverages a real-time strategy based on order book data.
- Market: The pair (symbol) to trade. Quadency's standard convention is Base/Quote.
- Number of Grids: Enter the number of grid lines to use. Generally higher is better if you have sufficient balance for good coverage of the trading range for the market being traded.
- Distance Between Grids: The distance between grid lines used to place orders on. This is also known as profit per grid.
- Amount Per Order: Enter the amount or quantity of base currency to user for limit orders. For example, if you're trading BAT/BTC, enter the number of BAT for each order.
- When Price Exits Grid: Indicate what to do when the price leaves defined grid boundaries. The boundaries are between the highest sell and lowest buy. See description of options above.