Change baseline of histogram from 0 to 50

 

Hi all, I am currently coding an indicator which requires the baseline of the histogram to draw from 50 instead of 0. In this case a value of 30 would be a bar drawn down from 50 to 30, instead of from 0 up to 30. Is this possible to do in MQL4?

I have been looking for a few days before asking, but couldn't find how to do it. I have attached 2 example images, the first shows how the indicator draws the bars with the baseline at 0 and the second image is how he bars should look if they were drawn correctly. I achieved this by subtracting 50 from the actual values to draw the bars correctly, but they are shifted down by 50. The bars should be drawn as in the second image, but around the 50 line.


Many thanks in advance

Files:
MQL4_01.jpg  12 kb
MQL4_02.jpg  12 kb
 
  1. Why did you post your MT4 question in the Root / MT5 Indicators section instead of the MQL4 section (bottom of the Root page?) General rules and best pratices of the Forum. - General - MQL5 programming forum
  2. Don't post a link to or attach a image, just insert the image
  3. For separate window indicators each histogram is from zero.
  4. Hide the histogram below the low as I did at How to Draw Cnadle chart in indicator_separate_window ? (XDXD) - MQL4 forum and set the indicator_minimum to 50
 

Apologies for posting in the wrong section, could a mod possibly move it?

Thanks for the advice and example, I will try it in my indicator.