Grid Trading Beats Time in the Market (or what was that?)

Have you also tried to buy a dump and then sell the pump again? Oh man, that can be frustrating. Often it seems like the market is against you and one dip is followed by another dip, even though you were hoping so much for the pump. While there is the saying «Time in the Market Beats Timing the Market», grid trading still tries to «time» the market. Well, it is less a predicting the market movement, but much more a trading with clearly predefined rules and actions. Grid Trading bots can execute these predefined rules automatically, so you can put away your smartphone and move on to other things.

Key Takeaways

StrategyBuy low and sell high
ApplicationManual on Exchange (eg. Binance)
Trading Bot (eg. Pionex)
AdvantagesExploiting Market Volatility
Expectation: «Fluctuate and then bullish»
RisksThe price falls and does not recover. In this case, you bought high and sold low.
Wrong setting: Grids set too tight causing the transaction fee to suck up the profit.

In the beginning, I was a classic hodler. I always bought a fraction of BTC and ETH at the end of each month and waited for the market to rise – which it did. When Elon Musk directed the market with his (stupid) Twitter posts about BTC and Dogecoin, I started to dump some of my BTC. Actually, I prefer to buy when the bears are at work and wait for the Greater Fools to join who are then ready to buy my overpriced assets. And so I got bored during the bull market….

The idea of Grid Trading

So I started with an Excel spreadsheet. My idea:

  • Whenever the market falls by 10%, I buy BTC for a certain amount ➞ eg. $100
  • If the price then rises back by 10%, I sell the previously purchased BTC again ➞ eg. sale $110 (Profit $10)
  • But if the price drops by another 10%, then I buy BTC again for the same amount ➞ eg. $100

Side note: In other experiments I bought at consecutive dumps of 10% each also for 10% more of the original amount (eg. $110). But to understand the principle of grid trading, this is less relevant.

And so I created the following Excel tables, which I called «Trading» at that time, because I had no idea about Grid Trading.

Excel table shows the purchase of BTC for €120 at a price of €44,965 and then the sale of the purchased BTC 3 days later for €47,492, resulting in a profit of approximately €5. Another sale was made the following day at a price €49,171, in which BTC were sold for €100.
Grid Trading Test BTC
Excel table shows the purchase of ETH for €120 at a price of €1,351 and then the sale of the purchased ETH 3 days later for €1,451, resulting in a profit of approximately €7.5. Further sales were made on the following days at prices of €1,509 and €1,631, in which ETH were sold for €100 and €50.
Grid Trading Test ETH

The tables show that I started testing right during a rising market movement. Therefore, my examples list almost exclusively sales.

If one puts these sales or the potential buys on the chart, the «grid» becomes visible.

(The following graphic is unrelated to my Excel screenshots above.)

Grid overlays the BTC3L/USDT chart on Pionex illustrating the grid trading tactics. The grid shows the buy and sell orders created. The buy orders range between a price of 0.649 and 0.850. The sell orders range between 0.901 and 1.154. The current price is 0.868.
Grid over the BTC3L/USDT chart on Pionex

The screenshot shows the buy and sell orders created in the order book for the trading pair BTC3L/USDT. The created buy orders (green) and sell orders (red) represent the grid, which was relevant for naming the trading strategy.

Side note: BTC3L is a so-called Leveraged Token whose prices often range between 0.1 and 3. Thus, the prices of the leveraged tokens do not reflect the prices of the base currency (e.g. BTC). Leveraged tokens are available on Binance as well as on Pionex: Binance: Review of the Largest Crypto Trading Platform

Automate Grid Trading Strategy with Trading Bot

If you visit my blog or Twitter profile from time to time, you know that I am a fan of Pionex. And so it didn’t take me long to find the right trading bot for grid trading on Pionex.


Follow me on Twitter and get regular updates about new posts.


A trading bot makes it unnecessary to set price alerts to execute your trading tactics with the correct buy and sell prices. It also allows you to set the grid tighter. In my manual test, I tried it with huge price gaps of 10%. However, since the trading bot is fully automated and can therefore act quickly, price gaps of less than 1% are easily possible.

To start a grid trading bot, the following parameters are relevant:

  • Cryptocurrency / Trading Pair
  • Lower price limit
  • Upper price limit
  • Number of grids

Setup of a Grid Trading Bot

Let’s assume we want to start a trading bot for Bitcoin with counter currency USDT (trading pair BTC/USDT). The Bitcoin price is 42,000 USDT. In addition, we define the following parameters:

  • Lower price limit: 37’000 USDT
  • Upper price limit: 49’000 USDT
  • Number of grids: 50

This results in a grid with price intervals of 240 USDT. (Or 0.49% to 0.65%, because 240 USDT are 0.49% of 49’000 USDT and 0.65% of 37’000 USDT).

Chart showing the past history price of Bitcoin. Over it lays the grid representing the buy and sell orders for grid trading strategy. Sell orders are shown as red lines. They range from $42,000 to $49,000 in $240 increments. Buy orders are shown as green lines. They range from $37,000 to $42,000 in $240 increments.
Resulting grid with sample parameters

If the price moves to $44,300, the trading bot executes the sell orders and replaces them with buy orders.

Chart of the Bitcoin price a few days after starting with grid trading. The price is now at $44'300. 9 sell orders were executed during the rise from $42'000. The bot has replaced the executed sell orders with buy orders.
Example development of the BTC price and its impact on the order book

If the price again falls below a line of the grid, the bot executes the corresponding buy order and replaces it with a sell order.

Investment and profit

If you start grid trading with an investment in USDT, then the bot initially changes 50% to BTC (or the currency you have chosen for the bot). Obviously, this results in a 50:50 ratio at the beginning (50% BTC and 50% USDT).

If the price increases, the ratio changes so that a part of the BTC is sold and thus more USDT are available. In addition, the rest of the BTC, which the bot does not sell, has more value. Since the price has risen in the meantime.

If the price falls in return, the trading bot buys some BTC with the existing USDT. Overall, the existing BTC have less value in this case. The matter becomes clearer with an example scenario.

Let’s have another look at the parameters from above:

  • Current price: 42’000 USDT
  • Lower price limit: 37’000 USDT
  • Upper price limit: 49’000 USDT
  • Number of grids: 50

This results in the following situation:

  • Price difference per grid: 240 USDT:
    (49’000 USDT – 37’000 USDT) / 50 Grids = 240 USDT
  • Consequently, the next sell line is at 42,040 USDT:
    37’000 USDT + 21 * 240 USDT = 42’040
    (Or, to put it another way: Which price in 240 USDT increments starting at 37,000 USDT is the next higher of 42,000 USDT?)
  • The next buy line is therefore at 41,800 USDT:
    37’000 USDT + 20 * 240 USDT = 41’800 USDT oder
    42’040 USDT – 240 USDT = 41’800
    (Or put another way: Which price in 240 USDT increments starting at 37,000 USDT is the next lower of 42,000 USDT?)

Given these conditions, we start a grid trading bot with 100 USDT.

Initial situation of the scenario: The BTC price is at 42'000 USDT in the graph. Over this graph is a red sell line at 42'040. Below this is a green buy line of 41'800 USDT.
Starting point of the scenario

The bot splits the invested USDT directly into BTC and USDT. In other words, it buys BTC worth 50 USDT, which corresponds to about 0.0012 BTC at a price of 42,000 USDT.

Example: Price change 1

Now let’s assume that the price rises to $42,110 USDT and thus the price breaks through the $42,040 USDT line. Since there were 25 sell lines above the starting price, the bot sells 4% (1/25 = 0.04) of the previously bought BTC.

Step 1: The BTC price breaks through the sell line at $42,040 and is now at $42,110 USDT. The sell line at $42,040 has been replaced by a buy line.
Price change 1

Through this action, the trading bot has made the first profit:

  • 4% of 0.0012 BTC is 0.000048 BTC
  • The 0.000048 BTC was previously bought by the bot for 42,000 USDT.
  • The 0.000048 BTC has just been sold by the bot for 42,040 USDT.
  • This results in a profit of 0.002 USDT (0.000048 BTC * 42,040 USDT – 0.000048 BTC * 42’000 USDT = 0.00192 USDT)

In summary, the state after step 1 is as follows:

  • Available BTC:: 0.001152 (0.0012 – 0.000048)
  • Available USDT: 50.002 (50 + 0.002 Profit from step 1)
  • Number of sell lines: 24
  • Number of buy lines: 26

Example: Price change 2

Let’s assume that after that the Bitcoin price drops to 41,750 USDT and falls down through the next two lower buy lines.

Step 2: The BTC price falls and lands at 41,750. During the fall, the BTC price breaks through the buy lines at 42,040 and 41,800 USDT. These buy lines were replaced by sell lines.
Price change 2

Consequently, the algorithm performs the following two steps:

  • Buying Bitcoin for 2 USDT (52.002 USDT / 26 Kaufslinien) at a price of 42,040 USDT = ~0.0000476 BTC
  • Buying Bitcoin for 2 USDT (~50.002 USDT / 25 Kaufslinien) at a price of 41,800 USDT = ~0.0000478 BTC

This results in the following state after price change 2:

  • Available BTC: 0.0012474 (0.001152 + 0.0000476 + 0.0000478)
  • Available USDT: ~46.002 (50.002 – 2 – 2)
  • Number of sell lines: 26
  • Number of buy lines: 24

The average price of all BTC bought is 42,000.60 USDT
(0.001152 BTC * 42,000 USDT + 0.0000478 BTC * 42,040 USDT + 0.0000478 BTC * 41,800 USDT) / 0.0012474 BTC = 42,000.60 USDT

In case the price continues to fall, the trading bot would buy BTC according to the strategy and try to sell them again at a later time.

Upper price limit: The desired state

It is relatively clear that the price of the selected cryptocurrency will not stay within the defined price limits forever. Thus, it may happen that the price breaks through all the sell thresholds upwards. In this case, the entire amount of previously purchased BTC is sold and only USDT is left.

Chart showing the past price of Bitcoin. Over the chart lays the grid representing the buy orders for the grid trading tactic. Since the price is at 50,600 USDT and the grid price range is between 37,000 and 49,000 USDT, only buy orders are visible, which are marked as green lines.
State, after which the price has broken through all the sell lines

This is the desired state using a grid trading bot. Pionex describes the target behavior of the price as «Fluctuate and then bullish», which means nothing more than that first the volatility is exploited and then all BTC are sold at a higher price.

In this state, it no longer makes sense to let the algorithm continue running. It would be possible for the price to fall back into the grid price range and for the bot to profit from the volatility there. However, since all BTC have already been sold successfully, it makes more sense to simply stop the bot and start a new one with a different price range.

Lower price limit: The undesired state

Of course, it can also happen that the price changes against your expectations. In this case, if the price slips below the lower price limit, the situation looks as follows.

Chart showing the past price of Bitcoin. Over it lays the grid representing the sell orders of the grid trading strategy. Since the price is at 34,200 USDT and the grid price range was set between 37,000 and 49,000 USDT, only sell orders are visible, which are marked as red lines.
State, after which the price has broken through all the buy lines

In this case, when the sell lines were hit, the algorithm exchanged all existing USDT for the selected cryptocurrency (eg. BTC). Moreover, the price has continued to fall, causing all purchased BTC to lose additional value. In contrast to a buying BTC without grid trading, at least the average cost price has moved downwards, which somewhat limits the damage:

Let’s assume you would have bought BTC for 100 USDT without a grid trading bot and the price would have dropped to 34,200 USDT as shown in the chart. In this case you would have a price loss of 7,800 USDT (42,000 – 34,200). In case of using a grid trading bot, the repetitive purchases would have pushed the average initial price down so that it would be between around 38,000 and 40,000 USDT. This only corresponds to a price loss between 3,8000 and 5,800 USDT.

Measures in case of negative price development

If you find the trading bot in this state, you have the following options:

  1. Stop bot, sell all BTC and take loss.
  2. Stop bot, keep all BTC and hodl.
  3. After stopping the bot, start a new one with new price limits to further exploit the volatility.
  4. Keep bot running until the price moves back into the defined price range.

If you go for option 1, then you have to strongly consider whether what you are doing is the right thing for you. In this case, you would definitely not have planned your investment clearly enough in advance.

Option 2 is basically possible. This way, you can at least still tell yourself that you got the Bitcoin cheaper than if you had bought the same amount right at the beginning.

In option 3, it should be noted that by stopping the algorithm, you collect the losses and then start a new bot with less liquidity. Since the algorithm already lost part of your investment.

Number 4 is the behavior that I would recommend. For some reason, you started the bot. If you don’t expect the value of the currency to move above the lower price range in the future, then it is not advisable to start a grid trading bot in the first place. Besides that, sometimes you should let your investments rest and not try to optimize things permanently. (Note to myself 😇).

Stop Loss and Take Profit

Instead of waiting for the bot to reach an appropriate level and then stopping it manually, there is also the option to set a Take Profit price. In this case, the bot will automatically liquidate all positions and exchange the purchased BTC into USDT if the price reaches the desired price.

As a counterpart to Take Profit, there is obviously also Stop Loss. Here you define an additional (undesired) price at which the assets will be sold automatically. In this case, however, rather to prevent too large losses.

Hands-On: Grid Trading on Pionex

Pionex offers a whole range of trading robots. In my article Pionex Arbitrage Bot: Your Smart Investor I have already described one of these trading bots. However, the following instructions will help you to start your first grid trading bot.


Pionex Logo with Wordmark

Create your account on Pionex here
and benefit from the lowest trading fee of 0.05%.


After creating an account on Pionex, the first thing you need to do is choose the currency you want to start the bot with. It is recommended to choose one with a lot of liquidity. One of the top 100 by market capitalization should offer this liquidity.

Pionex Exchange View. The selection of cryptocurrencies is highlighted. Pionex offers a wide selection from BTC, BUSD to leveraged tokens like BTC3S.
Pionex main view

With the currency selected, the running grid trading bot is just a few clicks away.

Pionex bot selection. Grid Trading is framed in gold.
Bot selection on Pionex

Pionex proposes parameters that the platform finds favorable based on past price development. For this reason, the configuration is also labeled as «AI Strategy».

Grid Trading Bot Configuration with AI Strategy. The current Bitcoin price is 44,113 USDT. Pionex suggests 39,016 USDT as the lower price barrier. The upper price barrier is shown as 48,350 USDT. Pionex proposes 37 grids, which would result in a profit of 0.44 - 0.56% per grid.
Pionex grid bot with AI strategy

With the parameters defined by Pionex, a profit of 0.44 – 0.56% per grid can be achieved. But if you want to set the price range wider or narrower, you have the possibility to choose «Manual setting». Or even easier is to click on «Copy parameters to Manual settings». This will copy the AI parameters to the manual configuration of the bot, where you can adjust them to your preferences.

Grid Trading Bot configuration with manual settings. The lower price limit is defined as 39,016 USDT. The upper price limit is defined as 48,350 USDT. 100 grids are defined, which would lead to a profit of 0.1 - 0.14% per grid.
Pionex Grid Bot using manual settings

Clicking on “Create” starts the rocket 🚀 and Pionex will begin to convert half of the invested USDT into the target currency.

Check activities and profits of the Grid Trading Bot

While the trading robot is running, the order book can be viewed at any time. The price movement is visible, which will lead to the the next action (buy/sell).

Order book of the started trading bot on Pionex. The image shows that for the next buy action, the price must fall by 0.76%. For the next sale, a price increase by 0.49% is required.
Order book of the Grid Trading Bot

In the example above, the price would have to fall by 0.76% for the price to break through the next buy line which would lead the algorithm to buy a small amount of the selected currency. In turn, an automatic sale takes place if the price rises by 0.49%.

The transactions listing (Transaction tab) shows the purchases and sales made by the bot. You can see that each sale is paired with a purchase. Each such pairing shows the profit gained from it.

List of purchases and sales executed. Each purchase is paired with a sale. If a purchase was made and the price did not increase to the corresponding level, the purchase is marked «To be sold».
Executed purchases and sales

Buy actions, after which the price has not increased by the predefined percentage, are indicated in the list with «To be sold». This remains the case until the price reaches the expected level. In the meantime, it takes profits from the lower buy and sell lines. And finally, this is the beauty of Grid Trading Bot:

The Grid Trading Bot has a plan B for every situation

After the bot has been running for a while, you can cash out a portion of the profit the algorithm generated.

Dialog for paying out the grid trading profit. The example shows a releasable profit of 0.14 USDT.
Dialog für das Auzahlen des Profits

The dialog clearly shows that the bot only releases part of the profit. The algorithm automatically reinvests the other part in further transactions.

Important: The listed profit in no way says that the algorithm was profitable overall. If the price of the cryptocurrency drops significantly, then depending on the scenario, the price will fall below the average cost price, resulting in a loss. Nevertheless, in the meantime, the bot trades out small profits through grid trading. In summary, the profit is calculated as follows:

Profit = Price_Profit + Grid_Profit

Whereby the Price_Profit can also be negative obviously. The grid profit is positive at any time.

Conclusion

I have tried grid trading bots with many currencies and in most cases their profits were in my favor. Nevertheless, it also happened that my investment slipped below all buy lines for weeks and patience decided whether I would take a massive loss or still be able to turn it into profit.

One approach I try to take in all of my investing is to always have a Plan B. The grid trading strategy inherently takes this approach. By using a trading bot, you can also save yourself a whole load of stress and at best rarely check their status.

Binance also offers grid trading bots. Over there, these bots are called “Strategy Trading”. You can find my review here: Binance: Review of the Largest Crypto Trading Platform