OPEN-SOURCE SCRIPT
Kaspareit VCP + TTM Squeeze Pro

Kaspareit VCP + TTM Squeeze Pro
A combined tool for identifying volatility contractions and breakout setups. The VCP module (Volatility Contraction Pattern) detects contraction phases under trend filters, while the TTM Squeeze module evaluates compression via Bollinger Bands vs. Keltner Channels and adds a momentum oscillator. The result: clearly marked setup phases, pivot zones, and breakout signals.
What the indicator does
Logic explained (simplified)
Visualization & legend
Inputs (settings) and meaning
VCP inputs
TTM Squeeze inputs
Practical usage
Important notes & limitations
Tuning tips
Credits & license
Disclaimer
This indicator is for educational and informational purposes only. It is not investment advice. Trading involves significant risk. Always test on demo accounts and use proper risk management.
Author’s notes
For questions or feedback, please send a private TradingView message with your username.
A combined tool for identifying volatility contractions and breakout setups. The VCP module (Volatility Contraction Pattern) detects contraction phases under trend filters, while the TTM Squeeze module evaluates compression via Bollinger Bands vs. Keltner Channels and adds a momentum oscillator. The result: clearly marked setup phases, pivot zones, and breakout signals.
What the indicator does
- []Detects potential VCP setups through falling ATR/True Range relative to the recent minimum, combined with a 3-step EMA trend filter.
[]Fixes a pivot zone above price to act as breakout reference.
[]Classifies TTM Squeeze compression levels in 4 colors and checks momentum.
[]Plots VCP potential (yellow dots), active breakouts (green dots), EMAs, pivot level, momentum histogram, and squeeze status.
Logic explained (simplified)
- []EMA trend filter (3-step): Close must be above EMA 50/100/200, and EMAs must be properly aligned. Only then VCP signals are valid.
[]VCP contraction: Current ATR compared to the lowest ATR over VCP period with tolerance factor. If volatility is sufficiently low, contraction is valid.
[]VCP timer: After a valid VCP, a window (Max days after VCP) remains active for breakout evaluation.
[]Pivot zone: Highest high of last Pivot lookback bars is fixed as Pivot level (red line).
[]Squeeze classification: Bollinger Band width vs. Keltner Channels gives 4 states: Green = no squeeze, Black = low, Red = mid, Orange = high.
[]Momentum: Regression-based oscillator evaluates directional impulse relative to smoothed price range.
[]Breakout: Valid if within active VCP window, close > pivot, EMA filter true, squeeze green, volume > previous bar, momentum > 0. Then Breakout active is marked.
[]Exit logic: Breakout state ends if volume < short-term average and True Range < short-term average.
Visualization & legend
- []EMA Short/Mid/Long: 3 lines for trend filter.
[]Pivot level: Red line, breakout threshold.
[]VCP potential: Yellow dots below candles when VCP criteria + (Momentum < 0 or Squeeze ≠ green).
[]Breakout active: Green dots below candles while breakout conditions hold.
[]Momentum histogram: Columns above chart edge if momentum > 0.
[]Squeeze status: Colored dots at 0-line: Orange = high, Red = mid, Black = low, Green = no squeeze.
Inputs (settings) and meaning
VCP inputs
- []VCP period (default 30): Window to detect ATR minimum. Larger = stricter, fewer signals.
[]Pivot resistance (lookback) (default 10): Bars used to fix pivot high. Lower = earlier, more sensitive levels.
[]Volatility tolerance (default 1.1): Factor above ATR minimum still considered “contraction.” Lower = stricter.
[]Volume comparison (Exit) (default 5): Length of average volume for breakout exit.
[]True Range comparison (Exit) (default 5): Length of TR average for breakout exit.
[]Max days after VCP (default 50): Time window for breakout after VCP. - EMA short/mid/long (default 50/100/200): Trend filter. Longer = smoother, fewer signals.
TTM Squeeze inputs
- []TTM Squeeze length (default 20): Base length for BB/KC.
[]Bollinger Band STD Multiplier (default 2.0): Width of BB. Higher = wider, fewer squeezes. - Keltner Channel #1/#2/#3 (default 1.5/2.0/3.0): Channel widths for low/mid/high squeeze classification.
Practical usage
- []Setup phase: Watch for aligned EMAs with price above all EMAs. Yellow dots = VCP potential, especially valuable if squeeze is red/orange.
[]Pivot observation: Red pivot level = breakout threshold.
[]Breakout trigger: Close above pivot, squeeze green, positive momentum, volume > previous bar → Breakout active.
[]Monitoring: Breakout state ends if volume and TR fall below short-term averages. This is a signal of weakening momentum, not an order exit rule. - Timeframes & markets: Works on all TFs with reliable data. Daily and H4 work well for trending stocks. For FX/CFDs, volume is tick volume.
Important notes & limitations
- []This is an indicator, not a strategy. It does not place orders or backtest results.
[]Pivot level and VCP state recalculate per bar. Pivot may move if new highs form.
[]Momentum histogram is scaled relative to recent range, not comparable across markets.
[]Squeeze colors are state labels, not trade signals. Always combine with trend filter. - No alerts included. You may add alertcondition if needed. Logic provides clear states (VCP potential, breakout active, squeeze status).
Tuning tips
- []See more contractions: Lower TTM length (e.g. 14–18), increase BB Mult slightly, or reduce KC Mult.
[]Stricter filter: Increase VCP period, lower Volatility tolerance, use longer EMAs. - Earlier breakouts: Reduce Pivot lookback, but risk more false signals.
Credits & license
- []VCP components: © Kaspareit-Trading.
[]TTM Squeeze components based on “Beardy Squeeze Pro” © Beardy_Fred. - TTM Squeeze code licensed under Mozilla Public License 2.0. License: mozilla.org/MPL/2.0/
Disclaimer
This indicator is for educational and informational purposes only. It is not investment advice. Trading involves significant risk. Always test on demo accounts and use proper risk management.
Author’s notes
For questions or feedback, please send a private TradingView message with your username.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน