OPEN-SOURCE SCRIPT

Rolling Kinetic Energy [Velocity x Pace x Friction]

675
Volume, OrderFlow, CVD, Momentum, Volatility, Scalping, Physics

Description:

The Rolling Kinetic Energy oscillator translates the laws of physics into order flow analysis. Rather than viewing volume and price as separate entities, this tool treats the market as an object in motion, calculating the "Kinetic Energy" behind a price swing to determine its true physical momentum.

The Underlying Logic & Calculations:
In classical physics, Kinetic Energy is calculated as 1/2 * Mass * Speed^2. This script applies that exact formula using market data proxies over a strict, unanchored rolling window (default 5 bars):

Mass (Volume Flow): The script calculates the intra-bar Delta (buying volume vs. selling volume) based on price action relative to the open, high, low, and close. It sums this Delta over the rolling window, and takes the absolute value to represent the market's "Mass."

Speed (Price Pace): It calculates the net point change of the asset over the exact same rolling window and divides it by the window length. This output (points per bar) represents the "Speed" or pace of the market.

Kinetic Calculation: The engine computes the raw energy using the formula: 0.5 * Mass * (Pace ^ 2). Because squaring the pace removes the negative sign during a downtrend, the script intentionally reapplies the directional sign based on the original price pace (positive for uptrends, negative for downtrends).

Visual Features:

Histogram: Plots the directional Kinetic Energy. Electric Blue represents bullish kinetic energy, while Deep Orange represents bearish kinetic energy.

Zero Baseline: The equilibrium point where market energy flips.

Kinetic Smoothing Line: A 3-period Weighted Moving Average (WMA) layered over the histogram to smooth out erratic energy spikes and reveal the broader momentum trend.

How to Use It in Trading:
This tool is highly effective for fast-paced scalping on volatile indices.

Confirming Breakouts: A true, sustainable breakout requires high mass (volume) moving at high speed (price). When breaking a key level, a massive surge in Kinetic Energy confirms that heavy market participation is driving the move.

Spotting Hollow Moves: If price is drifting higher or lower but the Kinetic Energy histogram remains flat and close to the zero line, it indicates a "hollow" move—low mass and low speed. These moves are highly susceptible to sudden mean-reversion, making it a great filter for fading choppy, low-energy market conditions.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.