Renko bars indicator fails

I am building an indicator using Renko bars and order flow with several sets. It is working ok when calculating for sets with 6 upto 21 bars but fails when I add another set calculating for 22 bars. When I run all sets, including the one calculating for 22 bars the indicator fails to plot for all sets but when I run for upto 21 bars, all is ok. What could be the problem. Kidly assist