Use a suitable parabolic SAR as a trailing stop, but disregard directional changes and only use the values 'under' the bar, if going long.
Does this program crash for anyone else?
Separate names with a comma.