Digging deeper into RenkoTrading for cryptocurrency trading (part II)
By: Gerard Martínez
Tags: Investment, Trading, Algorithmic Trading, Cryptocurrency, Bitcoin

In a previous post we introduced a fairly simple approach for cryptocurrency trading named RenkoTrading, inspired by a type of chart representation called Renko. The inner algorithm is pretty simple: every time the price changes on an x percentage (e.g. 5%), we add a tile or point (equivalent to a candle in a candlestick chart) in the direction of the change. Doing so we can obtain plots such as the following, which give a clear overview of the overall trend of the market (bearish in red vs bullish in green). Then, the simple algorithm consists in trading by selling or buying in reaction to a change of trend. In other words, when a red tile appears after a succession of green tiles, we must sell and vice versa.

Also Read: The Best Crypto Trading Bots

Renko charts for the BTCUSD pair obtained from tradingview.com

In this post, I want to explore further this trading idea. Particularly, I want to take into consideration two factors that were mainly unaddressed in the previous post: (a) trading fees and (b) slippage.

Trading fees

Most trading algorithms would be incomplete if they did not include transaction or trading fees, which are the commissions that the exchanges charge us to execute each trade we perform. For cryptocurrency exchanges that I know, these are usually lower than 1% of the amount we trade and the rules vary from exchange to exchange.

For instance, you may find exchanges such as GDAX which only charge you 0.3% for taker trades, which are also known as market orders. This type of trades are different from maker trades (a.k.a. limit orders) in which they subtract liquidity from the exchange instead of providing liquidity. While taker orders come with 0.3% commission, the maker orders are free.This incentives people to use the exchange and provides liquidity for people to trade upon.

On the other hand, other exchanges such as Binance will charge you always but with commission as low as 0.1% if you use their own ERC20 token called BNB.

For the RenkoTrading analysis presented here, we take into consideration a flat fee of 0.1% as we will use BTC-USDT (bitcoin — tether dollar) price extracted from the Binance exchange.

Slippage

Quoting investopedia:

Slippage happens when a trader gets a different rate than expected between the time he enters the trade and the time the trade is made. It is something that can happen to any trader, whether he’s trading stocks, currencies or futures.

In our previous RenkoTrading analysis, we used a ticker size of 1 day, meaning we only had one candlestick per day (open, close, min and max price) and we were using the mean of that ticker for trading. This is quite an unrealistic scenario because, in a production environment, after performing RenkoTrading and detecting a change in trend, the next available price for us to buy or sell is not the mean of the last candlestick but, instead, the closest to reality is the open price of the following one.

We take this fact into consideration for a more detailed RenkoTrading analysis. Namely, we now break down the previous 1-day candlestick into 6-hour candlesticks and, for the analysis, we consider the buy/sell price as the open price of the following candlestick.

RenkoTrading performance on BTC-USDT using 6h-tickers and next-ticker open trade price

Using the last 200 days data for the BTC-USDT pair on Binance, granularity of 6h and delta=0.05 (5% price change) for the RenkoTrading algorithm we can identify the following trend points.