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"
You must be logged in to post a comment.
Hi Nicolas,
I have tried to import on current V10.2 and it may not work as an overlay ? Unless I am doing it wrong as I am new to this.
Is it possible to do the renko calculation from a fixed date in history, as opposed to calculating from current candle of which it will give slightly different values each time?
Thanks in advance
Salut Nicolas, Je regarde cette indicateur très intéressant par le fait qu'il est superposé sur le graph, je trouve cette approche intéressante. Merci pour ton partage et ton travail ;-)