PROTECTED SOURCE SCRIPT
已更新 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.
版本注释
Small range calculation error fixed.受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用它,没有任何限制 — 在此处了解更多信息。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用它,没有任何限制 — 在此处了解更多信息。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。