This so called renko indicator is an attempt to draw renko boxes on the price chart itself. It uses only close price so if a new box appear, wait for the current candle to close before making any trading decision. I would make another instance of this renko indicator with high and low values of candles instead.
//parameters :
// boxsize = 50
once topprice = close
once bottomprice = close - boxsize*ticksize*2
if(close > topprice + boxsize*2) THEN
topprice = close
bottomprice = topprice - boxsize*2
ELSIF (close < bottomprice - boxsize*2) THEN
bottomprice = close
topprice = bottomprice + boxsize*2
ELSE
topprice = topprice
bottomprice = bottomprice
ENDIF
RETURN topprice as "box top", bottomprice as "bottom box"