When I was swing trading stocks, I used to use 2x the 20 day EMA of the Daily ATR, updated daily.
Worked well keeping me in the trades, but I found that if I used that exclusively as a trailing stop, I would give back too much profit. For example if I caught a nice move and hit 30% profits, it could fall back to 20% - 24% before taking me out.
After a few times, I took a leaf out of O'Neil's book and when profits reached 25%, I would tighten the stop to 1x ATR.
If you trade a longer timeframe and look at weekly or monthly charts, then use an equivalent ATR. I was trading off daily charts.