Screenshot Y axis

 

(I posted this a few days ago but it seems to have disappeared).

Does anyone know the formula used to generate the Y axis when taking a screenshot?

For example, if I take a screenshot of the past n bars, it set the Y axis based on the price range. What it seems to do is take the minimum and maximum price of the past n bars, then add space at the top and bottom of about 2.5% of the price range.

But I cant work out the exact formula. If any MT4 insider could tell me, Id be grateful.

Reason: