I fear you haven't read neither the documentation linked above about
params nor the sample which shows how optimization works and which actually shows the
params syntax just like any other.
What you actually mean with the same name is unclear. Thousands of functions have arguments which share the name and that doesn't make them incompatible.
slow_period as params and then assign them to whatever indicator you have.