Optimization loops for smoothing in Moving Averages

How to configure the nodes in optimization loops to discover the best parameter in Moving Averages to smooth line plots?