• Get $40 off VIP by signing up for a free account! Sign Up

4 & 20 Period Historical Volatility - Reversals and Trend Exhaustion

autoloader

Member
VIP
This simple indicator highlights bars in green when the 4 period historical volatility is less than half of the 20 period historical volatility. It highlights when volatility has declined and is, therefore, likely to increase in the near future. In practice, it can show when prices are about to reverse trend or when the existing trend has exhausted itself.

This indicator's based on observations of volatility Larry Connors made 20+ years ago in his book “Connors On Advanced Trading Strategies.” Connors points out that prices don't revert to a mean but volatility does. Prices may do a “random walk” but volatility is more predictable. When the 6 day or 10 day historical volatility is less than half of the 100 day historical volatility, volatility tends to revert to the mean with increased volatility by way of price reversals or just larger price swings.

Years ago, I noticed that the 6 or 10 day interval didn't work as well on stock indices as a 4 day interval did. With the intervals set at 4 and 20 days, the pattern seems to work well on some stocks too.

The basic trade signal is the following:
If the first red bar after a green bar trades through the high of the last green bar, go long.
If the first red bar after a green bar trades through the low of the last green bar, go short.

I wouldn't go purely off that, of course. I use it with Candlesticks, Bollinger Bands, the Hull MA, and other indicators.

I spot checked this indicator on other assets like currencies and other commodities and it seems to have mixed success. It works well on some securities and not so well on others. Also, it can work on one minute charts but on some of the longer intraday periods it doesn't seem to work at all.

jWCUV1h.png


ObrYRIE.png


I like how it called the absolute high and low in the Feb-Mar 2020 selloff.

fZr1wOV.png


BLWyekR.png


Here's a one minute chart of the S&P 500 from September.

PYylkvc.png


QQQ

mwDttz6.png



I know the code could be much better but it works and I've been too lazy to fix it up.

Code:
# 4 period historical volatility
def HV = stdev(log(close / close[1]), 4) * sqrt(252) * 100;
# 20 period historical volatility
def HV1 = stdev(log(close / close[1]), 20) * sqrt(252) * 100;

assignPriceColor(if HV/HV1<.5 then Color.Green else if HV/HV1>.5 then Color.Red else Color.White);
 
This simple indicator highlights bars in green when the 4 period historical volatility is less than half of the 20 period historical volatility. It highlights when volatility has declined and is, therefore, likely to increase in the near future. In practice, it can show when prices are about to reverse trend or when the existing trend has exhausted itself.

This indicator's based on observations of volatility Larry Connors made 20+ years ago in his book “Connors On Advanced Trading Strategies.” Connors points out that prices don't revert to a mean but volatility does. Prices may do a “random walk” but volatility is more predictable. When the 6 day or 10 day historical volatility is less than half of the 100 day historical volatility, volatility tends to revert to the mean with increased volatility by way of price reversals or just larger price swings.

Years ago, I noticed that the 6 or 10 day interval didn't work as well on stock indices as a 4 day interval did. With the intervals set at 4 and 20 days, the pattern seems to work well on some stocks too.

The basic trade signal is the following:
If the first red bar after a green bar trades through the high of the last green bar, go long.
If the first red bar after a green bar trades through the low of the last green bar, go short.

I wouldn't go purely off that, of course. I use it with Candlesticks, Bollinger Bands, the Hull MA, and other indicators.

I spot checked this indicator on other assets like currencies and other commodities and it seems to have mixed success. It works well on some securities and not so well on others. Also, it can work on one minute charts but on some of the longer intraday periods it doesn't seem to work at all.

jWCUV1h.png


ObrYRIE.png


I like how it called the absolute high and low in the Feb-Mar 2020 selloff.

fZr1wOV.png


BLWyekR.png


Here's a one minute chart of the S&P 500 from September.

PYylkvc.png


QQQ

mwDttz6.png



I know the code could be much better but it works and I've been too lazy to fix it up.

Code:
# 4 period historical volatility
def HV = stdev(log(close / close[1]), 4) * sqrt(252) * 100;
# 20 period historical volatility
def HV1 = stdev(log(close / close[1]), 20) * sqrt(252) * 100;

assignPriceColor(if HV/HV1<.5 then Color.Green else if HV/HV1>.5 then Color.Red else Color.White);
so does the 253 come from the trading days? what if you change the period to something else for intraday? have you explored that?
for example a 390 for a 5 minute period to look back a week?
 
so does the 253 come from the trading days? what if you change the period to something else for intraday? have you explored that?
for example a 390 for a 5 minute period to look back a week?
Yes, the 252 is trading days in one year. I haven't yet tried it with 390 on a 5 minute chart but that's a good idea.
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
207 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top