Setting the minimum distance(bars) between the zig and zag

 

Good day,


I've quite a novice to trading robots and at the moment I'm playing around with the language.

I would like to know if it is possible to set the minimum distance between the previous high and the new low (vise versa)

regards

Reason: