volume profle
Forums › ProRealTime English forum › ProBuilder support › volume profle
- This topic has 11 replies, 4 voices, and was last updated 7 years ago by robert123.
-
-
04/28/2017 at 10:43 AM #33825
In an attempt to get volume profile on the chart I have been working on the code below. It works on tick charts at the moment.
It is work in progress.
Any constructive are comments welcome!
Robert
12345678910111213141516171819202122232425262728293031//////////////////////////////////////////////////////////////defparam CALCULATEONLASTBARS=1000bi=intradaybarindexi=11//define first time factorfactor=bi/11if bi=(i*factor) thenfactor=round(factor)endifif factor<>factor[1] thenb=biendifcount=0while b=b[1] docount=count[1]+1breakwendcounter=round(count)ii=0for ii=0 to counter[10] doif counter>counter[1] thenDRAWRECTANGLE(((summation[2](volume[1]+volume[0]))/1000)+barindex[0],(close[40]), barindex[counter], close[40]-.3)coloured(0,255,0)DRAWRECTANGLE(((summation[2](volume[0]+volume[1]))/1000)+barindex[0], (close[40]), barindex[counter], close[40]-.3)coloured(255,0,0)endifbreaknextreturn1 user thanked author for this post.
04/28/2017 at 1:01 PM #3385304/28/2017 at 1:09 PM #3386004/28/2017 at 4:39 PM #3389204/28/2017 at 4:51 PM #3389304/28/2017 at 5:08 PM #3389605/04/2017 at 4:06 PM #3454705/06/2017 at 12:50 PM #34694Hi Nicolas,
Working on it!
Will update when I have something, but might have to send it via email first as the discription might be a bit complex. But on the whole I think it could, with a bit of input from you and others, quite be interesting.
R
05/06/2017 at 4:55 PM #34717Nicolas,
here is another version, I have made some notes to hopefully explain the thinking behind it.
R
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556defparam CALCULATEONLASTBARS=1800bi=intradaybarindexi=11 /////define first time factor ///factor=bi/11///if bi=(i*factor) then///factor=round(factor)endif /////// this is the time unit i.e 11 barsif factor<>factor[1] thenb=bi ///endifcount=0 ///while b=b[1] docount=count[1]+1 ///breakwend ///counter=round(count)ii=0//barlenghtavpl=(((volume[counter])/avp)-((volume[1[counter]])/avp))avp=average[10](volume)//bardepthBdp=.15for ii=counter[0] to counter[10] doif counter[0]>counter[1] thenif close[0]>high[1] thenDRAWRECTANGLE (avpl+barindex[0],(close[0]), barindex[counter], close[0]-bdp)coloured(0,255,0)endifif close[0]<high[1] thenDRAWRECTANGLE(avpl+barindex[0], (close[0]), barindex[counter], close[0]-bdp)coloured(255,0,0)endifendifbreaknext///'barindex[counter]' gives the box's overall size, this is dictated by the underlying barindex counter, this warps the volume's detail, something that needs working on, below is an attempt!for ii=counter[0] to counter[10] doif count[0]<>count[1] thenif volume[1]<>volume[0] and close[0]>high[1] thenDRAWRECTANGLE (avpl+barindex[0],(close[0]), barindex[round((count/8)*1)+1], close[0]-bdp)coloured(0,255,0)endifif volume[1]<>volume[0] and close[0]<high[1]thenDRAWRECTANGLE(avpl+barindex[0], (close[0]), barindex[round((count/8)*1)+1], close[0]-bdp)coloured(255,0,0)endifendifbreaknext//'barindex[round((count/8)*1)+1]' this is the attempt! Trying to get the volume to'float in the bar'-Sometimes it comes out the back-not sure why...return close//if you want the study 'on price make this invisable.3 users thanked author for this post.
05/07/2017 at 11:43 AM #3475105/07/2017 at 6:28 PM #34781I don’t understand what it should show… any screenshot?
05/08/2017 at 8:07 AM #34795Ciccio,
Please see the above screen shot provided by Nicolas.
R
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on