Elliott Impulse Engine [WillyAlgoTrader]📊 Elliott Impulse Engine (EIE) is an overlay indicator that counts a full Elliott cycle — impulse 0-1-2-3-4-5 plus correction A-B-C — completely automatically, using a Change-of-Character (CHoCH) trigger to start each count, a strict state machine to accept every wave point, Fibonacci target boxes to show where the next point is expected, a dashed "ghost" projection of the entire remaining path, and a trailing red invalidation line that tells you the exact price where the current count dies.
The core insight: most Elliott Wave tools either repaint their labels endlessly or force you to draw everything by hand. EIE does neither. It treats every count as a hypothesis : a CHoCH break seeds it, each confirmed pivot advances it one wave at a time, and a single hard price level can kill it. When the hypothesis dies, the chart is wiped clean and the engine waits for the next CHoCH — no stale labels, no silent redrawing of history. You always know three things at a glance: what wave the market is in, where price should go next, and where the idea is wrong.
Works on any symbol and any timeframe. Free and open for everyone.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A ZigZag alone gives you swings but no wave logic. A Fibonacci tool alone gives you levels but no structure. A CHoCH detector alone tells you the trend flipped but not what comes next. And a manual Elliott count gives you structure but demands hours of drawing and constant re-labeling.
EIE chains all of these into one pipeline:
Swing structure engine → CHoCH detection → count seeding (point 0 + point 1) → fib grid on leg 0-1 → target boxes for points 2/3/4 → pivot-based point acceptance with soft-marking → ghost projection of the remaining path → trailing invalidation level → reset with a stated reason
The swing engine finds structural highs and lows. A confirmed close through a swing level against the previous trend is a CHoCH — the only event allowed to start a new count, so counts always begin at genuine structure shifts, not random noise. The moment leg 0-1 is confirmed, the engine builds a Fibonacci grid on that leg and projects the whole expected structure forward as a dashed ghost path. Each subsequent wave point is accepted from a separate, faster pivot stream, checked against its expected fib range, and either labeled clean ("2") or soft-marked ("2~") if it landed outside the range. At every state the engine maintains exactly one critical price — the trailing invalidation level — and if price breaks it, the count is declared dead with an explicit reason (BELOW_0, BELOW_W2, W3_SHORTEST, and so on), the markup is wiped, and the engine returns to scanning.
No single public tool does this loop. The combination turns Elliott counting from a subjective drawing exercise into a rule-driven process you can watch unfold bar by bar.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ CHoCH-seeded counting — every count starts at a real structure break.
The engine tracks swing highs and lows using symmetric pivots (default 10 bars left / 10 bars right). A break is registered only on a confirmed bar close through the swing level. If that break goes against the current internal trend, it is a CHoCH — and only then does the engine arm a new count: point 0 is set to the extreme of the run that preceded the break, and the engine waits for a with-trend pivot beyond the CHoCH level to lock point 1.
Anti-noise guards built into the seeding:
— a warm-up gate (no CHoCH before max(3 × swing length, 50) bars of history),
— an optional cooldown (N bars after any count ends before a new CHoCH may seed),
— a level lock: after an invalidation, the same CHoCH level cannot immediately re-seed a new count (compared with half-a-tick tolerance, so floating-point equality can never leak a duplicate seed).
Why this matters: counts started from random pivots produce random labels. Counts started from structure breaks start where trend logic actually changed.
2️⃣ Non-blocking Fibonacci ranges with soft-marking — geometry informs, price decides.
Each wave point has an expected fib range measured on the 0→1 grid (retracement for 2, negative extension beyond point 1 for 3, 5 and B; point 4 uses its own 2→3 grid; C uses 0→1 again):
— Point 2: 0.5 – 0.705 (retracement of 0→1)
— Point 3: −0.5 – −0.618 (extension beyond point 1)
— Point 4: 0.5 – 0.705 (retracement of leg 2→3)
— Point 5: −0.618 – −1.0
— Point B: −0.5 – −0.618
— Point C: 0.0 – 0.236
The fib level of any price p on the 0→1 grid is computed as L = (p1 − p) / (p1 − p0); on the 2→3 grid as F = (p3 − p) / (p3 − p2). A pivot inside its range is labeled clean ("3"); a pivot outside it is still accepted but soft-marked ("3~") — because in real markets a valid wave frequently overshoots textbook levels. Only the hard invalidation rules can reject a point. Every range is a user input (min/max per point), so you can tighten or widen the geometry to your market.
Why this matters: strict-range engines discard perfectly good structure; free-form engines accept garbage. Soft-marking keeps the count honest while telling you visually which points are textbook and which are stretched.
3️⃣ Ghost projection — the whole remaining path drawn before it happens.
As soon as leg 0-1 is confirmed, EIE draws a dashed projection of every remaining point: 2? 3? 4? 5? A? B? C?. Each ghost point is placed inside its fib range at a position you choose (Middle of the range, Near edge, or Far edge), and spaced horizontally at step = round((b1 − b0) × coefficient) bars — i.e., the time geometry of the projection scales with the actual duration of leg 0-1. Ghost point 5? sits at extension −1.0 plus a configurable offset.
The projection is re-anchored from every newly accepted real point : once point 2 locks, the ghost path redraws starting from the real 2; once point 3 locks, from the real 3, and so on. Point 4's ghost is computed on the 2→3 grid using the best available references (real points when confirmed, ghost estimates before that).
Why this matters: you see the expected shape of the entire move — including the A-B-C correction after the impulse — while the impulse is still in wave 2.
4️⃣ Trailing invalidation level — one red line that answers "where am I wrong?".
At every state the engine maintains exactly one critical level, drawn as a dashed red line with an "INVALID + price" label:
— waiting for 1 / wave 2 in progress: point 0
— wave 3 before point 1 is broken: point 0; after the break: point 2
— wave 4: point 2
— wave 5 before point 3 is broken: point 2; after the break: point 4
— correction A/B/C: point 2
A break of this level resets the hypothesis with a named reason. The check runs every bar, before pivot processing , so a violent bar cannot both break the invalidation level and sneak a new wave point into the count on the same bar. Wick-driven pivots that slip past a close-based check are caught by a second, pivot-level guard (a pivot beyond point 2 / point 4 in the protected phases also triggers the reset). Classic Elliott rules are enforced on top: wave 2 may never retrace below point 0, wave 4 may never enter below point 2, and if wave 3 turns out shortest among 1, 3 and 5 at the moment point 5 is proposed, the count is rejected with reason W3_SHORTEST.
Why this matters: an Elliott count without a falsification level is a story, not a hypothesis. EIE makes the falsification price explicit on every bar.
5️⃣ Two-speed pivot system — stable structure, fast confirmation.
Structure and CHoCH run on the main swing length (default 10/10). Wave points 1-5 and A-C are accepted from a separate, shorter pivot stream (default 5/5, always ≤ swing length — validated at load). This decouples two jobs that a single pivot length cannot do well simultaneously: the long pivots keep the structural skeleton stable, the short pivots confirm wave points with roughly half the lag.
A dedicated backfill scan (up to ~480 bars) closes the pivot-lag gap for point 2: when point 1 locks or repositions, the engine re-scans all bars since point 1 for the true retracement extreme, so the best low/high inside the confirmation window is never missed. If price breaks point 1 before any counter-trend pivot confirmed point 2, the tracked extreme itself is accepted as point 2 and wave 3 is activated immediately.
Why this matters: one pivot length forces a trade-off between stability and speed. Two lengths plus a backfill scan give you both.
6️⃣ Repositioning logic — labels refine forward, never silently rewrite history.
Until the next wave locks, the engine allows controlled repositioning: a higher high repositions point 1 (rebuilding the grid and the point-2 box on the new geometry), a deeper pullback repositions point 2 (only until point 1 is broken — after the break, a deeper pivot is an invalidation, not a reposition), point 3 extends while wave 4 forms, point 4 deepens until point 3 is broken, point 5 extends during the correction, A deepens until B appears, B rises until C appears. Every reposition deletes and redraws only the affected segment and label, and the associated target box and its center line are rebuilt on the fresh grid — no stale geometry is left behind.
Why this matters: this is the honest middle ground between "repaints everything" and "freezes wrong labels forever". The rules for what may move, and until when, are fixed and stated.
7️⃣ OTE target boxes for points 2, 3 and 4 — the next objective is always a zone, not a guess.
When point 1 locks, a yellow box covering the point-2 fib range appears with a dashed center line at the range midpoint. When point 2 locks, the point-3 target box (on the extension side) appears. When point 3 locks, the point-4 box appears on the 2→3 grid. Each box extends forward a configurable number of bars (default 20) and its right edge snaps to the bar where the point actually forms. Box fill transparency adapts to the theme (65 dark / 55 light); the border and center line stay fully opaque.
Why this matters: "wave 4 should come" is vague. "Wave 4 is expected inside this drawn box, centered here" is actionable.
8️⃣ Explicit reset reasons + persistent CHoCH history — the chart tells you why.
Every count ends with a machine reason: FALSE_CHOCH (price broke back through point 0 before point 1 formed), BELOW_0, BELOW_W2, BELOW_W4, W3_SHORTEST, DEEP_C (correction retraced beyond point 2), TIMEOUT (optional: state lasted longer than k × leg 0-1 duration), B_ABOVE_5 (the "correction" broke above point 5 — the impulse is closed as done), or DONE (point C accepted, full cycle complete). On invalidation a ✖ marker with the reason in its tooltip is placed on the bar, and the dashboard keeps showing the last reason.
The active markup is wiped on reset — but CHoCH lines and labels live on a separate persistent layer (FIFO history, up to 100, default 50). When price later closes back through a CHoCH level, that line is clipped to the mitigation bar and turns dotted. So your chart accumulates a clean structural map of every trend change while dead counts disappear.
A special same-bar case is handled explicitly: if a reset and a fresh opposite CHoCH land on the same bar (with cooldown off), the engine wipes first, then seeds the new count on that same bar — the new hypothesis is never lost to ordering.
Why this matters: most auto-counters just vanish or redraw without explanation. EIE always states its reason, and the CHoCH map survives as context.
9️⃣ Anti-repaint discipline — confirmed pivots, close-confirmed breaks, honest Wick mode.
Three independent mechanisms:
— All pivot values are consumed only on confirmed bars: a forming real-time bar can make a pivot flicker, so transient pivot values are masked out and can never trigger an irreversible state transition. Historical bars are unaffected (they are all confirmed).
— In the default Close confirmation mode, invalidation breaks and wave-top breaks are evaluated only on the confirmed bar close — an intrabar excursion of the close cannot fire a reset that "un-happens" seconds later.
— The optional Wick mode reacts to any intrabar touch — faster, and by design irreversible within the bar. This is stated openly so you can choose speed vs. strictness.
Zone-entry events (price entering the point-2 OTE zone, the point-4 box, or tagging the −1.0 target) intentionally use wick extremes — a touch is a touch — and are one-way flags.
🔟 Theme-adaptive visual system with auto-contrast labels.
Theme is Auto-detected from the chart background (or forced Dark/Light). By default, long counts use a theme-adaptive green (dark green on light charts, bright green on dark charts) and short counts use red. If you enable custom colors, label text color is derived from the luminance of your chosen background — luma = 0.299R + 0.587G + 0.114B, threshold 140 — so digits stay readable on any shade you pick. The fib grid uses role-based color inputs (red 0.236, teal 0.705 OTE, blue retracement levels, gray round levels), all editable. Label font size is selectable from Tiny to Huge.
⚡ HOW IT WORKS — CALCULATION FLOW
Step 1 — Structure scan: Symmetric pivots (default 10/10) maintain the latest swing high and swing low; the engine also tracks the running extreme since the last swing (the future point 0).
Step 2 — CHoCH: A confirmed close through a swing level against the internal trend flips the trend and — if the engine is idle, cooled down, and the level is not locked — seeds a count: direction, CHoCH level, point 0.
Step 3 — Point 1: The first fast pivot beyond the CHoCH level becomes point 1. The 0→1 fib grid, the point-2 target box, and the full ghost projection are drawn.
Step 4 — Impulse counting: Fast counter-trend pivots propose points 2 and 4; fast with-trend pivots propose 3 and 5. Each is checked against its fib range (clean or "~"), each unlocks the next state, target boxes appear for the next objective, and the ghost path re-anchors from every real point.
Step 5 — Hard rules per bar: Before any pivot is processed, the trailing invalidation level is checked (Close or Wick mode). Wave 2 below point 0, wave 4 below point 2, a broken point 4 in late wave 5, or a shortest wave 3 all kill the count with a named reason.
Step 6 — Impulse complete: Point 5 accepted → the impulse counter increments and the engine rolls into correction tracking.
Step 7 — Correction A-B-C: A forms on a counter-trend pivot, B on a with-trend pivot (a B at or beyond point 5 closes the whole structure as B_ABOVE_5 instead), C completes the cycle → DONE.
Step 8 — Reset: On any ending — invalidation or completion — the active markup is wiped, the cooldown starts, and the engine returns to scanning. CHoCH history stays.
📖 HOW TO USE
🎯 Quick start (works even if you have never counted a wave):
1. Add the indicator to a clean chart. Nothing to configure — defaults are ready to use.
2. Wait for a CHoCH label. That is the engine saying: "the trend character just changed, I am watching for a new impulse here."
3. When labels 0 and 1 appear, the count is live. The dashed gray path with 2? 3? 4? 5? A? B? C? is the expected roadmap of the entire move.
4. Watch the yellow box — that is where the next wave point is expected. The dashed line inside it is the center of the zone.
5. Keep one eye on the red dashed INVALID line at all times. If price breaks it, the count is over — a ✖ appears, the markup clears, and the engine starts hunting for the next CHoCH. Hover the ✖ to read the exact reason.
👁️ Reading the chart:
— 🟢 Green numbered labels (0, 1, 2, 3, 4, 5) = accepted impulse points of a long count; red labels = a short count. Letters A, B, C = the correction.
— A label with ~ (like "2~") = the point is accepted, but it landed outside its textbook fib range — the count continues, treat it with slightly more caution.
— Solid colored path = confirmed structure. Dashed gray path with "?" labels = the ghost projection of what is still expected.
— 🟡 Yellow boxes = target zones for points 2, 3 and 4, each with a dashed center line.
— Dotted horizontal grid = the Fibonacci grid of leg 0-1 (retracements 0.236…1.0 above, extensions −0.5 / −0.618 / −1.0 below), each level labeled with its ratio and price.
— 🔴 Red dashed line + "INVALID price" = the trailing invalidation level of the current count.
— Dashed horizontal CHoCH lines = historical structure breaks; a line that turns dotted has been mitigated (price closed back through it).
— ✖ = the count was invalidated on this bar (reason in the tooltip).
📊 Dashboard fields:
— State: current phase (Scanning / CHoCH · wait 1 / Wave 2…5 / Corr · A-B-C).
— Direction: Long, Short, or — when idle.
— Invalidation: the current critical price.
— Last Reset: why the previous count ended (reason, DONE, or B_ABOVE_5). Resets on chart reload.
— Impulses: completed 5-wave impulses on the loaded history. Resets on chart reload.
— TF: chart timeframe. Version: engine version.
🔧 Tuning guide:
— Counts appear too rarely: lower Swing Detection Length (structure forms faster, more CHoCH seeds) — or the market is simply ranging without character changes.
— Too many counts die instantly (FALSE_CHOCH / BELOW_0): raise Swing Detection Length, or add a Cooldown of 5-20 bars so the engine skips the chop right after a failed count.
— Points confirm too slowly: lower Point Confirmation (min 1); remember it must stay ≤ Swing Detection Length.
— Too many "~" soft marks: widen the fib ranges for those points — your market may simply run hotter than the defaults.
— Old counts hang around in dead phases: set Timeout k > 0 (e.g. 3.0) — any state lasting longer than k × the duration of leg 0-1 resets automatically.
— Chart feels crowded: toggle off the Fib Grid, OTE Boxes, or the Projection independently; reduce Historical CHoCH; shrink label font size.
⚙️ KEY SETTINGS
⚙️ Main Settings:
— Swing Detection Length (default 10): pivot length for structure and CHoCH. Higher = larger structure, fewer seeds.
— Point Confirmation, bars (default 5): the separate short pivot used to accept wave points. Must be ≤ swing length (validated).
— Breaks: Invalidation Mode (default Close): Close = confirmed bar close beyond the level (non-repainting); Wick = any intrabar touch (instant, irreversible within the bar).
📐 Point Ranges (fib): min/max expectation range per point — Point 2 (0.5–0.705), Point 3 (−0.5…−0.618), Point 4 (0.5–0.705 on the 2→3 grid), Point 5 (−0.618…−1.0), Point B (−0.5…−0.618), Point C (0–0.236). All validated at load (2 and 4 must be inside (0,1); 3, 5, B must be negative; C inside [0,1); no zero-width ranges).
👻 Ghost Projection:
— Show Projection (on), Point Inside Range (Middle / Near / Far), Time Step Coef (default 1.0 × leg 0-1 duration), 5?: Offset From −1.0 (default 0.05).
♻️ Reset:
— Cooldown After Reset, bars (default 0 = off) and Timeout, k × leg 0-1 (default 0 = off; in the wait-for-1 phase the timeout scales on swing length instead, since no leg exists yet).
🎨 Visual Settings: Theme (Auto / Dark / Light), Fib Grid toggle, OTE Boxes toggle, CHoCH layer toggle, Path Width (2), Box Length Forward (20), Historical CHoCH max (50), Label Font Size (Tiny…Huge), Watermark toggle.
📏 Grid Levels: individual on/off for 0.236, 0.382, 0.5, 0.618, 0.705, 0.786, 0.886, 1.0, −0.5, −0.618, −1.0.
🎨 Colors: Use Custom Colors switch (off = theme-adaptive defaults), long/short point label backgrounds (text auto-contrasts), target box color, path and ghost colors, bull/bear CHoCH colors, and role-based fib grid colors.
📊 Dashboard: on/off, position (5 anchors), font size (the version row renders one step smaller).
🔔 ALERTS
Ten alert conditions covering the full lifecycle:
— 🟢 1. CHoCH + projection — CHoCH confirmed, movement projection built
— 🟡 2. Price in W2 OTE — price entered the point-2 zone
— 🟢 3. Point 2 accepted
— 🟢 4. Break of point 1 — wave 3 active
— 🟡 5. Price in W4 box
— 🟢 6. Break of point 3 — wave 5 active
— 🎯 7. Target −1.0 reached
— 🟢 8. Impulse complete — point 5 locked
— 🎯 9. Target C — correction complete, full cycle done
— 🔴 10. Invalidation — hypothesis reset
In addition, the engine fires dynamic alert() messages on every reset and on B_ABOVE_5 completion, including the reason text. In Close mode these announce on confirmed bar close; in Wick mode once per bar.
⚠️ IMPORTANT NOTES
— 🚫 No repainting of confirmed structure. Pivots use equal left/right lookback and their values are consumed only on confirmed bars; CHoCH breaks require a confirmed close; in the default Close mode, invalidation and wave-top breaks are evaluated on confirmed closes only. A pivot is, by nature, confirmed N bars after the actual extreme — the indicator draws from the confirmed bar backward to the true swing point. This is delayed confirmation, not repainting of settled values.
— 📐 Controlled repositioning is part of the design. Until the next wave locks, the latest point may legitimately move to a more extreme pivot (e.g., point 1 to a higher high). The rules for what may move, and until when, are fixed and described above. Wick mode reacts intrabar by design and is irreversible within the bar.
— 📊 The Impulses counter and Last Reset field are computed on loaded chart history and reset when the chart reloads.
— ⚖️ EIE counts one impulse degree at a time from the latest CHoCH. It does not label nested sub-waves, diagonals, or complex W-X-Y corrections — it is a focused impulse + zigzag engine, and the fib ranges reflect one practical interpretation of Elliott guidelines, which you can re-tune.
— 🛠️ This is a wave-counting and projection tool, not an automated trading system. It identifies structure, projects expected zones, and shows the invalidation price — trade decisions remain yours.
— 🌐 Works on all markets (crypto, forex, stocks, indices, commodities) and all timeframes. Indicator

Wave Oscillatorwave high low detector pro
wave high low detector is a bounded oscillator designed to help identify potential local high and low areas using momentum, rsi behavior, pivot confirmation, candle rejection, divergence, atr exhaustion, structure breaks, cooldown logic and quality scoring.
the oscillator moves between 0 and 100.
a value near 100 means price is trading close to the upper part of its recent range or showing strong upside momentum.
a value near 0 means price is trading close to the lower part of its recent range or showing strong downside momentum.
the script does not predict the future and does not guarantee market tops or bottoms. it is a technical analysis tool that marks possible early and confirmed high or low references. every signal should be confirmed with price action, market structure, volume, trend context and risk management.
main idea
the indicator separates high and low detection into two signal types:
early high and early low
confirmed high and confirmed low
early signals are faster and more reactive. they appear when the oscillator leaves an extreme zone and the selected filters agree.
confirmed signals are slower but more selective. they use pivot confirmation and additional context to validate a stronger high or low reference.
this design allows the trader to choose between speed and confirmation.
what the indicator shows
wave oscillator
high zone
low zone
balance zone
early high markers
early low markers
confirmed high markers
confirmed low markers
quality score labels
bull and bear gradient fill
optional glow
right-side zone labels
dashboard with state, value, score and mode
separate alerts for early and confirmed signals
how high and low detection works
an early high appears when the oscillator leaves the upper zone after being stretched upward.
an early low appears when the oscillator leaves the lower zone after being stretched downward.
a confirmed high appears only when a pivot high is confirmed and the score is strong enough.
a confirmed low appears only when a pivot low is confirmed and the score is strong enough.
confirmed signals are placed back on the pivot location, so they naturally appear with a delay. this is normal because pivots need future bars to confirm the local high or low.
quality score
the score rates the quality of a potential high or low from 0 to 100.
the score can include:
extreme oscillator condition
super extreme oscillator condition
oscillator slope reversal
wick rejection
atr exhaustion
divergence
structure break
pivot confirmation
a higher score means more conditions agree. a lower score means the setup is weaker or less complete.
the score is not a trade signal by itself. it is only a filter that helps compare the quality of different high and low references.
input guide
engine
source
selects the price source used by the rsi engine.
common choices are close, open, high, low, hl2, hlc3 or ohlc4.
length sensitivity
controls how many bars are used by the oscillator engine.
lower values make the wave faster and more reactive.
higher values make the wave smoother and slower.
smoothing
smooths the oscillator.
higher values reduce noise but add delay.
lower values react faster but may produce more signals.
engine
selects the oscillator calculation method.
momentum wave
uses a stochastic-style high and low range calculation. this is the most direct mode for high and low detection.
rsi
uses a smoothed rsi. this mode reads momentum exhaustion rather than pure range position.
blend
combines rsi and range position. this gives a balanced reading between momentum and high or low range behavior.
levels
overbought high zone
sets the upper zone where price is considered stretched toward the high area.
default logic usually works around 80.
oversold low zone
sets the lower zone where price is considered stretched toward the low area.
default logic usually works around 20.
show midline
shows or hides the 50 balance line.
above 50, the oscillator is generally stronger.
below 50, the oscillator is generally weaker.
high low detector
detection mode
controls the signal strictness.
fast
more reactive. it allows earlier signals with fewer confirmations.
balanced
uses a middle approach between speed and confirmation.
confirmed
stricter and slower. it requires stronger confirmation and higher score quality.
show early high low
shows or hides early high and early low markers.
show confirmed high low
shows or hides confirmed high and confirmed low markers.
balanced minimum score
sets the minimum score used in balanced mode.
higher values reduce signals.
lower values increase signals.
pivot left bars
sets how many bars to the left are used to confirm a pivot.
higher values make pivots more important but slower.
pivot right bars
sets how many bars to the right are required to confirm a pivot.
higher values make confirmed signals more reliable but delayed.
cooldown between signals
sets the minimum number of bars between repeated signals of the same type.
this helps reduce signal spam.
show quality score labels
shows or hides score labels near early and confirmed markers.
optional filters
use divergence in score
adds divergence logic to the quality score.
bearish divergence can strengthen a confirmed high.
bullish divergence can strengthen a confirmed low.
wick rejection filter
requires a rejection wick before accepting signals.
for highs, the script looks for upper wick rejection.
for lows, the script looks for lower wick rejection.
min wick percent of candle
sets the minimum wick size needed for the wick rejection filter.
higher values make the filter stricter.
lower values allow more signals.
atr exhaustion filter
requires price to be extended away from a moving average by an atr-based distance.
this helps focus on stronger exhaustion moves.
atr length
sets the atr calculation length.
atr exhaustion multiplier
sets how far price must extend from the average before the atr exhaustion filter confirms.
structure break filter
requires a short structure break to confirm the signal.
for highs, price should break below recent structure.
for lows, price should break above recent structure.
structure break lookback
sets how many bars are used to define the recent structure level.
visuals
glow
turns the glow effect around the wave on or off.
glow intensity
controls the strength of the glow.
bull bear gradient fill
fills the area between the wave and the midline with a bull or bear gradient.
fill transparency
controls how visible the gradient fill is.
higher transparency makes the fill lighter.
lower transparency makes the fill stronger.
tint high low zones
adds a faint background tint to the high and low areas.
color theme
selects the visual color style.
wizard
default bright cyan and red style.
ice
cool blue theme.
inferno
warm orange and red theme.
toxic
green and purple style.
markers
show high low markers
turns all markers on or off.
marker labels
selects the marker text style.
high low
uses early high, early low, confirmed high and confirmed low style labels.
buy sell
uses early buy, early sell, confirmed buy and confirmed sell style labels.
these labels are visual references only, not automatic entries.
show zone labels right
shows high, low and balance labels on the right side of the oscillator.
dashboard
show dashboard
shows or hides the dashboard.
position
selects the dashboard location.
the dashboard displays:
current state
current oscillator value
high score
low score
detection mode
signal types
early high
an early high appears when the wave leaves the high zone and the high score passes the selected requirements.
this means upside pressure may be weakening.
it is not a guaranteed top.
early low
an early low appears when the wave leaves the low zone and the low score passes the selected requirements.
this means downside pressure may be weakening.
it is not a guaranteed bottom.
confirmed high
a confirmed high appears when a pivot high is confirmed and the score is strong enough.
this signal is more selective but appears later.
confirmed low
a confirmed low appears when a pivot low is confirmed and the score is strong enough.
this signal is more selective but appears later.
how to use the alerts
the script includes separate alert conditions:
early high
early low
confirmed high
confirmed low
any early high or low
any confirmed high or low
for fast monitoring, use early alerts.
for cleaner monitoring, use confirmed alerts.
for fewer alerts, use only any confirmed high or low.
recommended anti-spam setup:
use confirmed signals only
increase cooldown between signals
use balanced or confirmed mode
keep pivot right bars at 3 or higher
increase the minimum score if there are too many signals
recommended beginner alert setup:
start with any confirmed high or low
use balanced mode
set cooldown between signals to 8 or more
keep score labels enabled
avoid using every alert condition at the same time
beginner tutorial
step 1: start with balanced mode
balanced mode is the best starting point because it avoids being too fast or too strict.
step 2: keep the default high and low zones
use 80 for the high zone and 20 for the low zone.
this gives a clean first reading.
step 3: watch the wave position
when the wave is above 80, price is stretched toward the high area.
when the wave is below 20, price is stretched toward the low area.
when the wave is around 50, the market is more balanced.
step 4: understand early signals
early signals are warnings.
early high means a possible local top area may be forming.
early low means a possible local bottom area may be forming.
do not enter a trade only because an early signal appears.
step 5: understand confirmed signals
confirmed signals are more selective.
confirmed high means a pivot high has been validated.
confirmed low means a pivot low has been validated.
these signals are slower because the script waits for confirmation.
step 6: read the score
a score near 50 is weaker.
a score near 65 is more acceptable.
a score above 75 is stronger.
a score above 85 means several filters agree.
step 7: confirm on the price chart
before using any signal, check:
trend direction
support and resistance
market structure
candle close
volume reaction
risk to reward
stop loss location
step 8: avoid overloading the chart
do not turn on every filter at once at the beginning.
start with:
balanced mode
wick rejection filter on
divergence in score on
atr exhaustion filter off
structure break filter off
cooldown enabled
after understanding the tool, activate atr exhaustion or structure break if you want stricter signals.
example 1: early high
price pushes upward and the wave moves above the high zone.
then the wave crosses back below the high zone.
an early high appears.
this means the upward push may be losing strength.
a beginner should wait for price rejection or a lower high before considering a short idea.
example 2: confirmed high
price forms a local high.
a few bars later, the pivot is confirmed.
the indicator prints confirmed high at the pivot location.
this is a stronger reference than an early high, but it appears later.
example 3: early low
price drops and the wave moves below the low zone.
then the wave crosses back above the low zone.
an early low appears.
this means downside pressure may be weakening.
a beginner should wait for support reaction or a higher low before considering a long idea.
example 4: confirmed low
price forms a local low.
a few bars later, the pivot is confirmed.
the indicator prints confirmed low at the pivot location.
this is a stronger reference than an early low, but it appears later.
example 5: using cooldown
if the market is volatile, the wave can create several signals close together.
cooldown prevents repeated signals from appearing too often.
higher cooldown values create a cleaner chart.
lower cooldown values create more frequent signals.
best use cases
spotting potential local highs
spotting potential local lows
detecting exhaustion zones
finding momentum fade areas
confirming high and low references with pivots
filtering noisy oscillator signals
building alerts for reversal watchlists
supporting discretionary trading decisions
important notes
early signals are faster but less confirmed.
confirmed signals are more selective but delayed.
pivot-based confirmation cannot appear instantly.
score is a filter, not a prediction.
buy and sell labels are only visual naming options.
the indicator should be combined with price action, structure, volume and risk management.
risk note
this indicator is for technical analysis and educational market study only. it does not provide financial advice, investment advice or guaranteed trading signals. all signals, markers, scores and alerts are references that require independent confirmation and proper risk management.
Indicator

Indicator

Self-Validating Elliott Wave EngineSELF-VALIDATING ELLIOTT WAVE ENGINE
A probabilistic Elliott Wave framework that does three things most wave tools do not: it weighs SEVERAL competing counts at once instead of asserting one, it CALIBRATES its own confidence against what actually happened on the instrument you are viewing, and it tells you honestly when no count is trustworthy. It is decision-support and context - not a signal generator, and never a claim of certainty.
WHY THESE PARTS BELONG TOGETHER (one engine, not a bundle)
Elliott Wave analysis is unavoidably ambiguous: the same swings can support an impulse, a zigzag, a flat or a triangle, and practitioners disagree constantly. A tool that draws one count and hides that ambiguity is misleading. This script is built as a single pipeline whose stages exist specifically to manage that ambiguity, and removing any one stage breaks it:
1. Structure - an alternating swing (ZigZag) series is built from confirmed pivots, and each pivot is tagged with momentum (RSI) and relative volume. This is the raw evidence every wave rule is tested against; without a clean swing series there is nothing to count.
2. Multi-count pattern engine - from that swing series the script forms several competing labelled hypotheses at once (impulse forming wave 3/4/5 or complete, zigzag, flat, contracting triangle). Because Elliott is ambiguous, evaluating alternatives is the whole point, not an add-on.
3. Scoring - each hypothesis is graded on Fibonacci fit, proportion and the alternation guideline (waves 2 and 4 should differ in form), and "wave energy" (does wave 3 thrust hardest, in trend direction, on rising volume?). These are combined deliberately: Fibonacci ratios alone mislabel corrections as impulses; momentum alone is directionless noise; only together do they discriminate real structure.
4. Regime context - a trend/range/compression read (from ADX and ATR) tilts the priors, because impulses are more likely in trends and corrections in ranges. It changes the odds, it does not override the structure.
5. Market-structure confirmation - an independent break-of-structure / change-of-character check raises or lowers the chosen count, so the wave read must agree with raw price action to score well.
6. Calibrated forecast - the forward zone is built from THIS chart's own distribution of historical retracement depths, not fixed ratios pulled from a textbook, so it reflects how the specific instrument actually behaves.
7. Outcome calibration - every forward call (target + invalidation + confidence) is logged and later checked: did price reach target before invalidation? Outcomes are bucketed by confidence, so the confidence number on screen can be mapped to a MEASURED hit-rate. This is the stage that makes the tool self-validating, and it is impossible without all the stages above feeding it.
So the components are not stacked for convenience - they form one loop: build competing hypotheses, score them on structure and momentum, tilt by regime, confirm against price structure, forecast from the instrument's own history, then grade that forecast against reality and report the measured reliability. That is why this is one indicator rather than seven separate overlays.
HOW IT WORKS ON THE CHART
- Wave labels and connecting lines draw the primary (highest-scoring) count's structure.
- A dashed projection line and a shaded forecast zone mark where the primary count expects price to go, with the zone width calibrated from the chart's own retrace history.
- A dashboard reports: the primary count with its probability share, its position and stage, the two best alternative counts, the raw confidence, the measured calibrated hit-rate once enough cases have resolved, the regime, the market-structure state (and whether it confirms or warns), the hard-rule pass/fail, wave energy, an opportunity read (confidence shaped by reward-to-risk and structure), and the target / invalidation levels.
HOW TO USE IT
- Read the ambiguity, not a single answer. The secondary and tertiary counts and their probabilities tell you how clear or murky the structure currently is.
- Trust "Calibrated" over "Confidence". Confidence is the raw structural score; the calibrated figure is the measured success rate for that confidence level on resolved cases - the honest number.
- Respect "stand aside". When confidence is below your threshold the panel says so instead of forcing a count. That is a feature.
- Use target and invalidation as context for your own plan. Invalidation is the level that would break the primary count; the forecast zone is where it expects to resolve. The script places no orders.
- Combine with your own method. The market-structure and regime rows are there so the wave read can be cross-checked against plain price action.
SETTINGS OVERVIEW
- Structure: swing sensitivity (pivot legs), max swings stored, and pivot source - wicks (high/low) or bodies (close), so it suits how you read a given market.
- Scoring weights: Fibonacci fit, proportion/look, wave-3 momentum.
- Context: ADX length and trend threshold.
- Forecast: inner/outer percentiles of the retrace distribution, minimum swings to calibrate, minimum resolved cases before the calibrated hit-rate is trusted.
- Display: minimum confidence for a "clean" count, label/zone/panel toggles, bull/bear colours.
- Alerts: new wave, count flip, invalidation breach, forecast-zone entry (via "Any alert() function call").
Pivot source is selectable and volume is used only when a symbol reports it, so the engine runs on futures, equities, forex, crypto and indices on any timeframe.
ORIGINALITY
Most Elliott tools draw a single count and stop. This one runs a bounded multi-count search, scores each hypothesis on structure plus momentum plus volume, tilts by regime and confirms against market structure, forecasts from the instrument's own retrace distribution, and - uniquely - measures its own realised hit-rate per confidence level so the number on screen is grounded in outcomes rather than asserted. It quantifies and reports its own reliability.
REPAINT NOTICE AND LIMITATIONS (honest)
- Swing detection uses confirmed pivots, which finalise a fixed number of bars after they form. The most recent leg is therefore always provisional and can change. This is inherent to Elliott structure detection and is disclosed deliberately, not hidden.
- Counts are probabilistic hypotheses, not predictions. Two analysts - and this engine on two settings - can read the same chart differently.
- Calibration is a long-run estimate over resolved cases on this chart; early on, and after a regime change, it needs samples before it means anything, and past hit-rate is not a future guarantee.
- This is context and decision-support. It is not a trading system and issues no orders.
DISCLAIMER
This script is for research and education only. It is not financial advice, not a recommendation, and not a solicitation to trade. It places no orders and guarantees no outcome. Markets carry risk; test any tool on your own data and timeframe and make your own decisions.
Indicator

Torsion Range [JOAT]Torsion Range
Introduction
Torsion Range is an open-source compression, expansion, and wave-energy panel designed to track whether the market is coiling, releasing, trending, or exhausting. The script combines wave direction, weighted energy accumulation, compression scoring, and exhaustion logic into one regime-aware panel.
The problem Torsion Range solves is fragmentation between wave tools and volatility tools. Traditional wave studies often ignore whether the market is compressing or expanding, while compression indicators often ignore directional wave state. Torsion Range merges both worlds so the user can monitor directional energy and structural volatility state together.
Core Concepts
1. Wave Direction Engine
The script supports multiple methods for determining directional wave state, including impulse, pressure, and hybrid behavior. This allows the model to adapt to different styles of price movement.
2. Weighted Energy Accumulation
Wave state is not just directional. It is weighted by body, range, ATR context, and optional relative volume to produce a more informative torsion core.
3. Compression Index
A 0-100 compression framework is built from fast and slow comparisons of range, body, and energy behavior. This allows the indicator to identify tight conditions before release.
4. Release and Exhaustion Logic
Confirmed-bar release events occur when compression gives way to directional expansion. Exhaustion logic looks for overstretched waves with weakening internal behavior.
5. Dashboard and Regime Visualization
The panel includes adaptive colors, background overlays, event flashes, and a top-right dashboard that summarizes wave state, bias, compression, and most recent event.
Features
Multi-method wave direction: Impulse, pressure, or hybrid state engine
Weighted energy accumulation: Uses price and optional relative volume
Compression scoring: Tracks coiling conditions on a normalized scale
Confirmed release logic: Detects transition from compression to directional expansion
Exhaustion detection: Flags overextended wave conditions
Adaptive gradient styling: Institutional panel presentation for dark charts
Regime overlays and event flashes: Highlights important state transitions cleanly
Top-right dashboard: Summarizes live wave and compression state
Confirmed event mode: Optional bar-close only event gating
Alertconditions: Wave flips, release events, and exhaustion states
How to Use This Indicator
Step 1: Read the Wave State
Determine whether directional energy currently favors bullish, bearish, or neutral behavior.
Step 2: Check Compression
High compression means stored energy but not yet confirmed release. Low compression with directional energy implies active movement rather than coiling.
Step 3: Watch Release Events
Release events matter most when they occur after genuine compression and align with the active wave bias.
Step 4: Respect Exhaustion
Exhaustion conditions can warn that a strong wave is becoming less efficient, even if trend has not yet fully reversed.
Indicator Limitations
Compression and exhaustion are relative, not absolute, conditions
Wave direction depends on the selected method and will respond differently across market types
This panel does not identify exact reversal bars and should not be treated as one
Release events are strongest when combined with separate structural context
Originality Statement
Torsion Range is original in its fusion of wave-state persistence, weighted energy accumulation, compression analysis, and exhaustion logic within one panel. It is not a basic Weis-style clone and not a plain volatility gauge. Its value comes from combining directional energy and volatility state into a single workflow.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Compression, release, and exhaustion states are analytical conditions derived from historical chart behavior and do not guarantee future outcomes.
- Made with passion by jackofalltrades
Indicator

Indicator

Adaptive Wave Pressure Index [JOAT]Adaptive Wave Pressure Index
Introduction
Adaptive Wave Pressure Index is a normalized slope oscillator built to measure directional pressure through the relationship between regression slope and volatility. By scaling a manually calculated OLS slope with ATR, the script produces a dimensionless momentum reading that can be compared across instruments and timeframes much more cleanly than raw slope alone.
This indicator is designed for traders who want wave pressure, not just speed. It tracks directional force, smooths that force into fast and slow lines, colors the histogram using structural swing context, and adds divergence detection for potential exhaustion.
Why This Indicator Exists
Volatility-Normalized Momentum: Regression slope is scaled by ATR to improve comparability
Fast / Slow Pressure Read: Reveals acceleration and deceleration of directional force
Structure Overlay: Swing-sequence counts add context to histogram strength
Zone Framework: Overbought and oversold thresholds define pressure extremes
Divergence Layer: Flags when price reaches new extremes without matching pressure
Core Components Explained
1. Manual OLS Slope
rawSlope = f_olsSlope(regLength)
The script calculates slope directly from the last N closes rather than relying on a built-in regression shortcut. This provides more control over normalization and display logic.
2. ATR Normalization
normSlope = rawSlope / ta.atr(atrNormPeriod)
Dividing slope by ATR transforms it into a volatility-aware measure of pressure. A positive slope on a low-volatility asset and a positive slope on a high-volatility asset become more comparable after normalization.
3. Fast / Slow Pressure System
Two EMAs are applied to the normalized slope:
Fast Line: More responsive pressure state
Slow Line: More stable reference
Histogram: Spread between fast and slow, showing acceleration or fade
4. Structural Sequence Layer
The indicator also counts consecutive higher lows and lower highs in price. When structure strongly supports the current pressure direction, histogram colors intensify. This adds a valuable distinction between pressure that is statistically rising and pressure that is also structurally confirmed.
5. Divergence and Zone Logic
The script highlights:
Fast-line crosses of overbought and oversold thresholds
Fast/slow line crosses
Bullish and bearish divergences
Divergence lines are retained with a fixed cap so the pane stays readable over time.
Visual Elements
Histogram: Pressure spread with structural-intensity color logic
Fast Line: Main directional read
Slow Line: Reference pressure line
Zero Fill: Directional bias area fill
OB/OS Background: Soft zone shading for extreme pressure
Markers: Crosses and divergence markers
Dashboard: Raw slope, normalized slope, trend, structure sequence, divergence, and active zone
Input Parameters
Regression Length: Window for OLS slope calculation
ATR Norm Period: Volatility baseline used for normalization
Fast / Slow EMA: Pressure responsiveness controls
OB / OS Levels: Extreme pressure thresholds
Pivot Left / Right: Sensitivity for structural and divergence logic
How to Use This Indicator
Step 1: Read whether fast is above or below slow.
Step 2: Check the histogram to see whether pressure is expanding or contracting.
Step 3: Use the sequence readout to judge whether price structure agrees with the oscillator.
Step 4: Treat divergences as warnings that pressure may be weakening.
Step 5: Use OB/OS events to identify stretched pressure, especially after large runs.
Best Practices
Use on instruments with clean swings and sufficient range
Respect signals more when sequence direction agrees with fast/slow direction
Use divergence with structure, not by itself
Increase regression length for smoother wave pressure
Lower lengths react faster but create more noise
Indicator Limitations
Normalized slope improves comparison but does not eliminate market differences
Pressure can stay elevated in strong trends
Divergences can persist before price turns
Short settings increase false transitions
Structure counts are descriptive, not predictive
Technical Implementation
Built in Pine Script v6 using:
Manual OLS slope computation
ATR normalization
Dual-EMA pressure smoothing
Pivot-based structure counting
Capped divergence-line management
Confirmed-bar signal generation
Originality Statement
This indicator is original in the way it combines normalized regression slope, structural sequence intensity, and divergence management into a single wave-pressure framework. Its purpose is not just to show direction, but to show how forceful and how structurally supported that direction is.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Momentum and divergence tools can fail, especially during volatile transitions. Always use proper risk management and independent confirmation.
-Made with passion by officialjackofalltrades
Indicator

Quantum Momentum Wave [Pineify]Quantum Momentum Wave
Quantum Momentum Wave is a signed peak-momentum oscillator paired with a Kaufman-style adaptive filter. Instead of measuring the net change from one point to another, the wave scans the full lookback window and returns the largest absolute price displacement with its original sign. The wave is linearly smoothed and then tracked by an adaptive signal line, so entry markers fire on context-filtered reversals rather than every momentum flip.
Key Features
Signed peak-momentum engine that isolates the strongest move inside the lookback
Linear regression smoothing to tame the step-change behavior of raw peak readings
Adaptive signal line that speeds up when the wave is stretched and slows down in noise
Zone-filtered BUY and SELL markers that only fire when the wave is past zero in the opposite direction
Gradient fill between the wave and zero — bullish above, bearish below
Alerts for reversal setups and for zero-line regime shifts
How It Works
The core function is a QMW scan. On each bar it walks the last Momentum Lookback bars, computes price minus each historical bar, and keeps the comparison that produced the largest absolute change. It returns that value with its original sign. So a -6 reading means the single strongest move inside the window was a 6-unit drop, even if the bar-to-bar change right now is small.
Raw peak readings step when a new candle takes over as the dominant move, so the output is passed through linear regression over the Signal Smoothing length. LR fits a straight line through the recent raw values and returns its endpoint, preserving signed direction while cutting short-term jitter.
The adaptive signal runs a Kaufman-style update on top of the smoothed wave. Its coefficient is the ratio of the wave's absolute value to the sum of its recent absolute one-bar changes. When momentum is clearly extended and directional, the ratio is high and the signal follows quickly. When the wave oscillates near zero, the ratio collapses and the line nearly freezes.
How the Components Work Together
Three layers combine into one output. The peak scan answers how hard has price moved inside the window, not just where it ended. Linear regression answers what is the underlying direction of the peak reading after filtering out one-bar swaps between competing peak bars. The adaptive signal answers when has that direction actually shifted by providing a responsive reference line.
Entries layer a location filter on top. A crossover only qualifies when the wave is on the opposite side of zero — buys look for the wave turning up while stretched below zero, sells for the wave rolling over while stretched above it. Crosses near the midline are ignored because they tend to be low-conviction flips without prior displacement, so the setup is biased toward reversals from extended states rather than trend-chasing entries.
Trading Ideas and Insights
BUY triangles below zero can flag exhaustion of a downside push and a possible rotation back toward the mean
SELL triangles above zero can flag fading upside strength after an extended rally
Zero-line crosses act as broader regime markers; alerts on those can frame intraday bias
During strong trends the wave may stay on one side of zero for many bars. Counter-trend BUY or SELL labels in that state often need extra confirmation from price structure or higher-timeframe context
Signals are context aids, not standalone trade instructions. Past reactions at these conditions do not guarantee future ones.
Unique Aspects
The momentum calculation returns the peak signed displacement within the lookback, not a simple close-minus-close value. The reading stays elevated while the dominant move is still inside the window, which tracks the strongest displacement in memory rather than just endpoint delta
The adaptive signal uses a non-standard variation of Kaufman's efficiency ratio — absolute wave value divided by total absolute wave travel — tuned for oscillator input rather than raw price
Entry markers require both a crossover and a zone match. No label prints for a crossover that happens in the neutral zone around zero, which filters out the weakest setups
How to Use
Add the indicator to the chart and start with the defaults. The thicker line is the Quantum Wave; the fainter line is the Adaptive Signal
Read the wave color and the gradient fill to see which side of zero the wave is on and how stretched it is
Watch for BUY triangles when the wave is clearly below zero and turning up through the signal line
Watch for SELL triangles when the wave is clearly above zero and turning down through the signal line
Configure alerts for buy, sell, or zero-cross conditions if you want notifications outside the chart
Customization
Source Data (default: close) — Price series used for the peak momentum scan
Momentum Lookback (default: 14) — Window size for the peak displacement scan. Higher values capture broader swings; lower values react faster
Signal Smoothing (default: 9) — Linear regression length applied to the raw wave. Higher values produce a cleaner line with more lag
Bullish Color / Bearish Color — Wave color in positive and negative territory, and the BUY/SELL marker colors
Adaptive Signal Color — Color of the adaptive reference line; a subtle contrast against the wave usually reads cleanest
Limitations
Linear regression smoothing introduces a small amount of lag. On fast reversals the wave can reach the crossover a few bars after price has already moved
Because the adaptive ratio uses the wave's own value, very small wave readings near zero make the signal line nearly freeze. This is deliberate but means the reference reacts slowly while momentum is mild
Mean-reversion style BUY and SELL labels can occur repeatedly during strong trends. Pair them with price structure or higher-timeframe bias instead of using them in isolation
Conclusion
Quantum Momentum Wave is for traders who want an oscillator that reflects the strongest recent move rather than the endpoint delta. Its value comes from the combination of peak-momentum measurement, linear regression smoothing, and an adaptive reference line that only produces labels when the wave is both stretched past zero and visibly turning back. Indicator

Artemis Volatility Bands PRO🟦 Artemis Volatility Bands PRO is a price-overlay volatility indicator built on the KernelLens Nadaraya–Watson regression library (a_jabbaroff/KernelLens/1). A single kernel estimate — selectable from eight classical kernel families — anchors the Basis line. Around it, two outer bands fan outward by a fixed multiple of the residual standard deviation, creating an envelope whose width is model-consistent with the kernel. The interior is washed with a 6-layer neon halo that mirrors the statistical density of price residuals under normality. A signal engine detects basis-breaks with confirming slope direction, guarded by Confirmed (zero-repaint) or Realtime mode. Twelve cohesive color themes, a theme-aware Dark / Light dashboard, and four opt-in alert conditions complete the indicator.
🟦 HOW IT WORKS
Artemis Volatility Bands PRO fuses two mathematical operations on every bar — a single kernel regression pass and a residual standard deviation calculation:
basis = kl.estimate(type, src, ℓ, α, period, phase, filter)
sigma = kl.confidenceBand(src, basis, window)
upper = basis + k · σ
lower = basis − k · σ
where ℓ is the Primary Bandwidth, k is the Band Multiplier, and window is the Residual σ Window. The kernel regression produces the Basis line, and the residual standard deviation (σ of price − basis) produces the per-σ band half-width.
This architecture collapses classical Bollinger band duality: in Bollinger bands, the moving average and volatility estimate live in different statistical universes. In Artemis, both emerge from a single kernel pass, so the envelope is internally consistent by construction. The Basis is always non-parametric, and the band width always measures deviation relative to the Basis, never to a disconnected moving average.
The library handles all weighted-sum computation, kernel weight evaluation, NA-safe iteration, division-by-zero guards, and input validation internally. Artemis Volatility Bands PRO does not reimplement any kernel math — every bug fix or optimization in the library automatically propagates to this indicator.
🟦 KERNEL LIBRARY INTEGRATION
Artemis Volatility Bands PRO imports the published KernelLens library and uses the following exports:
| Library Export | Used For |
|---|---|
| `kl.estimate()` | Unified dispatcher — routes to the correct kernel based on the user's Kernel Type dropdown. Called once per bar to produce the Basis line. |
| `kl.confidenceBand()` | Rolling residual standard deviation — computes σ of (source − basis) over the specified window. |
| `kl.trendState()` | Ternary trend detector — returns +1 (rising), 0 (flat), or −1 (falling) based on a 1-bar finite difference of the Basis. |
Every regression computation — kernel weight evaluation, NA-safe summation, bandwidth-aware loop termination — is delegated to the library. The indicator itself contains zero kernel math; it only orchestrates three library calls and aggregates their outputs into the band envelope and signal logic.
🟦 KERNEL REGRESSION & RESIDUAL VOLATILITY
**The Basis line** — A non-parametric kernel regression anchored to the user's choice of price source (default: close; also supports hl2, ohlc4, custom). Eight kernel families available:
| Kernel | Behavior | Best For |
|---|---|---|
| Rational Quadratic | Multi-scale mixer; α controls stretch | Default, balanced responsiveness |
| Gaussian / RBF | Canonical smoother, infinitely differentiable | Smooth trend, minimize noise |
| Periodic | Resonates with a known repetition distance p | Cyclic markets, seasonal patterns |
| Locally Periodic | Periodic × gaussian blend | Seasonal + trend drift |
| Epanechnikov | MSE-optimal, compact support | Minimal tail contamination |
| Tricube | LOWESS standard, near-Gaussian profile | Fast computation, robust |
| Triangular | Simplest compact kernel | Lightweight, real-time responsiveness |
| Cosine | Raised-cosine, smooth boundary transition | Smooth rolloff, professional appearance |
Three filter modes applied on top of the raw kernel estimate:
| Filter | Description | Use Case |
|---|---|---|
| No Filter | Single-pass Nadaraya–Watson | Rawest output, maximum responsiveness |
| Smooth | Double-pass: kernel applied to its own output | Cleaner, slightly more lag |
| Zero Lag | Ehlers de-lagging: 2·raw − smooth | Sharpens edges without increasing lag |
**Residual volatility** — Once the Basis is computed, the per-bar residual is (source − basis). The residual standard deviation is the rolling σ of this residual over a configurable window (default: 14 bars). This is the model-consistent volatility estimate — price deviations are measured relative to the kernel Basis, guaranteeing alignment between trend and volatility.
**Band levels** — upper = basis + k · σ and lower = basis − k · σ, where k is the Band Multiplier (default: 2.0, Bollinger-style). The multiplier is user-adjustable from 0.5 (tight) to 5.0 (wide).
🟦 SIGNAL ENGINE
Artemis fires Long / Short signals when price breaks the Basis with a confirming slope direction:
Long → close > basis AND basis rising
Short → close < basis AND basis falling
The signal state is persistent — once a direction flips, it remains latched until the opposite condition fires. This state machine (vii ∈ {−1, 0, +1}) ensures the Basis hue stays coherent across bars even when the raw trigger is a single-bar event.
Signal markers fire ONLY on the bar the state flips, not on every bar that satisfies the raw condition. This keeps the chart uncluttered and mirrors how discretionary traders consume trend-flip information.
**Signal Mode** — Two gating options:
| Mode | Behavior | Repaint |
|---|---|---|
| Confirmed | Signals fire ONLY after the bar closes via `barstate.isconfirmed` | Zero repaint, fully reliable for live trading |
| Realtime | Signals fire on the current (open) bar as soon as the condition is met | Fastest reaction; signal may vanish if price reverses before bar closes |
Historical repainting never occurs at any Signal Mode value. The library's `_phase` parameter shifts every kernel center into the past by that many bars, so historical bars' plotted values are final once confirmed.
🟦 6-LAYER NEON HALO VISUALIZATION
The interior between the Basis and each outer band is filled with a 6-layer gradient: 5 interior step plots plus the outer band, creating a stepped transparency schedule that mirrors the statistical density of price residuals under normality.
**Transparency schedule:**
| Layer | Transparency | Meaning |
|---|---|---|
| Outer band ↔ 1st interior | 70 % | Densest layer |
| 1st ↔ 2nd | 78 % | |
| 2nd ↔ 3rd | 85 % | |
| 3rd ↔ 4th | 90 % | |
| 4th ↔ 5th | 95 % | |
| 5th ↔ Basis | 98 % | Nearly invisible fade to centerline |
Every transparency value is scaled by the Gradient Intensity input (0–100 %), so the user can dial the visual density from invisible (0) to heavy fills (100).
**Color assignment:**
- Upper band + gradient: Bearish theme hue (short signal color)
- Lower band + gradient: Bullish theme hue (long signal color)
- Basis line: Slope-adaptive color (thBull when rising, thBear when falling, previous color on flat bars)
**Signal markers** — Two-layer neon glow plotshapes:
- Halo: size.small, 40 % opaque theme hue (glow layer)
- Core: size.tiny, 100 % opaque theme hue (bright center)
🟦 THEME SYSTEM
Twelve cohesive color palettes tuned to every trading aesthetic. One selection drives every visual component — Basis line, outer bands, gradient halos, long / short signal markers, dashboard accents — all sharing the same bull / bear / neutral color axes:
| Theme | Bull | Bear | Usage |
|---|---|---|---|
| Tropic | Cyan steel | Deep orange | Default, electric contrast |
| Amber | Warm amber | Indigo blue | Fire tones |
| Pastel | Sky blue | Soft lavender | Cool arctic glow |
| Cyber | Neon lime | Hot crimson | Cyber terminal aesthetic |
| Helios | Bright gold | Scarlet | Solar warmth |
| Electric | Electric aqua | Magenta | High-voltage neon |
| Candy | Neon green | Hot pink | Dark energy pop |
| Bloomberg | Terminal orange | Cyan | Wall Street finance heritage (PRO) |
| Solar | Solarized olive | Crimson | Developer palette, easy on eyes (PRO) |
| Royal | Imperial gold | Deep purple | Luxury signature (PRO) |
| Midnight | Deep navy | Dark crimson | Dark depth |
| Graphite | Near-black | Silver grey | Monochrome minimal |
**Dashboard display modes** — Dark (black background, bright accents) or Light (white background, darker accents), auto-adapting visual contrast regardless of chart background.
🟦 DASHBOARD
A 2-column, 9-row theme-aware status panel that updates only on the last bar (zero historical overhead). Supports Dark and Light display modes, six docking positions, and four text sizes. Renders via `force_overlay = true` on the main price chart.
| Row | Label | Content |
|---|---|---|
| Header | ARTEMIS PRO | DARK / LIGHT |
| Theme | Theme | Active palette name |
| Divider | KERNEL | — |
| Type | Type | Selected kernel type |
| Bandwidth ℓ | Bandwidth ℓ | Primary bandwidth + Phase φ |
| Basis | Basis | Current Basis value in chart mintick format |
| Divider | VOLATILITY | — |
| Residual σ | Residual σ | Current residual standard deviation |
| Signal | Signal | ▲ LONG / ▼ SHORT / ━ FLAT (direction-colored) |
🟦 ALERT CONDITIONS
Four opt-in alert conditions, each gated by its own toggle:
| Alert | Fires When |
|---|---|
| Long Signal | Price breaks above the Basis with a rising slope (confirmed state flip) |
| Short Signal | Price breaks below the Basis with a falling slope (confirmed state flip) |
| Upper Band Touch | Price touches or exceeds the upper outer band (raw crossover) |
| Lower Band Touch | Price touches or falls below the lower outer band (raw crossunder) |
Band touch alerts are useful as pre-signal early warnings in trending markets. Signal alerts are gated by the Signal Mode setting, so Confirmed mode ensures zero-repaint alerts suitable for live trading.
All alerts use `alertcondition()` for maximum compatibility with PulseWire's alert system including webhooks. Messages are structured as `"Artemis Volatility Bands: "` for easy parsing in downstream automation.
🟦 RECOMMENDED PRESETS
| Trading Style | Bandwidth ℓ | Filter | Residual σ Window | Phase |
|---|---|---|---|---|
| Scalper | 10–20 | No Filter | 8–10 | 1 |
| Day Trader | 20–40 | Smooth | 14 | 2 |
| Swing | 30–60 | Smooth | 20–40 | 2 |
| Position | 60–120 | Smooth | 40–60 | 3 |
**Bandwidth tuning** — Smaller ℓ produces a tighter fit to price and faster reaction; larger ℓ produces smoother curves and more stability. Experiment with ℓ in your preferred style's range, then adjust the Residual σ Window and Filter mode for visual smoothness.
**Phase tuning** — Phase = 0 is live (flickers on the current bar); Phase = 2 is the recommended balance; Phase = 3+ adds margin against noise at the cost of lag. Historical charts are immutable at any phase value.
🟦 KERNEL-ONLY DESIGN PHILOSOPHY
Artemis Volatility Bands PRO contains zero classical technical analysis bolt-ons. No Bollinger Bands, no Keltner Channels, no linear regression, no ATR, no moving averages — only kernel regression and residual volatility. This kernel-only architecture guarantees that:
1. **Internal consistency** — The Basis and band width emerge from a single statistical model, not from mixing independent techniques.
2. **Unified parameterization** — All visual outputs (Basis, bands, gradient) are controlled by a single set of kernel-theoretic parameters.
3. **No analytical compromise** — Every choice in the indicator is mathematically motivated; no ad-hoc decorations.
The philosophy is defensive: traders who layer Artemis on top of their own edge strategies get a pure kernel-regression envelope that will not conflict with classical-TA signals already in use. Traders seeking a standalone kernel-based indicator get a complete, coherent system.
🟦 COMPATIBILITY
- Pine Script v6
- All exchanges, all asset classes (crypto, forex, equities, commodities, indices)
- All timeframes (1 minute through Monthly)
- Both Dark and Light chart themes — visual elements auto-adapt to chart background
- No exchange-specific logic — fully deterministic
Indicator renders on the main overlay chart with `force_overlay = true`. No secondary panes, no subplot logic.
🟦 TECHNICAL NOTES
- **Library dependency** — `import a_jabbaroff/KernelLens/1` — all kernel regression math is delegated to the published library
- **Plot budget** — 2 outer bands + 10 gradient interior plots + 1 Basis + 1 transparent anchor + 4 signal shapes + 12 fills + 4 alertconditions = 34 outputs, well under Pine's 64-output hard limit (50 % margin)
- **Table** — Single `var table` created once on `barstate.islast` with `force_overlay = true`; dashboard renders on the main chart pane, zero historical overhead
- **No persistent drawing objects** — no `box.new`, `line.new`, no `array.new`; all visuals are plots and fills
- **Opacity convention** — every user-facing opacity / transparency input follows `0 = invisible, 100 = fully opaque`; conversion to Pine's native transparency is centralized in a single helper function (`f_opac`)
- **Non-repainting** — inherits from the library's `_phase` parameter; no `request.security`, no lookahead, no future-bar leakage at any phase value
- **Residual consistency** — The residual σ is computed as `ta.stdev(source − basis, window)`, ensuring the band width always measures deviation relative to the kernel Basis
🟦 DISCLAIMER
Artemis Volatility Bands PRO is a technical analysis indicator built on the KernelLens Nadaraya–Watson regression library. It is provided solely for educational and research purposes and does not constitute financial, investment, or trading advice.
Kernel regression is a local smoothing technique. It estimates the mean of a source series in the neighborhood of the current bar based on historical data, but it does not predict future prices, does not generate trading signals on its own, and does not guarantee the profitability of any strategy built on top of its output. The signal engine is a mechanical detector of basis breaks and slope direction — not a forecast — and should always be combined with broader context: higher-timeframe structure, volatility regime, liquidity, news, and risk management.
Past performance of any model does not guarantee future results. Markets contain systemic risks that cannot be eliminated by any amount of mathematical rigor. Responsibility for any trading decisions rests entirely with the user. Always apply sound capital management, conduct your own independent analysis, and never risk capital you are not prepared to lose.
The author assumes no liability for direct or indirect losses incurred through the use of Artemis Volatility Bands PRO or the underlying KernelLens library. Indicator

Velocity Spectrum Analyzer [JOAT]Velocity Spectrum Analyzer
Introduction
The Velocity Spectrum Analyzer is an advanced open-source momentum wave system that combines Munich Wave methodology with ALMA enhancement and multi-basis momentum tracking. This indicator analyzes momentum across five distinct velocity layers, creating a spectrum of momentum waves that reveal trend strength, regime shifts, and momentum alignment across multiple timeframes.
Unlike single-line momentum indicators, the Velocity Spectrum Analyzer provides multi-dimensional momentum analysis through layered EMA calculations, ALMA enhancement, regime classification, and spread analysis. The indicator is designed for traders who understand that momentum flows in waves and that multi-layer alignment signals institutional conviction.
Why This Indicator Exists
This indicator addresses the need for multi-dimensional momentum analysis. By combining five momentum layers with ALMA enhancement and regime detection, it reveals:
Five Velocity Layers: Fast (9), Medium (21), Slow (55), Very Slow (100), and Ultra Slow (200) EMAs create a momentum spectrum
ALMA Enhancement: Arnaud Legoux Moving Average provides adaptive smoothing with reduced lag
Basis Calculations: Averages between EMA layers create intermediate momentum levels
Regime Classification: Extreme Bull/Bear detection using Bollinger-style bands
Spread Analysis: Distance between fast and slow layers measures momentum strength
Wave State Detection: All layers bullish or bearish signals strong directional momentum
Background Coloring: Visual regime indication shows extreme conditions
Core Components Explained
1. Core Momentum Calculation
The indicator starts with basic momentum (current close minus close N bars ago), then applies ALMA for adaptive smoothing:
The ALMA offset (default 0.85) and sigma (default 6) parameters control the balance between responsiveness and smoothness. Higher offset values shift the average toward recent prices, while higher sigma values increase smoothness.
2. Five EMA Layers
Five EMAs are calculated on the momentum values:
Fast EMA (9): Captures short-term momentum shifts
Medium EMA (21): Tracks intermediate momentum trends
Slow EMA (55): Identifies primary momentum direction
Very Slow EMA (100): Reveals long-term momentum bias
Ultra Slow EMA (200): Shows institutional momentum positioning
Each layer responds at different speeds, creating a spectrum of momentum perspectives.
3. Basis Calculations
Five basis levels are calculated as averages between EMA layers:
Basis 1: Average of Fast and Medium EMAs
Basis 2: Average of Medium and Slow EMAs
Basis 3: Average of Slow and Very Slow EMAs
Basis 4: Average of Very Slow and Ultra Slow EMAs
Basis 5: Average of Ultra Slow and Fast EMAs (wraps around)
These basis levels create intermediate momentum zones that smooth transitions between layers.
4. Trend Classification Functions
Two functions classify momentum direction:
Growing: Momentum > basis (bullish momentum)
Falling: Momentum <= basis AND momentum <= ALMA (bearish momentum)
Each basis is classified independently, creating five separate momentum assessments.
5. Regime Detection with Bollinger-Style Bands
The indicator calculates bands around the average of all five basis levels:
Origin: SMA of basis average (default 25 periods)
Deviation: Standard deviation multiplied by factor (default 6.0)
Top Band: Origin + deviation (extreme bullish threshold)
Bottom Band: Origin - deviation (extreme bearish threshold)
When basis 1 and ALMA both exceed the top band with rising momentum, the indicator signals extreme bullish conditions. When both fall below the bottom band with falling momentum, it signals extreme bearish conditions.
6. Mean Range Calculation
A long-term mean range (default 415 bars) tracks the highest and lowest basis average values. The center of this range serves as a reference point for ALMA positioning. When ALMA is above the center mean with all layers bullish, strong upward momentum is confirmed.
7. Wave State Analysis
The indicator tracks when all five basis levels are simultaneously bullish or bearish:
All Bullish: All five basis levels show growing momentum - strong uptrend
All Bearish: All five basis levels show falling momentum - strong downtrend
Mixed: Some layers bullish, some bearish - transitional or choppy conditions
Wave state alignment indicates institutional conviction across all momentum timeframes.
8. Spread Calculation
The spread between Basis 1 (fastest) and Basis 5 (slowest) measures momentum divergence:
Positive Spread (> 10): Fast momentum exceeds slow momentum - bullish acceleration
Negative Spread (< -10): Fast momentum below slow momentum - bearish acceleration
Extreme Spread (> 20 or < -20): Very strong momentum divergence - potential exhaustion
Large spreads indicate strong directional momentum, while narrowing spreads warn of momentum loss.
Visual Elements
Five Velocity Layer Lines: Thick colored lines showing each basis level with dynamic coloring (cyan = bullish, yellow = bearish, white = neutral)
ALMA Enhanced Line: Separate line showing ALMA-adjusted momentum with tri-color scheme
Wave State Line: Zero line colored based on overall wave state
Background Regime: Red background for extreme bull, green background for extreme bear
Information Dashboard: Displays wave state, regime, spread, ALMA position, momentum value, layer alignment, and signal status
Signal Generation
The indicator generates four types of signals:
Lean Short: Bearish crossover with falling Basis 1 and 2, spread <= -10
Maybe Buy: Bearish crossover with falling Basis 1 and 2, extreme bear regime, spread <= -20 (oversold)
Lean Long: Bullish crossover with growing Basis 1 and 2, spread >= 10
Maybe Sell: Bullish crossover with growing Basis 1 and 2, extreme bull regime, spread >= 20 (overbought)
Additional signals:
All Aqua: All layers bullish for 4+ consecutive bars - strong uptrend confirmation
All Yellow: All layers bearish for 4+ consecutive bars - strong downtrend confirmation
How to Use This Indicator
Step 1: Check Wave State
Monitor the dashboard for wave state (All Bullish, All Bearish, or Mixed). Trade in the direction of wave state alignment.
Step 2: Analyze Regime
Watch for extreme bull/bear regimes (red/green backgrounds). These often precede reversals or strong continuation moves.
Step 3: Monitor Spread
Large spreads (> 20 or < -20) indicate strong momentum but potential exhaustion. Narrowing spreads warn of momentum loss.
Step 4: Check ALMA Position
ALMA above center mean with bullish layers confirms uptrend. ALMA below center mean with bearish layers confirms downtrend.
Step 5: Count Layer Alignment
The dashboard shows how many layers are bullish (X/5). 5/5 bullish = strongest uptrend, 0/5 bullish = strongest downtrend.
Step 6: Wait for Signal Confirmation
Lean Long/Short signals work best when wave state aligns. Maybe Buy/Sell signals at extremes offer reversal opportunities.
Best Practices
Trade with wave state alignment, not against it
Use extreme regimes as reversal warnings, not continuation signals
Monitor spread for momentum strength - large spreads indicate strong trends
Wait for all layers to align (5/5) before taking aggressive positions
Use Maybe Buy/Sell signals only at extreme regimes with high spread
Combine with price action - momentum shows intent, price shows result
Be cautious when layers are mixed (2/5 or 3/5) - indicates choppy conditions
Watch for spread narrowing as early warning of trend exhaustion
Input Parameters
Momentum Engine:
Source: Price input (default: close)
Momentum Length: Period for momentum calculation (default: 21)
ALMA Offset: Offset parameter for ALMA (default: 0.85)
ALMA Sigma: Sigma parameter for ALMA (default: 6)
Momentum Layers:
Fast EMA: Short-term momentum (default: 9)
Medium EMA: Intermediate momentum (default: 21)
Slow EMA: Primary momentum (default: 55)
Very Slow EMA: Long-term momentum (default: 100)
Ultra Slow EMA: Institutional momentum (default: 200)
Regime Classification:
Mean Lookback: Period for mean range (default: 415)
StdDev Length: Period for standard deviation (default: 25)
StdDev Multiplier: Band width multiplier (default: 6.0)
Background Offset: Shift background display (default: 0)
Visual Configuration:
Bullish Color: Color for bullish momentum (default: cyan)
Bearish Color: Color for bearish momentum (default: yellow)
Neutral Color: Color for neutral momentum (default: white)
Enable Alerts: Toggle alert conditions (default: enabled)
Originality Statement
This indicator is original in its multi-layer momentum approach. While individual components (EMAs, ALMA, momentum) are established concepts, this indicator is justified because:
It combines five distinct momentum layers into a unified spectrum analysis
The basis calculation system creates intermediate momentum zones between layers
ALMA enhancement provides adaptive smoothing with reduced lag
Regime detection using Bollinger-style bands on basis average identifies extremes
Wave state analysis tracks alignment across all five layers simultaneously
Spread calculation measures momentum divergence between fast and slow layers
The comprehensive dashboard presents all momentum dimensions simultaneously
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Momentum analysis does not guarantee profitable trades. Past momentum patterns do not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by officialjackofalltrades Indicator

Quantum Flux Oscillator [JOAT]Quantum Flux Oscillator
Introduction
The Quantum Flux Oscillator is an advanced open-source momentum detection system that synthesizes six distinct analytical methodologies into a unified institutional-grade oscillator. This indicator combines Volume Flux Indicator (VFI), Laguerre RSI, Fisher Transform, True Strength Index (TSI), Money Flow Index (MFI), and On-Balance Volume (OBV) with Accumulation/Distribution analysis to create a comprehensive momentum engine that reveals institutional positioning and market regime shifts.
Unlike traditional single-dimension oscillators, the Quantum Flux Oscillator provides multi-layered momentum intelligence through weighted composite calculations, regime classification, velocity tracking, and divergence detection. The indicator is designed for traders who understand that momentum precedes price and that institutional footprints can be detected through systematic multi-indicator confluence.
Why This Indicator Exists
This indicator addresses a critical gap in momentum analysis: the ability to detect institutional momentum shifts before they become obvious to retail traders. By combining multiple momentum methodologies with volume-weighted analysis, this indicator reveals:
Volume Flux Intelligence: Detects unusual volume-price relationships that signal institutional activity
Laguerre RSI: Zero-centered adaptive RSI that responds faster to price changes while filtering noise
Fisher Transform: Converts momentum into a Gaussian normal distribution for clearer extreme identification
True Strength Index: Double-smoothed momentum that separates genuine trends from noise
Money Flow Analysis: Tracks buying and selling pressure through volume-weighted price movements
Volume Confirmation: Integrates OBV and A/D Line to confirm momentum with volume flow
Regime Classification: Categorizes market conditions as Extreme Bull, Bullish, Neutral, Bearish, or Extreme Bear
Multi-Timeframe Alignment: Confirms momentum across higher timeframes for conviction measurement
Each component provides a different perspective on momentum. VFI shows volume-driven momentum, Laguerre RSI shows adaptive momentum, Fisher Transform shows statistical extremes, TSI shows smoothed directional momentum, MFI shows money flow momentum, and OBV/A/D show cumulative volume momentum. Together, they create a comprehensive view of institutional momentum positioning.
Core Components Explained
1. Volume Flux Indicator (VFI)
VFI measures the relationship between price movement and volume to identify institutional accumulation or distribution. The calculation uses logarithmic price changes and volume cutoffs to filter significant moves:
The indicator classifies volume-price relationships by comparing actual volume against average volume with a cutoff threshold. When price moves significantly with volume above the cutoff, it signals institutional participation. VFI is scaled and smoothed to create a momentum baseline that responds to volume-confirmed price movements.
2. Laguerre RSI (Zero-Centered)
Laguerre RSI applies a four-stage Laguerre filter to price data, creating an adaptive RSI that responds faster to recent price changes while maintaining smoothness. The zero-centered output ranges from -50 to +50, making it easier to identify bullish and bearish momentum:
The Laguerre filter uses a gamma parameter (default 0.4) to control responsiveness. Lower gamma values create faster response, while higher values create smoother output. The zero-centered format allows direct comparison with other momentum components.
3. Fisher Transform
The Fisher Transform converts the composite momentum into a Gaussian normal distribution, making extreme values more identifiable. This transformation compresses the middle range and expands the tails, creating clearer overbought and oversold signals:
The Fisher Transform output oscillates around zero with extreme values typically beyond +2 and -2. These extremes often precede reversals as momentum reaches unsustainable levels.
4. True Strength Index (TSI)
TSI applies double exponential smoothing to price momentum, creating a smooth oscillator that filters out short-term noise while preserving trend direction. The calculation uses two EMA periods (default 25 and 13) to separate signal from noise:
TSI values above zero indicate bullish momentum, while values below zero indicate bearish momentum. The double smoothing reduces whipsaws while maintaining responsiveness to genuine momentum shifts.
5. Money Flow Index (MFI)
MFI is a volume-weighted RSI that measures buying and selling pressure. It calculates the ratio of positive money flow (volume on up days) to negative money flow (volume on down days):
MFI values above 80 indicate overbought conditions with high volume, while values below 20 indicate oversold conditions with high volume. The indicator normalizes MFI to a zero-centered scale for integration with other components.
6. On-Balance Volume (OBV) and Accumulation/Distribution (A/D)
OBV and A/D track cumulative volume flow to confirm momentum direction. OBV adds volume on up days and subtracts on down days, while A/D weights volume by the close's position within the day's range:
Both indicators are normalized to a 0-100 scale and then zero-centered for composite integration. Rising OBV/A/D with rising momentum confirms institutional accumulation, while falling OBV/A/D with rising price warns of distribution.
Quantum Flux Core Calculation
The Quantum Flux Core combines all components using weighted averaging:
Quantum Flux = (VFI × 0.20) + (Laguerre RSI × 0.20) + (Fisher × 0.15) + (TSI × 0.15) + (MFI × 0.10) + (OBV × 0.10) + (A/D × 0.05) + (CMF × 0.05)
This weighted approach emphasizes volume-driven components (VFI, Laguerre) while incorporating smoothed momentum (Fisher, TSI) and volume confirmation (MFI, OBV, A/D, CMF). The result is smoothed with an EMA to create the final Quantum Flux line.
Regime Classification System
The indicator classifies market conditions into five regimes based on Quantum Flux levels:
Extreme Bull (QF > 35): Institutional buying pressure at extreme levels, potential exhaustion
Bullish (QF > 25): Strong bullish momentum with institutional participation
Neutral (-25 < QF < 25): Balanced conditions, no clear institutional bias
Bearish (QF < -25): Strong bearish momentum with institutional selling
Extreme Bear (QF < -35): Institutional selling pressure at extreme levels, potential capitulation
Regime shifts often precede significant price moves as institutional positioning changes. The indicator tracks regime changes and generates signals when momentum confirms directional bias.
Multi-Timeframe Alignment
The indicator requests Quantum Flux data from three customizable higher timeframes (default: 5m, 15m, 60m) and calculates alignment:
Strong Aligned (3/3): All timeframes show bullish/bearish momentum - high conviction
Aligned (2/3): Majority timeframes confirm - moderate conviction
Weak (1/3): Only one timeframe confirms - low conviction
No Alignment (0/3): No timeframe confirmation - conflicting signals
Strong alignment across multiple timeframes indicates institutional participation at scale, as large orders are often split across timeframes to minimize market impact.
Velocity and Acceleration Tracking
The indicator calculates momentum velocity (rate of change) and acceleration (change in velocity):
Velocity: Current Quantum Flux minus previous bar's value
Acceleration: Current velocity minus previous velocity (second derivative)
Accelerating momentum often precedes breakouts as institutional orders hit the market. Decelerating momentum warns of potential reversals or consolidation.
Visual Elements
Quantum Flux Line: Main oscillator with regime-based color coding (cyan = extreme bull, aqua = bullish, yellow = neutral, red = bearish, magenta = extreme bear)
Threshold Lines: Horizontal lines at +35 (extreme overbought), +25 (overbought), 0 (zero line), -25 (oversold), -35 (extreme oversold)
Velocity Histogram: Shows momentum velocity with color-coded bars (green = rising, red = falling)
Acceleration Columns: Displays momentum acceleration to identify momentum shifts early
Regime Strength Bars: Visual regime indicator showing current market condition strength
Gradient Glow Effect: Multiple layered fills create a glowing effect that emphasizes momentum intensity
Information Dashboard: Comprehensive table displaying all metrics in real-time with color-coded cells
The dashboard displays 10 key metrics: Regime, Flux Value, HTF Confirmation, MFI, CMF, Velocity, Divergence, Volume, and Signal status.
Signal Generation
The indicator generates two types of signals:
Primary Reversal Signals:
Bullish Reversal: Quantum Flux in extreme oversold (< -35), rising momentum, positive velocity acceleration, and HTF confirmation
Bearish Reversal: Quantum Flux in extreme overbought (> 35), falling momentum, negative velocity acceleration, and HTF confirmation
Momentum Crossover Signals:
Bullish Momentum: Quantum Flux crosses above -25 (oversold threshold) with positive velocity and volume confirmation
Bearish Momentum: Quantum Flux crosses below +25 (overbought threshold) with negative velocity and volume confirmation
Signals include anti-overlap logic to prevent signal clustering and ensure clean chart presentation.
Divergence Detection
The indicator detects both regular and hidden divergences between price and Quantum Flux:
Regular Bullish Divergence: Price makes lower low, Quantum Flux makes higher low (potential reversal up)
Regular Bearish Divergence: Price makes higher high, Quantum Flux makes lower high (potential reversal down)
Hidden Bullish Divergence: Price makes higher low, Quantum Flux makes lower low (trend continuation up)
Hidden Bearish Divergence: Price makes lower high, Quantum Flux makes higher high (trend continuation down)
Divergences are drawn with clean lines (solid for regular, dashed for hidden) without text clutter.
How to Use This Indicator
Step 1: Monitor Regime Classification
Watch for regime shifts between Extreme Bear, Bearish, Neutral, Bullish, and Extreme Bull. Regime changes often precede significant price moves.
Step 2: Check Multi-Timeframe Alignment
Strong alignment (3/3) across timeframes confirms institutional conviction. Weak or no alignment suggests retail-driven moves that may lack follow-through.
Step 3: Analyze Velocity and Acceleration
Accelerating momentum (positive acceleration) often precedes breakouts. Decelerating momentum (negative acceleration) warns of potential reversals.
Step 4: Look for Divergences
Regular divergences at extreme levels (QF > 35 or < -35) often signal reversals. Hidden divergences confirm trend continuation.
Step 5: Confirm with Volume Metrics
Check MFI, CMF, OBV, and A/D for confirmation. Rising volume metrics with rising Quantum Flux confirms institutional accumulation.
Step 6: Wait for Signal Confirmation
Primary reversal signals at extreme levels with HTF confirmation provide highest probability setups. Momentum crossover signals work best in trending markets.
Best Practices
Use on liquid instruments (major forex pairs, large-cap stocks, major crypto) for most reliable signals
Combine with price action analysis - momentum shows intent, price shows result
Pay attention to extreme levels (QF > 35 or < -35) as these often precede reversals
MTF alignment is most reliable in trending markets, less reliable in choppy conditions
Extreme momentum can persist longer than expected during strong trends - use stops
Look for momentum divergences at key support/resistance levels for highest probability setups
Monitor velocity and acceleration for early warning signs of momentum shifts
Use the dashboard to quickly assess overall market condition and signal status
Indicator Limitations
Momentum analysis works best on liquid instruments with consistent volume patterns
Low-volume instruments or off-market hours can produce unreliable readings
MTF alignment requires sufficient data on all timeframes - may not work on newly listed instruments
Momentum precedes price but doesn't guarantee direction - high momentum can occur on both breakouts and fakeouts
Extreme momentum levels can persist longer than expected during major news events or market dislocations
The indicator shows what is happening, not why - fundamental catalysts can override technical momentum patterns
Divergences are more reliable at extreme levels than in neutral zones
Multiple components mean the indicator can be slower to respond than single-component oscillators
Input Parameters
Core Engine:
Primary Length: Period for momentum calculations (default: 14)
Smoothing Period: EMA smoothing for final output (default: 7)
Sensitivity Factor: Multiplier for Fisher Transform input (default: 1.5)
Volume Flux Engine:
VFI Coefficient: Cutoff multiplier for significant moves (default: 0.2)
Volume Cutoff: Maximum volume multiplier (default: 2.5)
Scale Multiplier: VFI output scaling (default: 4.0)
Laguerre Transform:
Gamma: Responsiveness parameter (default: 0.4, lower = faster)
Threshold Zones:
Extreme Overbought: Upper extreme threshold (default: 35)
Overbought: Upper threshold (default: 25)
Oversold: Lower threshold (default: -25)
Extreme Oversold: Lower extreme threshold (default: -35)
Money Flow & Volume:
MFI Length: Period for Money Flow Index (default: 14)
OBV Smoothing: Smoothing period for OBV (default: 14)
A/D Smoothing: Smoothing period for A/D Line (default: 14)
Multi-Timeframe Analysis:
Enable Higher Timeframe: Toggle MTF calculations (default: enabled)
HTF Timeframe 1/2/3: Customizable timeframes (default: 5m, 15m, 60m)
Visual Configuration:
Color Theme: Choose from Gradient Glow, Professional Dark, Neon Spectrum, or Institutional Grey
Bullish/Bearish Spectrum: Customizable colors for momentum direction
Glow Layers: Number of gradient layers for glow effect (default: 20)
Show Divergence: Toggle divergence detection (default: enabled)
Show Volume Profile: Toggle volume profile histogram (default: enabled)
Technical Implementation
Built with Pine Script v6 using:
Custom VFI calculations with logarithmic price changes and volume cutoffs
Four-stage Laguerre filter for adaptive RSI
Fisher Transform for Gaussian distribution conversion
Double-smoothed TSI for noise filtering
Volume-weighted MFI calculations
Normalized OBV and A/D Line integration
Multi-timeframe security requests with proper lookahead settings
Velocity and acceleration calculations for momentum derivatives
Real-time regime classification system
Dynamic dashboard with 10 metrics and color-coded cells
Gradient glow effect with multiple layered fills
Divergence detection with pivot analysis
The code is fully open-source and can be modified to suit individual trading styles and preferences.
Originality Statement
This indicator is original in its comprehensive integration approach. While individual components (VFI, Laguerre RSI, Fisher Transform, TSI, MFI, OBV, A/D) are established concepts, this indicator is justified because:
It synthesizes six distinct momentum methodologies into a unified weighted composite system
The regime classification provides institutional momentum measurement not available in standard oscillators
Multi-timeframe alignment detection measures institutional conviction across timeframes
Velocity and acceleration calculations provide early warning of momentum shifts
The gradient glow visualization creates intuitive momentum intensity display
Integration of volume-weighted components (VFI, MFI) with smoothed momentum (Fisher, TSI) and cumulative volume (OBV, A/D) creates layered confirmation
The comprehensive dashboard presents 10 metrics simultaneously for holistic momentum analysis
Each component contributes unique information: VFI shows volume-driven momentum, Laguerre RSI shows adaptive momentum, Fisher Transform shows statistical extremes, TSI shows smoothed momentum, MFI shows money flow, OBV shows cumulative volume, and A/D shows distribution. The indicator's value lies in presenting these complementary perspectives simultaneously with a unified regime classification system.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Momentum analysis is a tool for understanding market dynamics, not a crystal ball for predicting future price movement. High momentum does not guarantee profitable trades. Past momentum patterns do not guarantee future momentum patterns. Market conditions change, and strategies that worked historically may not work in the future.
The metrics displayed are mathematical calculations based on current market data, not predictions of future price movement. Extreme momentum levels, regime classifications, and signal generation do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator

Lattice Trend Helix [JOAT]Lattice Trend Helix
Introduction
The Lattice Trend Helix is an open-source trend analysis indicator built in Pine Script v6. It combines a GMMA-inspired multi-EMA fan system (19 exponential moving averages across fast and slow groups) with a pivot-center SuperTrend, RSI momentum confirmation, and a comprehensive trend strength scoring system. The indicator detects EMA fan alignment, measures trend strength on a 0-100 scale, identifies fan expansion/contraction dynamics, and generates priority-ranked signals including full confluence locks, fan crosses, SuperTrend flips, EMA 200 reclaims, fan burst breakouts, SuperTrend bounces, and displacement impulses.
The Guppy Multiple Moving Average (GMMA) concept, originally developed by Daryl Guppy, uses two groups of EMAs to visualize the behavior of short-term traders (fast group) and long-term investors (slow group). When both groups are aligned and separated, a strong trend is in place. When they converge and cross, a trend change is developing. This indicator extends the GMMA concept by adding a pivot-based SuperTrend for dynamic support/resistance, RSI filtering for momentum confirmation, and a quantified scoring system that turns visual alignment into a measurable number.
Why This Indicator Exists
Single moving average crossover systems are prone to whipsaws. Even dual-MA systems produce frequent false signals in choppy markets. The GMMA approach solves this by requiring alignment across many EMAs simultaneously — a much higher bar than a simple crossover. This indicator takes that concept further:
19-EMA Fan System: 11 fast EMAs (periods 3 through 23) capture short-term trader sentiment. 8 slow EMAs (periods 25 through 60) capture longer-term investor positioning. Full alignment of all 11 fast EMAs in order is a strong signal that short-term traders agree on direction. Full alignment of all 8 slow EMAs confirms institutional agreement.
Pivot-Center SuperTrend: Unlike standard SuperTrend which uses HL2 as the center, this implementation uses a weighted average of detected pivot points. Each new pivot high or low updates the center using the formula: center = (center * 2 + pivot) / 3. This creates a more responsive center line that adapts to actual market structure rather than simple bar midpoints. ATR-based bands around this center define the trend direction.
Trend Strength Score (0-100): Quantifies trend strength from three components — fast EMA alignment (50 points), slow EMA alignment (30 points), and price position relative to EMA 200 (20 points). A score of 100 means all 19 EMAs are perfectly aligned and price is on the correct side of the 200 EMA.
Fan Spread Dynamics: The distance between the fastest EMA (3) and slowest fast EMA (23), normalized by ATR, measures how "open" the fan is. An expanding fan indicates strengthening trend momentum. A contracting fan warns of potential trend exhaustion or reversal.
RSI Momentum Filter: RSI must agree with the fan direction for the highest-confidence signals. This prevents false confluence signals during momentum divergences.
EMA 200 Macro Filter: Price must be above the 200 EMA for confirmed bullish signals and below for confirmed bearish signals, ensuring alignment with the macro trend.
How the EMA Fan Alignment Works
The fast fan consists of 11 EMAs at periods 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, and 23. For bullish alignment, every EMA must be above the next longer one:
// Full fast fan bull alignment requires ALL 10 pairs in order
bool fastBull = ef3 > ef5 and ef5 > ef7 and ef7 > ef9 and ef9 > ef11
and ef11 > ef13 and ef13 > ef15 and ef15 > ef17
and ef17 > ef19 and ef19 > ef21 and ef21 > ef23
This is an extremely high bar. In choppy markets, the fast EMAs will be tangled and neither fastBull nor fastBear will be true. Only in genuine trending conditions do all 11 EMAs sort into perfect order. The same logic applies to the 8 slow EMAs.
The indicator counts how many adjacent pairs are aligned (0-10 for fast, 0-7 for slow) to produce a granular alignment score even when full alignment is not achieved. This allows the trend strength score to reflect partial alignment — a market with 8/10 fast pairs aligned is stronger than one with 4/10, even though neither achieves full alignment.
Pivot-Center SuperTrend
The SuperTrend component uses a unique center calculation based on detected pivot points:
Pivot highs and lows are detected using ta.pivothigh() and ta.pivotlow() with a configurable period
Each new pivot updates the center line using an exponentially weighted formula that gives 2/3 weight to the existing center and 1/3 to the new pivot
Upper and lower bands are calculated as center +/- (ATR Factor * ATR)
Trend direction flips when price crosses the opposite band
The trailing stop ratchets in the trend direction — it can only move favorably, never against the trend
This pivot-based center produces a SuperTrend that is more responsive to actual market structure than the standard HL2-based version. It adapts to the rhythm of the market's swing points rather than just the midpoint of each bar.
Signal Priority System
The indicator generates 8 types of signals, ranked by priority with cooldown-based anti-overlap:
P1 — HELIX LOCK (highest): Full fan alignment (fast + slow) + RSI confirmation + price above/below EMA 200. This is the maximum confluence signal — every factor agrees. A highlight box is drawn around the signal candle.
P2 — LATTICE SYNC: Full fan alignment (fast + slow) without RSI/EMA200 confirmation. Strong but not maximum confluence.
P3 — TREND FLIP: SuperTrend direction change. The pivot-center SuperTrend has flipped from bearish to bullish or vice versa.
P4 — FAN CROSS: The fast fan median (EMA 13) crosses the slow fan median (EMA 40). This is the GMMA equivalent of a moving average crossover, but using the center of each fan group.
P5 — MACRO CROSS: Price crosses the EMA 200 — a major structural event that changes the macro trend context.
P6 — FAN BURST: The fan spread transitions from contracting to expanding while the trend score is above 50. This indicates a breakout from compression — similar to a Bollinger squeeze release but measured through EMA dynamics.
P7 — ST BOUNCE: Price touches the SuperTrend line and bounces in the trend direction. This is a pullback-to-support/resistance signal unique to this indicator. A separate 5-bar cooldown prevents repeated bounce signals during extended touches.
P8 — IMPULSE (lowest): Displacement candle detection — large body (>70% of range, >2x average body). These indicate aggressive institutional order flow.
Trend Strength Score Breakdown
The 0-100 score is computed from three weighted components:
Fast EMA Alignment (50 points): The number of aligned adjacent pairs (max 10) divided by 10, multiplied by 50. Full fast alignment = 50 points. Half alignment = 25 points.
Slow EMA Alignment (30 points): The number of aligned adjacent pairs (max 7) divided by 7, multiplied by 30. Full slow alignment = 30 points.
EMA 200 Filter (20 points): If price is above EMA 200 and the fast fan leans bullish, or below EMA 200 and the fast fan leans bearish, 20 points are added. This rewards macro-aligned trends.
The score is displayed in the HUD with both a number and a visual bar (||||......). Scores above 70 indicate strong, tradeable trends. Scores between 40-70 indicate developing or weakening trends. Below 40 indicates choppy or transitional conditions.
Visual Design
The indicator uses a "Cyberpunk" color theme — electric cyan, hot magenta, neon yellow, deep violet, and chrome accents:
Fast EMA Fan: All 11 lines in a single color that adapts to alignment — cyan for bullish, magenta for bearish, steel grey for neutral. Configurable opacity.
Slow EMA Fan: All 8 lines in deeper tones — teal for bullish, violet for bearish, steel grey for neutral.
EMA 200: Three-layer neon glow effect (outer glow, mid glow, core line) that shifts between cyan (above) and violet (below).
Holographic Ribbon: Fill between the fastest (EMA 3) and slowest (EMA 23) fast EMAs, creating a ribbon that expands with trend strength and contracts during consolidation.
SuperTrend: Four-layer neon glow step-line (88%, 72%, 50%, 10% transparency) in cyan (bullish) or magenta (bearish).
Regime Background: Subtle background tinting for confirmed bull (cyan) or confirmed bear (magenta) conditions.
Candle Coloring: Multi-tier coloring based on confirmation level — confirmed bull/bear, strong bull/bear, weak bull/bear, or neutral.
HUD Dashboard
The HUD displays 14 metrics:
Trend direction (Bullish/Bearish/Neutral)
Strength score with visual bar (||||......)
Fan state (Strong Bull/Bear, Weak Bull/Bear, Converging)
SuperTrend direction
EMA 200 position (Above/Below)
Alignment counts (Fast: X/10, Slow: X/7)
Fan Spread value with state (Expanding/Contracting/Stable)
RSI value with bull/bear/neutral classification
Confluence count (0-5): fast alignment + slow alignment + SuperTrend agreement + RSI agreement + EMA 200 agreement
SuperTrend distance from price
Volume ratio (current vs 20-bar average)
Confirmed signal status (CONFIRMED BULL/BEAR or ---)
Input Parameters
EMA Fan:
Show Fast/Slow EMAs: Toggle each fan group
Show EMA 200: Toggle macro filter line
Fast/Slow EMA Opacity: Control transparency of each fan group
SuperTrend:
Show SuperTrend: Toggle the pivot-center SuperTrend
Pivot Period: Lookback for pivot detection (default: 3)
ATR Factor: Band width multiplier (default: 2.5)
ATR Length: Period for ATR calculation (default: 14)
Visual:
Show Trend Ribbon: Toggle holographic ribbon fill
Show Fan Crosses: Toggle fan cross signals
Show Regime Background: Toggle background tinting
SuperTrend Neon Glow: Toggle 4-layer glow effect
Color Candles: Toggle multi-tier candle coloring
HUD Panel: Toggle dashboard
Momentum Filter:
Show RSI Confirmation: Toggle RSI requirement for confirmed signals
RSI Length: Period (default: 14)
RSI Bull/Bear Threshold: Directional thresholds (default: 55/45)
How to Use This Indicator
Step 1: Check Fan Alignment
Look at the fan state in the HUD. "Strong Bull" or "Strong Bear" means both fast and slow fans are fully aligned — the strongest trend condition. "Weak" means only the fast fan is aligned — a developing or weakening trend.
Step 2: Verify with SuperTrend
The SuperTrend should agree with the fan direction. Fan bullish + SuperTrend bullish = high conviction. Disagreement suggests a transitional market.
Step 3: Check the Strength Score
Scores above 70 are strong trends. Use the visual bar for quick assessment. The confluence count (0-5) tells you how many independent factors agree.
Step 4: Trade the Signals
HELIX LOCK is the highest-conviction entry — all factors agree. LATTICE SYNC and TREND FLIP are strong. FAN CROSS and MACRO CROSS are structural. ST BOUNCE provides pullback entries within established trends.
Step 5: Monitor Fan Spread
Expanding fan = strengthening trend. Contracting fan = weakening trend or approaching reversal. FAN BURST signals mark the transition from contraction to expansion.
Best Practices
The 19-EMA fan is most effective on timeframes of 5 minutes and above. Very low timeframes produce too much noise for meaningful alignment.
Full fan alignment is rare and powerful. Do not expect it on every trade — it represents the highest-conviction conditions.
The SuperTrend bounce signal works best in established trends. In choppy markets, bounces may fail.
Fan crosses (fast median vs slow median) are the GMMA equivalent of MA crossovers — they confirm trend changes but lag the actual turn.
The EMA 200 filter is a macro-level gate. Ignoring it means trading against the larger trend, which reduces probability.
Use the fan spread dynamics to time entries — entering when the fan is expanding gives you momentum. Entering when it is contracting means you are fighting exhaustion.
The confluence count (0-5) is a quick decision filter. 4-5 = high conviction. 2-3 = moderate. 0-1 = low conviction.
Limitations
EMAs are lagging indicators. Full fan alignment is confirmed after the trend has already started, not at the exact turn.
The 19-EMA system uses significant computational resources. On very long charts with many bars, loading may be slower.
Pivot-center SuperTrend depends on pivot detection, which has an inherent delay equal to the pivot period.
Fan alignment can persist in overextended trends. Full alignment does not mean the trend will continue indefinitely.
The RSI filter can occasionally prevent valid signals during strong momentum divergences.
The indicator is optimized for trending markets. In range-bound conditions, the fan will be tangled and few signals will fire — which is by design.
EMA periods are fixed (3-23 fast, 25-60 slow). Different instruments or timeframes might benefit from different period sets, but the GMMA standard periods are well-tested across markets.
Technical Implementation
Built with Pine Script v6 using:
19 EMA calculations at global scope (11 fast + 8 slow) for Pine v6 compliance
Pivot-based SuperTrend center with exponentially weighted pivot averaging
Granular alignment counting (0-10 fast, 0-7 slow) for trend strength scoring
Fan spread normalization by ATR for cross-instrument comparability
8-tier priority signal system with cooldown-based anti-overlap
Separate cooldown tracking for SuperTrend bounce signals
4-layer neon glow rendering for SuperTrend and EMA 200
Holographic ribbon fill between fan extremes
Multi-tier candle coloring based on confirmation level
barstate.isconfirmed gating on all signal generation
9 alert conditions covering alignment changes, fan crosses, SuperTrend flips, confirmed signals, and fan expansion
Originality Statement
This indicator is original in its synthesis of the GMMA fan concept with pivot-center SuperTrend and quantified trend scoring. While GMMA and SuperTrend are established concepts, this indicator is justified because:
The pivot-center SuperTrend uses a weighted average of actual market pivots rather than simple HL2, creating a more structurally responsive trend line
The trend strength score (0-100) quantifies fan alignment into a single actionable metric with three weighted components
Fan spread dynamics (expansion/contraction tracking normalized by ATR) provide momentum acceleration/deceleration information not available in standard GMMA implementations
The 8-tier priority signal system with separate cooldown tracking for SuperTrend bounces prevents visual clutter while capturing all significant events
RSI momentum filtering and EMA 200 macro gating create a multi-layer confirmation framework that reduces false signals
The confluence count (0-5) provides an instant assessment of how many independent factors agree
The Cyberpunk theme with 4-layer neon glow and holographic ribbon creates a distinctive visual identity where trend strength is immediately apparent from the fan's visual character
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Moving average systems identify trends after they have started — they do not predict trend changes in advance. Full fan alignment can occur in overextended trends that are about to reverse. SuperTrend bounces can fail. Past alignment patterns do not guarantee future trend behavior. Always use proper risk management and never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Hosoda Wave Targets [UAlgo]Hosoda Wave Targets is a wave projection tool inspired by the classical Hosoda target framework. The script identifies a three point swing structure using confirmed pivots, classifies that structure as either bullish or bearish, and then projects forward target levels from the completed A B C wave. Instead of drawing generic extension levels, it uses Hosoda style wave arithmetic to produce V, N, and E targets, while also calculating NT internally.
The logic begins with swing detection. Once the script has three valid pivots in sequence, it checks whether they form a proper bullish wave or bearish wave. A bullish wave requires a low, then a high, then a higher low. A bearish wave requires a high, then a low, then a lower high. If the structure is valid and does not overlap with the previous completed pattern, the script creates a new wave object and calculates its targets.
The visual output is built around the A B C D sequence. A, B, and C label the measured swing points, while D is placed at the projected N target time and price. The script also draws a dotted path for the original A to B and B to C legs, then projects the C to D path toward the N objective. In addition, horizontal V, N, and E target lines are plotted forward so the user can see the three main Hosoda price objectives at a glance.
This makes the indicator useful for traders who want a structured wave target model rather than a standard Fibonacci extension tool. Because the wave must pass a specific pivot sequence test before targets are shown, the script stays focused on clean swing structures instead of projecting from every random oscillation in price.
In practical use, Hosoda Wave Targets can help with wave mapping, objective placement, and scenario planning after a three point structure is completed. It works especially well as a framework for comparing potential continuation targets once a valid A B C sequence is already in place.
🔹 Features
🔸 Automatic A B C Wave Detection
The script continuously tracks confirmed pivot highs and pivot lows, then checks whether the latest three pivots form a valid bullish or bearish Hosoda wave structure.
🔸 Bullish and Bearish Pattern Recognition
A bullish structure requires a low, then a high, then a higher low.
A bearish structure requires a high, then a low, then a lower high.
This keeps the wave logic clear and directional.
🔸 Hosoda Style Price Targets
Once a valid wave is found, the script calculates classic Hosoda V, N, and E targets. It also computes the NT target internally as part of the target model.
🔸 Time Projection for D Point
The projected D point is placed using the Hosoda N time relationship. This means the script is not only projecting price, but also projecting where that objective sits in bar time.
🔸 Clear Wave Path Visualization
The A to B and B to C legs are drawn as dotted structural guides, while the C to D path toward the N target is drawn as the forward projection leg.
🔸 Color Coded Target Lines
V, N, and E targets are drawn with separate colors so the user can distinguish between the major Hosoda objectives quickly.
🔸 Last Wave Only Option
The script can either show only the most recent valid wave or keep multiple wave drawings on the chart, depending on the selected setting.
🔸 Overlap Protection
A new wave is only accepted when its first pivot does not overlap the prior completed pattern. This reduces repeated stacking of wave projections over the same structure.
🔹 Calculations
1) Defining the Core Data Objects
type Point
int bar_index
float price
bool isHigh
type HosodaTargets
float v
float n
float e
float nt
float p
int time_n
type Wave
Point a
Point b
Point c
int direction
This is the structural foundation of the indicator.
A Point stores one pivot with its bar index, price, and whether it is a high or low.
A HosodaTargets object stores the projected target values:
V,
N,
E,
NT,
an unused placeholder P,
and the projected time for the N target.
A Wave object stores the three actual swing points A, B, and C, along with the direction of the structure.
So before any drawing is done, the script already has a clear data model for pivots, waves, and targets.
2) Detecting Pivot Highs and Pivot Lows
float ph = ta.pivothigh(high, pivotLength, pivotLength)
float pl = ta.pivotlow(low, pivotLength, pivotLength)
This is the pivot discovery step.
The script uses the selected pivot length on both the left and right side, which means a pivot is only confirmed after enough bars have passed. This avoids premature wave labeling on unconfirmed turning points.
When a pivot high is confirmed, it becomes a candidate high point. When a pivot low is confirmed, it becomes a candidate low point.
So the whole wave engine is built from confirmed swing structure rather than from temporary price fluctuations.
3) Storing Recent Pivot Points
if not na(ph)
pivots.push(Point.new(bar_index - pivotLength, ph, true))
if not na(pl)
pivots.push(Point.new(bar_index - pivotLength, pl, false))
if pivots.size() > 10
pivots.shift()
Once a pivot is confirmed, the script converts it into a Point object and stores it in the pivot array.
The true pivot bar is pivotLength bars in the past, so the script uses bar_index - pivotLength as the pivot location.
The pivot history is capped at ten points. This keeps the structure engine focused on recent swings and avoids unnecessary buildup of old pivots.
4) Building the Candidate A B C Structure
if pivots.size() >= 3 and (not na(ph) or not na(pl))
Point pA = pivots.get(pivots.size() - 3)
Point pB = pivots.get(pivots.size() - 2)
Point pC = pivots.get(pivots.size() - 1)
This block selects the latest three stored pivots and treats them as a potential A B C sequence.
The script does not skip around the array looking for arbitrary combinations. It always evaluates the latest three pivots in sequence. That keeps the pattern logic straightforward and tied to the most recent confirmed structure.
So every wave begins as a direct test of the newest three pivot points.
5) Bullish Wave Validation
bool isValidUptrend = not pA.isHigh and pB.isHigh and not pC.isHigh and pB.price > pA.price and pB.price > pC.price and pC.price > pA.price
This line defines the bullish Hosoda wave condition.
For a bullish structure:
A must be a low,
B must be a high,
C must be a low,
B must sit above both A and C,
and C must remain above A.
That last condition is important because it ensures the pullback at C is a higher low rather than a full structural failure.
So the script only accepts bullish waves that look like an advancing move followed by a constructive retracement.
6) Bearish Wave Validation
bool isValidDowntrend = pA.isHigh and not pB.isHigh and pC.isHigh and pB.price < pA.price and pB.price < pC.price and pC.price < pA.price
This is the mirror condition for bearish waves.
For a bearish structure:
A must be a high,
B must be a low,
C must be a high,
B must sit below both A and C,
and C must remain below A.
This ensures the move represents a decline followed by a lower high retracement, which is the bearish counterpart of the bullish wave structure.
So the script only projects bearish targets when the A B C pattern shows proper downside sequence.
7) Preventing Pattern Overlap
bool isNotOverlapping = pA.bar_index >= lastPatternEnd
This is the overlap protection rule.
The script tracks the end of the previous completed pattern and requires the new A point to begin at or after that location. If the new structure starts inside the previous wave’s territory, it is ignored.
This reduces repetitive wave printing over the same swing area and keeps the output cleaner.
So the chart shows more distinct wave structures instead of heavily overlapping ones.
8) Assigning Wave Direction
int dir = isValidUptrend ? 1 : -1
Wave newWave = Wave.new(pA, pB, pC, dir)
Once the script confirms that the latest three pivots form a valid structure, it assigns a direction:
1 for bullish,
-1 for bearish.
That direction then controls how the target formulas are calculated. So all later math depends on whether the wave is an advancing or declining structure.
9) Calculating the Hosoda Time Projection
int _time_n = this.c.bar_index + (this.b.bar_index - this.a.bar_index)
This is the time projection used for the D point and the N target.
The script measures the bar distance from A to B, then adds that same distance forward from C. That projected index becomes time_n .
So the wave does not only project price objectives. It also projects when the N objective would align in bar space according to the A to B rhythm.
10) Bullish V, N, E, and NT Target Formulas
if this.direction == 1
_v := this.b.price + (this.b.price - this.c.price)
_n := this.c.price + (this.b.price - this.a.price)
_e := this.b.price + (this.b.price - this.a.price)
_nt := this.c.price + (this.c.price - this.a.price)
These are the bullish target formulas.
For bullish waves:
V projects the B to C distance upward from B.
N projects the A to B distance upward from C.
E projects the A to B distance upward from B.
NT projects the A to C distance upward from C.
Each target represents a different Hosoda style price relationship. The script calculates all four, although only V, N, and E are drawn visually in the current implementation.
So the script provides a full bullish target set, with one of the values kept internally for future expansion or interpretation.
11) Bearish V, N, E, and NT Target Formulas
else if this.direction == -1
_v := this.b.price - (this.c.price - this.b.price)
_n := this.c.price - (this.a.price - this.b.price)
_e := this.b.price - (this.a.price - this.b.price)
_nt := this.c.price - (this.a.price - this.c.price)
These are the bearish equivalents.
For bearish waves:
V projects the C to B distance downward from B.
N projects the A to B distance downward from C.
E projects the A to B distance downward from B.
NT projects the A to C distance downward from C.
So the same target families are preserved, but the math is reversed to match bearish structure.
12) Returning the Target Object
HosodaTargets.new(_v, _n, _e, _nt, 0.0, _time_n)
After the formulas are calculated, the script packages them into a HosodaTargets object.
This makes it easy to pass all target information into the drawing method in one structured object.
Note that the p field is currently filled with 0.0 and is not used elsewhere in the script. So the active practical targets in this version are V, N, E, and the projected time index for N.
13) Drawing the A B C Labels
label lA = label.new(this.a.bar_index, this.a.price, "A", color=lblBgColor, textcolor=lblTextColor, style=this.direction == 1 ? label.style_label_up : label.style_label_down, size=size.small)
label lB = label.new(this.b.bar_index, this.b.price, "B", color=lblBgColor, textcolor=lblTextColor, style=this.direction == 1 ? label.style_label_down : label.style_label_up, size=size.small)
label lC = label.new(this.c.bar_index, this.c.price, "C", color=lblBgColor, textcolor=lblTextColor, style=this.direction == 1 ? label.style_label_up : label.style_label_down, size=size.small)
These labels mark the confirmed swing points of the pattern.
Their placement style changes according to wave direction so the labels sit in a visually readable position relative to price.
So the user can immediately see the measured A B C structure before looking at any target levels.
14) Placing the Projected D Label
label lD = label.new(targets.time_n, targets.n, "D", color=lblBgColor, textcolor=lblTextColor, style=this.direction == 1 ? label.style_label_down : label.style_label_up, size=size.small)
The D label is placed at the projected N time and N price.
This does not mean D is a confirmed pivot. It is the projected completion point of the main wave objective according to the N relationship.
So D acts as a forward reference point, not a confirmed market event.
15) Drawing the Structural A to B and B to C Legs
line ab = line.new(this.a.bar_index, this.a.price, this.b.bar_index, this.b.price, color=color.gray, width=1, style=line.style_dotted)
line bc = line.new(this.b.bar_index, this.b.price, this.c.bar_index, this.c.price, color=color.gray, width=1, style=line.style_dotted)
These two dotted lines draw the original measured wave.
They are not target lines. They simply show the actual A to B impulse and B to C correction that were used to build the projection.
So the user can visually separate measured structure from projected structure.
16) Drawing the C to D Projection Path
line cd = line.new(this.c.bar_index, this.c.price, targets.time_n, targets.n, color=cN, width=1)
This line connects the confirmed C pivot to the projected D point at the N target.
It visually represents the expected continuation path of the wave according to the N target model.
So the script does not leave the targets floating independently. It ties the projected move directly back to the completed C point.
17) Drawing the V, N, and E Target Lines
line vLine = line.new(this.c.bar_index, targets.v, targets.time_n + 10, targets.v, color=color.new(cV, 0), style=line.style_dashed, width=1)
line nLine = line.new(this.c.bar_index, targets.n, targets.time_n + 10, targets.n, color=color.new(cN, 0), style=line.style_dashed, width=1)
line eLine = line.new(this.c.bar_index, targets.e, targets.time_n + 10, targets.e, color=color.new(cE, 0), style=line.style_solid, width=1)
These horizontal lines display the three visible price objectives.
V and N are drawn as dashed lines.
E is drawn as a solid line.
Each starts from the C area and extends forward beyond the projected D time. This makes it easier to compare the three target levels side by side.
It is worth noting that NT is calculated but not drawn in this version of the script. So the visible target framework here focuses on V, N, and E.
18) Drawing the Target Labels
label vLbl = label.new(targets.time_n + 10, targets.v, "V " + str.tostring(targets.v, format.mintick), textcolor=cV, style=noBgStyle, size=size.small, textalign=text.align_left)
label nLbl = label.new(targets.time_n + 10, targets.n, "N " + str.tostring(targets.n, format.mintick), textcolor=cN, style=noBgStyle, size=size.small, textalign=text.align_left)
label eLbl = label.new(targets.time_n + 10, targets.e, "E " + str.tostring(targets.e, format.mintick), textcolor=cE, style=noBgStyle, size=size.small, textalign=text.align_left)
Each visible target line gets its own text label showing both the target family and the exact projected price.
This is useful because Hosoda targets often overlap or sit close to one another. The labels remove ambiguity and make it easy to read exact values directly from the chart.
19) Show Only Last Wave Mode
if showOnlyLast
while drawings.size() > 0
WaveDrawing d = drawings.shift()
d.clear()
This setting controls how much history remains visible.
If enabled, every time a new valid wave appears, all prior wave drawings are deleted first. That leaves only the most recent wave and its targets on the chart.
If disabled, multiple valid waves can remain visible.
So the user can choose between a clean single setup view or a historical wave map.
20) Clearing Old Drawings
method clear(WaveDrawing this) =>
if not na(this)
this.lineAB.delete()
this.lineBC.delete()
this.lineCD.delete()
this.lblA.delete()
this.lblB.delete()
this.lblC.delete()
this.lblD.delete()
this.lineV.delete()
this.lineN.delete()
this.lineE.delete()
this.lblV.delete()
this.lblN.delete()
this.lblE.delete()
This cleanup method deletes every visual object associated with one stored wave drawing.
That includes:
the structural lines,
the projected line,
the point labels,
the target lines,
and the target labels.
So the indicator can safely remove prior patterns without leaving stale objects on the chart. Indicator

Bollinger Bands Bull/Bear B2Bollinger Bands Bull/Bear
by MasterTony
Overview & How It Works:
This indicator enhances classic Bollinger Bands by the legendary John Bollinger with emphasizing dynamic bull/bear coloring, gradient strength fills, overextension highlights, and an orange squeeze overlay to visualize volatility contraction.
Core Calculations:
Basis Line: User-selectable moving average (SMA by default) of the source (close by default).
Upper / Lower Bands: Basis ± (Multiplier × Standard Deviation over the chosen length). Default multiplier = 2.0.
Bull / Bear State Determination: Price position relative to the basis and outer or lower bollinger bands, smoothed with a short EMA.
Hysteresis is applied to prevent rapid flipping during consolidation.
Result: stable bullish state when price is convincingly above the basis, bearish when below.
Proximity & Gradient Strength: Distance from price to each band is measured and normalized against current band width.
The closer price is to a band, the stronger the signal and the more opaque the fill becomes.
Colored Band Fills: Bullish state → mint-green fills around both bands (brighter/opaquer when price hugs the upper band).
Bearish state → red fills around both bands (brighter/opaquer when price hugs the lower band).
Special Overextension Fill:
When price is very close (>85%) to the "active" band (upper in bull, lower in bear) and the state is confirmed, a Brighter gradient of the band green (bull) or lred (bear).
Strong Vs Weak Bollinger
Thicker the Bollinger Band stronger the trend, thinner the weaker. Gradient going from brighter to more transparent highlights potential exhaustion of strong Bollinger.
Squeeze Detection (Orange Overlay):
Bollinger Band Width Percentile (BBWP) is calculated over a user-defined lookback (default 100 bars).
Squeeze = BBWP ≤ 25% (bands are historically narrow).
Tight squeeze = BBWP < 15% → brighter orange.
Orange fill covers the entire area between upper and lower bands during squeeze periods.
Toggle available to hide squeeze fills if desired.
How to Read & Trade This Indicator
Visual Interpretation:
Green-dominant chart (mint fills + possible light-green basis-to-band fill) = bullish bias. The brighter and fuller the green, the stronger the momentum (price pushing against or touching the upper band).
Red-dominant chart (red fills + possible light-red basis-to-band fill) = bearish bias. Brighter/fuller red = stronger downward pressure.
Light special fills (light green or light red from basis to band) = overextension zone. Often seen near trend extremes — watch for continuation (breakout) or reversal (failure to hold the band).
Orange overlay = low volatility / squeeze. Two shades:
Lighter orange = regular squeeze (potential move brewing).
Brighter orange = very tight squeeze (high probability of imminent explosive move).
Trading Guidelines:
Trend Following (Shows Bull Zone and Bear Zones):
In green fills → favor longs or hold existing longs.
In red fills → favor shorts or hold existing shorts.
Strength increases as fills become more opaque (price near the outer band).
Squeeze Breakouts (Highest Probability Setups):
Wait for orange squeeze to appear.
When price closes outside the bands (breakout), enter in the direction of the break.
Bias the trade toward the prevailing color:Breakout upward during green fills = strong long signal.
Breakout downward during red fills = strong short signal.
If breakout direction opposes the color bias, be cautious (lower probability).
Entry/Exits:
Follow the Band color, Band color with special fill green or red is strong to determining Bull or Bear states. Green=price up Red= Price down
Risk Management:
Use the basis line as dynamic support/resistance.
Stops can be placed just beyond the opposite band or basis during strong trends.
Combine with volume or other confirmation for higher conviction.
This visual upgrade makes Bollinger Bands far more intuitive — the chart literally colors itself bullish or bearish while highlighting volatility cycles and overextension zones. Great for trend, breakout, and mean-reversion strategies across any timeframe.
Enjoy fellow traders, this is V1 more versions will be updated.
Please also boost and comment would love your ideas on advancements to this.
Cheers,
MasterTony Indicator

Divergence Confirmation System [JOAT]Divergence Confirmation System
Introduction
The Divergence Confirmation System (DCS) is an advanced open-source multi-oscillator divergence detection indicator that combines RSI, MFI, Stochastic, MACD, CCI, and Stochastic RSI analysis to identify high-probability divergence setups through systematic pivot comparison and multi-oscillator confirmation. This indicator reveals when price action diverges from underlying momentum across six independent oscillators, providing traders with early warning signals of potential trend reversals or continuations through rigorous confirmation requirements.
Unlike basic divergence indicators that rely on a single oscillator, DCS employs a sophisticated 6-oscillator confirmation system that detects both regular divergences (trend reversal signals) and hidden divergences (trend continuation signals) across multiple momentum indicators. The indicator requires minimum oscillator confirmation (default 2/6) to filter false signals and provides divergence strength scoring based on oscillator count, volume confirmation, and price momentum.
Why This Indicator Exists
This indicator addresses the challenge of identifying reliable divergence signals in noisy market conditions. Single-oscillator divergences often produce false signals, but when multiple independent oscillators confirm the same divergence pattern, probability of successful reversal increases significantly. DCS systematically reveals:
6-Oscillator Analysis: RSI, MFI, Stochastic, MACD, CCI, Stochastic RSI for comprehensive momentum assessment
Regular Divergence Detection: Price makes new high/low but oscillators don't confirm (reversal signal)
Hidden Divergence Detection: Price makes higher low/lower high but oscillators show opposite (continuation signal)
Multi-Oscillator Confirmation: Requires 2+ oscillators to agree before generating signal
Divergence Strength Scoring: 0-100% score based on oscillator count, volume, and momentum
Multi-Timeframe Divergence: Confirms divergences on higher timeframe for added conviction
Divergence Clustering: Detects multiple divergences in short period indicating strong reversal potential
Each component provides unique intelligence. Multiple oscillators reduce false signals, regular divergences show reversals, hidden divergences show continuations, strength scoring quantifies quality, MTF confirmation adds conviction, and clustering shows intensity.
Core Components Explained
1. Multi-Oscillator Divergence Detection System
DCS calculates six independent oscillators and detects divergences on each:
// RSI
float rsi = ta.rsi(close, rsi_period)
float rsi_high = ta.pivothigh(rsi, pivot_left, pivot_right)
float rsi_low = ta.pivotlow(rsi, pivot_left, pivot_right)
// MFI (Money Flow Index - volume-weighted RSI)
float mfi = ta.mfi(hlc3, mfi_period)
// Stochastic
float stoch_k = ta.stoch(close, high, low, stoch_period)
// MACD Histogram
= ta.macd(close, macd_fast, macd_slow, macd_signal)
// CCI (Commodity Channel Index)
float cci = ta.cci(close, 20)
// Stochastic RSI
float rsi_for_stoch = ta.rsi(close, rsi_period)
float stoch_rsi_k = ta.stoch(rsi_for_stoch, rsi_for_stoch, rsi_for_stoch, stoch_period)
Each oscillator provides independent momentum perspective. RSI shows price momentum, MFI adds volume weighting, Stochastic shows position in range, MACD shows trend momentum, CCI shows deviation from mean, and Stochastic RSI shows RSI momentum.
2. Regular Divergence Detection (Reversal Signals)
Regular bullish divergence occurs when price makes lower low but oscillator makes higher low:
f_detect_bull_regular_div(float osc_val, float osc_pivot) =>
bool detected = false
if not na(osc_pivot) and not na(price_low) and array.size(price_lows) >= 2
float curr_price = array.get(price_lows, last_idx)
float prev_price = array.get(price_lows, prev_idx)
// Price makes lower low, oscillator makes higher low
if curr_price < prev_price and osc_pivot > osc_pivot
if (bar_index - prev_bar) <= max_pivot_distance
detected := true
detected
Regular bearish divergence occurs when price makes higher high but oscillator makes lower high. These signal potential trend reversals.
3. Hidden Divergence Detection (Continuation Signals)
Hidden bullish divergence occurs when price makes higher low but oscillator makes lower low:
f_detect_bull_hidden_div(float osc_val, float osc_pivot) =>
bool detected = false
if detect_hidden and not na(osc_pivot) and not na(price_low)
float curr_price = array.get(price_lows, last_idx)
float prev_price = array.get(price_lows, prev_idx)
// Price makes higher low, oscillator makes lower low
if curr_price > prev_price and osc_pivot < osc_pivot
if (bar_index - prev_bar) <= max_pivot_distance
detected := true
detected
Hidden bearish divergence occurs when price makes lower high but oscillator makes higher high. These signal trend continuation after pullback.
4. Multi-Oscillator Confirmation Aggregation
DCS counts how many oscillators confirm each divergence type:
int bull_reg_count = (rsi_bull_reg ? 1 : 0) + (mfi_bull_reg ? 1 : 0) +
(stoch_bull_reg ? 1 : 0) + (macd_bull_reg ? 1 : 0) +
(cci_bull_reg ? 1 : 0) + (srsi_bull_reg ? 1 : 0)
bool confirmed_bull_regular = bull_reg_count >= min_oscillators
// Optional volume confirmation
float vol_avg = ta.sma(volume, 20)
bool vol_confirm = volume > vol_avg * 1.2
bool final_bull_regular = confirmed_bull_regular and
(not require_volume_confirm or vol_confirm)
Minimum oscillator requirement (default 2/6) filters false signals. Volume confirmation adds additional filter.
5. Divergence Strength Scoring System
Strength score (0-100%) calculated from multiple factors:
f_divergence_strength(int osc_count, bool vol_confirm_param, float price_momentum) =>
float score = 0.0
// Oscillator count (0-50 points)
score += osc_count * 8.33 // 6 oscillators max = 50 points
// Volume confirmation (0-25 points)
score += vol_confirm_param ? 25 : 0
// Price momentum (0-25 points)
float momentum_score = math.min(math.abs(price_momentum) * 5, 25)
score += momentum_score
math.min(score, 100)
Strength classification:
- 75-100%: Very Strong (highest probability)
- 60-74%: Strong (high probability)
- 40-59%: Moderate (medium probability)
- 0-39%: Weak (low probability)
6. Multi-Timeframe Divergence Confirmation
DCS checks for divergences on higher timeframe (default 15m):
f_get_htf_divergence(string tf) =>
= request.security(syminfo.tickerid, tf,
)
float htf_rsi_high = ta.pivothigh(htf_rsi, pivot_left, pivot_right)
float htf_rsi_low = ta.pivotlow(htf_rsi, pivot_left, pivot_right)
bool htf_bull = f_detect_bull_regular_div(htf_rsi, htf_rsi_low)
bool htf_bear = f_detect_bear_regular_div(htf_rsi, htf_rsi_high)
bool mtf_bull_confirmed = final_bull_regular and htf_bull_div
bool mtf_bear_confirmed = final_bear_regular and htf_bear_div
MTF confirmation significantly increases signal reliability.
7. Divergence Clustering Detection
Clustering identifies multiple divergences in short period:
var array div_bars = array.new_int(0)
if final_bull_regular or final_bear_regular
array.push(div_bars, bar_index)
// Count divergences in last 50 bars
int recent_div_count = 0
for i = 0 to array.size(div_bars) - 1
int div_bar = array.get(div_bars, i)
if bar_index - div_bar <= 50
recent_div_count += 1
bool in_div_cluster = recent_div_count >= 3
string cluster_intensity = recent_div_count >= 5 ? "High" :
recent_div_count >= 3 ? "Moderate" : "Low"
Clusters indicate strong reversal pressure building.
Visual Elements
Primary Oscillator Display: User-selectable (RSI/MFI/Stochastic/MACD) with gradient shadow effect
Reference Lines: 70 (overbought), 50 (midline), 30 (oversold)
Oscillator Histogram: Gradient-colored bars showing oscillator deviation from 50
Background Zones: Cyan for bullish divergence, red for bearish divergence
Divergence Labels: "BULL DIV" or "BEAR DIV" with oscillator count (e.g., "4/6")
Hidden Divergence Markers: Small "H" circles for hidden divergences
Elite Signals: Large labels for 4+ oscillator confirmation with strength >75%
MTF Confirmation: Triangle markers when higher timeframe confirms
Multi-Oscillator Confirmation: Labels showing oscillator count (e.g., "3/6 CONF")
Institutional Flow: "INST BUY/SELL" labels when delta confirms divergence
Input Parameters
Oscillator Settings:
RSI Period: RSI calculation period (default: 14)
MFI Period: MFI calculation period (default: 14)
Stochastic Period: Stochastic calculation period (default: 14)
MACD Fast: MACD fast EMA (default: 12)
MACD Slow: MACD slow EMA (default: 26)
MACD Signal: MACD signal line (default: 9)
Divergence Detection:
Pivot Left Bars: Bars to left of pivot (default: 5)
Pivot Right Bars: Bars to right of pivot (default: 2)
Detect Hidden Divergences: Toggle hidden divergence detection (default: true)
Max Pivot Distance: Maximum bars between pivots (default: 60)
Confirmation Rules:
Minimum Oscillator Confirmation: Required oscillators (default: 2/6)
Require Volume Confirmation: Toggle volume filter (default: false)
Visualization:
Show Divergence Lines: Toggle divergence line drawing (default: true)
Show Labels: Toggle divergence labels (default: true)
Primary Display: Select oscillator to display (RSI/MFI/Stochastic/MACD)
How to Use This Indicator
Step 1: Monitor Primary Oscillator
Watch selected oscillator (default RSI) for overbought/oversold conditions.
Step 2: Wait for Divergence Labels
"BULL DIV" or "BEAR DIV" labels appear when 2+ oscillators confirm divergence.
Step 3: Check Oscillator Count
Higher count = higher probability. 4/6 or better is ideal.
Step 4: Assess Divergence Strength
Tooltip shows strength percentage. >75% is very strong, >60% is strong.
Step 5: Confirm with MTF
Triangle markers indicate higher timeframe confirmation - highest probability setups.
Step 6: Watch for Elite Signals
Large "BULL DIV" or "BEAR DIV" labels with 4+ oscillators and >75% strength are highest conviction.
Best Practices
Focus on divergences with 3+ oscillator confirmation for best results
Regular divergences work best at price extremes (support/resistance)
Hidden divergences confirm trend continuation - trade with trend
MTF confirmation adds significant edge - wait when possible
Divergence clustering indicates strong reversal pressure
Volume confirmation reduces false signals but adds lag
Elite signals (4+ oscillators, >75% strength) have highest win rate
Use cooldown system (15 bars minimum) to avoid overtrading
Combine with price action - divergence shows momentum, price shows structure
Indicator Limitations
Divergence detection requires clear pivot formation - lags by pivot_right bars
Multiple oscillators can produce conflicting signals during choppy markets
Hidden divergences are less reliable than regular divergences
Strength scoring is probabilistic, not deterministic
MTF confirmation adds lag but increases reliability
Clustering detection has fixed lookback - may miss longer-term patterns
Volume confirmation may not work well on illiquid instruments
Extreme market conditions can invalidate divergence signals
Technical Implementation
Built with Pine Script v6 using:
6-oscillator system (RSI, MFI, Stochastic, MACD, CCI, Stochastic RSI)
Pivot-based divergence detection with array tracking
Regular and hidden divergence algorithms
Multi-oscillator confirmation aggregation
Divergence strength scoring (oscillator count + volume + momentum)
Multi-timeframe security requests for HTF confirmation
Divergence clustering detection (50-bar lookback)
Signal cooldown system (15 bars minimum)
Gradient visualization with dynamic coloring
Institutional flow integration (CVD delta analysis)
Elite signal filtering (4+ oscillators, >75% strength)
The code is fully open-source and can be modified to suit individual trading styles.
Originality Statement
This indicator is original in its comprehensive multi-oscillator divergence confirmation approach. While individual oscillator divergences are established concepts, this indicator is justified because:
It combines 6 independent oscillators (RSI, MFI, Stochastic, MACD, CCI, Stochastic RSI) for robust confirmation
The multi-oscillator confirmation system (2-6 required) significantly reduces false signals
Divergence strength scoring quantifies setup quality through multi-factor analysis
Multi-timeframe divergence confirmation adds conviction layer
Divergence clustering detection identifies high-probability reversal zones
Integration of institutional flow (CVD delta) with divergence analysis is unique
Elite signal filtering (4+ oscillators, >75% strength) isolates highest probability setups
Signal cooldown system prevents overtrading while maintaining signal quality
Each component contributes unique information: multiple oscillators reduce false signals, regular divergences show reversals, hidden divergences show continuations, strength scoring quantifies quality, MTF confirmation adds conviction, clustering shows intensity, and institutional flow confirms with volume. The indicator's value lies in presenting these complementary perspectives simultaneously with rigorous confirmation requirements.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Divergence signals do not guarantee reversals. Trading involves substantial risk of loss. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by officialjackofalltrades Indicator

Apex Momentum Wave [Pineify]Apex Momentum Wave
The Apex Momentum Wave (AMW) is a noise-filtered momentum oscillator that combines Hull Moving Average price smoothing with RSI momentum measurement and an EMA-based signal line to produce cleaner, more actionable momentum readings. Instead of applying RSI directly to raw price — which often generates noisy, whipsaw-prone signals — AMW first smooths the close price through an HMA filter to strip out short-term market noise, then measures momentum on this cleaned data. The result is a responsive yet smooth oscillator that highlights genuine momentum shifts while suppressing false signals. Buy and sell markers are further refined by a midline filter that only triggers entries when momentum is turning from a favorable position, making this indicator a practical tool for timing entries across any market and timeframe.
Key Features
HMA-smoothed RSI oscillator — applies RSI to a Hull Moving Average of price rather than raw close, dramatically reducing noise and false momentum readings.
EMA signal line with crossover detection — a trailing signal line provides clear, objective crossover-based entry triggers.
Midline-filtered buy/sell signals — BUY signals only fire when momentum crosses up below the 50 midline (turning from weakness), and SELL signals only fire when crossing down above 50 (turning from strength), filtering out low-conviction entries.
Multi-layer visual zone system — overbought/oversold zones, dynamic breach fills, and oscillator-signal cloud fills provide instant visual context of market momentum state.
Built-in alert conditions — configurable alerts for both BUY and SELL signals for hands-free monitoring.
How It Works
The indicator follows a three-stage calculation pipeline designed to extract clean momentum information from price:
Price smoothing via Hull Moving Average (HMA): The closing price is first passed through an HMA with a configurable period (default: 7). The Hull Moving Average uses a combination of weighted moving averages with a square-root-period final smoothing step, producing a curve that closely tracks price with significantly less lag than traditional SMA or EMA. This step acts as a pre-filter, removing intrabar noise and minor fluctuations before momentum is measured.
Momentum measurement via RSI: The Relative Strength Index is then calculated on the HMA-smoothed price over a configurable lookback (default: 14). Because the input price has already been cleaned by the HMA, the resulting RSI oscillator produces smoother momentum readings that more accurately reflect the underlying trend's strength, rather than reacting to every minor price tick.
Signal line via EMA: An Exponential Moving Average (default period: 9) is applied to the oscillator output, creating a trailing signal line. Crossovers between the oscillator and this signal line indicate momentum direction changes — the oscillator crossing above the signal suggests strengthening momentum, while crossing below suggests weakening momentum.
Trading Ideas and Insights
The AMW is designed to be versatile across different trading styles and market conditions. Here are practical approaches:
Momentum reversal entries: The primary use case — when a BUY triangle appears (oscillator crosses above signal below the 50 midline), it indicates momentum is shifting from bearish to bullish while still in the lower half of the range, catching the turn early. Enter long and target the midline or overbought zone. The SELL signal is the mirror for short entries.
Overbought/oversold confluence: When the oscillator enters the shaded overbought zone (above 80) or oversold zone (below 20), the market is at a momentum extreme. Wait for the oscillator to turn and cross below the signal line (in overbought) or above it (in oversold) for high-probability mean reversion trades.
Trend confirmation: Use the cloud fill between the oscillator and signal line as a trend filter. A sustained bullish (green) cloud suggests maintaining long bias; a sustained bearish (red) cloud suggests maintaining short bias. Only take signals aligned with the prevailing cloud color for higher win rates.
Divergence analysis: Compare the oscillator's peaks and troughs with price action. If price makes a higher high but the oscillator makes a lower high, bearish divergence suggests weakening momentum — and vice versa for bullish divergence. These divergences often precede significant reversals.
How Multiple Indicators Work Together
The AMW integrates three distinct technical components into a cohesive system, each serving a specific role:
Hull Moving Average (noise reduction): The HMA serves as the foundation layer, transforming noisy raw price data into a clean input signal. Its near-zero-lag property is critical — if a lagging average like SMA were used instead, the subsequent RSI calculation would inherit that lag, making the entire oscillator slow to react. HMA preserves responsiveness while eliminating the noise that causes false RSI signals.
Relative Strength Index (momentum quantification): RSI converts the smoothed price movement into a bounded 0–100 oscillator that measures the speed and magnitude of price changes. Applied to the HMA-filtered price, it produces a momentum reading that is both responsive and stable — capturing genuine momentum shifts without the jitter that plagues standard RSI on raw price.
Exponential Moving Average signal line (timing mechanism): The EMA of the oscillator creates a reference line that the oscillator oscillates around. Crossovers between the two provide objective, rule-based entry timing. The EMA's inherent smoothing prevents the signal line from reacting to every minor oscillator fluctuation, ensuring crossovers represent meaningful momentum changes rather than noise.
The synergy is sequential: HMA cleans the price → RSI measures momentum on clean data → EMA provides a timing reference for the momentum reading. Each layer builds on the previous one, and the midline filter on top adds a final directional bias check, ensuring the complete system produces signals only when multiple conditions align.
Unique Aspects
Pre-filtered RSI approach: Most oscillator indicators apply RSI (or similar) directly to raw price. AMW's innovation is the HMA pre-smoothing step, which fundamentally changes the quality of the RSI output. This two-stage approach produces a momentum oscillator that behaves more like a "true" momentum reading rather than a noisy derivative of price.
Midline directional filter: Unlike simple crossover systems that generate signals anywhere in the oscillator range, AMW restricts BUY signals to the lower half (below 50) and SELL signals to the upper half (above 50). This ensures entries occur when momentum is turning from a relatively extreme position, significantly reducing false signals during choppy, range-bound conditions.
Multi-layer visual feedback: The indicator provides four distinct visual layers — oscillator-signal cloud fill, horizontal zone lines, extreme zone background shading, and dynamic breach fills — giving traders an immediate, at-a-glance understanding of the current momentum state without needing to interpret raw numbers.
Clean sub-panel design: As a non-overlay oscillator, AMW keeps the price chart uncluttered while providing all momentum information in a dedicated panel, making it easy to combine with overlay-based indicators like moving averages or support/resistance tools.
How to Use
Add the indicator to your chart. It will appear in a separate panel below the price chart, displaying the oscillator (thick line), signal line (orange), and reference levels.
Watch for BUY triangles (green, at the bottom of the panel) — these appear when the oscillator crosses above the signal line while below the 50 midline, indicating a bullish momentum shift from a weak state.
Watch for SELL triangles (red, at the top of the panel) — these appear when the oscillator crosses below the signal line while above the 50 midline, indicating a bearish momentum shift from a strong state.
Use the cloud fill color between the oscillator and signal line to gauge the prevailing momentum direction — green for bullish, red for bearish.
Monitor the overbought (80) and oversold (20) zones. When the oscillator enters these shaded areas and the breach fill activates, the market is at a momentum extreme — be alert for potential reversals.
Set up alerts using the built-in "AMW Buy Signal" and "AMW Sell Signal" alert conditions to receive real-time notifications.
Customization
Momentum Length (default: 14): The RSI lookback period. Lower values (e.g., 8–10) make the oscillator more sensitive and responsive, suitable for scalping or lower timeframes. Higher values (e.g., 21–30) produce smoother, more stable readings for swing trading or higher timeframes.
Price Smoothing / HMA (default: 7): Controls the Hull Moving Average period applied to price before RSI calculation. Lower values preserve more price detail but allow more noise through; higher values produce a cleaner oscillator but introduce slight additional lag. Find the balance that suits your timeframe.
Signal Line Length (default: 9): The EMA period for the signal line. Shorter periods make the signal line more reactive, generating more frequent crossovers; longer periods produce fewer but potentially more reliable crossover signals.
Overbought Level (default: 80): The upper threshold for the extreme zone. Raise to 85 or 90 for fewer but more extreme overbought readings; lower to 70 or 75 for earlier warnings.
Oversold Level (default: 20): The lower threshold for the extreme zone. Lower to 10 or 15 for fewer but more extreme oversold readings; raise to 25 or 30 for earlier warnings.
All colors — bullish, bearish, and signal line — are fully customizable through the Colors & Aesthetics settings group.
Conclusion
The Apex Momentum Wave reimagines the classic RSI oscillator by introducing an HMA pre-smoothing stage that fundamentally improves signal quality. Combined with an EMA signal line for objective crossover timing and a midline directional filter that restricts entries to favorable momentum positions, AMW delivers a momentum oscillator that is both cleaner and more actionable than standard RSI implementations. Its multi-layer visual design — featuring cloud fills, zone shading, and dynamic breach highlights — provides traders with immediate, intuitive momentum context. Whether you trade stocks, forex, crypto, or futures, the Apex Momentum Wave adapts to your market and timeframe, offering a refined approach to momentum-based trading decisions. Indicator

Adaptive Spectral Forecast [WillyAlgoTrader]📡 Adaptive Spectral Forecast is an overlay indicator that applies Goertzel spectral analysis to decompose price into its dominant cyclical components, reconstructs them as a harmonic sum, and then extrapolates the resulting waveform forward in time to generate a visual forecast with confidence bands. Signals fire when the forecast direction changes with sufficient signal-to-noise ratio and trend alignment — projecting where price is likely to oscillate next based on the cycles detected in recent history.
This is a fundamentally different approach from trend-following or momentum-based indicators. Instead of asking "where is price going based on its direction and speed?", spectral analysis asks "what recurring cycles exist in this price data, and where do they project to next?" The Goertzel algorithm is a targeted frequency detector — it scans a range of cycle periods, measures the power (amplitude²) at each frequency, identifies the dominant peaks, computes their exact phase and amplitude via DFT projection, and recombines them into a multi-harmonic forecast that decays toward the adaptive trend as it extends into the future.
🧩 WHY THESE COMPONENTS WORK TOGETHER
Raw price is a mix of trend, cycles, and noise. Attempting to forecast raw price directly fails because trend and cycles require different extrapolation methods: trend continues linearly, cycles repeat sinusoidally, and noise should not be extrapolated at all.
This indicator solves the problem through decomposition and reassembly:
EMA trend extraction → Hann-windowed detrending → Goertzel spectral scan → SNR peak detection → DFT coefficient extraction → Harmonic recombination with decay → Trend re-addition → Confidence bands
Each stage addresses a specific challenge:
— Trend extraction separates the slow directional component so it can be extrapolated linearly (via slope), not sinusoidally
— Hann windowing reduces spectral leakage — without it, the finite data window creates false frequency peaks that contaminate the analysis
— Goertzel scanning efficiently measures power at each candidate frequency without computing a full FFT — enabling targeted, adaptive-resolution frequency detection
— SNR filtering ensures only cycles with meaningful signal strength are included — weak noise-level frequencies are discarded
— DFT coefficient extraction computes the exact amplitude and phase of each selected cycle on un-windowed data (the Hann window is only for spectral scanning, not for coefficient calculation — this preserves correct amplitudes)
— Harmonic decay causes the cyclic component to gradually fade toward the trend as the forecast extends forward — reflecting the reality that detected cycles have limited persistence
— Confidence bands widen with √(bars ahead) × ATR, showing that forecast uncertainty grows with distance
Removing any component breaks the pipeline: without detrending, the Goertzel scan detects the trend as a low-frequency "cycle". Without Hann windowing, spectral leakage creates phantom peaks. Without SNR filtering, the forecast includes noise-level harmonics that produce random oscillations. Without decay, the harmonic projection repeats forever at full amplitude (unrealistic). The full pipeline is required.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Goertzel spectral analysis for cycle detection.
The Goertzel algorithm is a single-frequency DFT that computes the power at one specific period using a recursive formula:
s0 = data + 2×cos(2π/period) × s1 − s2
After iterating through all N data points, the power is: (s1 − s2×cos(ω))² + (s2×sin(ω))², normalized by N² for cross-period comparability.
The indicator scans every integer period from Min Cycle Period (default 8) up to N/2, with an adaptive step size: every period for fast cycles (≤30 bars), step of 2 for longer cycles (reducing computation without losing resolution where it matters most). For each period, the Goertzel power is computed, producing a power spectrum — a map of which cycle lengths carry the most energy in the current price data.
This is fundamentally more targeted than an FFT. An FFT computes power at all frequencies simultaneously but at fixed resolution (determined by window size). The Goertzel approach allows scanning exactly the frequency range of interest with customizable resolution.
2️⃣ SNR-based peak detection with fallback.
From the power spectrum, the indicator identifies local peaks (frequencies where power is higher than both neighbors) and computes the Signal-to-Noise Ratio for each: SNR = peak_power / mean_power_across_all_frequencies. Only peaks with SNR ≥ Min Cycle SNR (default 2.0) are accepted as genuine cycles — the rest are considered noise-level fluctuations.
If no peaks pass the SNR filter (possible in highly random or trend-dominated price action), the algorithm falls back to the single strongest frequency. In this case, the dashboard displays "Weak*" strength and buy/sell signals are suppressed — the forecast is shown for visual reference only, but the indicator acknowledges that no reliable cyclical structure was found.
The top N peaks (sorted by power, N = Harmonics Count, default 5) are selected as the dominant cycles.
3️⃣ DFT coefficient extraction on un-windowed data.
For each selected cycle period, the indicator computes exact sine and cosine coefficients using standard DFT projection:
a = (2/N) × Σ data × sin(2π × i / period)
b = (2/N) × Σ data × cos(2π × i / period)
Critically, this computation uses the raw detrended data (without Hann windowing). The Hann window was only applied for the spectral scan (to identify which frequencies are dominant). Using windowed data for coefficient extraction would distort the amplitude of the harmonics. This two-pass approach — windowed scan for detection, raw data for coefficients — is a key design choice that preserves forecast accuracy.
4️⃣ Harmonic extrapolation with configurable decay.
The forecast is constructed by evaluating the harmonic sum at each future bar:
forecast = trend_projection + Σ (a_k × sin(ω_k × t) + b_k × cos(ω_k × t)) × decay^(t − t_base)
Where trend_projection = trend_last + trend_slope × bars_ahead (linear extrapolation of the EMA trend). The decay factor (default 0.97) causes harmonic amplitude to reduce by 3% per bar, so the cyclic component gradually fades and the forecast converges toward the trend line.
At decay = 1.0, harmonics repeat at full amplitude forever (pure cycle projection). At decay = 0.95, they fade rapidly (forecast becomes trend-only within ~20 bars). Default 0.97 provides meaningful oscillation for the first 20–30 bars before fading. The forecast line is colored by segment: green segments where the forecast is rising, red where falling. Reversal dots mark predicted peaks and troughs.
5️⃣ ATR-based confidence bands with √t scaling.
Uncertainty in the forecast grows with distance. The confidence band width is calculated as:
band_width = ATR(14) × confidence_multiplier × √(bars_ahead)
The √t scaling follows the mathematical principle that forecast variance grows linearly with time horizon (standard deviation grows with square root). The ATR provides the natural volatility scale of the instrument. At bar +1, the band is approximately ATR × multiplier. At bar +25, it's 5× wider. This gives a realistic visual envelope of where price might actually be, not just the central harmonic forecast.
6️⃣ 3-bar consensus forecast direction.
Instead of using a simple "is the next bar higher or lower?" check (which is noisy), the forecast direction is determined by majority vote over 3 bars:
The indicator evaluates the forecast at t+0, t+1, t+2, t+3 and counts upward moves: upVotes = (y1>y0 ? 1:0) + (y2>y1 ? 1:0) + (y3>y2 ? 1:0). If ≥2 of 3 transitions are upward → forecast direction is bullish. If ≤1 → bearish. This consensus approach prevents a single-bar oscillation from flipping the forecast direction.
7️⃣ Trend alignment filter for signal quality.
When enabled (default on), buy signals require the EMA trend slope to be positive, and sell signals require negative slope. This prevents the indicator from generating counter-trend signals when a cycle oscillation temporarily points against the broader trend — which is the most common source of false signals in cycle-based systems.
If the trend filter blocks a direction change, the forecast visualization still updates (you can see the cycle projection) but no signal label is emitted. Additionally, signals are suppressed when the SNR is below the minimum threshold or when the spectral scan fell back to a single non-significant frequency.
8️⃣ Adaptive trend extraction with linear extrapolation.
The trend component is extracted using an EMA with configurable smoothing (default 30 bars), applied forward using the buildTrendArray function. The trend's slope is computed via weighted linear regression over the last 5 points of the trend array — providing a stable slope estimate that isn't dominated by a single bar.
The trend is extrapolated linearly into the forecast: trend_forecast = trend_last + slope × i. This linear projection is appropriate for the short-term forecast horizon (15–55 bars) where trend curvature is typically negligible.
9️⃣ Historical fit visualization.
The reconstructed harmonic sum + trend is plotted over historical data as a polyline, showing how well the detected cycles explain the actual price movement. This serves as an immediate visual validation: if the fit tracks price well, the detected cycles are meaningful. If the fit diverges significantly, the current market regime may not have strong cyclical structure (reflected in low SNR scores in the dashboard).
The fit line is colored by trend direction (green for bullish slope, red for bearish) and decimated for performance (every 1–3 bars depending on lookback length).
🔟 Four presets with coordinated parameter scaling.
— Conservative : lookback ≥ 150, harmonics ≤ 3, forecast ≥ 40 bars — stable, long-term cycles, less overfitting risk
— Default : user settings unchanged
— Aggressive : lookback ≤ 80, harmonics +1, forecast ≤ 25 — faster adaptation, more cycles included
— Scalping : lookback ≤ 50, harmonics +2, forecast ≤ 15 — shortest window, most harmonics, very short projection
Each preset adjusts lookback (spectral window), harmonics count (complexity), and forecast length (projection horizon) as a coordinated unit. Longer lookback needs fewer harmonics (the cycles are more stable). Shorter lookback needs more harmonics (to capture the faster fluctuations within the compressed window).
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Data collection: The last N bars (Analysis Lookback, default 144) of the selected price source are collected into an array, oldest first.
Step 2 — Trend extraction: An EMA with the Trend Smoothing period (default 30) is applied across the array using a forward-pass recursive formula: trend = α × price + (1−α) × trend . This produces a smooth trend array.
Step 3 — Detrending + Hann window: Each bar's trend value is subtracted from its price. The residual is multiplied by a Hann window: w = 0.5 × (1 − cos(2π×i/(N−1))). This isolates the cyclical component while minimizing spectral leakage at the data boundaries.
Step 4 — Goertzel spectral scan: For each candidate period from minPeriod to N/2 (adaptive step: 1 for periods ≤30, 2 for longer), the Goertzel algorithm computes power. The result is a power spectrum across all scanned frequencies.
Step 5 — Peak detection: Local maxima in the power spectrum are identified (power > both neighbors). Each peak's SNR is computed against the mean power. Peaks with SNR ≥ threshold are accepted. If none pass, the strongest single frequency is used as fallback (with "Weak*" marking).
Step 6 — Coefficient extraction: For the top N peaks (by power), sine and cosine coefficients are computed via DFT projection on raw (un-windowed) detrended data. This gives exact amplitude and phase for each cycle.
Step 7 — Forecast generation: The trend is extrapolated linearly using its 5-bar regression slope. Each harmonic is evaluated at future time steps with decay applied. The sum of trend + decayed harmonics produces the central forecast line. Confidence bands = ATR × multiplier × √(bars_ahead).
Step 8 — Direction and signals: 3-bar consensus determines forecast direction. Trend filter and SNR check gate signal emission. Buy/sell labels appear on bar-close confirmation.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — the historical fit and forecast line appear on the last bar
2. The colored dotted line extending right is the forecast (green = rising, red = falling)
3. Colored dots (●) on the forecast mark predicted peaks and troughs
4. Dotted lines above and below = confidence bands (forecast uncertainty zone)
5. ▲/▼ labels = buy/sell signals when the forecast direction changes
👁️ Reading the chart:
— 🟢 Green solid line on history = harmonic fit (uptrend slope)
— 🔴 Red solid line on history = harmonic fit (downtrend slope)
— 🟢🔴 Dotted line extending right = forecast (colored by direction: green rising, red falling)
— 🔵 Upper/lower dotted lines = confidence bands (uncertainty grows with distance)
— 🟢 ● dots = predicted troughs (potential support)
— 🔴 ● dots = predicted peaks (potential resistance)
— 🟢 ▲ below bar = buy signal (forecast changed to bullish)
— 🔴 ▼ above bar = sell signal (forecast changed to bearish)
📊 Dashboard fields:
— Trend: current EMA trend direction (Bullish / Bearish / Neutral)
— Forecast: predicted direction (▲ Up / ▼ Down / — Flat)
— Signal: current state (BUY / SELL / Bullish Bias / Bearish Bias / Wait)
— Strength: cycle quality based on average SNR (Strong > 5.0 / Medium > 2.5 / Weak / Weak* = fallback)
— Dom. Cycle: dominant cycle period in bars (e.g., "34 bars")
— Cycles: how many cycles passed SNR filter vs. requested (e.g., "3 / 5")
— Timeframe, preset, version
🔧 Tuning guide:
— Forecast too noisy: reduce Harmonics Count (3), increase Min SNR (3.0+), increase Trend Smoothing
— Forecast too smooth: increase Harmonics Count (5–7), decrease Min SNR (1.5), decrease Trend Smoothing
— Cycles don't match price: increase Analysis Lookback (200+) for more stable cycle detection, or decrease for faster adaptation
— Forecast fades too fast: increase Decay Rate toward 0.99–1.0
— Forecast unrealistic long-term: decrease Decay Rate toward 0.95, reduce Forecast Bars
— Too many false signals: enable Trend Alignment Filter, increase Min SNR
— Scalping 1–5M: use Scalping preset (lookback ≤50, 7 harmonics, 15-bar forecast)
— Swing 4H–1D: use Conservative preset (lookback ≥150, 3 harmonics, 40-bar forecast)
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Analysis Lookback (default 144): spectral analysis window — the last N bars analyzed
— Harmonics Count (default 5): how many dominant cycles to include in the forecast
— Min Cycle Period (default 8): shortest cycle to scan for (bars)
— Preset (default Default): Conservative / Default / Aggressive / Scalping
— Trend Alignment Filter (default On): require trend-forecast agreement for signals
🔮 Forecast:
— Forecast Bars (default 55): projection length into the future
— Confidence Band Width (default 1.5× ATR): band multiplier
— Trend Smoothing (default 30): EMA period for trend component
— Harmonic Decay Rate (default 0.97): amplitude reduction per bar (1.0 = no decay)
— Min Cycle SNR (default 2.0): signal-to-noise threshold for cycle acceptance
🎨 Visual:
— Historical fit, trend line, reversal dots, confidence bands (all toggleable)
— Auto / Dark / Light theme
🔔 Alerts
— 🟢 BUY — ticker, price, timeframe, time
— 🔴 SELL — same fields
Both support plain text and JSON webhook format. Signals are bar-close confirmed, direction-locked, trend-filtered, and SNR-gated.
⚠️ IMPORTANT NOTES
— 📐 This is spectral analysis, not trend following. The indicator detects and projects recurring cycles. In markets with strong cyclical structure (commodities, forex majors, crypto with regular oscillations), it performs well. In news-driven or momentum-dominated markets with no cyclical structure, the SNR will be low and the forecast unreliable — the dashboard reflects this via the Strength reading.
— 🚫 No repainting of signals. The spectral analysis runs on barstate.islast (updating the forecast in real time on the current forming bar). Signals only fire on the next barstate.isconfirmed bar, after the forecast direction has been set. This means the forecast line itself updates in real time (by design — it's a live projection), but buy/sell signals are confirmed and do not change retroactively.
— 📊 The forecast is a projection, not a prediction. It shows where price would go if the detected cycles continue with their current amplitude and phase. Real markets introduce new information that disrupts cycles. The confidence bands reflect this growing uncertainty. Treat the forecast as a probabilistic zone, not a target.
— 🔄 "Weak*" strength means no cycles passed the SNR filter and the indicator fell back to the single strongest frequency. In this state, signals are suppressed. The forecast is still shown for visual reference but should not be trusted for trading decisions.
— ⚖️ The Hann window is applied only for spectral scanning , not for coefficient extraction. This is deliberate: the window prevents spectral leakage during frequency detection, but the un-windowed data preserves correct harmonic amplitudes for the forecast.
— 📏 The forecast extends a fixed number of bars into the future. Accuracy degrades with distance — the first 10–15 bars are typically the most reliable. The confidence bands quantify this degradation visually.
— 🛠️ This is a spectral analysis and forecasting tool , not an automated trading bot. It detects cycles, projects them forward, and generates directional signals — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Cycle periods adapt automatically to whatever timeframe you apply it on. Indicator

Variable Sine Wave Fit [LuxAlgo]The Variable Sine Wave Fit indicator uses Ordinary Least Squares (OLS) to fit a dynamic, damped, or expanding sine wave with an underlying linear trend to recent price action. This tool aims to identify cyclical patterns and project their potential continuation into the future, providing a mathematical framework for understanding market regimes and turning points. This indicator is subject to repainting and is displayed retrospectively.
🔶 USAGE
The indicator fits a complex trigonometric model to the price data within a user-defined window. The resulting fit is displayed as a solid line over historical bars and transitions into a dashed extrapolation for the forecasted period.
To use the indicator effectively, traders should observe the relationship between the price and the RMSE bands. If the price remains within these bands, the current cyclical model is considered to be tracking the price action effectively. If the price breaks significantly outside, the cycle may be shifting or breaking down.
🔹 Extrema Markers
Small dot markers are placed at the local maxima and minima of the dashed forecast line. These serve as visual guides for the timing of potential future turning points based on the current mathematical fit.
🔹 Market Regime Dashboard
The dashboard provides a real-time summary of the fitted model's characteristics:
State: Classified based on the amplitude behavior (Damped, Expanding, or Constant) and the linear component (Trending or Ranging).
Best Period: The cycle length (in bars) that currently provides the best fit to the data.
RMSE: The Root Mean Square Error, representing the average deviation of price from the fit.
🔶 DETAILS
The script solves for the best parameters of the following equation:
y = e^(λ * t) * (a * sin(ω * t) + b * cos(ω * t)) + m * t + c
Where:
e^(λ * t): The damping/expansion factor. If λ > 0, the cycle is expanding; if λ < 0, it is damping.
a, b: Coefficients determining the phase and initial amplitude of the sine wave.
m * t + c: A linear regression component that accounts for the underlying price trend.
The "Best Period" is determined through a grid search that minimizes the Sum of Squared Errors (SSE), ensuring the frequency (ω) matches the most dominant local cycle within the search range.
🔶 SETTINGS
🔹 Settings
Window Size (N): The number of historical bars used to calculate the fit.
Auto Period: When enabled, the script searches for the best period within the specified min/max range.
Fixed Period (P): The period used if Auto Period is disabled.
Min/Max Search Period: Defines the boundaries for the automatic cycle search.
Forecast Length: The number of bars to project the fit into the future.
RMSE Band Multiplier: Determines the width of the bands surrounding the fit based on the fit error.
🔹 Visuals
Bullish/Bearish Color: Colors used for the fit line and extrema markers based on the final slope.
Band Color: The color of the RMSE-based envelope.
🔹 Dashboard
Dashboard: Toggles the visibility of the data table.
Position: Moves the dashboard to different corners of the chart.
Size: Adjusts the text and table scale.
Indicator

Harmonic Frequency Visualizer [BackQuant]Harmonic Frequency Visualizer
Overview
Harmonic Frequency Visualizer is a cycle-analysis and cross-asset resonance tool that uses a simplified Discrete Fourier Transform (DFT) to measure how strongly specific cycle periods are present in price. It is not a “trend indicator” and it is not trying to predict direction by itself. Its job is to quantify rhythm: which repeating periods (in bars) are currently dominant, whether those cycles are expanding or contracting (phase direction), and whether multiple instruments are sharing the same dominant periods at the same time (resonance).
This indicator has two main output modes:
Spectrum : a frequency “snapshot” showing amplitude at each tested period for up to five instruments.
Spectrogram : a history heatmap showing how the spectrum evolves through time (for the chart instrument).
Spectrum
Spectrogram
On top of that, it produces a Dominant Cycle Oscillator derived from the dominant cycle’s phase, which gives a continuous cycle position metric (peak/trough style zones) without repainting.
This is designed for traders who want cycle context the same way they want volatility context: not as a magic signal, but as structure.
What “frequency” and “cycles” mean in trading terms
A cycle period (say 21 bars) means: “a repeating pattern that tends to complete one full oscillation every 21 bars.” If price contains such a pattern, the DFT will detect a strong correlation between price and a 21-bar sine/cosine wave.
Markets do not have perfectly stable periodic motion, but they often show:
Mean-reverting swings around value.
Trend pulses with pullback cadence.
Volatility clustering that creates rhythmic expansions and contractions.
Cycle tools are trying to measure those repeating components, and DFT is the standard mathematical way to do it.
Where DFT comes from (the core idea)
The Discrete Fourier Transform comes from Fourier analysis, a foundational signal processing concept:
Fourier’s idea : any sufficiently well-behaved signal can be expressed as a sum of sine and cosine waves at different frequencies, each with:
An amplitude (how strong that wave is).
A phase (where you are within the wave cycle).
In continuous math you get the Fourier Transform. In sampled data (like candles) you use the Discrete Fourier Transform. It converts a time series (price over time) into a frequency description (strength of different cycles).
In markets:
Time domain: candles and price series.
Frequency domain: cycle periods and their strengths.
Why sine and cosine, not just sine
A sine wave alone cannot represent every phase alignment cleanly. DFT uses both cosine and sine components because together they form an orthogonal basis that can represent any phase shift.
You can think of it like this:
Cosine component captures “in-phase” alignment with the cycle.
Sine component captures “quadrature” (90-degree shifted) alignment.
Combining them gives full information: amplitude + phase.
Mathematically, a single frequency component can be written as:
A * cos(ωt + φ)
But DFT estimates A and φ by separately accumulating cosine and sine projections.
How this script implements the DFT (and what it is actually measuring)
This is not a full-spectrum FFT across every frequency. It is a targeted DFT across a fixed set of cycle periods:
Tested periods
The script tests 8 predefined periods:
5, 8, 13, 21, 34, 55, 89, 120
These are Fibonacci-like cycle candidates commonly used in cycle/market structure work. The point is not that Fibonacci is magic. The point is that these represent a reasonable spread from short to long rhythms without needing hundreds of frequencies (which would be heavy in Pine).
Normalization step (important)
Before computing the DFT, the script normalizes the series:
mn = SMA(src, lookback)
sd = stdev(src, lookback)
norm = (src - mn) / sd (if sd != 0)
Why normalize:
DFT amplitude depends on the scale of the input series.
If you compare BTC and TLT raw prices, the magnitude is meaningless.
Z-score normalization makes amplitude more comparable across instruments and regimes.
So the spectrum is measuring “cyclical structure in standardized deviations,” not raw dollars.
Projection onto cosine and sine
For each tested period P:
ω = 2π / P (angular frequency for that period)
Compute:
- sCos = Σ(norm * cos(ωk))
- sSin = Σ(norm * sin(ωk))
Interpretation:
You are correlating the last window of normalized price with a cosine wave of period P.
And also correlating it with a sine wave of period P.
If the price has a strong P-bar rhythm, these sums grow in magnitude.
Window length detail
The script uses:
window = min(lookback - 1, 99)
So even if lookback is 200, the internal DFT accumulation caps at 100 bars for performance stability. This is a deliberate trade: stable computation in Pine, while still letting you define normalization lookback and overall context.
Amplitude computation
Once sCos and sSin are computed:
raw magnitude = sqrt(sCos² + sSin²)
This is the length of the vector (sCos, sSin). That vector length is the standard way to combine the orthogonal components into one strength metric.
Then it scales it into a 0–100 “display amplitude”:
amp = sqrt(sCos² + sSin²) / lookback * 100 * sensitivity
amp is capped to 100
So:
Higher amplitude means stronger alignment with that cycle period.
Sensitivity is a user control to amplify or damp the display scaling.
Important: amplitude here is not a probability, and it is not guaranteed “signal quality.” It is a standardized “how much of that cycle exists in the recent window” metric.
Phase computation
Phase is computed using atan2(sSin, sCos). That matters because:
A simple atan(sin/cos) fails in different quadrants.
atan2 correctly resolves the angle from -π to +π.
Phase tells you where you are within the cycle:
Two cycles can have same amplitude but opposite phase.
Phase is what lets you infer “approaching peak vs trough” behavior.
Dominant cycle selection
The script chooses the dominant cycle as the period with the highest amplitude among the tested periods:
domIdx = argmax(amp )
domAmp = max amplitude
domPhase = phase at domIdx
This dominant cycle is used for:
Spectrogram history matrix (chart symbol).
Dominant cycle oscillator.
Data window outputs (dominant period, oscillator value).
Spectrum View: what you see and how to read it
In Spectrum mode, the indicator draws a frequency snapshot for up to five instruments. Each instrument gets a spectrum line (or bars/area depending on style) plotted across the 8 periods on the x-axis, with amplitude (0–100) on the y-axis.
X-axis meaning
Each x position corresponds to a period (5 → 120 bars). You are not looking at “frequency in Hz.” You are looking at “period in bars,” which is more intuitive in trading.
Y-axis meaning
Amplitude is a scaled measure of how strongly that period is present in the recent normalized data. Higher means stronger.
Plot styles
Waveform: connects amplitude points into a continuous shape, best for seeing spectrum shape.
Bars: draws vertical bars per period, best for quick comparison.
Area: similar to waveform but filled toward baseline for emphasis.
Dominant peaks and phase direction labels
The script highlights dominant cycles per symbol (if enabled):
If max amplitude > 20, it labels that peak with the symbol name.
If Show Phase Direction is enabled, it appends ▲ or ▼.
Phase direction logic:
rising = sin(phase) < 0
▲ means cycle is in a “rising” phase segment
▼ means cycle is in a “falling” phase segment
This is not “price will rise now.” It is “the dominant cycle’s instantaneous phase suggests you are on the upward vs downward half of that oscillation.” In real markets, you use this as context, not as a standalone trade trigger.
It also draws small ▲/▼ markers on secondary peaks (amp > 15) to show phase direction of other meaningful cycles, giving you a richer picture than “one dominant period.”
Resonance Zones: cross-asset harmonic alignment
Resonance is where this tool becomes more than a single-chart curiosity.
What resonance means here
A resonance zone is flagged when at least 3 out of 5 instruments have strong amplitude at the same tested period. Mechanically:
For each period i:
- Count instruments with amp > 30
- If count >= 3, mark resonance at that period
When resonance is detected:
A vertical highlight box is drawn behind that period.
A ⚡ marker is printed at the top.
Interpretation:
Multiple assets are expressing a similar cycle length at the same time.
This can indicate macro rhythm, shared liquidity timing, or cross-market synchronization.
This is especially useful when your instrument set includes:
Rates proxy (TLT), commodities (oil, gold), and crypto indices.
You can visually spot when markets are “vibrating” together at a shared period.
Resonance is not automatically bullish or bearish. It is telling you “cycle length agreement,” which can help with timing models and contextual trade planning.
Spectrogram View: frequency over time
Spectrum mode is a snapshot. Spectrogram mode adds time evolution.
What a spectrogram is
A spectrogram is a 2D heatmap where:
Rows = different periods (frequency bands).
Columns = time history (bars ago → now).
Color = amplitude strength.
This allows you to see:
Which cycles are persistent vs fleeting.
When dominant cycle shifts occur (energy moves from one period to another).
Cycle regime transitions (short cycles dominating in chop vs longer cycles dominating in trend).
How the script builds the spectrogram matrix
It maintains a matrix with:
NUM_PERIODS rows (8 periods)
histBars columns (history length)
Each bar:
Remove the oldest column.
Append the newest amplitude array from chartSpec.
So the spectrogram is always a rolling history of the chart symbol’s cycle amplitudes. It does not attempt to store five symbols (too heavy), it focuses on the active chart for time evolution.
Heat coloring
Amplitude values map to a custom gradient:
Low = dark blue
Mid = blue/cyan to orange
High = yellow
This makes dominant energy bands visually obvious. A stable bright band means persistent cycle dominance.
Dominant Cycle Oscillator: phase mapped to a 0–100 oscillator
The oscillator is derived from the dominant cycle phase (chart symbol):
oscRaw = cos(domPhase)
oscValue = 50 + 50 * oscRaw (maps -1..1 into 0..100)
Interpretation:
When cos(phase) ≈ +1, oscillator near 100 (cycle peak zone).
When cos(phase) ≈ -1, oscillator near 0 (cycle trough zone).
Midline 50 corresponds to the quarter-cycle transition points.
It also colors the oscillator by phase direction:
oscRising = sin(domPhase) < 0
Rising phase = green-ish
Falling phase = red-ish
This gives you a clean timing reference:
The dominant period tells you the cycle length.
The oscillator tells you where you are within that cycle.
It is not forecasting price. It is telling you the current phase position of the strongest detected cycle component.
Alerts and practical timing usage
Alerts are based on the oscillator:
Cross above 80: dominant cycle entering peak zone.
Cross below 20: dominant cycle entering trough zone.
Cross 50: midline cross (phase transition).
In practice, you use these as “timing context” alerts, for example:
If your trend model is bullish and cycle oscillator enters trough zone, it can hint at a favorable pullback timing window.
If you are mean-reversion trading and cycle peak zone aligns with resistance, that confluence matters.
Again: cycle timing needs structure confirmation. The oscillator alone is not a trade system.
Multi-instrument design and non-repaint behavior
The indicator requests five external instruments via request.security. It uses:
close with lookahead_on
This forces the data to be “previous confirmed close” so the spectral calculations do not repaint intra-bar. That matters because cycle measures can change drastically within a bar if you let them use live values.
So:
Spectra for external symbols are based on confirmed historical closes.
Chart symbol spectrogram and oscillator are also stable in the sense they depend on confirmed series values (dominant phase updates bar-to-bar).
Key parameters and how they change behavior
Analysis Lookback
Affects normalization and the DFT window cap:
Higher lookback stabilizes mean/stdev normalization and reduces random shifts.
Lower lookback makes the tool more reactive but more prone to regime noise.
Because the inner DFT accumulation caps at 100 bars, very high lookback mostly affects normalization rather than the raw projection length.
Sensitivity
Scales displayed amplitude:
Higher sensitivity makes peaks stand out more.
Lower sensitivity compresses amplitude.
It is a display control, not a physics constant.
View Mode
Spectrum: cross-asset snapshot comparison, resonance detection.
Spectrogram: time evolution of cycle energy for chart symbol.
Show Phase Direction
Adds ▲/▼ markers derived from sin(phase). Useful for quick cycle position intuition, but do not treat ▲ as “buy.”
Show Resonance Zones
Marks periods where many instruments share strong energy. Useful for macro rhythm alignment.
Highlight Dominant Cycles
Labels peaks. If you disable it, the chart becomes cleaner but less informative.
Spectrogram History
Controls how many columns are stored. Higher makes a longer heatmap but costs more drawing.
Limitations and what not to assume
This tool is honest DSP applied to market data, but market data is not a stationary sine wave generator. Key limitations:
Cycles drift. Dominant period can shift as regime changes.
The tool only tests 8 candidate periods. If the true dominant period is 30, it will express as energy near 34 or distributed across neighbors.
Normalization helps comparability, but does not make amplitude “absolute truth.”
DFT assumes a stable frequency over the window. Markets often violate that.
Phase-based oscillators are timing aids, not predictors.
This is why the indicator is best used as:
Context for entries/exits, not a standalone system.
A way to see when cycle energy concentrates or disperses.
A way to detect when multiple markets share a timing rhythm.
How to use it properly (workflows)
1) Cycle regime identification
If short periods (5–13) dominate, market is often choppy, reactive, and mean-reverting.
If mid periods (21–55) dominate, market often shows swing structure.
If long periods (89–120) dominate, market can be in slower macro drift, trend legs, or compressed volatility regimes.
2) Timing layer for an existing strategy
Use your trend model to decide direction.
Use dominant cycle oscillator to decide timing within that direction.
Use spectrogram to avoid trading when dominant period is unstable or flipping rapidly.
3) Cross-asset confirmation
If you see resonance at a period, watch whether your main instrument is also showing strength there.
Resonance can justify holding a cycle-based timing thesis with more confidence because it is not isolated.
4) Expectation management
If the spectrum is flat (no peaks above threshold), that is information:
No clean dominant cycle, randomness dominates.
Cycle-based timing will be unreliable.
Summary
Harmonic Frequency Visualizer uses a targeted Discrete Fourier Transform across predefined cycle periods to measure amplitude and phase of cyclical components in price. It supports multi-instrument spectrum comparison, resonance detection when several markets share strong energy at the same periods, and a spectrogram heatmap for the chart instrument showing how cycle dominance evolves over time. A dominant cycle oscillator maps phase into a 0–100 timing readout with alerts for peak/trough/midline transitions. It is a cycle context engine designed to complement trend, structure, and risk models, not replace them. Indicator

Indicator

Luminous Trend Wave [Pineify]```
Luminous Trend Wave - Hull MA Based Normalized Momentum Oscillator
The Luminous Trend Wave (Pineify) is a momentum oscillator designed to provide clear, responsive trend signals while minimizing the lag commonly associated with traditional momentum indicators. By combining Hull Moving Average (HMA) calculations with ATR-based normalization and hyperbolic tangent transformation, LTW delivers a bounded oscillator that works consistently across different assets and timeframes.
Key Features
Hull Moving Average foundation for reduced lag trend detection
ATR normalization for universal applicability across all markets
Bounded output range (-100 to +100) using mathematical tanh transformation
Dynamic gradient coloring that reflects momentum intensity
Built-in signal line for momentum confirmation
Automatic alerts for trend reversals and momentum shifts
How It Works
The indicator operates through a four-stage calculation process:
Trend Basis Calculation: The indicator first calculates a Hull Moving Average (HMA) of the closing price. HMA was chosen specifically because it provides significantly less lag compared to Simple or Exponential Moving Averages while maintaining smoothness. This allows the oscillator to respond quickly to genuine price movements.
Distance Measurement: The raw distance between the current close price and the HMA trend line is calculated. This distance represents how far price has deviated from its smoothed trend.
ATR Normalization: The distance is then divided by the Average True Range (ATR) over the same lookback period. This normalization step is crucial - it makes the oscillator readings comparable across different assets regardless of their price levels or typical volatility. A stock trading at $500 and one at $5 will produce equivalent readings when their relative movements are similar.
Tanh Transformation: Finally, the normalized value is passed through a hyperbolic tangent function scaled by a sensitivity multiplier. The mathematical formula (e^2x - 1) / (e^2x + 1) naturally bounds the output between -100 and +100, preventing extreme spikes while preserving the directional information.
Trading Ideas and Insights
Zero Line Crossovers: When the oscillator crosses above zero, it indicates a shift from bearish to bullish momentum. Conversely, crossing below zero signals bearish momentum. These crossovers can be used as entry triggers when confirmed by other analysis.
Overbought/Oversold Levels: Readings above +80 suggest overbought conditions where price has extended significantly above its trend. Readings below -80 indicate oversold conditions. These extremes often precede mean reversion moves.
Signal Line Divergence: When the main oscillator (histogram) is above the signal line, momentum is increasing. When below, momentum is decreasing. This relationship helps identify the strength of the current move.
Momentum Fading: The indicator automatically fades the color intensity when the oscillator value is closer to the signal line than to the extremes, visually indicating weakening momentum before potential reversals.
How Multiple Indicators Work Together
LTW integrates three distinct technical concepts into a cohesive system:
Hull MA + ATR Integration: The Hull Moving Average provides the trend direction while ATR provides the volatility context. Together, they answer not just "where is the trend?" but "how significant is the current deviation relative to normal market movement?"
Mathematical Bounding + Visual Mapping: The tanh transformation ensures readings stay within predictable bounds, while the gradient coloring maps these bounded values to intuitive visual feedback. Strong bullish readings appear in bright green, strong bearish in bright red, with smooth transitions between.
Oscillator + Signal Line System: Similar to MACD's relationship between the MACD line and signal line, LTW uses a WMA-smoothed signal line to filter noise and confirm momentum direction. The interplay between the faster oscillator and slower signal creates actionable crossover signals.
Unique Aspects
Universal Normalization: Unlike many oscillators that produce different reading ranges on different assets, LTW's ATR normalization ensures consistent interpretation whether trading forex, crypto, stocks, or commodities.
Sensitivity Control: The sensitivity parameter allows traders to adjust how aggressively the oscillator responds to price changes. Higher values make it more responsive (useful for scalping), while lower values smooth out noise (better for swing trading).
Visual Momentum Feedback: The gradient coloring and transparency adjustments provide immediate visual feedback about trend strength without requiring traders to interpret numerical values.
How to Use
Add the indicator to your chart - it displays in a separate pane below price.
Watch for zero line crossovers as primary trend signals. Bullish when crossing above, bearish when crossing below.
Use the ±80 levels as caution zones where reversals become more likely.
Monitor the relationship between the histogram and signal line - histogram above signal indicates strengthening momentum.
Pay attention to color intensity - faded colors indicate weakening momentum and potential reversal zones.
Set alerts for automated notifications on trend changes and momentum shifts.
Customization
Trend Lookback (default: 21): Controls the HMA period. Lower values increase responsiveness but may generate more false signals. Higher values provide smoother trends but with more lag.
Signal Smoothing (default: 5): Adjusts the WMA period for the signal line. Higher values create a slower signal line with fewer crossovers.
Sensitivity (default: 1.5): Multiplier for the tanh transformation. Increase for more reactive signals, decrease for smoother readings.
Colors: Fully customizable bullish and bearish colors to match your chart theme.
Gradients: Toggle gradient coloring on/off based on preference.
Conclusion
The Luminous Trend Wave indicator offers traders a mathematically sound approach to momentum analysis. By combining the low-lag properties of Hull Moving Average with ATR-based normalization and bounded output transformation, LTW provides consistent, interpretable signals across any market. The visual feedback system makes trend strength immediately apparent, while the signal line crossovers offer clear entry and exit timing. Whether used as a standalone tool or combined with price action analysis, LTW helps traders identify trend direction, momentum strength, and potential reversal zones with clarity.
```
Indicator

Indicator

ADX Volatility Waves [BOSWaves]ADX Volatility Waves - Trend-Weighted Volatility Mapping with State-Based Wave Transitions
Overview
ADX Volatility Waves is a regime-aware volatility framework designed to map statistically significant price extremes through adaptive wave structures driven by trend strength.
Rather than treating volatility as a static dispersion metric, this indicator conditions all volatility expansion, contraction, and zone placement on ADX-derived trend intensity. Price behavior is interpreted through wave-like transitions between balance, expansion, and exhaustion states rather than isolated band interactions.
The result is a dynamic, gradient-based wave system that visually encodes volatility cycles and regime shifts in real time, allowing traders to contextualize price movement within trend-weighted volatility waves.
Price is evaluated not by static thresholds, but by its position and progression within adaptive volatility waves shaped by directional strength.
Conceptual Framework
ADX Volatility Waves is built on the premise that volatility unfolds in waves, not straight lines.
Traditional volatility tools identify dispersion but fail to account for how volatility behaves differently across trend regimes. By embedding ADX directly into volatility construction, this indicator ensures that volatility waves expand during strong directional phases and compress during weak or transitioning regimes.
Three guiding principles define the framework:
Volatility must be conditioned on trend strength
Extremes occur within zones, not at lines
Signals should emerge from completed wave transitions, not instantaneous touches
This reframes analysis from reactive mean-reversion toward regime-aware wave interpretation.
Theoretical Foundation
The indicator fuses directional movement theory with statistical volatility modeling.
Bollinger-derived dispersion provides the structural base, while ADX normalization controls the amplitude of volatility waves. As ADX increases, volatility waves widen and deepen; as ADX weakens, waves compress and tighten around equilibrium.
From this foundation, extended upper and lower wave zones are constructed and smoothed to represent statistically significant expansion and contraction phases.
At its core are three interacting systems:
ADX-Controlled Volatility Engine : Standard deviation is dynamically scaled using normalized ADX values, producing trend-weighted volatility waves.
Wave Zone Construction : Smoothed volatility boundaries are offset and expanded to form upper and lower wave zones, defining overextension and compression regions.
State-Based Wave Transition Logic : Signals occur only after price completes a full wave cycle: expansion into an extreme wave zone followed by a confirmed return to equilibrium.
This structure ensures that signals reflect completed volatility waves, not transient noise.
How It Works
ADX Volatility Waves processes price action through layered wave mechanics:
Trend-Weighted Volatility Calculation : Volatility boundaries are dynamically adjusted using ADX influence, allowing wave amplitude to scale with trend strength.
Structural Smoothing : Volatility boundaries are smoothed to stabilize wave geometry and reduce short-term distortions.
Wave Offset & Expansion : Upper and lower wave zones are positioned beyond equilibrium and expanded proportionally to volatility range, forming clearly defined expansion waves.
Gradient Wave Depth Mapping : Each wave zone is subdivided into multiple gradient layers, visually encoding increasing extremity as price moves deeper into a wave.
Wave State Tracking & Cooldown Control : The system tracks prior wave occupancy, enforces neutral stabilization periods, and applies cooldowns to prevent overlapping wave signals.
Compression Detection : Volatility width monitoring identifies compression phases, highlighting conditions where new volatility waves are likely to form.
Together, these processes create a continuous, adaptive wave map of volatility behavior.
Interpretation
ADX Volatility Waves reframes market reading around volatility cycles:
Upper Volatility Waves (Red Gradient) : Represent upside expansion phases. Deeper wave penetration indicates increased overextension relative to trend-adjusted volatility.
Lower Volatility Waves (Green Gradient) : Represent downside expansion phases. Sustained presence signals pressure, while exits toward balance suggest wave completion.
Equilibrium Zone : The neutral region between volatility waves. Confirmed re-entry into this zone marks the completion of a wave cycle and forms the basis for BUY and SELL signals.
Regime Context via ADX : Strong ADX regimes widen waves, reducing premature reversal signals. Weak ADX regimes compress waves, increasing sensitivity to reversion.
Wave progression and completion matter more than single-bar interactions.
Signal Logic & Visual Cues
ADX Volatility Waves produces single-entry BUY and SELL labels as its visual cues, plotted only when price first enters a volatility wave zone after the defined cooldown period.
Buy Signal (Bottom Zone Entry) : A BUY label appears when price enters the lower volatility wave (oversold zone). This highlights potential expansion into undervalued extremes, providing visual context for trend assessment rather than a guaranteed execution trigger.
Sell Signal (Top Zone Entry) : A SELL label appears when price enters the upper volatility wave (overbought zone). This marks potential overextension into upper volatility extremes, serving as a contextual indicator of trend stress.
All labels respect cooldown tracking to prevent clustering. Alerts are tied directly to these zone-entry signals, and a separate alert monitors volatility squeezes for awareness of compression periods.
Strategy Integration
ADX Volatility Waves integrates cleanly into volatility-aware trading frameworks:
Wave Context Mapping : Use wave depth to assess expansion and exhaustion risk rather than forcing immediate entries.
Transition-Based Execution : Prioritize BUY and SELL signals formed after confirmed wave completion.
Trend-Regime Filtering : In strong ADX regimes, treat waves as continuation pressure. In weak regimes, favor completed wave reversions.
Volatility Cycle Awareness : Monitor compression phases to anticipate the emergence of new volatility waves.
Multi-Timeframe Alignment : Apply higher-timeframe ADX regimes to contextualize lower-timeframe wave behavior.
Technical Implementation Details
Core Engine : ADX-normalized volatility expansion
Wave System : Smoothed, offset, expanded volatility waves
Visualization : Multi-layer gradient wave zones
Signal Logic : State-based wave transitions with cooldown enforcement
Alerts : Wave entry, wave completion, volatility compression
Performance Profile : Lightweight, real-time optimized overlay
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Short-term volatility waves and intraday transitions
15 - 60 min : Structured intraday wave cycles
4H - Daily : Macro volatility regimes and expansion phases
Suggested Baseline Configuration:
BB Length : 20
BB StdDev : 1.5
ADX Length : 14
ADX Influence : 0.8
Wave Offset : 1.0
Wave Width : 1.0
Neutral Confirmation : 5 bars
These suggested parameters should be used as a baseline; their effectiveness depends on the asset volatility, liquidity, and preferred entry frequency, so fine-tuning is expected for optimal performance.
Performance Characteristics
High Effectiveness:
Markets exhibiting rhythmic volatility expansion and contraction
Assets with responsive ADX regime behavior
Reduced Effectiveness:
Erratic, news-driven price action
Illiquid markets with distorted volatility metrics
Integration Guidelines
Confluence : Combine with BOSWaves structure or trend tools
Discipline : Respect wave completion and cooldown logic
Risk Framing : Interpret wave depth probabilistically, not predictively
Regime Awareness : Always contextualize waves within ADX strength
Disclaimer
ADX Volatility Waves is a professional-grade volatility and regime-mapping tool. It does not predict price and does not guarantee profitability. Performance depends on market conditions, parameter calibration, and disciplined execution. BOSWaves recommends using this indicator as part of a comprehensive analytical framework incorporating trend, volatility, and structural context. Indicator
