Volatility: ATR and realized volatility
- Lesson 4 of 5
- Indicators
- steps
- 7
- metrics taught
- 2
- Your test
- Not taken yet
About this lesson
What you'll learn
Volatility is how much the price swings, whatever direction it ends up going. You'll measure it two ways and use it to tell a quiet market from a wild one.
Same result, different ride
These two days both end exactly 1% higher. One gets there calmly. The other swings up and down all day.
That difference is volatility: how big the moves are along the way, whatever the final result. Switch between the two days and compare the size of the candles.
True range: the full size of a candle
A candle's size is usually its high minus its low. But if the price jumped between candles, that jump is part of the move too.
The true range takes the biggest of three distances: high to low, high to the previous close, and low to the previous close. Crypto trades nonstop, so each candle opens near the last close and the true range is almost always high minus low. Stocks pause overnight and can open with a gap. Switch markets to see the difference.
ATR: the average true range
ATR (average true range) is the average of the last N true ranges. The usual period is 14. It's in dollars, so it tells you how far BTC tends to move in one candle right now.
ATR says nothing about direction. It climbs when candles get bigger, up or down. Change the period: a short one reacts fast, a long one is smoother.
ATR against its own average
A $600 ATR is huge for one coin and tiny for another. Comparing ATR with its own recent average fixes that. ATR at or above 1.5× its average means candles are half again as big as usual, on any asset.
Here the average covers the previous 30 candles. Move the multiple and see when the ATR line reaches the chartreuse line.
Realized volatility: how spread out the moves are
Realized volatility looks at the small moves inside a window. Bots here take the twelve 5-minute returns inside the last hour and measure how spread out they are, using the standard deviation.
Make the swings bigger. The hour still ends about +0.5%, but realized volatility climbs with the size of the moves.
Your turn: rough patches
This is a day of 5-minute candles. The lower line is realized volatility over the last hour, updated every candle.
Set the threshold for realized volatility 1h at or above and replay the day. Each dot marks where the bot would fire. Under the chart, the same condition runs on the live feed.
Test what you learned
Three quick questions, then a bot to build.
Read the strategy and set up a bot that follows it, with the direction and the conditions it names and no others. The strategy also uses the price change from the first lesson. Passing depends on the build alone. Once it's right, the bot fires and you see what the market did next, which won't always go your way.
These lessons explain what each number measures. They are not trading advice, and the lesson charts use simulated data. Preview build: market data on this site is simulated.