Every parameter you tune on the full history is a small leak from the future. Walk-forward analysis limits the damage: optimise on one window, trade the next, roll forward, and only ever report the stitched out-of-sample results.
Keep the number of tunable parameters small and write down the candidate set before you start. If the best value sits on the edge of the grid, widen the grid rather than trusting the result.
A strategy that only works for one narrow parameter choice is describing the past. Look for plateaus, not peaks.