OPEN-SOURCE SCRIPT

Breakout/Consolidation Filter [jwammo12]

This indicator acts as a filter for determining recent breakouts and consolidations in price.

The first way to use the indicator is with a short lookback period. It then will paint yellow most of the time, with red marking a sharp recent breakdown in price and green marking a sharp breakout in price. This can be used to follow the breakout, or to fade it.

The second way to use the indicator is a long lookback period. This will change the output to be colored most of the time, with small sections of yellow. The yellow indicators areas where price has not made a large move in a while, or periods of consolidation. This can then be used to plan reversal trades, or follows any new trend.

The blue line is a Average True Range Percent Rank, when this value is high, it means that breakouts are less likely to trigger, since price has been moving rapidly recently, and a relative breakout would have to be a large move. When the line is low, breakouts will trigger more easily, since price has been moving relatively slowly
Average True Range (ATR)breakoutconsolidationflaggingTrend AnalysisVolatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Software Engineer and FX, Options, Crypto Trader. Previously worked at large options market maker. If you like my scripts and would like to donate:
Bitcoin: 179ETrGo3FCVcnBV8i1uc4J8YHFRknYytz
Eth: 0x73d59A8214FD70053aF37E9700692e25de441245

Disclaimer