gabri

Renko box on price with volumes

Category: Indicators By: gabri Created: February 13, 2019, 10:01 AM
February 13, 2019, 10:01 AM
Indicators
2 Comments
Renko box on price with volumes

This indicator will be OBE as soon as the new version of prorealtime will be released (Renko charts will have volumes showing according to the teaser) but it will be still useful for all the traders that don’t want to switch completely to a chart that ignore time. The indicator draws the volume of the exchanged shares for the period depicted by the box.

Blue skies!!

//percbox=1
//mm=3
//period=14

if barindex>1 and barindex<=(period) then
 boxsize=average[barindex](range)
else
 boxsize = percbox*average[period,MM](TR(close))
endif
if barindex<=1 then
 boxsize=range
endif
once topprice = high
once bottomprice = topprice-boxsize//close - boxsize

i=1
while (close>topprice+(i*boxsize)) do

 if (close<topprice+((i+1)*boxsize)) then
  topprice=topprice+i*boxsize
  bottomprice=topprice-boxsize
 endif
 i=i+1
wend

j=1
while (close<bottomprice-(j*boxsize)) do
 if (close>bottomprice-((j+1)*boxsize)) then
  bottomprice=bottomprice-j*boxsize
  topprice=bottomprice+boxsize
 endif
 j=j+1
wend



if topprice>topprice[1] then
 green=210
 red=0
 long=1
 if long=1 and long[1]=-1 then
  DRAWTEXT("#con#", barindex, bottomprice[1]*0.995) coloured (210,0,0)
  con=round(volume/1000)
  ref=con
 endif
 if long=1 and long[1]=1 then
  DRAWTEXT("#ref#", barindex, bottomprice[1]*0.995) coloured (100,100,100)
  ref=round(volume/1000)
 endif
endif

if topprice<topprice[1] then
 green=0
 red=210
 long=-1
 if long=-1 and long[1]=1 then
  DRAWTEXT("#con#", barindex, topprice[1]*1.005) coloured (0,0,200)
  con=round(volume/1000)
 endif
 if long=-1 and long[1]=-1 then
  DRAWTEXT("#ref#", barindex, topprice[1]*1.005) coloured (100,100,100)
  ref=round(volume/1000)
 endif
endif

DRAWRECTANGLE(barindex, topprice, barindex+1, bottomprice) coloured (red,green,0)
if topprice=topprice[1] then
 con=con+round(volume/1000)
 ref=ref+round(volume/1000)
endif
RETURN

Download
Filename: Mio-Renko-ATR-box-and-volume.itf
Downloads: 507
gabri
gabri Master
Code artist, my biography is a blank page waiting to be scripted. Imagine a bio so awesome it hasn't been coded yet.
Author’s Profile

Comments

Slowlyslowly
7 years ago
#

can u just help me with the exact definition of percbox , mm and period to understand will allow me to amend correctly for my needs - many thanks for your feedback

Nicolas
8 years ago
#

Good job Gabri, I confirm that with the new ProRealTime v11, everyone will be able to use indicators on Renko charts. I'm in beta phase testing and it offers a lot of great new possibilities! I can not wait for everyone to benefit! :)

ProRealCode ProRealCode
Loading...