OPEN-SOURCE SCRIPT

Institutional Swing Pressure Engine [ISPE]

348
Description

Swing Pressure Engine [ISPE] is a multi-factor swing trading indicator designed to identify periods where directional pressure may be building before or during a larger price expansion.

Rather than relying on a single oscillator or breakout condition, ISPE evaluates several independent characteristics of market behavior and combines them into bullish and bearish pressure models.

The indicator analyzes five primary areas:


Compression — Measures whether volatility and price ranges are contracting relative to the instrument’s own historical behavior. It incorporates ATR, Bollinger Band width, realized volatility, rolling range contraction, candle-body compression, and Bollinger/Keltner squeeze conditions.

Flow — Estimates accumulation and distribution using price-and-volume proxies including closing location, relative volume, OBV behavior, directional volume, price response to volume, and absorption-style behavior. These calculations do not identify actual institutional orders; they infer buying and selling pressure from publicly available price and volume data.

Relative Strength — Measures the instrument against a broad-market benchmark and an optional sector benchmark. It evaluates relative performance, downside resilience, upside participation, and beta-adjusted relative behavior.

Structure — Evaluates the technical structure surrounding price, including proximity to support and resistance, moving-average alignment, higher-low/lower-high behavior, trend efficiency, and changes in rejection strength near important levels.

Multi-Timeframe Context — Uses higher-timeframe trend information to determine whether the current setup is aligned with the broader market structure.

These components are combined into separate Bull Pressure and Bear Pressure scores ranging from 0–100.

ISPE also calculates an Expansion score intended to represent the strength of conditions associated with a potential directional move. These values are composite heuristic scores and should not be interpreted as statistically calibrated probabilities.

Market States

The indicator classifies current conditions into states such as:

Dormant
Compressing
Accumulating
Distributing
Pressurized Bull
Pressurized Bear
Bull Pressure Divergence
Bear Pressure Divergence
Bull Expansion Imminent
Bear Expansion Imminent
Bull Expansion
Bear Expansion
Failed Breakout
Expansion Exhaustion

The purpose of these states is to make the underlying calculations easier to interpret at a glance.

Pressure Divergence

One of ISPE’s distinctive features is its Pressure Divergence model.

Pressure divergence occurs when price remains relatively compressed while the internal bullish or bearish pressure score changes significantly.

For example, price may remain nearly unchanged while accumulation, relative strength, structure, and compression increasingly favor the bullish side. ISPE can identify this as bullish pressure divergence before a traditional price breakout occurs.

The same logic is applied inversely to bearish setups.

How to Use

ISPE is primarily intended as a swing-trading research and confirmation tool.

A potentially favorable bullish setup may show:

Elevated compression
Strong accumulation
Strong relative strength
Favorable bullish structure
Positive higher-timeframe alignment
Bull pressure clearly exceeding bear pressure

A bearish setup uses the inverse conditions.

Higher pressure scores do not automatically represent trade signals. They are intended to identify environments that may deserve additional analysis.

The indicator also displays current structural support and resistance, along with potential entry, invalidation, and target reference levels when directional pressure becomes sufficiently elevated.

These levels are generated from current volatility and market structure and should be treated as analytical references rather than guaranteed entry or exit prices.

Adaptive Normalization


Many components of ISPE are normalized against the instrument’s own historical distribution using rolling percentile calculations.

This allows the indicator to adapt to securities with substantially different volatility characteristics.

For example, volatility that is unusually low for one stock may still be very high for another. ISPE therefore evaluates compression relative to the instrument itself rather than relying exclusively on fixed thresholds.

Relative Strength

By default, the indicator compares the current instrument with SPY and an optional sector ETF.

Users should change the sector benchmark where appropriate.

For example, a technology stock may reasonably be compared with XLK, while stocks from other industries should use a more appropriate sector benchmark.

Multi-Timeframe Data


ISPE incorporates higher-timeframe trend information into its pressure model.

Higher-timeframe calculations use confirmed historical higher-timeframe information to reduce repainting behavior from unfinished higher-timeframe bars.

Limitations

ISPE does not predict future prices and does not guarantee profitable trades.

The Bull Pressure, Bear Pressure, and Expansion readings are composite analytical scores rather than verified probabilities of future returns.

Accumulation and distribution calculations are based on price and volume proxies. The script cannot determine whether specific transactions originate from institutions, market makers, retail traders, or other market participants.

Support, resistance, entry, invalidation, and target levels change as market structure and volatility change.

Relative-strength calculations also depend on the selected benchmarks, so inappropriate benchmark selection can reduce their usefulness.

The indicator should therefore be used as one component of a broader trading process rather than as a standalone decision system.

Intended Use

ISPE was designed primarily for identifying and evaluating developing swing-trading environments where volatility compression, directional pressure, relative strength, and market structure begin aligning before or during price expansion.

Its primary purpose is not simply to identify completed breakouts, but to organize several underlying characteristics of a developing setup into a compact directional pressure model.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.