Renko strategies in cTrader
A Renko chart is a type of chart that is built using only price movement. A new Renko brick is only formed once the price movement for a symbol exceeds a certain threshold of pips; the time component typically used in candlestick charts is entirely absent. cTrader allows traders to develop automated strategies based on Renko bars in the exact same way as developing such strategies for time-based candlestick bars. In this article and its corresponding video, we will create a simple cBot that uses a Renko-based strategy and backtest it.
Define the trading strategy
We will start by defining the buy signal. Since Renko bars are independent of time, they naturally filter out market noise, making them useful for identifying trend exhaustions and potential reversals. We will place a new buy order when two bearish Renko bars are followed by two bullish bars.

Our sell signal will follow the opposite setup. We will place a sell order when two bullish Renko bars are followed by two bearish bars.

Create an example cBot
We can now proceed to code a cBot based on the above strategy. To start, we will define the parameters for the order volume and the relative stop-loss and take-profit levels.
1 2 3 4 5 6 7 8 | |
We will implement our trading strategy in the OnBarClosed() method. For our bullish setup, we will check if the bars with indices 3 and 2 have a close price lower than the open price and we will also check if the bars with indices 1 and 0 have a close price higher than the open price.
1 2 3 4 | |
For our bearish setup, we will check for the opposite. Bars with indices 3 and 2 have to have a higher close price than their open price; bars with indices 1 and 0 must have a higher open price than their close price.
1 2 3 4 | |
Backtest the cBot
After we save and build our cBot, we can proceed straight to backtesting. If we add the cBot to a chart for EURUSD with a 20-pip Renko threshold, we should get encouraging results.

Note
Renko-based strategies use the same data structures as time-based candlesticks. For example, we have used the Bars collection to retrieve our Renko bars as we would have done to retrieve candles from a candlestick chart. This feature allows for developing strategies that can be tested and run on any chart type without the need for any modifications. If we backtest our cBot on a candlestick chart, all operations will still be executed according to the specified rules.
Note
Renko-based strategies can be optimised just like candlestick-based strategies in the Optimisation tab.
In this guide, we have created a successful Renko-based cBot with minimal effort.