Detrended Oscillator Node
Detrended Price Momentum
Overview
The Detrended Oscillator is a momentum indicator that isolates short-term price movements by removing the long-term trend. Rather than measuring absolute momentum, it shows how current price deviates from its long-term tendency. This makes it especially valuable for identifying overbought/oversold conditions and local bottoms within larger trends.
By filtering out the trend component, the Detrended Oscillator reveals pure momentum cycles. It excels at identifying when a price rally is running out of steam or when selling pressure is exhausted, even while the main trend persists. This makes it ideal for timing entry and exit points within trending markets without fighting the primary trend direction.
Formula
Detrended Oscillator removes the trend to isolate momentum:
The key insight is the offset - it shifts the moving average to align with current price action, making deviations more meaningful. This timing adjustment makes the Detrended Oscillator much more useful than simple price minus SMA.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | number | 14 | Period for the moving average trend calculation. Shorter periods are more sensitive. |
| shift | number | 7 | Offset periods (typically half the main period). Controls lag compensation. |
| source | Node | Auto | The root data source node. Automatically detected from connected nodes. |
💡 Tip: The default 14/7 pairing matches the period/offset convention. For faster response (more signals), use 10/5. For smoother action (fewer false signals), use 21/10 or 28/14. Always keep the shift at approximately half the period for proper detrending.
Common Use Cases
1. Trend-Following Entry Timing
Use Detrended Oscillator to TIME entries within the direction of the main trend. If price is in an uptrend (confirms via SMA), wait for the Detrended Oscillator to dip below zero (pullback) then cross back above zero for entry. This keeps you aligned with the trend while catching local dips with favorable risk/reward.
2. Momentum Divergence Detection
The Detrended Oscillator is excellent for spotting divergences. When price makes higher highs but the oscillator makes lower highs, momentum is weakening - a bearish signal. Conversely, lower lows in price with higher lows in the oscillator is bullish. These divergence signals often precede significant trend reversals.
3. Scalp Trading in Ranges
In sideways/choppy markets, the Detrended Oscillator becomes a mean-reversion tool. Buy when the oscillator reaches extreme negative levels near support, sell when it reaches extreme positive levels near resistance. The oscillator naturally reverts toward zero as price mean-reverts. Quick trades with tight stops work well with this approach.
4. Exit Signal Generation
Use extreme oscillator readings as profit-taking signals. In an uptrend, when the Detrended Oscillator reaches its highest level in recent weeks/months, consider exiting a long position - price is far from the trend and ready for pullback. This helps lock in gains before momentum reversal.
Advantages & Limitations
Advantages
- •Isolates momentum from underlying trend effectively
- •Simple calculation - easy to understand and modify
- •Fast response to local momentum changes
- •Works well in trending markets for timing
- •Good divergence signals ahead of reversals
Limitations
- •Still lagging like all moving average-based indicators
- •Zero-line crosses can whipsaw in choppy markets
- •Removes information by filtering out trend component
- •Parameter sensitivity - shift value affects signals significantly
- •Not suitable for directional prediction - only momentum timing
Tips & Best Practices
💡 Combine with Trend Confirmation
ALWAYS confirm the main trend direction using a separate moving average (like SMA200). Only trade Detrended Oscillator signals that align with the primary trend. In uptrends, wait for negative oscillator readings then positive crosses. In downtrends, do the opposite. This keeps you with the trend, not against it.
📊 Use Extreme Levels for Exits
Track the indicator's range in recent price action. When it reaches recent extremes (highest positive or most negative), that's an exit signal. Price has moved far from the trend and momentum is about to reverse. This removes emotion from exit decisions and improves profit-taking discipline.
⚡ Adjust Period for Timeframe
On 1-hour or 4-hour charts, use shorter periods like 10/5 for faster signals. On daily charts, the standard 14/7 works well. On weekly charts, try 21/10. The period should create roughly 3-5 oscillations per screen for optimal visual feedback and trading decisions.
⚠️ Watch for Trend Changes
When the Detrended Oscillator starts making consistently higher/lower extremes in the opposite direction of the trend, the trend itself is about to break. This is an early warning to reduce position size or prepare for reversal. The oscillator often shows weakness before price officially reverses.
Example Strategy
Here's a trend-following strategy using the Detrended Oscillator for timing:
Detrended Dip-Buying Strategy
1Setup
- →Add SMA(50) for trend identification
- →Add Detrended Oscillator with period 14, shift 7
- →Mark support and resistance levels
2Entry Conditions
- →Trend: Price above SMA(50) - uptrend confirmed
- →Pullback: Detrended Oscillator dips below zero
- →Trigger: Oscillator crosses back above zero
3Exit Rules
- →Detrended Oscillator reaches 20-day high (extreme bullish)
- →Or crosses back below zero (momentum died)
- →Or price closes below SMA(50)
4Risk Management
- →Stop below the pullback low or below support
- →Take first profit at resistance or SMA-based target
- →Trail remaining position with oscillator extreme exits
Related Nodes
SMA (Simple Moving Average)
Base component of Detrended Oscillator. Use for trend confirmation.
RSI (Relative Strength Index)
Alternative momentum oscillator with similar use cases.
ROC (Rate of Change)
Unbounded momentum measure. Less lag than Detrended Oscillator.
EMA (Exponential Moving Average)
More responsive trend alternative to SMA.