Grid search for parameter values

Dear all, I would be very thankful for an advice! I have a code for an open economy model, with 6 parameters, and I need to perform a grid search for this parameters. I am just starting to use Dynare and absolutely unclear how to build the loop for the parameters search. I thought to write and external matlab file, but may be there is a better way? Would be very thankful for suggestions or/and examples!! Thanks a lot in advance!

You need an external Matlab file with a loop of set_param_value and resol. Details can be found at [Loop over parameters)

Thank you so very much for your fast reply and much-needed help! Very grateful!