OPEN-SOURCE SCRIPT
WaveTrend Oscillator [Axe]

## WaveTrend Oscillator [Axe]
**A clean, display-only momentum oscillator — built on the classic WaveTrend with Ehlers low-lag smoothing, an honest four-quadrant divergence engine, strong/weak turning-point tiers, and a multi-timeframe resonance dashboard. It shows you market structure; it does not tell you to buy or sell.**
---
### What it is
WaveTrend Oscillator [Axe] is a refined version of the well-known WaveTrend oscillator, rebuilt on Pine v6. It visualizes **momentum, trend accumulation, and divergence structure** so you can read the state of a market at a glance.
It is a **decision-support / display tool**, by design:
- ❌ No buy/sell arrows
- ❌ No alerts
- ❌ No "90% win-rate" claims
- ✅ Clean structure you can actually read
- ✅ Honest about which signals are reliable and which are not
- ✅ Every layer independently toggleable
You stay in full control of every decision. Think of it as a well-built gauge, not an autopilot.
---
### How it works (the idea, in plain terms)
1. **Price transform** — the math runs on `log(close)`, so a +5% move and a −5% move are treated symmetrically. This matters for crypto's wide range.
2. **Channel deviation** — it measures how far price has stretched from its own moving baseline, then normalizes that by the recent average stretch. The result is a smooth oscillator that swings around zero (roughly between −1 and +1).
3. **Ehlers SuperSmoother core** — instead of a plain EMA, the signal line is smoothed with John Ehlers' 2-pole SuperSmoother filter plus an improved EMA. This gives **less lag and cleaner turns** than a vanilla WaveTrend.
4. **The two lines** — the blue **Signal (sig)** line is the core momentum; the orange **MA** is a short average of it, used as the trigger reference.
5. **Turning points** — when the signal crosses its MA back from an extreme (with recent momentum confirming), the indicator marks a momentum **bottom** or **top**. These are *structural measurement points*, not trade signals.
6. **Divergence** — at each turning point, it compares the current momentum extreme and price extreme against the previous one to classify a divergence.
---
### What you see on the chart
| Layer | What it looks like | Meaning |
|---|---|---|
| **Signal (sig)** | Blue line | Core WaveTrend momentum |
| **MA** | Orange line | Smoothed signal — the trigger reference |
| **OB / OS levels** | Horizontal lines at ±0.65 (default) | Overbought / oversold thresholds |
| **OB / OS zones** | Green / orange fills | Highlight when momentum is in extreme territory |
| **Histogram** | Light-blue / orange area | `sig − ma`; blue when bullish, orange when bearish |
| **OB / OS strength columns** | Red columns above OB, green below OS | How deep momentum has pushed past the threshold |
| **Trend tint** | Subtle green / red pane background | Trend accumulation — deeper tint = stronger trend |
| **Turning dots** | Aqua (bottom) / fuchsia (top) dots | **Full dot = strong** turn (came from a genuine extreme); **faded dot = weak** turn (mid-range) |
| **Divergence lines** | Diagonal lines on the signal | Dashed = regular (reversal); solid = hidden (continuation, faded & off by default) |
| **Divergence labels** | `R↑ / R↓ / H↑ / H↓` tags | Quick read of the divergence type and direction |
| **OB / OS value labels** | Small flag with the sig reading | The exact momentum value when it pierced an extreme |
| **Price-pane zones** | Horizontal line + band on the price chart | A regular-divergence price level; band fades to dashed once price breaks it |
| **MTF dashboard** | Corner table + background highlight | Higher-timeframe momentum state at a glance (see below) |
---
### Divergences explained
A divergence is when **price and momentum disagree**. There are two families, and they mean **opposite** things — so reading them correctly matters.
**Encoding rule:**
- **Line style = type:** dashed = **regular** (reversal), solid = **hidden** (continuation)
- **Line color = direction:** green = bullish, red = bearish
| Label | Type | Pattern | What it suggests |
|---|---|---|---|
| **R↑** (green dashed) | Regular bullish | Price lower low + momentum higher low | Reversal **up** (potential bottom) |
| **R↓** (red dashed) | Regular bearish | Price higher high + momentum lower high | Reversal **down** (potential top) |
| **H↑** (green solid) | Hidden bullish | Price higher low + momentum lower low | Uptrend **continuation** |
| **H↓** (red solid) | Hidden bearish | Price lower high + momentum higher high | Downtrend **continuation** |
⚠️ **A green line is not always "buy a reversal."** A *dashed* green line (R↑) means a bottoming reversal; a *solid* green line (H↑) means follow the existing uptrend. Always read the line style.
**A note on reliability (and why hidden divergence is OFF by default):**
In testing across BTC and ETH on 15m, **regular** divergences were the more dependable structural signal, while **hidden** divergences added little. So this indicator foregrounds regular divergences and keeps hidden ones thin, faded, and **off by default**. You can switch them on, but treat them as low-confidence context — not a signal.
---
### Multi-timeframe (MTF) resonance dashboard
Markets look different on different timeframes, and the strongest reads happen when timeframes **agree**.
The corner dashboard shows the WaveTrend state of **two higher timeframes** alongside your current chart:
- **Auto mode (default):** the two higher timeframes are derived as ×4 and ×16 of your chart. On a 15m chart that's 1h and 4h; on a 3m chart that's 12m and 48m. Switch the chart timeframe and the dashboard adapts automatically.
- **Manual mode:** turn Auto off and pick any two timeframes you like (e.g. 30m and 6h).
Each row shows **Trend** (▲/▼), **Zone** (OB / OS / neutral), and the latest **Divergence** direction. When all three timeframes line up in the same direction, the pane background lights up and the header shows ⚡ — that's "resonance."
The higher-timeframe data is requested **non-repainting**: historical bars never redraw, so what you see on the past is what you would have seen live.
---
### Settings
**Core**
- Channel Length (n1) — `12`
- Average Length (n2) — `25`
- Signal Smoothing — `4`
- MA Period — `4`
- Overbought / Oversold — `±0.65`
- Source — `close`
*(Defaults were tuned on BTC 15m. The original WaveTrend [Krypt] values — 10 / 21 / ±0.75 — are still valid; feel free to retune for your own market and timeframe.)*
**Trend Strength** — toggle the background tint and its intensity.
**Divergence** — show/hide regular (on) and hidden (off) divergences; line width.
**Turning Points** — show dots; dot size; "Only Show Strong Turns" to hide mid-range turns; genuine-extreme lookback.
**OB/OS Columns** — show/hide, colors, transparency.
**Divergence Labels / OB-OS Value Labels** — toggle and size.
**Price Zones** — project regular-divergence levels onto the price pane; max per side, band width, transparency.
**MTF** — show the table; Auto vs manual HTFs; the two multiples or manual timeframes; table position/size; alignment highlight.
**Data Export** — off by default; adds hidden plots used only for offline verification.
---
### How to use it
1. **Read the background tint first.** Green = bullish momentum stacking; red = bearish; clear = no decisive trend (range/chop).
2. **Find structure with the dots and columns.** Aqua dots mark momentum bottoms, fuchsia dots mark tops. Full (strong) dots are the cleaner ones. Tall OB/OS columns mean momentum is deep into an extreme.
3. **Read divergences by label, then line style.** `R↑ / R↓` = reversal (fade the move); `H↑ / H↓` = continuation (follow the trend). Green = bullish bias, red = bearish.
4. **Cross-check with the price-pane zones.** A solid band = the level still holds (live support/resistance). A dashed line with no band = price broke through it.
5. **Confirm with the MTF dashboard.** A setup is strongest when your timeframe and the two higher ones agree (resonance highlight on). When they disagree, be cautious.
6. **Combine layers, and confirm with your own system.** The strongest reads happen when several layers line up — but this tool is *context*, not a trigger. Pair it with your own entries, key levels, volume, or risk rules.
**Timeframes:** primary **15m**; also works on 5m / 1h / 4h. Tuned with crypto (BTC / ETH) in mind, but applicable to any liquid market.
---
### Important notes
- This is a **display / decision-support** indicator. It does **not** generate trade signals or alerts, and it does **not** predict price.
- Historical bars do not repaint.
- Nothing here is financial advice. Trading involves substantial risk of loss. Past behavior of any indicator does not guarantee future results. You are solely responsible for your decisions.
---
### Credits & License
Forked from **"WaveTrend Oscillator [Krypt]"** (Pine v3) and rebuilt on Pine v6, adding: trend-strength tint, a foregrounded regular-divergence engine with de-emphasized hidden divergences, genuine-extreme strong/weak turning-point tiers, OB/OS strength columns, divergence labels (`H↑ / R↑ / H↓ / R↓`), OB/OS value labels, price-pane divergence zones, and a multi-timeframe resonance dashboard; defaults retuned for BTC 15m.
- Original WaveTrend concept — **LazyBear**
- SuperSmoother filter — **John F. Ehlers**
- Price-pane divergence-zone visual idiom — adapted from **"RSI Momentum Divergence Zones [ChartPrime]"**
Published in the same open spirit — please credit the original authors when reusing.
**A clean, display-only momentum oscillator — built on the classic WaveTrend with Ehlers low-lag smoothing, an honest four-quadrant divergence engine, strong/weak turning-point tiers, and a multi-timeframe resonance dashboard. It shows you market structure; it does not tell you to buy or sell.**
---
### What it is
WaveTrend Oscillator [Axe] is a refined version of the well-known WaveTrend oscillator, rebuilt on Pine v6. It visualizes **momentum, trend accumulation, and divergence structure** so you can read the state of a market at a glance.
It is a **decision-support / display tool**, by design:
- ❌ No buy/sell arrows
- ❌ No alerts
- ❌ No "90% win-rate" claims
- ✅ Clean structure you can actually read
- ✅ Honest about which signals are reliable and which are not
- ✅ Every layer independently toggleable
You stay in full control of every decision. Think of it as a well-built gauge, not an autopilot.
---
### How it works (the idea, in plain terms)
1. **Price transform** — the math runs on `log(close)`, so a +5% move and a −5% move are treated symmetrically. This matters for crypto's wide range.
2. **Channel deviation** — it measures how far price has stretched from its own moving baseline, then normalizes that by the recent average stretch. The result is a smooth oscillator that swings around zero (roughly between −1 and +1).
3. **Ehlers SuperSmoother core** — instead of a plain EMA, the signal line is smoothed with John Ehlers' 2-pole SuperSmoother filter plus an improved EMA. This gives **less lag and cleaner turns** than a vanilla WaveTrend.
4. **The two lines** — the blue **Signal (sig)** line is the core momentum; the orange **MA** is a short average of it, used as the trigger reference.
5. **Turning points** — when the signal crosses its MA back from an extreme (with recent momentum confirming), the indicator marks a momentum **bottom** or **top**. These are *structural measurement points*, not trade signals.
6. **Divergence** — at each turning point, it compares the current momentum extreme and price extreme against the previous one to classify a divergence.
---
### What you see on the chart
| Layer | What it looks like | Meaning |
|---|---|---|
| **Signal (sig)** | Blue line | Core WaveTrend momentum |
| **MA** | Orange line | Smoothed signal — the trigger reference |
| **OB / OS levels** | Horizontal lines at ±0.65 (default) | Overbought / oversold thresholds |
| **OB / OS zones** | Green / orange fills | Highlight when momentum is in extreme territory |
| **Histogram** | Light-blue / orange area | `sig − ma`; blue when bullish, orange when bearish |
| **OB / OS strength columns** | Red columns above OB, green below OS | How deep momentum has pushed past the threshold |
| **Trend tint** | Subtle green / red pane background | Trend accumulation — deeper tint = stronger trend |
| **Turning dots** | Aqua (bottom) / fuchsia (top) dots | **Full dot = strong** turn (came from a genuine extreme); **faded dot = weak** turn (mid-range) |
| **Divergence lines** | Diagonal lines on the signal | Dashed = regular (reversal); solid = hidden (continuation, faded & off by default) |
| **Divergence labels** | `R↑ / R↓ / H↑ / H↓` tags | Quick read of the divergence type and direction |
| **OB / OS value labels** | Small flag with the sig reading | The exact momentum value when it pierced an extreme |
| **Price-pane zones** | Horizontal line + band on the price chart | A regular-divergence price level; band fades to dashed once price breaks it |
| **MTF dashboard** | Corner table + background highlight | Higher-timeframe momentum state at a glance (see below) |
---
### Divergences explained
A divergence is when **price and momentum disagree**. There are two families, and they mean **opposite** things — so reading them correctly matters.
**Encoding rule:**
- **Line style = type:** dashed = **regular** (reversal), solid = **hidden** (continuation)
- **Line color = direction:** green = bullish, red = bearish
| Label | Type | Pattern | What it suggests |
|---|---|---|---|
| **R↑** (green dashed) | Regular bullish | Price lower low + momentum higher low | Reversal **up** (potential bottom) |
| **R↓** (red dashed) | Regular bearish | Price higher high + momentum lower high | Reversal **down** (potential top) |
| **H↑** (green solid) | Hidden bullish | Price higher low + momentum lower low | Uptrend **continuation** |
| **H↓** (red solid) | Hidden bearish | Price lower high + momentum higher high | Downtrend **continuation** |
⚠️ **A green line is not always "buy a reversal."** A *dashed* green line (R↑) means a bottoming reversal; a *solid* green line (H↑) means follow the existing uptrend. Always read the line style.
**A note on reliability (and why hidden divergence is OFF by default):**
In testing across BTC and ETH on 15m, **regular** divergences were the more dependable structural signal, while **hidden** divergences added little. So this indicator foregrounds regular divergences and keeps hidden ones thin, faded, and **off by default**. You can switch them on, but treat them as low-confidence context — not a signal.
---
### Multi-timeframe (MTF) resonance dashboard
Markets look different on different timeframes, and the strongest reads happen when timeframes **agree**.
The corner dashboard shows the WaveTrend state of **two higher timeframes** alongside your current chart:
- **Auto mode (default):** the two higher timeframes are derived as ×4 and ×16 of your chart. On a 15m chart that's 1h and 4h; on a 3m chart that's 12m and 48m. Switch the chart timeframe and the dashboard adapts automatically.
- **Manual mode:** turn Auto off and pick any two timeframes you like (e.g. 30m and 6h).
Each row shows **Trend** (▲/▼), **Zone** (OB / OS / neutral), and the latest **Divergence** direction. When all three timeframes line up in the same direction, the pane background lights up and the header shows ⚡ — that's "resonance."
The higher-timeframe data is requested **non-repainting**: historical bars never redraw, so what you see on the past is what you would have seen live.
---
### Settings
**Core**
- Channel Length (n1) — `12`
- Average Length (n2) — `25`
- Signal Smoothing — `4`
- MA Period — `4`
- Overbought / Oversold — `±0.65`
- Source — `close`
*(Defaults were tuned on BTC 15m. The original WaveTrend [Krypt] values — 10 / 21 / ±0.75 — are still valid; feel free to retune for your own market and timeframe.)*
**Trend Strength** — toggle the background tint and its intensity.
**Divergence** — show/hide regular (on) and hidden (off) divergences; line width.
**Turning Points** — show dots; dot size; "Only Show Strong Turns" to hide mid-range turns; genuine-extreme lookback.
**OB/OS Columns** — show/hide, colors, transparency.
**Divergence Labels / OB-OS Value Labels** — toggle and size.
**Price Zones** — project regular-divergence levels onto the price pane; max per side, band width, transparency.
**MTF** — show the table; Auto vs manual HTFs; the two multiples or manual timeframes; table position/size; alignment highlight.
**Data Export** — off by default; adds hidden plots used only for offline verification.
---
### How to use it
1. **Read the background tint first.** Green = bullish momentum stacking; red = bearish; clear = no decisive trend (range/chop).
2. **Find structure with the dots and columns.** Aqua dots mark momentum bottoms, fuchsia dots mark tops. Full (strong) dots are the cleaner ones. Tall OB/OS columns mean momentum is deep into an extreme.
3. **Read divergences by label, then line style.** `R↑ / R↓` = reversal (fade the move); `H↑ / H↓` = continuation (follow the trend). Green = bullish bias, red = bearish.
4. **Cross-check with the price-pane zones.** A solid band = the level still holds (live support/resistance). A dashed line with no band = price broke through it.
5. **Confirm with the MTF dashboard.** A setup is strongest when your timeframe and the two higher ones agree (resonance highlight on). When they disagree, be cautious.
6. **Combine layers, and confirm with your own system.** The strongest reads happen when several layers line up — but this tool is *context*, not a trigger. Pair it with your own entries, key levels, volume, or risk rules.
**Timeframes:** primary **15m**; also works on 5m / 1h / 4h. Tuned with crypto (BTC / ETH) in mind, but applicable to any liquid market.
---
### Important notes
- This is a **display / decision-support** indicator. It does **not** generate trade signals or alerts, and it does **not** predict price.
- Historical bars do not repaint.
- Nothing here is financial advice. Trading involves substantial risk of loss. Past behavior of any indicator does not guarantee future results. You are solely responsible for your decisions.
---
### Credits & License
Forked from **"WaveTrend Oscillator [Krypt]"** (Pine v3) and rebuilt on Pine v6, adding: trend-strength tint, a foregrounded regular-divergence engine with de-emphasized hidden divergences, genuine-extreme strong/weak turning-point tiers, OB/OS strength columns, divergence labels (`H↑ / R↑ / H↓ / R↓`), OB/OS value labels, price-pane divergence zones, and a multi-timeframe resonance dashboard; defaults retuned for BTC 15m.
- Original WaveTrend concept — **LazyBear**
- SuperSmoother filter — **John F. Ehlers**
- Price-pane divergence-zone visual idiom — adapted from **"RSI Momentum Divergence Zones [ChartPrime]"**
Published in the same open spirit — please credit the original authors when reusing.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Making trading better with ME!
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Making trading better with ME!
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.