This indicator will draw the median renko boxes directly on price chart. Just like the normal renko bricks construction, this one is not time dependent and top/bottom prices of bricks can last some times before a new one could be built upon the price change. The default brick size is 50 points, it can be adapted to any instrument with the parameter built in.
Coded by a request on the German forum.
The classic renko bricks indicator on chart can be download here in the library : http://www.prorealcode.com/prorealtime-indicators/renko-boxes-on-price-chart/
//parameters :
// boxsize = 50
once topprice = close
once bottomprice = close - boxsize*ticksize*2
if(close > topprice + boxsize*2) THEN
topprice = close
bottomprice = (topprice[1] + bottomprice[1])/2
ELSIF (close < bottomprice - boxsize*2) THEN
bottomprice = close
topprice = (topprice[1] + bottomprice[1])/2
ELSE
topprice = topprice
bottomprice = bottomprice
ENDIF
RETURN topprice as "box top", bottomprice as "bottom box"