Efficiency Weighted Hull [BackQuant]

Efficiency Weighted Hull [BackQuant]
Overview
Efficiency Weighted Hull is a variation of the Hull Moving Average that adjusts the usual Hull lag-compensation term using Kaufman’s Efficiency Ratio.
A standard Hull construction uses:
This indicator keeps the same basic structure, but replaces the fixed compensation with an adaptive value between the selected Minimum Compensation and 1.
When price movement is relatively efficient, the filter behaves more like a standard Hull. When movement is less efficient, the fast-minus-slow compensation is reduced.
Efficiency Ratio
The script uses Kaufman’s Efficiency Ratio:
The result is limited between 0 and 1.
A value closer to 1 means price travelled relatively directly from its starting point to its ending point.
A value closer to 0 means price covered considerably more total distance than its net displacement.
The calculation is directional-neutral. Efficient movement can occur during either rising or falling markets.
Efficiency Power
Efficiency Power changes how the raw Efficiency Ratio is mapped into Hull compensation:
With a power of 1, the relationship is linear.
Values above 1 reduce compensation more aggressively at intermediate Efficiency values.
Values below 1 retain more compensation at intermediate values.
Hull Compensation
The final compensation value is:
This value controls how strongly the difference between the Fast and Slow WMA is extrapolated.
The adaptive raw Hull is:
When Compensation = 1:
which matches the normal Hull compensation step.
When Compensation = 0:
The result is then smoothed with a WMA using approximately the square root of the main Hull Length.
Minimum Compensation
Minimum Compensation sets the lowest amount of Hull extrapolation allowed.
At 0:
At higher values:
This allows the user to control how far the adaptive version is permitted to move away from the standard Hull construction.
Standard Hull Reference
The script also calculates the standard Hull:
This value is available in the Data Window for direct comparison with the adaptive version.
Structural Base
The ribbon uses a slower reference calculated as:
This is not the standard Hull itself.
It is a smoothed version of the Slow WMA used as a structural reference for the ribbon and optional Base plot.
Trend State
Trend direction is based on the slope of the Efficiency Weighted Hull.
The script measures:
A noise estimate is then calculated from an EMA of the Hull’s absolute one-bar changes:
The trend threshold is:
The state changes bullish when:
and bearish when:
If the slope remains inside the dead zone, the previous trend state is retained.
Slope Dead Zone
The dead zone prevents small Hull movements from immediately changing the trend colour.
Higher values require a larger slope relative to the recent movement of the Hull before the trend changes.
Lower values make the state more responsive.
Setting the Dead Zone to 0 effectively reduces the decision to the sign of the selected Hull slope.
Trend Strength
A separate visual Trend Strength value combines:
The slope component compares the selected Trend Lookback slope with three times the recent one-bar Hull movement estimate.
Trend Strength only affects the visual intensity of the gradient and glow.
It does not change:
Adaptive Ribbon
The optional ribbon fills the area between the Efficiency Weighted Hull and the slower structural Base.
It provides a visual reference for the separation between the adaptive Hull and the slower smoothed line.
The ribbon itself does not determine trend direction.
Price Gradient
The optional gradient fills the area between the Hull and the chart Close using several transparency layers.
Its colour follows the stored bullish or bearish trend state.
The strongest part of the gradient also responds to the visual Trend Strength value.
This is cosmetic only.
Glow
Glow width is based on the larger of:
The glow therefore scales with the current behaviour of the filter rather than using a fixed price distance.
It does not alter the underlying calculation.
Trend Candles
Optional candles are coloured according to the stored trend state:
The candle colour reflects the Hull trend regime, not whether each individual candle closed up or down.
Input Guide
Hull Length
Controls the Fast, Slow and final Hull smoothing lengths.
Efficiency Length
Lookback used to calculate net displacement versus total travelled distance.
Efficiency Power
Changes how strongly intermediate Efficiency Ratio values affect compensation.
Minimum Compensation
Sets the minimum Hull extrapolation retained during low-Efficiency conditions.
Trend Lookback
Number of bars used to measure Hull slope.
Slope Noise Length
Smoothing period used to estimate the Hull’s normal one-bar movement.
Slope Dead Zone
Controls how large the Hull slope must be relative to recent Hull movement before the trend state changes.
How to Read It
High Efficiency
Compensation moves toward 1 and the filter moves closer to the standard Hull construction.
Low Efficiency
Compensation is reduced toward the selected Minimum Compensation.
Bullish State
The Hull slope has exceeded the positive dead-zone threshold.
Bearish State
The Hull slope has fallen below the negative threshold.
State retained
The Hull slope is inside the dead zone, so the previous trend state remains active.
Data Window
The indicator exposes:
Limitations
Alerts
The script includes:
Summary
Efficiency Weighted Hull modifies the standard Hull Moving Average by making its fast-minus-slow compensation depend on Kaufman’s Efficiency Ratio.
More efficient movement increases compensation toward the standard Hull value, while less efficient movement reduces it toward the selected minimum.
The final Hull is then evaluated using a slope dead zone based on its recent movement, creating a persistent bullish or bearish trend state without changing the underlying adaptive Hull calculation.
Overview
Efficiency Weighted Hull is a variation of the Hull Moving Average that adjusts the usual Hull lag-compensation term using Kaufman’s Efficiency Ratio.
A standard Hull construction uses:
- Fast WMA = WMA(Source, Length / 2)
- Slow WMA = WMA(Source, Length)
- Hull Raw = 2 × Fast WMA - Slow WMA
- Final Hull = WMA(Hull Raw, √Length)
This indicator keeps the same basic structure, but replaces the fixed compensation with an adaptive value between the selected Minimum Compensation and 1.
When price movement is relatively efficient, the filter behaves more like a standard Hull. When movement is less efficient, the fast-minus-slow compensation is reduced.
Efficiency Ratio
The script uses Kaufman’s Efficiency Ratio:
- Displacement = |Source - Source[N]|
- Path = Sum of absolute one-bar Source changes over N bars
- Efficiency = Displacement / Path
The result is limited between 0 and 1.
A value closer to 1 means price travelled relatively directly from its starting point to its ending point.
A value closer to 0 means price covered considerably more total distance than its net displacement.
The calculation is directional-neutral. Efficient movement can occur during either rising or falling markets.
Efficiency Power
Efficiency Power changes how the raw Efficiency Ratio is mapped into Hull compensation:
- Adjusted Efficiency = Efficiency ^ Efficiency Power
With a power of 1, the relationship is linear.
Values above 1 reduce compensation more aggressively at intermediate Efficiency values.
Values below 1 retain more compensation at intermediate values.
Hull Compensation
The final compensation value is:
- Compensation = Minimum Compensation + (1 - Minimum Compensation) × Adjusted Efficiency
This value controls how strongly the difference between the Fast and Slow WMA is extrapolated.
The adaptive raw Hull is:
- Hull Raw = Fast + Compensation × (Fast - Slow)
When Compensation = 1:
- Hull Raw = 2 × Fast - Slow
which matches the normal Hull compensation step.
When Compensation = 0:
- Hull Raw = Fast
The result is then smoothed with a WMA using approximately the square root of the main Hull Length.
Minimum Compensation
Minimum Compensation sets the lowest amount of Hull extrapolation allowed.
At 0:
- Low Efficiency can remove the fast-minus-slow compensation almost completely.
At higher values:
- Some Hull compensation remains active even when Efficiency is low.
This allows the user to control how far the adaptive version is permitted to move away from the standard Hull construction.
Standard Hull Reference
The script also calculates the standard Hull:
- Standard Raw = 2 × Fast - Slow
- Standard Hull = WMA(Standard Raw, √Length)
This value is available in the Data Window for direct comparison with the adaptive version.
Structural Base
The ribbon uses a slower reference calculated as:
- Base = WMA(Slow WMA, √Length)
This is not the standard Hull itself.
It is a smoothed version of the Slow WMA used as a structural reference for the ribbon and optional Base plot.
Trend State
Trend direction is based on the slope of the Efficiency Weighted Hull.
The script measures:
- Slope = Current Hull - Hull[Trend Lookback]
A noise estimate is then calculated from an EMA of the Hull’s absolute one-bar changes:
- Slope Noise = EMA(|Hull - Previous Hull|, Slope Noise Length)
The trend threshold is:
- Threshold = Slope Noise × Slope Dead Zone
The state changes bullish when:
- Slope > Threshold
and bearish when:
- Slope < -Threshold
If the slope remains inside the dead zone, the previous trend state is retained.
Slope Dead Zone
The dead zone prevents small Hull movements from immediately changing the trend colour.
Higher values require a larger slope relative to the recent movement of the Hull before the trend changes.
Lower values make the state more responsive.
Setting the Dead Zone to 0 effectively reduces the decision to the sign of the selected Hull slope.
Trend Strength
A separate visual Trend Strength value combines:
- 60% Efficiency Ratio.
- 40% normalized Hull slope magnitude.
The slope component compares the selected Trend Lookback slope with three times the recent one-bar Hull movement estimate.
Trend Strength only affects the visual intensity of the gradient and glow.
It does not change:
- The Efficiency Ratio.
- Hull compensation.
- Trend state.
- Alerts.
Adaptive Ribbon
The optional ribbon fills the area between the Efficiency Weighted Hull and the slower structural Base.
It provides a visual reference for the separation between the adaptive Hull and the slower smoothed line.
The ribbon itself does not determine trend direction.
Price Gradient
The optional gradient fills the area between the Hull and the chart Close using several transparency layers.
Its colour follows the stored bullish or bearish trend state.
The strongest part of the gradient also responds to the visual Trend Strength value.
This is cosmetic only.
Glow
Glow width is based on the larger of:
- A fraction of the distance between the adaptive Hull and its structural Base.
- A fraction of the recent average one-bar Hull movement.
The glow therefore scales with the current behaviour of the filter rather than using a fixed price distance.
It does not alter the underlying calculation.
Trend Candles
Optional candles are coloured according to the stored trend state:
- Bullish = selected Bullish colour.
- Bearish = selected Bearish colour.
The candle colour reflects the Hull trend regime, not whether each individual candle closed up or down.
Input Guide
Hull Length
Controls the Fast, Slow and final Hull smoothing lengths.
Efficiency Length
Lookback used to calculate net displacement versus total travelled distance.
Efficiency Power
Changes how strongly intermediate Efficiency Ratio values affect compensation.
Minimum Compensation
Sets the minimum Hull extrapolation retained during low-Efficiency conditions.
Trend Lookback
Number of bars used to measure Hull slope.
Slope Noise Length
Smoothing period used to estimate the Hull’s normal one-bar movement.
Slope Dead Zone
Controls how large the Hull slope must be relative to recent Hull movement before the trend state changes.
How to Read It
High Efficiency
Compensation moves toward 1 and the filter moves closer to the standard Hull construction.
Low Efficiency
Compensation is reduced toward the selected Minimum Compensation.
Bullish State
The Hull slope has exceeded the positive dead-zone threshold.
Bearish State
The Hull slope has fallen below the negative threshold.
State retained
The Hull slope is inside the dead zone, so the previous trend state remains active.
Data Window
The indicator exposes:
- Efficiency Ratio.
- Hull Compensation.
- Fast WMA.
- Slow WMA.
- Adaptive Hull Raw value.
- Standard Hull.
- Trend Slope.
- Trend Strength.
Limitations
- The indicator uses current and historical price data and does not predict future direction.
- Efficiency Ratio measures path efficiency, not trend profitability or probability of continuation.
- Reducing Hull compensation can increase smoothing and lag during less efficient movement.
- High Efficiency does not guarantee that the current move will continue.
- The Slope Dead Zone can reduce frequent state changes but can also delay reversals.
- The visual ribbon, gradient and glow do not provide additional signal logic.
Alerts
The script includes:
- Efficiency Hull Bullish: trend state changes from bearish to bullish.
- Efficiency Hull Bearish: trend state changes from bullish to bearish.
Summary
Efficiency Weighted Hull modifies the standard Hull Moving Average by making its fast-minus-slow compensation depend on Kaufman’s Efficiency Ratio.
More efficient movement increases compensation toward the standard Hull value, while less efficient movement reduces it toward the selected minimum.
The final Hull is then evaluated using a slope dead zone based on its recent movement, creating a persistent bullish or bearish trend state without changing the underlying adaptive Hull calculation.
Join the Paid Space or get access to my invite only scripts at
backquant.com/
Or join the free discord discord.gg/RmVrJV67yE
backquant.com/
Or join the free discord discord.gg/RmVrJV67yE
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
Join the Paid Space or get access to my invite only scripts at
backquant.com/
Or join the free discord discord.gg/RmVrJV67yE
backquant.com/
Or join the free discord discord.gg/RmVrJV67yE
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.