If your data is discrete then you can implement this relatively easily using a MATLAB Fcn block.
For an example of using a MATLAB Fcn block see the tutorial:
http://www.goddardconsulting.ca/simulink-using-embedded-matlab.html
or the documentation for that block.
Just have the block act as a buffer, keeping track of the previous n values, and outputing their max and/or min value.
If your data is not discrete then you'll most likely have to resort to writing an S-Function.
This is because there can potentially be a different number of data points in the sliding window each time the min/max needs calculating, and it's easier to keep track of time in an S-Function that a MATLAB Fcn block.
There a couple of examples of writing S-Functions at
http://www.goddardconsulting.ca/simulink-writing-sfunctions.html
or again, lots of examples in the Writing S-Functions Guide.
Phil.