Recognize the degree of movement of the mouse

Good morning
I need a system that recognizes mouse movements in a project I’m making using unreal 4.26.
Rather than simply recognizing movement, it should be recognized only when the mouse is shaken left and right a few times.
I don’t know how to structure the Blueprint system in this case.

please give me advice

Thank you