This is my first post to the programming section of any value. Everyone here is so wonderful that I wanted to at least be a help and not a complete drain on resources here.
This is not brain surgery code by any means, but I think the idea is a little clever and works rather well for something so simple.
I call it the Slither Stop, and it's a trailing stop based on the lowest low or highest high of X (adjustable) bars ago plus X (adjustable) ticks.
The benefit to this is that a nice trend trade might balance for a bit before continuing. This sort of stop is better than a hard set trailing stop in that it gives better wiggle room while tightening the stop when it matters
Feel free to use it. I hope it's of value to someone, you're all been a great help to me.