Automatic Fixed Scale with Top/Bottom Margins MT4 Indicator.
This code was written as an indicator.
It adds top and bottom margin to the chart. Both can be adjusted separately.
This gives some breathing space to top and bottom of the chart for drawing.
It’s changing chart scale to a fixed scale, then finds Highest and Lowest price visible on the chart. Then adjust those prices with selected margin, and those are used for Fixed scale.
Also added automatic switch to auto-scroll when the chart is moved.
Head Margin by default bigger is on top of the price is above mid-range (uptrend), and on the bottom if the price is below mid-range.