After a large candle closes, the recalculated trailing stop loss (TSL) would sometimes be higher than the candle's low (vice-versa for shorts). This led to the TSL not calculating anymore, causing issues with plots and alerts. This problem has been fixed: a dotted lines will now show in such cases and alerts will trigger correctly.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.