OPEN-SOURCE SCRIPT
Gaspard98 - Carter Squeeze On Chart / Signals

# Gaspard98 — Carter Squeeze On Chart / Signals
## Overview
The **Carter Squeeze** is an on-chart implementation of John Carter's well-known *TTM Squeeze* concept, rebuilt as a clean overlay with discrete **Buy / Sell signals**. It detects periods of volatility compression — when a market coils up before an expansion move — and fires a directional signal the moment that energy is released.
Unlike a classic momentum-pane squeeze, everything here lives directly on the price chart: compression state, momentum bias, trend, and entries are all visible at a glance, with no second window to monitor.
---
## The Concept Behind the Squeeze
Carter's method is built on a single, elegant observation: **when Bollinger Bands contract inside the Keltner Channels, the market is in a low-volatility "squeeze."** Volatility is mean-reverting, so a tight squeeze tends to be followed by a sharp expansion. The trade is not the squeeze itself — it's the *release* (the "fire"), taken in the direction of momentum.
This script measures that compression at **three intensity levels** (TTM Squeeze Pro style) rather than a single on/off state, so you can distinguish a mild coil from an extreme one.
---
## How It Works
**1. Compression detection**
Bollinger Bands (default 20, 2.0) are compared against three Keltner Channels built from the average True Range, at multipliers 2.0 / 1.5 / 1.0:
- **No squeeze** — bands are outside the widest Keltner (market is expanding)
- **Low compression** — mild coil
- **Mid compression** — moderate coil
- **High compression** — the tightest state; bands sit inside the narrowest channel
**2. Momentum**
A linear-regression oscillator measures price relative to the mid-channel (the classic Carter momentum formula). Its sign defines directional bias (bullish / bearish) and its slope defines whether momentum is accelerating or fading.
**3. Signals**
The default trigger is the **squeeze fire**: the bar where compression releases. A **BUY** prints if momentum is positive at the release, a **SELL** if it is negative. An optional alternative mode triggers on a **momentum zero-cross** instead.
---
## Signal Logic & Filtering
- **Trigger — Squeeze fire** (default): entry on the release of a compression, in the direction of momentum. This is the purest expression of Carter's method.
- **Trigger — Momentum cross**: entry when momentum crosses the zero line, regardless of squeeze state.
- **Require accelerating momentum** (default on): only allows a BUY when momentum is rising and a SELL when it is falling, filtering out weak, fading releases.
- **Confirm on close** (default on): signals evaluate only on closed bars, making them **non-repainting**. Disable it for faster, intrabar-reactive signals at the cost of mid-bar flicker.
---
## Visual Features
- **Buy / Sell labels** plotted directly below / above the bars.
- **Squeeze state dots** along the bottom of the chart, color-coded by intensity:
- green = no squeeze
- blue = low compression
- orange = mid compression
- red = high compression
- **Background tint** while a squeeze is active (color reflects intensity).
- **Candle coloring** driven by momentum (bright = accelerating, faded = fading).
- **Trend line** (the basis) colored by momentum bias.
- **Status table** in the top-right corner showing squeeze level, momentum value + direction, current bias, and the last signal.
- Optional **Bollinger + Keltner band overlay** so you can visualize the compression itself.
---
## Settings
**Squeeze**
- Source, Bollinger length & multiplier
- Keltner length and the three compression multipliers (low / mid / high)
**Signals**
- Trigger mode (Squeeze fire / Momentum cross)
- Require accelerating momentum
- Confirm on close (non-repaint)
**Visual**
- Toggle bands, background, dots, candle coloring, trend line, status table
- Custom Buy / Sell colors
---
## How to Use It
1. Watch for a tightening sequence — dots moving from green toward orange and red signal building compression.
2. The **brighter the candles** and the larger the momentum value, the stronger the directional conviction.
3. A signal prints when the squeeze releases. Treat the release as a *timing* tool, not a standalone system — combine it with structure, higher-timeframe trend, and your own risk management.
4. Tighter compressions (red) before a fire tend to precede the cleanest expansions.
Works on any market and timeframe (futures, indices, FX, crypto, equities). Higher timeframes generally yield fewer but cleaner signals.
---
## Alerts
Two alert conditions are built in — **BUY** and **SELL** — ready to attach in TradingView's alert dialog. The default message embeds the ticker and close price and can be reshaped for any webhook or automation endpoint.
---
## Notes
- Default Bollinger / Keltner parameters follow Carter's classic 20-period configuration; adjust to your instrument's volatility profile.
- With *Confirm on close* enabled, signals are fixed once the bar closes and do not repaint.
---
*This indicator is a technical-analysis tool provided for educational and informational purposes only. It is not financial advice and does not guarantee any outcome. Trading involves substantial risk of loss — always test thoroughly and manage risk according to your own plan.*
## Overview
The **Carter Squeeze** is an on-chart implementation of John Carter's well-known *TTM Squeeze* concept, rebuilt as a clean overlay with discrete **Buy / Sell signals**. It detects periods of volatility compression — when a market coils up before an expansion move — and fires a directional signal the moment that energy is released.
Unlike a classic momentum-pane squeeze, everything here lives directly on the price chart: compression state, momentum bias, trend, and entries are all visible at a glance, with no second window to monitor.
---
## The Concept Behind the Squeeze
Carter's method is built on a single, elegant observation: **when Bollinger Bands contract inside the Keltner Channels, the market is in a low-volatility "squeeze."** Volatility is mean-reverting, so a tight squeeze tends to be followed by a sharp expansion. The trade is not the squeeze itself — it's the *release* (the "fire"), taken in the direction of momentum.
This script measures that compression at **three intensity levels** (TTM Squeeze Pro style) rather than a single on/off state, so you can distinguish a mild coil from an extreme one.
---
## How It Works
**1. Compression detection**
Bollinger Bands (default 20, 2.0) are compared against three Keltner Channels built from the average True Range, at multipliers 2.0 / 1.5 / 1.0:
- **No squeeze** — bands are outside the widest Keltner (market is expanding)
- **Low compression** — mild coil
- **Mid compression** — moderate coil
- **High compression** — the tightest state; bands sit inside the narrowest channel
**2. Momentum**
A linear-regression oscillator measures price relative to the mid-channel (the classic Carter momentum formula). Its sign defines directional bias (bullish / bearish) and its slope defines whether momentum is accelerating or fading.
**3. Signals**
The default trigger is the **squeeze fire**: the bar where compression releases. A **BUY** prints if momentum is positive at the release, a **SELL** if it is negative. An optional alternative mode triggers on a **momentum zero-cross** instead.
---
## Signal Logic & Filtering
- **Trigger — Squeeze fire** (default): entry on the release of a compression, in the direction of momentum. This is the purest expression of Carter's method.
- **Trigger — Momentum cross**: entry when momentum crosses the zero line, regardless of squeeze state.
- **Require accelerating momentum** (default on): only allows a BUY when momentum is rising and a SELL when it is falling, filtering out weak, fading releases.
- **Confirm on close** (default on): signals evaluate only on closed bars, making them **non-repainting**. Disable it for faster, intrabar-reactive signals at the cost of mid-bar flicker.
---
## Visual Features
- **Buy / Sell labels** plotted directly below / above the bars.
- **Squeeze state dots** along the bottom of the chart, color-coded by intensity:
- green = no squeeze
- blue = low compression
- orange = mid compression
- red = high compression
- **Background tint** while a squeeze is active (color reflects intensity).
- **Candle coloring** driven by momentum (bright = accelerating, faded = fading).
- **Trend line** (the basis) colored by momentum bias.
- **Status table** in the top-right corner showing squeeze level, momentum value + direction, current bias, and the last signal.
- Optional **Bollinger + Keltner band overlay** so you can visualize the compression itself.
---
## Settings
**Squeeze**
- Source, Bollinger length & multiplier
- Keltner length and the three compression multipliers (low / mid / high)
**Signals**
- Trigger mode (Squeeze fire / Momentum cross)
- Require accelerating momentum
- Confirm on close (non-repaint)
**Visual**
- Toggle bands, background, dots, candle coloring, trend line, status table
- Custom Buy / Sell colors
---
## How to Use It
1. Watch for a tightening sequence — dots moving from green toward orange and red signal building compression.
2. The **brighter the candles** and the larger the momentum value, the stronger the directional conviction.
3. A signal prints when the squeeze releases. Treat the release as a *timing* tool, not a standalone system — combine it with structure, higher-timeframe trend, and your own risk management.
4. Tighter compressions (red) before a fire tend to precede the cleanest expansions.
Works on any market and timeframe (futures, indices, FX, crypto, equities). Higher timeframes generally yield fewer but cleaner signals.
---
## Alerts
Two alert conditions are built in — **BUY** and **SELL** — ready to attach in TradingView's alert dialog. The default message embeds the ticker and close price and can be reshaped for any webhook or automation endpoint.
---
## Notes
- Default Bollinger / Keltner parameters follow Carter's classic 20-period configuration; adjust to your instrument's volatility profile.
- With *Confirm on close* enabled, signals are fixed once the bar closes and do not repaint.
---
*This indicator is a technical-analysis tool provided for educational and informational purposes only. It is not financial advice and does not guarantee any outcome. Trading involves substantial risk of loss — always test thoroughly and manage risk according to your own plan.*
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。