PROTECTED SOURCE SCRIPT
Aktualisiert Shark Efficiency

Shock! Indicator — Description
This indicator measures how efficient or inefficient each candle is compared to recent volatility. It uses two calculations:
Residual (R):
Compares the actual candle return to what would be expected based on an exponential weighted moving average (EWMA) of intraday variance.
Positive residuals mean the candle moved farther than expected (inefficient); negative residuals mean the move was smaller or more controlled (efficient).
Histogram (H):
Compares realized variance (RV) of recent candles to bipower variation (BV), which estimates what volatility should be if there were no large jumps.
A large positive histogram value means the candle was an inefficient “jump” relative to normal volatility.
A negative histogram value means the candle was efficient, moving in line with expected variance.
Both Residual and Histogram are plotted bar-by-bar, with green bars showing efficient moves and red bars showing inefficient moves.
How to read it:
Efficient bullish candle: Price closed up, Residual < 0, Histogram < 0.
Efficient bearish candle: Price closed down, Residual < 0, Histogram < 0.
Inefficient bullish candle: Price closed up, Residual > 0, Histogram > 0.
Inefficient bearish candle: Price closed down, Residual > 0, Histogram > 0.
This lets you see not just whether price moved, but whether that move was efficient (controlled, sustainable) or inefficient (overextended, unsustainable).
Inputs:
alpha sets the percentile for efficiency thresholds (default 0.10 = 10/90 bands).
lambda controls the decay speed of the EWMA used to smooth variance.
winCov sets the lookback window for realized/bipower variance.
shockLen and jumpLen control how many bars are used in the “shock” and “jump” tests.
Usage:
Inefficient spikes (large positive Residual + Histogram) often mark exhaustion or blowoff moves.
Efficient shifts in the opposite direction can confirm reversals.
The tool is designed for intraday trading, especially in futures and indices, to spot when price is moving in line with liquidity versus when it is stretched and vulnerable.
This indicator measures how efficient or inefficient each candle is compared to recent volatility. It uses two calculations:
Residual (R):
Compares the actual candle return to what would be expected based on an exponential weighted moving average (EWMA) of intraday variance.
Positive residuals mean the candle moved farther than expected (inefficient); negative residuals mean the move was smaller or more controlled (efficient).
Histogram (H):
Compares realized variance (RV) of recent candles to bipower variation (BV), which estimates what volatility should be if there were no large jumps.
A large positive histogram value means the candle was an inefficient “jump” relative to normal volatility.
A negative histogram value means the candle was efficient, moving in line with expected variance.
Both Residual and Histogram are plotted bar-by-bar, with green bars showing efficient moves and red bars showing inefficient moves.
How to read it:
Efficient bullish candle: Price closed up, Residual < 0, Histogram < 0.
Efficient bearish candle: Price closed down, Residual < 0, Histogram < 0.
Inefficient bullish candle: Price closed up, Residual > 0, Histogram > 0.
Inefficient bearish candle: Price closed down, Residual > 0, Histogram > 0.
This lets you see not just whether price moved, but whether that move was efficient (controlled, sustainable) or inefficient (overextended, unsustainable).
Inputs:
alpha sets the percentile for efficiency thresholds (default 0.10 = 10/90 bands).
lambda controls the decay speed of the EWMA used to smooth variance.
winCov sets the lookback window for realized/bipower variance.
shockLen and jumpLen control how many bars are used in the “shock” and “jump” tests.
Usage:
Inefficient spikes (large positive Residual + Histogram) often mark exhaustion or blowoff moves.
Efficient shifts in the opposite direction can confirm reversals.
The tool is designed for intraday trading, especially in futures and indices, to spot when price is moving in line with liquidity versus when it is stretched and vulnerable.
Versionshinweise
Small range calculation error fixed.Geschütztes Skript
Dieses Script ist als Closed-Source veröffentlicht. Sie können es kostenlos und ohne Einschränkungen verwenden – erfahren Sie hier mehr.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Geschütztes Skript
Dieses Script ist als Closed-Source veröffentlicht. Sie können es kostenlos und ohne Einschränkungen verwenden – erfahren Sie hier mehr.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.