I'm not sure about Spydertrader's answer, but I dont think it answers the question you're asking... perhaps I misunderstand the question you're asking though.
To generalize, there are probably two volatility calculations you should be aware of.
1. Average true range. I think everyone already understands this one?
2. Statistical (or historical) volatility. This is the standard deviation of the returns, usually annualized. Note carefully that this calculation works on RETURNS not raw CLOSES. You may use percentage returns or continuously compounded returns without much difference.
I would interpret these two measures slightly differently:
1. shows you the average range the market is likely to cover in a single bar. That one's easy.
2. Is probably less intuitive: when this number is correctly annualized, it tells you what a 1 standard deviation price change would be one year from now, assuming normality. It is clearly a measure of close to close volatility, which can be very different than ATR.
You should play with these numbers a lot until they make sense. For instance, does it seem right to you that a stock can be bouncing around in a $5 range from 45 - 50, then viciously drop from 50 - 20 in two weeks, and the volatility would actually decrease as that happens? That's a very possible outcome under #2 if the breakdown happens in a straight line (think how closely the closing prices cluster around a best fit line drawn over a fairly short lookback period. Not the same measure, but a useful way to think about it.)
Blindly applying these measures will get you in trouble. The behavior of volatility is actually one of the most fascinating aspects of market analysis... and some of the most reliable profits come from systems designed to trade volatility. This is not a topic we can cover adequately in this thread, but it will reward deep study.
There are also other volatility measures... many more. For instance, you can calculate measure #2 using the C to O return to study overnight gaps, using L to H return to look at intraday volatility, can look at residuals from a regression line on closes... etc etc etc, but what is more important is what they are measuring rather than how.
Quote from xburbx:
any thoughts on what calculations to use for volatility according to different time frames?
example
i wouldnt use the same strat on an 8 week swing as i would an intraday trade correct?
trying to figure stocks to filter