Grid Bot

Available to Professional Users only

Grid Bot allows a user to setup a grid trading strategy. Grid trading is a strategy in which a trader earns from the spread between the bid and offer price.

For example, if a buy order is placed at 1000 USD and a sell order is placed at 1100 USD for the same amount of token, the trader would have pocketed 100 USD in profit if both buy and sell orders are filled.

The simplicity (yet complexity due to the surrounding logic) of grid trading appeals to many traders. Even some of the largest hedge funds use grid trading for their market making strategies.

In fact, most grid strategies have multiple layers of bid and offer prices.

Although grid trading is simple on its own, still there are many complexities and logic surrounding grid trading. However, StockHero is able to simplify these complexities and offer our users an easy to deploy grid bot.

This is how a grid strategy works with multiple layers:

Assuming there are two layers, a user will place two buy and two sell orders for a stock as follow:

Sell Level 2: 3100

Sell Level 1: 3000

Buy Level 1: 2900

Buy Level 2: 2800

If both Buy Level 1 and Sell Level 1 trades are filled, the user would have pocketed 100 USD in profit assuming 1 unit of the stock is transacted. This 100 USD in profit is known as the spread profit. And the spread percentage is about 3.4%. If Buy Level 2 and Sell Level 2 trades are filled, the same user would have earned 300 USD. Collectively, 400 USD in profit would be earned from this single grid strategy yielding a 7% (400 / (2900+2800)) in net profit.

It may seem that a grid trading strategy is a sure-win, but it is not. Grid trading would fail when the market suddenly moves out of range on either the buy or sell side causing the grid strategy to be handicapped or one-legged. Hence, timing when to create your grid trades and when to exit is important.

Using StockHero Grid Bot

To deploy a grid strategy, you will need both the stock itself and your native currency to place a buy order. For example, if you want to deploy grid strategy for AAPL pair, you will need both AAPL and USD assets. This is because the bot will be placing buy orders using USD and sell orders for AAPL.

However, if you are running the bot connected to a Margin account that allows you to place Shorts (without the need to own the physical stock), the DCA bot will still require you to own AAPL shares in order to place sell trades on the opposite side. This is because you cannot simultaneously have both borrowed-shorts and long-buy positions existing at the same time.

Understanding Mid Price

Mid price is the middle price between the closest bid and offer price. For example, if AAPL order book is currently looking like:

Sell Level 2: 3001

Sell Level 1: 3000

Buy Level 1: 2996

Buy Level 2: 2997

the mid price will be 2998 USD.

Upper Range Sell Price Limit

This configures the grid bot to place your sell orders below the sell price limit. For example, if the current mid price of the AAPL order book is 2998 USD and if Upper Range Sell Price Limit is 10%, the grid bot will not place any orders above 3297.80 USD (2998 x 110%).

Lower Range Buy Price Limit

This configures the grid bot to place your buy orders above the buy floor price limit. For example, if the current mid price of ETH order book is 2998 USD and if Lower Range Buy Price Limit is 10%, the grid bot will not place any orders below 2698.2 USD (2998 x 90%).

No. of Orders Between Mid Price and Range Limit

This indicates the total orders to place between the mid price and both Buy and Sell Range Limits (as described above). The orders will be placed in equal price distance. For example if the number of orders is 3, the buy orders will be placed in the following price levels in steps of 99.93 USD:

2898.06 USD

2791.13 USD

2698.2 USD

Per Order Amount

This indicates how much asset to buy or sell.

After entering all the values, StockHero will automatically calculate how much assets you need in order to run this grid strategy.

Entry Condition

A key criteria in running a good grid strategy is knowing when to start one. StockHero Grid Bot offers users three options for their entry condition. We will explain the Range condition.

The idea of Range entry condition is that grid trading is typically more successful in a range-trading pattern. Any breakouts would invalidate a grid strategy. Hence, in order to determine a range trading pattern, a user may select the Range condition.

Range is measured using the highest and lowest CLOSED price of a candlestick. A range is confirmed to occur if it fulfils the values set by the user.

When to use Lesser and when do you use Greater condition? Lesser condition is a safer bet due to its lagging nature on confirming that a range trading pattern has started. A more aggressive trader would select Greater condition if he or she wants to enter a grid trade almost immediately after a breakout or crash.

Exit Condition

Knowing when to exit an unfavourable grid trading position is as important as knowing when to enter.

StockHero Grid Bot will automatically close a deal if all Buy and Sell orders are filled. However, there are situations when a user may want to exit the grid trade entirely. A user can set the maximum Wait Time for the grid bot to wait for all its buy/sell orders to be filled. The grid bot can also be configured to exit if a breakout occurs. This is determined by the Outer Range Limit value.

For example if the Outer Range Limit is set as 5% and if we use the above AAPL example of 10% as the Range Limits, the grid bot will exit if the price of AAPL exceeds 5% above 3297.80 = 3462.69 USD.

A user can choose what to do with the remaining unfilled orders if the grid bot exits. Some users prefer to leave the open orders hanging in order to keep the previous grid strategy intact. After all, if all buy and sell orders are filled, the grid strategy is considered successful and the bot automatically restarts with a new set of grid trades.

Please note that backtest is not available for grid bot.

Last updated