PROTECTED SOURCE SCRIPT
Обновлено Ober Trend Oscillator [by Oberlunar]

The Ober Trend Oscillator by Oberlunar unifies a volume-weighted view of price with order-flow information in a single, disciplined signal. At its core is a Triple Hull Moving Average applied to the session VWAP. This pairing is intentional: the Hull family is widely used because its quadratic weighting and internal differencing reduce phase lag versus SMA/EMA while preserving a smooth, readable contour; running it on top of VWAP anchors the calculation to a price already “risk-weighted” by volume, which behaves in practice like a microstructural equilibrium level. Around VWAP, the indicator computes standard-deviation envelopes that provide statistical context; excursions to the far band against the prevailing direction often mark probabilistic excess and become the first checkpoint for signal qualification.
The order-flow module is built on a tick-rule Cumulative Volume Delta, the most robust choice when native bid/ask deltas are unavailable. Volumes are signed by up- or down-moves, cumulatively integrated, then smoothed by a configurable EMA. To make the series comparable across instruments and timeframes, the CVD is standardised via an adjustable z-score window. This normalisation matters because it reframes “push” and “exhaustion” as deviations from recent behaviour rather than absolute thresholds tied to each market’s idiosyncratic liquidity. When enabled, a pivot-based divergence engine searches for fresh local highs or lows in price that the CVD refuses to confirm and annotates the symbol Δ with the percentage size of the divergence on price, on CVD, or both. Quantifying divergence avoids binary, eye-ball readings and lets you compare the relative strength of signals over time.
Signal generation follows a two-stage logic. Stage one is regime detection by the THMA on VWAP. The slope of the long THMA defines the primary trend, while the instantaneous difference between the THMA and its own lag sets the “serpentine” colour that conveys the local direction of pressure. Using slope on the longer window is deliberate: trend-following practice shows that slope filters materially reduce false positives in choppy regimes. Stage two enforces contextual alignment between price and higher-timeframe VWAP bands. For a long, the THMA computed on the higher-timeframe VWAP must sit below the current curve and below the second lower deviation, consistent with either a mean-reverting excess or early re-accumulation; shorts are defined symmetrically. Volume-flow confirmation is then required through either a rising CVD, a supportive z-score, or a detected pivot divergence in the same direction. To discourage over-trading, signals alternate by design and a strict colour gate is applied: a green diamond is never printed on a red line and bullish divergences are not drawn when the serpentine indicates bearish pressure. This visual consistency is not cosmetic; it reduces cognitive dissonance between filters and execution signal and improves reading discipline.
Parameters are organised to make these choices explicit. The main THMA length controls the oscillator’s sensitivity to VWAP, while the “trend” and “long-term” lengths drive the slope filter, with the latter acting as the regime anchor. The higher timeframe used to compute THMA on VWAP is the context-alignment knob and enables true multi-period operation, which is essential in fractal markets such as crypto, FX and equity indices. The VWAP deviation multiplier sets the breadth of the statistical bands; values modestly below one are a deliberate default to keep excess detection sensitive without turning the envelopes into a very wide channel. The ATR window that drives the line’s thickness is not a visual gimmick: thickness adapts to volatility and communicates the movement’s energy at a glance, much like an adaptive envelope.
The CVD package offers full control. A dedicated timeframe lets you decouple order-flow estimation from the chart’s timeframe when a slower, more reliable read of pressure is preferred. The calculation mode can reference Close-to-Close for responsiveness or HL2 for slightly greater robustness to closing noise, depending on the instrument’s microstructure. EMA smoothing governs granularity, the slope lookback sets how many observations are required to validate an inflection, and the z-score length defines the statistical horizon for normalisation—longer windows make the signal steadier, shorter windows make it more tactical. The pivot divergence option with percentage sizing grades relevance rather than merely flagging presence. Measuring both the price change between pivots and the CVD change is intentional: the most actionable divergences exhibit not only directionally opposing shapes but also a quantitative mismatch between price and flow; putting the two numbers side by side clarifies whether price is outrunning flow or flow is reversing ahead of price.
On the attached weekly Bitcoin example, the turquoise serpentine highlights impulsive phases while red denotes retracement or distribution. Δ labels with “P:%” and “C:%” mark points where price sets a new extreme without a matching CVD extreme; the percentage annotation helps distinguish a trivial imbalance from a credible exhaustion. Diamonds appear only when their colour agrees with the serpentine, and their location relative to the higher-TF VWAP bands clarifies when the market stops pushing “with volume” and starts pushing “against volume”—often the operational cue that precedes mean reversion or a consolidation before the next impulse.
Three methodological choices deserve emphasis. The THMA-on-VWAP architecture addresses the classic lag-versus-noise trade-off by combining a low-lag smoother with a volume-anchored base series that reflects institutional execution practice. Z-scoring the CVD is consistent with a statistical reading of flow that reasons in deviations from expected behaviour rather than fixed thresholds, which is particularly relevant on assets with shifting liquidity regimes. Finally, the colour gate plus signal alternation mitigates the well-known clustering of false positives in sideways markets: you do not print green on red or red on green, and you do not fire the same direction twice in a row without an opposite transition, which avoids hammering into the same move.
Practical usage is straightforward. Select your trading timeframe and align context with a higher timeframe in the VWAP-THMA; tune the VWAP deviation multiplier to match the instrument’s excess profile; choose an equal or slower CVD timeframe to extract structural pressure; enable divergence sizing when you want to measure, not only see, the gap between price and flow. Signals can also be drawn on the main chart, so next to candles, you will see both the execution diamonds and Δ labels with their percentage sizes. If you work with higher-timeframe inputs via `request.security`, be aware that those series confirm only at their own close; you can require confirmation for both the higher-TF VWAP and CVD timeframes to eliminate any practical repaint. Integrated alerts tied to THMA+VWAP+CVD validation convert discretionary reading into a monitorable workflow consistent with systematic routines.
Known limitations are stated explicitly. Tick-rule CVD is an approximation and, while standard in the absence of native bid/ask deltas, it may diverge from “true” delta on venues with unusual execution dynamics; normalisation helps but does not eliminate this. Pivot divergences depend on swing definition and require sensitivity calibration to avoid over-signalling on erratic markets. By construction, the oscillator favours trending contexts with statistically motivated pullbacks; during prolonged congestion, signals will naturally thin out, and the standardised CVD becomes the primary discriminator.
In sum, the Ober Trend Oscillator is a dual-channel reader: the THMA-on-VWAP line tells you about regime and movement quality, and the normalised CVD tells you about the pressure sustaining that movement. When the two stories align, continuation probability improves; when they diverge, the Δ annotation quantifies the gap and offers an objective basis for judging whether you are seeing a healthy pause or an impending reversal. The integration of volume-weighted price, simple statistics, and order-flow makes the indicator genuinely multi-period, capable of scaling from intraday to swing without changing its visual language or its decision criteria.
Oberlunar 👁️⭐
The order-flow module is built on a tick-rule Cumulative Volume Delta, the most robust choice when native bid/ask deltas are unavailable. Volumes are signed by up- or down-moves, cumulatively integrated, then smoothed by a configurable EMA. To make the series comparable across instruments and timeframes, the CVD is standardised via an adjustable z-score window. This normalisation matters because it reframes “push” and “exhaustion” as deviations from recent behaviour rather than absolute thresholds tied to each market’s idiosyncratic liquidity. When enabled, a pivot-based divergence engine searches for fresh local highs or lows in price that the CVD refuses to confirm and annotates the symbol Δ with the percentage size of the divergence on price, on CVD, or both. Quantifying divergence avoids binary, eye-ball readings and lets you compare the relative strength of signals over time.
Signal generation follows a two-stage logic. Stage one is regime detection by the THMA on VWAP. The slope of the long THMA defines the primary trend, while the instantaneous difference between the THMA and its own lag sets the “serpentine” colour that conveys the local direction of pressure. Using slope on the longer window is deliberate: trend-following practice shows that slope filters materially reduce false positives in choppy regimes. Stage two enforces contextual alignment between price and higher-timeframe VWAP bands. For a long, the THMA computed on the higher-timeframe VWAP must sit below the current curve and below the second lower deviation, consistent with either a mean-reverting excess or early re-accumulation; shorts are defined symmetrically. Volume-flow confirmation is then required through either a rising CVD, a supportive z-score, or a detected pivot divergence in the same direction. To discourage over-trading, signals alternate by design and a strict colour gate is applied: a green diamond is never printed on a red line and bullish divergences are not drawn when the serpentine indicates bearish pressure. This visual consistency is not cosmetic; it reduces cognitive dissonance between filters and execution signal and improves reading discipline.
Parameters are organised to make these choices explicit. The main THMA length controls the oscillator’s sensitivity to VWAP, while the “trend” and “long-term” lengths drive the slope filter, with the latter acting as the regime anchor. The higher timeframe used to compute THMA on VWAP is the context-alignment knob and enables true multi-period operation, which is essential in fractal markets such as crypto, FX and equity indices. The VWAP deviation multiplier sets the breadth of the statistical bands; values modestly below one are a deliberate default to keep excess detection sensitive without turning the envelopes into a very wide channel. The ATR window that drives the line’s thickness is not a visual gimmick: thickness adapts to volatility and communicates the movement’s energy at a glance, much like an adaptive envelope.
The CVD package offers full control. A dedicated timeframe lets you decouple order-flow estimation from the chart’s timeframe when a slower, more reliable read of pressure is preferred. The calculation mode can reference Close-to-Close for responsiveness or HL2 for slightly greater robustness to closing noise, depending on the instrument’s microstructure. EMA smoothing governs granularity, the slope lookback sets how many observations are required to validate an inflection, and the z-score length defines the statistical horizon for normalisation—longer windows make the signal steadier, shorter windows make it more tactical. The pivot divergence option with percentage sizing grades relevance rather than merely flagging presence. Measuring both the price change between pivots and the CVD change is intentional: the most actionable divergences exhibit not only directionally opposing shapes but also a quantitative mismatch between price and flow; putting the two numbers side by side clarifies whether price is outrunning flow or flow is reversing ahead of price.
On the attached weekly Bitcoin example, the turquoise serpentine highlights impulsive phases while red denotes retracement or distribution. Δ labels with “P:%” and “C:%” mark points where price sets a new extreme without a matching CVD extreme; the percentage annotation helps distinguish a trivial imbalance from a credible exhaustion. Diamonds appear only when their colour agrees with the serpentine, and their location relative to the higher-TF VWAP bands clarifies when the market stops pushing “with volume” and starts pushing “against volume”—often the operational cue that precedes mean reversion or a consolidation before the next impulse.
Three methodological choices deserve emphasis. The THMA-on-VWAP architecture addresses the classic lag-versus-noise trade-off by combining a low-lag smoother with a volume-anchored base series that reflects institutional execution practice. Z-scoring the CVD is consistent with a statistical reading of flow that reasons in deviations from expected behaviour rather than fixed thresholds, which is particularly relevant on assets with shifting liquidity regimes. Finally, the colour gate plus signal alternation mitigates the well-known clustering of false positives in sideways markets: you do not print green on red or red on green, and you do not fire the same direction twice in a row without an opposite transition, which avoids hammering into the same move.
Practical usage is straightforward. Select your trading timeframe and align context with a higher timeframe in the VWAP-THMA; tune the VWAP deviation multiplier to match the instrument’s excess profile; choose an equal or slower CVD timeframe to extract structural pressure; enable divergence sizing when you want to measure, not only see, the gap between price and flow. Signals can also be drawn on the main chart, so next to candles, you will see both the execution diamonds and Δ labels with their percentage sizes. If you work with higher-timeframe inputs via `request.security`, be aware that those series confirm only at their own close; you can require confirmation for both the higher-TF VWAP and CVD timeframes to eliminate any practical repaint. Integrated alerts tied to THMA+VWAP+CVD validation convert discretionary reading into a monitorable workflow consistent with systematic routines.
Known limitations are stated explicitly. Tick-rule CVD is an approximation and, while standard in the absence of native bid/ask deltas, it may diverge from “true” delta on venues with unusual execution dynamics; normalisation helps but does not eliminate this. Pivot divergences depend on swing definition and require sensitivity calibration to avoid over-signalling on erratic markets. By construction, the oscillator favours trending contexts with statistically motivated pullbacks; during prolonged congestion, signals will naturally thin out, and the standardised CVD becomes the primary discriminator.
In sum, the Ober Trend Oscillator is a dual-channel reader: the THMA-on-VWAP line tells you about regime and movement quality, and the normalised CVD tells you about the pressure sustaining that movement. When the two stories align, continuation probability improves; when they diverge, the Δ annotation quantifies the gap and offers an objective basis for judging whether you are seeing a healthy pause or an impending reversal. The integration of volume-weighted price, simple statistics, and order-flow makes the indicator genuinely multi-period, capable of scaling from intraday to swing without changing its visual language or its decision criteria.
Oberlunar 👁️⭐
Информация о релизе
A small bug fix on labels.Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Track my trades and access the indicators I run live:
t.me/+azHozalsRellODlk
t.me/+azHozalsRellODlk
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Track my trades and access the indicators I run live:
t.me/+azHozalsRellODlk
t.me/+azHozalsRellODlk
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.