Dynare does not provide a ready-to-use method of solving your problem. You’ll have to do some programming.
First you need to solve your model at a higher order, to take into account time-varying volatility. A third order approximation is usually needed to get a satisfactory solution, see e.g. this post and the Fernandez-Villaverde et al. paper.
Then, once you’re able to get a meaningful solution of your model for a given set of parameters, you need to compute your policy objective (e.g. a weighted average of the variances of the variables of interest, as in OSR).
Since you’re now able to compute your objective for a given set of parameters, you can do a grid search over the parameter space to find a maximum for your objective. Of course, there are some computational challenges involved, especially if you have many parameters over which to search (the so-called curse of dimensionality).