pinescripts Technical Analysis Tools Best Trailing Stop Shows a trailing stop calculated from high/lows combined with an ATR based offset, displayed as a stepline.