I strongely suggest to draw one of them as a line, so the visual impact will be clearer.
sd59 #:
I don't really like that format.
I think I can get the format I want by using 4 buffers and then using a reverse indices order if val2 > val1 but this seems a bit over the top for a simple indicator.
Is this a limitation or am I missing a much simpler solution?
You can change order of drawing of the buffers by their indexing in SetIndexBuffer, but some buffers will always overlap the others (depending from their values on corresponding bars), so your solution is to use different width for lines, so that thinner histograms can look through or above thicker ones.
You can choose DRAW_LINE and DRAW_HISTOGRAM instead of having them both as histogram.
Yashar Seyyedin #:
You can choose DRAW_LINE and DRAW_HISTOGRAM instead of having them both as histogram.
You can choose DRAW_LINE and DRAW_HISTOGRAM instead of having them both as histogram.
thansk guys I solved it using 3 buffers.
SetIndexBuffer(0,val1); SetIndexBuffer(1,val2); SetIndexBuffer(2,temp); SetIndexStyle(0,DRAW_HISTOGRAM,0,2); SetIndexStyle(1,DRAW_HISTOGRAM,0,2); SetIndexStyle(2,DRAW_HISTOGRAM,0,2); SetIndexEmptyValue(0,0.0); SetIndexEmptyValue(1,0.0); SetIndexEmptyValue(2,0.0); for(i=0; i<limit; i++) { temp[i] = 0; val1[i]=(Volume[i]+(Close[i]-Open[i])/ndigit)/2; val2[i]=(Volume[i]-val1[i]); if(val2[i] > val1[i]){temp[i] = val1[i];val1[i] = 0;} }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I have a very simple histogram indicator displayed in a subwindow. It displays fine unless val2 > val1 then the val2 histogram 'covers' the val1 indicator colour.
Is there a simple fix to this? Is there a way to send val2 colour to the background so that both histogram colours show on this condition?