pine-script-trailing-stop-requires-ratchet-pattern

ATR-based trailing stops in Pine Script must use math.max(nz(dynamicSL[1]), newStopLevel) to prevent the stop from moving backward when price retraces. Without the ratchet, the trailing stop recalculates on every bar and can move against the trade, defeating its purpose entirely.