Live Squeeze Momentum Demo

This demo uses the PineTS library to load the market data and calculate the indicators, and QFChart library for visualizing the results.


Loading Data ...

About Squeeze Momentum (SQZMOM) Indicator

What is Squeeze Momentum?

The Squeeze Momentum (SQZMOM) indicator, popularized by trader John Carter, is a powerful tool that combines Bollinger Bands and Keltner Channels to identify periods of consolidation (the "squeeze") and explosive breakout moves. When volatility contracts and price is coiling, the indicator signals a squeeze condition. When the squeeze releases, the momentum histogram shows the direction and strength of the breakout. This makes SQZMOM invaluable for timing entries at the start of new trends.

How Squeeze Momentum Works

The SQZMOM indicator consists of two main components:

Trading the Squeeze

The classic Squeeze Momentum trading strategy follows these steps:

  1. Identify the Squeeze - Wait for dots to appear, indicating low volatility consolidation
  2. Watch for the Release - When dots disappear, the squeeze is releasing (volatility expanding)
  3. Check Momentum Direction - Enter long if first histogram bar is green, short if red
  4. Ride the Trend - Stay in the trade as long as momentum continues in your direction
  5. Exit on Reversal - Exit when histogram changes color or momentum fades significantly

Advanced Squeeze Patterns

Squeeze Momentum with QFChart & PineTS

This live demo demonstrates real-time squeeze detection and momentum analysis using QFChart and PineTS. The indicator continuously calculates Bollinger Bands, Keltner Channels, and momentum values using PineTS's Pine Script runtime, while QFChart renders the interactive histogram with color-coded bars and squeeze markers. The chart updates every 3 seconds with live market data from Binance, allowing you to see squeeze conditions forming and releasing in real-time.

Technical Implementation

This demo showcases several advanced technical features:

Interpreting the Colors

Element Color Meaning
Histogram Dark Green Bullish momentum increasing
Histogram Light Green Bullish momentum decreasing
Histogram Dark Red Bearish momentum increasing
Histogram Light Red Bearish momentum decreasing
Dots Gray Normal squeeze active
Dots Black Extreme squeeze active

Use Cases

Getting Started

To implement Squeeze Momentum in your own application:

// Create PineTS instance
const pineTS = new PineTS(PineTS.Provider.Binance, 'BTCUSDC', '15m', 500);

// Stream indicator data
const stream = pineTS.stream(sqzmomIndicator, {
    pageSize: 100,
    live: true,
    interval: 3000
});

// Handle live updates
stream.on('data', (ctx) => {
    if (!chart) {
        // Initialize chart with historical data
        chart = new QFChart.QFChart(container, { /* options */ });
        chart.setMarketData(ctx.marketData);
        indicator = chart.addIndicator('SQZMOM', ctx.plots, {
            isOverlay: false,
            height: 25
        });
    } else {
        // Update with live data
        indicator.updateData(ctx.plots);
        chart.updateData([latestBar]);
    }
});

Learn More