The following code is an expert advisor that will create a range bar chart from a M1 chart.
You will have to open the respective offline chart (File > Open offline > M3).
The difference between a renko chart and a range bar chart is that it doesn't wait for the body to go x pips over / under the previous one. It just shows the last x pips move whatever is the direction.