TradingView Indicator · Complete Guide
Twin Peaks Oscillator — The Complete User Guide
A two-pole momentum oscillator with built-in invalidation levels and a volume-weighted VIDYA trend filter — so every setup tells you when to act, which way to lean, and where the idea is wrong.
By Sut P
Most oscillators give you a crossover and nothing else. You still have to decide whether the signal agrees with the trend, whether volume is behind it, and — the part most traders skip — at what price the setup has failed. Twin Peaks Oscillator answers all three on the chart.
Twin Peaks Oscillator combines a noise-filtered momentum oscillator, dotted invalidation levels projected from every signal, and a volume-weighted VIDYA trend ribbon with a Delta Volume reading. A signal only becomes a qualified setup when all three agree. This guide explains how each piece works, how to get access on TradingView, and how traders put it to work.
Get Twin Peaks Oscillator for TradingView
Invite-only access added to your TradingView account — works on any symbol and timeframe.
Buy Twin Peaks Oscillator →What the Indicator Does
Every trade idea needs answers to three questions. Twin Peaks Oscillator assigns one component to each:
| Question | Component | Where it appears |
|---|---|---|
| When? | Two-pole oscillator and signal-line crossovers | Oscillator pane |
| Which way? | VIDYA trend ribbon and Delta Volume | Price chart + dashboard |
| Where am I wrong? | Dotted invalidation levels and ✕ marks | Price chart |
One indicator, two panes. The oscillator lives in its own pane below price; the ribbon, invalidation levels, and entry labels draw directly on your price chart. You add it once and get both.
How the Oscillator Works
The oscillator is built in three steps:
- Measure deviation. How far price has stretched from its own moving average over the Deviation Length.
- Normalize it. That deviation is scaled against its own recent volatility, so a reading of +1.0 means the same thing on MNQ as it does on Bitcoin or Apple — on any timeframe.
- Two-pole filter it. The normalized series is smoothed with a two-pole filter (2-pole Butterworth by default, or a cascaded dual-pole exponential smoother). Two-pole filtering strips far more bar-to-bar noise than a single moving average for similar lag — which is what keeps the oscillator's turns clean instead of jittery.
The signal line is a lagged copy of the oscillator (4 bars by default). When the oscillator crosses its signal line, momentum has turned.
Reading the colors
Blue — oscillator above its signal line. Bullish momentum.
Purple — oscillator below its signal line. Bearish momentum.
Thin light-blue line — the signal line (can be hidden).
Reading the scale
| Level | Zone | What it means |
|---|---|---|
| +1.0 | Extreme overbought | Price is unusually stretched above its mean. Exhaustion risk is high. |
| +0.5 | Overbought | Upside is extended. The shaded band between +0.5 and +1.0 marks the zone. |
| 0 | Midline | Price at balance with its mean. |
| −0.5 | Oversold | Downside is extended. The shaded band between −0.5 and −1.0 marks the zone. |
| −1.0 | Extreme oversold | Price is unusually stretched below its mean. Capitulation risk is high. |
Signals and Invalidation Levels
A buy signal (blue triangle) prints when the oscillator crosses above its signal line. A sell signal (purple triangle) prints when it crosses below. Full-size, full-color triangles are qualified setups that passed every filter; small, dimmed triangles are raw crossovers that didn't. You can hide the dimmed ones.
The invalidation level
Every signal projects a dotted line onto the price chart:
- Buy signals — the level sits at the low of the signal candle. If price trades back down to it, the bullish idea has failed.
- Sell signals — the level sits at the high of the signal candle. If price trades back up to it, the bearish idea has failed.
The line extends forward bar by bar until one of four things happens: price hits it, an opposite signal appears, a newer same-side signal replaces it, or it reaches the maximum length (150 bars by default).
When price hits the level, a red ✕ prints at that price and the line stops. That setup is done — the ✕ is your visual record that the idea was wrong, and a matching small ✕ appears in the oscillator pane.
Tuning the level to your style
Level Anchor switches from the signal candle to the swing extreme over a lookback (wider, more room). ATR Buffer pushes the level beyond the wick by a fraction of ATR to avoid stop-hunts. Invalidation Trigger chooses between a touch (strict) and a close beyond the level (forgiving).
The VIDYA Trend Ribbon and Delta Volume
VIDYA — the Variable Index Dynamic Average — is a moving average that changes speed with the market. When price moves efficiently in one direction, it speeds up and tracks closely. When price chops sideways, it slows down and ignores the noise.
Twin Peaks uses a volume-weighted version: price moves on heavy volume count for more than moves on light volume, so the average responds to real participation rather than thin drift. The default length is 34.
The ribbon
ATR bands around the VIDYA form a trailing ribbon on your price chart:
Green — bullish trend. The trailing band sits below price and only ratchets up.
Red — bearish trend. The trailing band sits above price and only ratchets down.
The ribbon flips only when price closes through the trailing band — a deliberate choice so a single wick doesn't flip your trend read.
Delta Volume
Delta Volume compares volume on up-candles with volume on down-candles, from −100% (all selling) to +100% (all buying). It answers a simple question: is the money behind this move?
- Since Trend Start (default) — measures from the bar the ribbon last flipped. It tells you whether the current trend has been built on buying or selling.
- Rolling Window — measures over a fixed number of recent bars (34 by default). Steadier early in a new trend.
⚠ Symbols without volume
Many forex and CFD feeds on TradingView report no volume. On those symbols Delta Volume falls back to counting up-candles against down-candles, and the dashboard labels the reading (proxy). The volume filter is much less meaningful there — consider turning off Require Delta Volume on those charts.
Qualified Setups and Entry Timing
A crossover becomes a qualified setup only when every filter agrees:
| Condition | Long | Short |
|---|---|---|
| Signal | Oscillator crosses above signal line | Oscillator crosses below signal line |
| Oscillator level | Below +0.5 | Above −0.5 |
| VIDYA ribbon | Green | Red |
| Delta Volume | ≥ +20% | ≤ −20% |
Every threshold is adjustable, and the trend and volume filters can each be switched off.
Want fewer, stricter setups?
The default levels let through most crossovers that agree with the trend. For reversal-only setups, set Long: Signal Must Occur Below to −0.5 and Short: Signal Must Occur Above to +0.5. Now a long only qualifies when it turns up from oversold, and a short only from overbought.
The entry delay
A qualified setup doesn't trigger immediately. The entry fires a set number of bars after the signal candle closes — 2 by default — giving the move time to prove itself:
Signal bar
Crossover qualifies. Invalidation level is set. Entry is pending.
Bar +1
Waiting. The setup must survive — no invalidation, no opposite crossover.
Bar +2 closes
LONG label prints on the chart and the entry alert fires.
If price hits the invalidation level or the oscillator crosses back before the trigger bar, the pending entry is cancelled and no alert fires. Set the delay to 0 to trigger on the signal bar itself.
Getting Access on TradingView
Twin Peaks Oscillator is an invite-only TradingView script. There's nothing to download or install — access is added directly to your TradingView account:
- Purchase Twin Peaks Oscillator on PriceIsKing.com.
- Send us your TradingView username (the name on your TradingView profile, not your email) through the contact form below.
- Once access is granted, open any chart in TradingView and click Indicators.
- Select Invite-only scripts, then click Twin Peaks Oscillator to add it.
Send Your TradingView Username →
Access works on TradingView desktop, web, and mobile, on any symbol and timeframe.
The Dashboard
A compact panel in the oscillator pane summarizes the current state at a glance:
- Trend — the VIDYA ribbon direction (Bullish / Bearish).
- Δ Volume — the current Delta Volume percentage, colored when it clears your threshold.
- Oscillator — the exact oscillator reading.
- Zone — Neutral, Overbought, Oversold, or Extreme.
- Last Event — the most recent setup and its status: Pending, Triggered, or Invalidated.
Move it to any corner, or hide it, from the Appearance settings.
Setting Up Alerts
Twin Peaks includes seven alert conditions:
| Alert | Fires when |
|---|---|
| ① Long Entry | A qualified long survives the entry delay. |
| ② Short Entry | A qualified short survives the entry delay. |
| ③ Long Setup Qualified | A buy signal passes all filters (before the delay). |
| ④ Short Setup Qualified | A sell signal passes all filters (before the delay). |
| ⑤ Buy Signal (Raw) | Any bullish crossover, filtered or not. |
| ⑥ Sell Signal (Raw) | Any bearish crossover, filtered or not. |
| ⑦ Setup Invalidated | Price hits an active invalidation level. |
To create one:
- Click the Alert (clock) icon in TradingView, or press Alt + A.
- Set Condition to Twin Peaks, then pick the alert from the list.
- Set Trigger to Once Per Bar Close.
- Choose your notifications (app, email, webhook) and click Create.
Detailed messages for bots and webhooks
Choose Any alert() function call as the condition instead, and you'll get one alert that covers entries and invalidations, with the symbol, timeframe, entry price, invalidation level, and Delta Volume in the message — ready to send to a webhook.
Full Settings Reference
| Setting | Default | What it does |
|---|---|---|
| ① Oscillator | ||
| Source | Close | Price input for the oscillator. |
| Deviation Length | 25 | Lookback for measuring and normalizing deviation from the mean. |
| Filter Length | 20 | Two-pole smoothing. Higher = smoother and slower. |
| Filter Type | Butterworth | Butterworth or Dual-Pole EMA. |
| Signal Line Lag | 4 | Bars of lag for the signal line. Lower = more signals. |
| Show Signal Line | On | Shows or hides the signal line and cloud. |
| ② Signals & Invalidation | ||
| Show Buy / Sell Arrows | On | Triangles in the oscillator pane. |
| Show Unqualified Signals | On | Dimmed triangles for crossovers that failed a filter. |
| Show Invalidation Levels | On | Dotted lines on the price chart. |
| Show Invalidation Marks (✕) | On | ✕ where a level is hit. |
| Levels Drawn For | All Signals | All signals, or qualified setups only. |
| Level Anchor | Signal Bar | Signal-candle low/high, or swing extreme. |
| Swing Lookback | 5 | Bars scanned when the anchor is Swing Extreme. |
| ATR Buffer | 0.0 | Extra distance beyond the anchor, in multiples of ATR(14). |
| Invalidation Trigger | Touch | Touch (wick) or Close Beyond. |
| Max Level Length | 150 bars | A level retires after this many bars. |
| Opposite Signal Retires Level | On | A sell signal ends the active long level, and vice versa. |
| ③ VIDYA Trend Ribbon | ||
| Show VIDYA Ribbon | On | Green/red ribbon on the price chart. |
| VIDYA Length | 34 | Base length of the adaptive average. |
| Momentum Length | 20 | Lookback for the volume-weighted efficiency measure. |
| Band ATR Length | 100 | ATR period for the trailing bands. |
| Band Multiplier | 2.0 | Band width. Higher = fewer trend flips. |
| Delta Volume Mode | Since Trend Start | Since Trend Start or Rolling Window. |
| Rolling Window Length | 34 | Bars used in Rolling Window mode. |
| ④ Entry Filter & Alerts | ||
| Require VIDYA Trend Alignment | On | Longs need a green ribbon, shorts a red one. |
| Require Delta Volume | On | Applies the Delta Volume threshold. |
| Delta Volume Threshold | 20% | Longs need ≥ +threshold, shorts ≤ −threshold. |
| Long: Signal Must Occur Below | 0.5 | Maximum oscillator value for a qualified long. |
| Short: Signal Must Occur Above | −0.5 | Minimum oscillator value for a qualified short. |
| Entry Delay | 2 bars | Bars after the signal close before the entry triggers (0–10). |
| Cancel Pending Entry if Invalidated | On | Drops the entry if its level is hit during the delay. |
| Show Entry Labels | On | LONG / SHORT labels on the price chart. |
| ⑤ Appearance | ||
| Colors | Blue / purple / green / red | Bullish, bearish, signal line, ribbon, and ✕ colors. |
| Glow Effect | On | Soft glow behind the oscillator line. |
| Show Dashboard / Position | On / Top Right | Dashboard visibility and corner. |
How Traders Use Twin Peaks
These are illustrations of how the tool is commonly interpreted — not signals or recommendations. Always apply your own plan and risk management.
Pullbacks in a trend
With the defaults, qualified setups favor the trend: longs on a green ribbon, shorts on a red one. The oscillator times the end of the pullback, the ribbon confirms the bigger direction, and Delta Volume confirms buyers or sellers are still in control.
Turns from extremes
Tighten the levels to −0.5 / +0.5 and only turns from oversold or overbought qualify. Crossovers from beyond ±1.0 mark the most stretched conditions — exactly where the name comes from: momentum peaks, then turns.
The invalidation level as your stop reference
The dotted level is a ready-made, objective answer to "where is this wrong?" Many traders place their protective stop at or just beyond it, and size the position from the distance between entry and level.
Reading the ✕ marks
A cluster of ✕ marks against one direction tells you momentum signals are failing there — often a sign of a range or a stronger opposing trend. Treat repeated invalidations as information, not just losses.
Automating with webhooks
Use the Any alert() function call alert to push entries and invalidations — with the entry price and level in the message — to a webhook for journaling, notifications, or your own execution setup.
Tips and Best Practices
- Always alert on bar close. Crossovers can appear and disappear while a candle is still forming. Once Per Bar Close avoids alerts on signals that never finish.
- Give the ribbon history. The trailing bands need about 100 bars to initialize with default settings. On a fresh chart, scroll back or load more data.
- Hide what you don't use. Once you trust the filters, turn off unqualified signals and draw levels for qualified setups only for a cleaner chart.
- Match the filter to the timeframe. Faster charts often benefit from a shorter Filter Length; higher timeframes from a longer one. Change one setting at a time.
- Mind the delay. By the trigger bar, price may have moved away from the invalidation level. Check the entry-to-level distance before sizing.
Frequently Asked Questions
Does it repaint?
Signals are based on confirmed bar closes. While a bar is still forming, a crossover can appear and then disappear — that's normal for any close-based indicator. Once the bar closes, the signal is fixed. Use Once Per Bar Close for alerts.
Is this the Bill Williams "twin peaks" setup?
No. The classic twin peaks pattern uses two peaks on the Awesome Oscillator. Twin Peaks Oscillator is its own tool: a two-pole filtered momentum oscillator with invalidation levels and a volume-weighted trend filter.
Why don't I see the VIDYA ribbon?
The ribbon needs enough bars to build its ATR bands (about 100 by default). Scroll back or load more history. Also check that Show VIDYA Ribbon on Chart is on.
A setup qualified, but no entry alert fired. Why?
During the entry delay, either price hit the invalidation level or the oscillator crossed back. Both cancel the pending entry. The dashboard's Last Event shows what happened.
Why does Delta Volume say "(proxy)"?
The symbol has no volume data, so the indicator counts up-candles against down-candles instead. Consider turning off Require Delta Volume on those symbols.
Does it work on stocks, futures, crypto, and forex?
Yes — any symbol and timeframe on TradingView. The volume filter works best on markets with real volume data.
Can I see or edit the source code?
No. Twin Peaks Oscillator is a protected invite-only script. Every setting you need is adjustable from the indicator's settings window.
Does it place trades?
No. It's a charting and alerting indicator with no order-execution logic. Any trades are placed by you or by tools you connect to its alerts.
Ready to add it to your charts?
Purchase, send your TradingView username, and start trading with clear invalidation levels.
Buy Now → Send TradingView Username →Risk disclaimer: Twin Peaks Oscillator is an analytical charting tool for TradingView. It is provided for informational and educational purposes only and does not constitute financial, investment, or trading advice, nor a recommendation to buy or sell any instrument. Trading futures, stocks, crypto, forex, and other leveraged products involves substantial risk of loss and is not suitable for every investor. No indicator predicts future price movement, and past performance is not indicative of future results. You are solely responsible for your own trading decisions and risk management. TradingView is a trademark of TradingView, Inc.; PriceIsKing.com is not affiliated with TradingView. PriceIsKing.com is a product of Vulture Data Solutions Inc.
