Can an indicator perform an automatic zoom of the y axis by choosing y min level as the min value of the candlesticks (incl. wicks) on the chart, and similarly the y max level as the max value of the candlesticks? If so, how can this be coded used Pine Scripts?
This could be the solution written in Matlab (but I obviously need it in Pine Script):
ymin = min(close)
ymax = max(close)
plot(...)
ylim([ymin ymax])