OPEN-SOURCE SCRIPT
Updated

VCP + TTM Squeeze Breakout Detection Tool

156
This open-source script combines two powerful concepts into a single breakout detection tool:

1. **VCP (Volatility Contraction Pattern)**
Based on Mark Minervini’s principle of structured volatility contraction.
The script identifies low ATR environments combined with a strong trend filter using EMA 50, EMA 100, and EMA 200.
A pivot high is fixed using a rolling high from the last X candles.

2. **TTM Squeeze (inspired by Beardy_Fred's Pro version)**
This module compares Bollinger Bands to Keltner Channels.
When the Bollinger Bands fit inside the Keltner Channels, it signals volatility compression.
The script classifies the squeeze intensity into four stages using colored dots:
- **Green:** No squeeze
- **Black:** Light compression
- **Red:** Medium compression
- **Orange:** Strong compression

A linear momentum oscillator adds directional confirmation by plotting aqua bars above price if momentum is positive.

---

### **Signal Logic**

- **Yellow Dots (Setup Potential)**
Appear when VCP criteria are met **and** either momentum is bearish or the squeeze is still active (non-green).

- **Green Dots (Breakout Active)**
Appear only when:
- Price breaks above pivot high
- EMA filter is valid
- Squeeze has resolved (green)
- Volume is higher than the previous bar
- Momentum is positive

Breakout status is removed once volume AND true range drop below their respective short-term averages.

---

### **Visual Elements**

- 3 EMA Lines: EMA 50 (blue), EMA 100 (orange), EMA 200 (red)
- Pivot line (red), based on recent high
- Colored squeeze state (dots at zero line)
- Yellow dots (pre-breakout tension)
- Green dots (confirmed breakout)
- Aqua bars above price (momentum strength)

---

**Note:**
This script is for educational purposes only and does not constitute financial advice.
No alerts included yet. No external dependencies. No embedded advertising.

---

**License**
Portions of the TTM Squeeze code are derived from “Beardy Squeeze Pro” and are used under the terms of the Mozilla Public License 2.0.
mozilla.org/MPL/2.0/

Release Notes
Chart updated
The chart layout was updated to show only the native signals of this script.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.