Forums › ProRealTime English forum › ProBuilder support › Volume Separator (help needed) › Reply To: Volume Separator (help needed)
03/10/2020 at 10:20 AM
#121659
Perhaps you mean that if the green bar is bigger than the red bar then the red bar is hidden. If so this version fixes that issue by changing the order they are drawn in.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
//o=open hi=high l=low c=close v=volume buying=v*(c-l)/(hi-l) selling=v*(hi-c)/(hi-l) if buying > selling then a = buying ra = 0 ga = 255 b = selling rb = 255 gb = 0 else a = selling ra = 255 ga = 0 b = buying rb = 0 gb = 255 endif return a coloured(ra,ga,0) style(histogram,2) ,b coloured(rb,gb,0) style(histogram,1) |