The method you refer to is for use with shift. Since shift of max/min values is undeterministic (it might vary how far is the last max or min), it is more convenient to use indicator calls that return value arrays. So you can apply the same type of method calls as with Stochastic indicator (either by time interval or by candle interval).
If you just want to print the values, have a look at the following example:
https://www.dukascopy.com/wiki/index.php ... ing_valuesinstead of
bbands, make a
fractal call and of course change the optional input values.