20 day historical volatility

After reading about how volatility (price movement) can impact a traders results, I had an epiphany. It might be worthwhile to trade the most volatile contracts, since trading profits come directly from price movement.

I've been researching how to program a 20 day historical volatility indicator in easylangauge.

So far, the base formula would look like:

Code:
StdDev( Log( average( (c/ c[1]) , 20 ) ) ) * SquareRoot(365) * 100

This seems like it would yield volatility as a percentage measurment so that one could compare how volatile one contract is to another.

Is my thinking incorrect?
 
For comparison purposes it makes more sense to just use the n day high/low range as a percent.


(n day high - n day low)/(n day high + n day low) * 200
 
Quote from jficquette:

(Average(atr,n)/average(c,n))*100

This seems correct. I'll try this when i get home. My original formula that I copied from some site doesn't give me a consistent result that lets me compare contracts.
 
Quote from WD40:

if you want to push it, do an ATR of H and L.

My goal was to be able to compare contract volatilities, so I need a method to put the value into a percentage term, rather than simply just comparing ATR of one contract to another.
 
In case anyone cares:

I was looking for:

Code:
TimeFrame = 20

( avgtruerange ( TimeFrame ) / C ) * 1000 ;

Than you jficquette

This gives u a % value that you can then use to compare how volatile an instrument is to anther one.
 
Back
Top