Indicator

Adaptive Fourier Transform CCI [QuantAlgo]🟢 Overview
The Adaptive Fourier Transform CCI reimagines the classic Commodity Channel Index by replacing its fixed lookback period with one that continuously adjusts to the market's own rhythm. Rather than measuring price deviation against an arbitrary static length, it first isolates the cyclical component of price action through a Discrete Fourier Transform, identifies which cycle period currently holds the most spectral energy, and then tunes the CCI calculation to that dominant period. The result is a momentum oscillator calibrated to the frequency structure of the instrument being traded, naturally tightening during fast, high-frequency regimes and widening during slower, drawn-out cycles without requiring manual timeframe adjustments.
🟢 How It Works
Before any cycle detection occurs, raw price is conditioned through two sequential filters. A high-pass filter strips the slow-moving trend component from the close, leaving only the oscillating portion of price action:
hp := 0.5 * (1 + a1) * (close - close ) + a1 * hp
That residual is then passed through a Super Smoother filter, which removes short-term noise from the cycle signal without introducing the lag that standard moving averages add at this stage:
filt := c1 * (hp + hp ) / 2 + c2 * filt + c3 * filt
This cleaned signal is what the Discrete Fourier Transform (DFT) operates on. The DFT scans across a range of candidate cycle periods and measures how much price energy is concentrated at each one. The period where that energy is strongest is selected as the dominant cycle. An EMA smooths the period output to prevent erratic length switching between bars, and the result is scaled by the Length Multiplier to derive the final adaptive CCI lookback:
adaptiveLen = clamp(round(dominantPeriod × lengthMult), 5, 60)
The CCI is then calculated using the standard Lambert formula over that adaptive length, measuring how far typical price has deviated from its mean relative to its average absolute deviation. An optional output smoothing MA reduces bar-to-bar noise before the final value is plotted.
🟢 Signal Interpretation
▶ Overbought (Above Upper Level, Red): When the Adaptive Fourier Transform CCI (AFT-CCI) rises above the upper threshold, price has deviated significantly above its cycle-adaptive mean. The reading reflects momentum extended relative to the market's current detected rhythm rather than a fixed arbitrary baseline. The signal carries more weight when the dominant cycle is stable and the DFT is locked onto a consistent frequency rather than switching between periods.
▶ Oversold (Below Lower Level, Green): When the AFT-CCI falls below the lower threshold, price has moved an equivalent distance below its cycle-adaptive mean. In strongly trending conditions the AFT-CCI can remain in either zone for extended periods, so the threshold levels should be read as zones of extension rather than automatic reversal points.
▶ Neutral Zone (Between Levels, Grey): When the AFT-CCI sits between the upper and lower thresholds, price deviation relative to the detected cycle is within normal range. Zero-line crosses within this zone indicate the adaptive mean is being reclaimed, which can serve as early directional context before a full threshold break develops.
▶ Zero Line: The zero line represents the adaptive mean itself. A cross above zero indicates typical price has moved above the cycle-adaptive mean; a cross below indicates the opposite. These crosses are lower-conviction reads on their own but become more meaningful when followed by a threshold break in the same direction.
🟢 Features
▶ Preconfigured Presets: Two parameter sets sit alongside the default configuration. "Fast Response" compresses the DFT window and cycle search range while raising the length multiplier, producing faster adaptation suited to intraday charts from 5-minute to 1-hour. "Smooth Trend" expands the window and search range while lowering the multiplier, establishing a more stable cycle read suited to daily and weekly position trading.
▶ Built-in Alerts: Six alert conditions cover the full range of meaningful oscillator events. Separate alerts fire on entering and exiting both overbought and oversold territory, capturing threshold breaks in both directions. Two additional alerts trigger on bullish and bearish zero-line crosses, enabling directional monitoring without requiring constant chart observation.
▶ Visual Customisation: Six colour presets, Classic, Aqua, Cosmic, Cyber, Neon, and Custom, apply consistently across the signal line, glow layers, and threshold level lines so the overbought and oversold colours remain coherent regardless of which preset is active. The optional neon glow effect uses three layered plots at increasing transparency to give the signal line visual depth and make threshold breaks immediately readable at a glance.
Indicator

BK AK-Vigilante☠ BK AK-Vigilante ☠
All glory to G-d.
Respect to my mentor AK, whose standard is discipline, confirmation, and execution without noise.
BK AK-Vigilante is a CCI-based momentum and reversal framework built to expose what most traders miss: not just where momentum is, but whether it is accelerating, fading, exhausting, or quietly preparing to reverse.
This indicator does not treat CCI like a basic overbought and oversold tool. It turns CCI into a layered read of market behavior by combining raw CCI structure, slope pressure, smoothing interaction, momentum-state transitions, fast and slow divergence engines, velocity expansion, absorption signals, multi-timeframe alignment, and a confluence intelligence layer that helps separate trend continuation from reversal conditions.
What it does
BK AK-Vigilante tracks the market through multiple stacked reads:
a core CCI engine
optional smoothing and Bollinger structure
instant slope coloring for momentum pressure
crossover fill between CCI and its smoothing average
peak and valley pivot detection
fast divergence for tactical shifts
slow divergence for structural shifts
divergence confluence when both engines align
momentum histogram state changes such as launch, surge, fade, and flip
velocity envelope breaks
absorption and exhaustion detection at extremes
higher-timeframe confluence
a CCI volatility ratio that helps judge signal quality
a compact intelligence layer and status table for live decision support
How it works
The script starts with raw CCI, then builds context around it.
The slope layer measures how aggressively CCI is changing bar to bar. That makes the line react not just to level, but to force. The histogram then compares CCI to its smoothing average so you can see when momentum is launching, accelerating, fading, or flipping. That matters because reversals often begin with deceleration before they appear in price.
The divergence engine is split into two parts. The fast engine is for tactical divergence and shorter-turn behavior. The slow engine is for structural divergence and larger reversals. When both engines align inside the confluence window, the script flags that as a much higher-conviction condition than a single divergence by itself.
On top of that, the script checks for absorption at deep extremes. That helps identify the moments when CCI is still stretched, but the force behind the move is already dying. The velocity envelope adds another layer by showing when CCI is pushing beyond its normal movement range. The volatility ratio then helps filter whether current conditions are expanded and meaningful or compressed and likely to be noisy.
What makes it different
BK AK-Vigilante is not a decorative CCI remake.
Its purpose is to convert CCI from a simple oscillator into a market-state tool.
The difference is in the interaction of its layers:
slope tells you pressure
histogram tells you state
divergence tells you disagreement
absorption tells you exhaustion
velocity tells you acceleration
MTF tells you alignment
confluence intelligence tells you when the layers are working together
That is the edge here. It is built to help answer practical questions:
Is the current move still healthy or already fading?
Is this extreme actually strong, or is it exhausted?
Is divergence tactical noise or structural risk?
Are multiple layers confirming the same direction?
Is this the point to press, reduce, or prepare for reversal?
How to use it
A clean workflow is:
Start with the CCI regime and slope.
Then check the histogram state.
Then check whether divergence is forming.
Then look for absorption or velocity breaks.
Then confirm with MTF and the volatility ratio.
In practice:
SURGE + strong slope + expanded volatility favors continuation.
FADE + absorption at extremes is where reversal risk becomes real.
Fast and slow divergence together is where conviction increases.
Compressed volatility means reduce trust in signals and avoid overcommitting.
MTF agreement gives better directional confidence.
This script is best used as a decision-support tool, not as a blind auto-entry system.
Best fit
BK AK-Vigilante is suited for traders who want momentum and reversal structure in one place, especially for:
intraday scalping
day trading
momentum continuation trades
exhaustion-based reversal setups
confirmation work alongside structure, levels, or price action
It can be used on any market, but it is most useful where momentum shifts matter and where the trader wants to distinguish between a real trend leg and a move that is already starting to fail.
Bottom line
BK AK-Vigilante was built to read momentum with more depth than a standard oscillator.
Not just overbought.
Not just oversold.
Not just divergence.
It is a framework for reading pressure, state, exhaustion, acceleration, and confluence through CCI so the trader can act with more structure and less guesswork.
☠ BK AK-Vigilante ☠ Indicator

Indicator

Luminous Volume Flow Oscillator [Pineify]Luminous Volume Flow Oscillator
This indicator splits each bar's volume into buying and selling pressure using bar polarity — where the close sits within the high-low range — then smooths the net delta into a flowing oscillator. Unlike simple up/down volume counters that only compare close vs. open, bar polarity captures intrabar conviction: a close near the high with heavy volume tells a different story than a close near the midpoint. The result is a momentum-style oscillator driven by volume direction rather than price alone.
Key Features
Bar-polarity volume splitting that goes beyond basic open/close comparison
EMA-smoothed volume delta oscillator with dynamic gradient coloring
Signal line crossovers filtered by oscillator zone — buy signals only fire below zero, sell signals only above
Adaptive color intensity that scales to recent volume momentum range
How It Works
The calculation starts by classifying each bar's directional bias. If the close is closer to the high than the low — meaning (close − low) > (high − close) — the bar is considered buyer-dominated and the full volume is assigned as buying pressure. The inverse applies for seller-dominated bars. When the close position is ambiguous, the indicator falls back to a simple close-vs-open check.
Volume is split into buying (upVol) and selling (dnVol) components based on bar polarity
The raw volume delta (upVol − dnVol) is calculated — positive means net buying, negative means net selling
An EMA smooths the delta to filter out single-bar noise, producing the main oscillator line
A simple moving average of the smoothed delta creates the signal line for crossover detection
How the Components Work Together
The bar-polarity classification acts as the first filter: it determines who controlled the bar. The EMA smoothing then reveals the underlying trend in volume direction by stripping out random fluctuations. On top of this, the signal line provides timing — when the oscillator crosses the signal line, it suggests a shift in volume momentum direction.
The zone filter ties everything together. Buy signals require the oscillator to be below zero (net selling territory) when the bullish crossover occurs. This means you're catching potential reversals where selling pressure is already dominant but starting to weaken — not chasing after volume momentum is already extended. Sell signals work in reverse, firing only when the oscillator is above zero and bearish momentum starts to take over.
Trading Ideas and Insights
When the oscillator crosses above the signal line while below zero, it may indicate that selling pressure is exhausting and buyers are stepping in — consider this a potential early reversal signal rather than a confirmed trend change
Divergence between price making new highs and the oscillator failing to do so can flag weakening conviction behind the move
The histogram gradient intensity provides a quick visual read: deep, saturated colors mean strong directional volume; faded colors suggest the move is losing participation
Note that bar-polarity volume splitting is an approximation — it doesn't use actual tick-level order flow data. During low-volume or choppy sessions, the oscillator can produce noise even after EMA smoothing. Combine with price structure or trend context for better results.
Unique Aspects
Bar polarity is a more nuanced volume classification than simple candle direction. A bullish candle with its close near the midpoint gets less credit than one closing near the high — this distinction matters in real markets where wicks tell the story
The zone-filtered signal approach acts as a built-in mean-reversion guard. Rather than generating signals at momentum extremes (where risk/reward deteriorates), it targets the inflection zone where directional volume is shifting
Dynamic gradient scaling using a 100-bar lookback means the color intensity adapts to recent conditions — a moderate reading in a low-volatility period still shows up clearly
How to Use
Add the indicator to your chart. The histogram shows the smoothed volume delta — bars above zero indicate net buying pressure, below zero net selling
Watch for the gray signal line crossovers. A crossover while the histogram is below zero is a potential buy setup; a crossunder while above zero is a potential sell setup
Use the gradient color intensity as a confidence gauge — stronger colors mean more decisive volume flow in that direction
Set up alerts for automated notifications when buy or sell conditions trigger
Customization
Volume Smoothing Length (default: 14) — Controls how much the raw volume delta is smoothed. Higher values produce a calmer oscillator but introduce more lag; lower values are more responsive but noisier
Signal Line Length (default: 9) — Sets the SMA period for the signal line. Shorter lengths generate more frequent crossovers; longer lengths filter out minor fluctuations
Bullish / Bearish Color — Customize the gradient palette for positive and negative volume flow
Show Signals / Histogram / Signal Line — Toggle individual visual components on or off to declutter the chart
Conclusion
The Luminous Volume Flow Oscillator turns raw volume into a directional momentum reading by splitting each bar's volume according to where price closed within its range. The zone-filtered signal approach keeps entries focused on inflection points rather than chasing extended moves. It works best as a confirmation tool alongside price action or trend-following methods — volume tells you the conviction behind a move, but never the whole story on its own.
Indicator

Indicator

Aura Trend Cloud Navigator [Pineify]Aura Trend Cloud Navigator
This indicator builds a trend-following system around a Trend Regularity Adaptive Moving Average — an adaptive MA that adjusts its responsiveness based on how frequently price makes new period highs or lows. When the market trends, the baseline tracks price closely; when it ranges, the baseline goes nearly flat, cutting down on false crossover signals. An ATR-based volatility cloud wraps around the baseline to frame the trend's expected range.
Key Features
Adaptive baseline that self-adjusts speed — fast in trends, nearly frozen in ranges
Dynamic ATR cloud that expands and contracts with real-time volatility
Gradient-filled cloud with automatic color shifts between bullish and bearish states
Crossover-based buy/sell signals filtered by the adaptive regime detection
Bar coloring for quick visual trend identification
How It Works
The core is a recursive adaptive moving average controlled by a trend coefficient derived from market structure:
On each bar, the script checks whether a new highest high or lowest low has been established over the lookback period (default 99 bars). If either condition is met, a binary signal of 1 is recorded; otherwise 0.
The average of this binary signal over the same period is computed via SMA, then squared. Squaring creates a nonlinear response — the coefficient drops sharply when trend activity fades and rises steeply when price consistently prints new extremes.
This squared value becomes the smoothing factor in a recursive formula: baseline = baseline + coefficient × (close − baseline) . A high coefficient pulls the baseline toward price; a near-zero coefficient locks it in place.
An Average True Range envelope is then added above and below the baseline, scaled by a user-defined multiplier. This forms the cloud — a corridor representing expected price movement around the trend.
How the Components Work Together
The adaptive baseline and the ATR cloud serve complementary roles. The baseline handles trend direction and generates entry signals, but because it adapts to market regime, it sidesteps the main weakness of fixed-period moving averages: constant whipsawing during consolidation. The cloud adds a volatility dimension on top of that directional read. When price stays inside the cloud, it is oscillating within the normal range of the current trend. Price pushing beyond the cloud edges may signal overextension or trend acceleration. In short, the baseline answers "which direction" while the cloud answers "how far is normal."
Trading Ideas and Insights
When the baseline shifts color and a triangle signal fires, treat it as a potential trend change. Confirmation improves if the crossover happens near or beyond the opposite cloud edge, suggesting genuine momentum rather than a range poke.
In a bullish regime, price hugging the upper cloud boundary suggests strong follow-through. A pullback toward the baseline that holds can offer a continuation entry — especially if the baseline remains clearly sloped upward.
Watch for the baseline going flat while the cloud tightens — this is the indicator explicitly telling you to stand aside. Crossovers that occur while the baseline is flat carry less conviction than those during a clearly sloped baseline, since the adaptive mechanism has detected a low-regularity environment.
Unique Aspects
The trend regularity approach counts how often new period extremes occur rather than measuring price direction or momentum directly. Most adaptive MAs rely on efficiency ratios or volatility scaling; this one responds to the structural behavior of the market itself — whether it is consistently making progress or stalling out.
Squaring the trend coefficient means the MA doesn't merely slow down in ranges — it practically stops. This creates clear visual separation between trending and non-trending regimes that is immediately readable on the chart.
The gradient cloud gives volatility context without the visual clutter of multi-line band systems. One glance tells you both direction and how stretched the current move is.
How to Use
Add the indicator to your chart. The thick colored line is the adaptive baseline — green for bullish, red for bearish.
Triangle markers appear at crossover points: upward green triangles below bars for potential long entries, downward red triangles above bars for potential short entries or exits.
Use the cloud as context. Price within the cloud is behaving normally for the trend. Moves beyond the cloud edges are stretched and may revert or signal acceleration.
On higher timeframes (4H, Daily), the default 99-period length works well as a medium-term trend filter. On lower timeframes, consider reducing the length for faster adaptation — though this increases sensitivity to noise.
Customization
Trend Filter Length (default: 99) — How many bars are used to assess trend regularity. Higher values produce a smoother, slower baseline that only reacts to sustained directional moves. Lower values increase sensitivity but also raise whipsaw risk in choppy markets.
Cloud Width / ATR Multiplier (default: 2.0) — Scales the ATR-based cloud. Wider values capture more price action within the corridor; tighter values make cloud-edge touches more frequent and potentially more meaningful as overextension signals.
ATR Length (default: 14) — Period for the Average True Range calculation. The standard 14 suits most instruments. Increase it for smoother cloud behavior on volatile assets.
Conclusion
The Aura Trend Cloud Navigator provides a regime-adaptive trend filter that goes quiet when the market goes quiet. The TRAMA baseline combined with an ATR cloud delivers both directional guidance and volatility context in a single overlay. It suits swing and position traders looking for a trend filter that avoids generating noise during consolidation — though the adaptive smoothing does introduce lag at trend reversals, so pairing it with a momentum oscillator for timing may improve entries on faster-moving instruments. Indicator

Trend Momentum (Algionics) - Ribbon Pressure FieldTrend Momentum interprets a 28-line EMA ribbon field as a physical force landscape. It reads what directional pressure price is under, how strong that pressure is, and what the current market state is, all within a single framework.
The ribbon spans periods 20 to 236 in steps of 8. Each line is not a simple EMA. It passes through a multi-stage smoothing kernel:
f_rb(int len) =>
float ama = (ta.ema(src, len) + ta.sma(src, len)) / 2
int k = int(math.ceil(len * 0.08))
float kl = ta.ema(ama, k)
(kl + ta.sma(kl, k + 2)) / 2
The average of EMA and SMA is computed first, then a secondary smoothing pass is applied using a kernel length equal to 8 percent of the original period. This dual-smoothing structure suppresses both the phase lag of a pure EMA and the ripple noise of a pure SMA simultaneously. Because the kernel ratio scales proportionally with the period, short lines and long lines maintain consistent smoothing characteristics across the entire ribbon.
Force Boundary
The histogram plots Bull Force above the zero line and Bear Force below it.
float bullForce = math.max(v001 - rb_min, 0.0)
float bearForce = math.min(v001 - rb_max, 0.0)
Bull Force is the distance from price to the bottom edge of the field. Bear Force is the distance from price to the top edge. When price is inside the field, both are active. When price breaks above, Bear Force converges to zero. When price drops below, Bull Force converges to zero.
The space between them defines the force boundary. When the boundary widens, price is moving away from the field edges. When it narrows, price is returning toward the center.
Pressure Ratio
Where Force Boundary measures raw displacement between price and the field edges, Pressure Ratio measures the internal pressure distribution within the field.
float bp_a = math.max(v001-v020,0)+math.max(v001-v028,0)+math.max(v001- v036,0)+math.max(v001-v044,0)+...
float total_p = bull_pressure + bear_pressure
float bull_dom = total_p > 0 ? (bull_pressure / total_p) * 100.0 : 50.0
For each of the 28 lines, the distance from price is measured individually. Lines below price contribute to bull pressure. Lines above contribute to bear pressure. Both sides are summed independently, then the ratio is computed.
This is not a simple count of how many lines are above or below. A line 10 points below price contributes 10 times more bull pressure than a line 1 point below. The ratio reflects both the number of lines favoring each side and how far they are from price.
At 100, every line sits below price. At 0, every line sits above. At 50, the total upward and downward distances are equal.
Bias Line
The Bias Line sits inside the force boundary. Its position is determined by the pressure ratio.
float biasLine = bearForce + (bullForce - bearForce) * (bull_dom / 100.0)
It divides the space between Bull Force and Bear Force using the pressure ratio as a positioning weight. A 73 percent bull reading does not place the line at 73 percent of the field. It places the line at 73 percent of the distance between Bear Force and Bull Force at that moment.
The Bias Line responds to two independent inputs: how far the field edges are from price, and how the internal pressure is distributed. The separation between boundary logic and positioning logic is the structural core of this design.
The color follows a gradient based on its position within the force boundary.
Ribbon Overlay
The ribbon draws two boundary lines on the price chart. The upper line marks the highest value across the field. The lower line marks the lowest.
Each boundary changes color independently based on price crossovers. When price crosses above a boundary, it turns bull color. When price crosses below, it turns bear color. The moment both boundaries switch to the same color confirms that price has moved fully to one side of the field.
A gradient fill appears between price and the nearest boundary, fading as price moves away from the edge.
Price Candles
When enabled, candles on the main chart are colored based on where the Bias Line sits within the force boundary.
float sig_pos = tm_range > 0 ? ((biasLine - bearForce) / tm_range) * 2.0 - 1.0 : 0.0
color candle_col = color.from_gradient(sig_pos, -1.0, 1.0, C_BEAR, C_BULL)
The Bias Line position is converted to a scale from minus 1 to plus 1, then mapped to a color gradient. Bear color at the bottom, bull color at the top.
This coloring reflects pressure balance, not price direction. A rising candle with bear coloring means price moved up but field pressure remains tilted to the downside. When candle color and price direction disagree, the field is telling a different story than the bar itself.
Dashboard
BIAS
Displays bull and bear pressure percentages. Each value updates with a directional arrow indicating whether the percentage increased or decreased from the previous bar. A segment bar provides a visual representation of the pressure distribution.
Flow
Tracks whether the dominant pressure is accelerating or decelerating. It compares the current pressure percentage against its own smoothed average.
float bias_smooth = ta.ema(bull_dom, GM_LEN)
The smoothing length is derived as the geometric mean of the ribbon endpoints:
int GM_LEN = int(math.round(math.sqrt(float(START_P) * float(END_P))))
No arbitrary period. A natural interaction scale derived from the ribbon structure.
When the percentage is above its average, the label reads Rising. When below, Falling. When pressure reaches full saturation, Maxed.
Status
A four-state market condition classifier.
Trend activates when price moves outside the field entirely. Hold activates when the dominant side remains intact but price is inside the field. Weakening activates when the dominant side still leads but its pressure is declining. Reversal Warning activates when price crosses the center of mass to the opposing side.
The state engine uses two mechanisms. A trend latch and a condition matrix.
if bull_dom >= 100
is_bull := true
if bull_dom <= 0
is_bull := false
The latch sets only when the pressure ratio touches either extreme. It does not reset at any intermediate value. It only changes at the next full saturation on the opposite side. 100 and 0 are mathematical boundaries. 50 is the equilibrium point where upward and downward pressure are equal. There is no arbitrary threshold in this system.
The natural state progression is Trend to Hold to Weakening to Reversal Warning. When states skip steps, for example jumping from Trend directly to Reversal Warning, it signals a sharp shift in pressure. The faster the sequence moves, the less time available to react.
Trend
Confirms the established directional bias. It reads Bull when the last confirmed extreme was at full bullish saturation, and Bear when at full bearish saturation. The direction holds until the opposite extreme is reached.
Note
A one-line contextual summary tied to the active status. Each of the four states has its own message describing the current condition and what to watch for.
Technical Implementation
Ribbon Kernel Structure
Each ribbon line is not a simple EMA. The EMA-SMA average serves as a first-stage compromise between exponential responsiveness and rectangular stability. The secondary kernel, scaled to 8 percent of the input period, applies consistent proportional smoothing across the entire ribbon. Short-period lines receive short kernels. Long-period lines receive long kernels. The noise suppression ratio remains uniform regardless of where a line sits in the ribbon.
Distance-Weighted Pressure Measurement
Conventional ribbon-based indicators measure strength as the count of lines above or below price divided by the total number of lines. This approach treats every line equally. A line barely below price and a line far below price contribute the same.
This engine converts the absolute distance to each line into pressure. A line 10 points below price contributes 10 times more bull pressure than a line 1 point below. Because this distance weighting is embedded in the ratio, the system reads the pressure gradient inside the field, which a simple count cannot capture.
Dual Separation Architecture
Force Boundary and Pressure Ratio are computed independently. Force Boundary measures only the raw displacement between price and the field edges. Pressure Ratio measures only the distance-weighted sum across all 28 individual lines.
The Bias Line is the sole point where these two independent inputs converge. The boundary defines the range of possible positions. The pressure ratio determines the position within that range. A change in one does not affect the calculation of the other.
Latch-Based State Engine
State transitions are driven by mathematical extremes, not arbitrary thresholds. The latch sets only at 100 (all lines below price) or 0 (all lines above price). These are physical limits of the distribution, not chosen values.
50 is the point where the sum of upward distances exactly equals the sum of downward distances. The condition matrix uses only these three structural boundaries: 0, 50, and 100.
Interlocking Constant Architecture
Every parameter in this system branches from a single root:
int START_P = 20
int END_P = 236
From these two constants the 28-line ribbon is defined, and from that ribbon: Force Boundary, Pressure Ratio, Bias Line, Flow smoothing length, and every boundary in the state engine are all derived. The smoothing length used for Flow is the geometric mean of the two endpoints. The state classification boundaries of 0, 50, and 100 derive directly from the mathematical limits of the pressure distribution.
Change one constant and the ribbon structure shifts, the field boundaries move, the pressure distribution recalculates, and every downstream output cascades accordingly.
Settings
Ribbon Overlay:
displays the upper and lower field boundaries on the price chart with color-coded crossover states.
Price Candles:
colors candles on the main chart based on the Bias Line position within the force boundary.
Dashboard:
shows the status panel with BIAS percentages, segment bar, Flow, Status classification, Trend direction, and Note.
Force Boundary:
plots the Bull Force and Bear Force histogram in the indicator pane.
Bias Line:
plots the pressure-weighted position line inside the force boundary.
Position Point:
marks the current Bias position on the last bar. Indicator

SQZ Pro JS [MTF + ADX + Divergencias + Giros]El ecosistema definitivo del Squeeze Momentum. Basado en la estrategia clásica del Squeeze, este indicador ha sido reconstruido desde cero para traders exigentes que buscan precisión matemática y gráficos extremadamente limpios. Hemos eliminado el "ruido" y las señales falsas para centrarnos en lo que realmente importa: la fuerza de la tendencia, la alineación de temporalidades y las divergencias estructurales.
🎯 CARACTERÍSTICAS PRINCIPALES:
1. Motor de Divergencias PRO (Lógica de Olas)
Olvídate de las divergencias falsas causadas por pequeños baches en el precio. Este indicador utiliza un rastreador de "Olas" (Wave Tracker) que identifica el pico absoluto de la fuerza compradora/vendedora y lo compara estrictamente con la ola anterior.
Regla de Cero Estricta: Las divergencias alcistas solo se calculan en la zona roja (valles) y las bajistas en la zona verde (picos). Trazado limpio "de palo a palo".
2. Panel Dinámico Multi-Timeframe (MTF)
Un monitor lateral que te permite escanear el mercado desde 5 Minutos hasta Mensual. La tabla es inteligente: su tamaño se adapta dinámicamente según las temporalidades que actives.
Para cada temporalidad, el panel analiza simultáneamente:
La dirección del Squeeze.
La fuerza de la tendencia (Filtro ADX y cruces DI+/DI- integrados matemáticamente).
Eventos en tiempo real (Giros de color y cruces de la línea cero).
3. Señales Verticales de Precisión (Sin ensuciar el gráfico)
El indicador traza líneas verticales directamente en tu gráfico solo en la temporalidad en la que te encuentras, marcando los momentos críticos:
Giro Buy / Sell: Cuando el momentum cambia de dirección perdiendo fuerza.
Cruce 0 UP / DN: Cuando el momentum cruza la línea cero confirmando el cambio de bando.
Totalmente personalizables: Elige el grosor, color y estilo (línea sólida, punteada o discontinua) para adaptar el gráfico a tu estilo visual.
4. Estética "Clean Chart" (Cero distracciones)
Diseñado para no estorbar.
El Momentum se muestra en formato de columnas limpias (Verde oscuro para fuerza creciente, Rojo para fuerza decreciente).
Elementos secundarios como el ADX, las líneas DI o los puntos del Squeeze (dots) vienen ocultos de fábrica para mantener el gráfico puro, aunque su matemática sigue trabajando en segundo plano para la tabla MTF.
Las etiquetas molestas de la escala de precios han sido desactivadas por defecto.
💡 CÓMO UTILIZARLO:
El Panel (El Bosque): Utiliza la tabla MTF para confirmar que las temporalidades mayores (ej. Diario y 4H) están alineadas en la misma dirección (Fuerza + ADX).
El Histograma (El Árbol): Busca entradas en tu temporalidad operativa cuando el histograma confirme un "Giro" a favor de la tendencia mayor, o cuando detecte una Divergencia Pro confirmada.
⚙️ CONFIGURACIÓN DE FÁBRICA:
El indicador viene pre-configurado para operar "Out of the box" con colores intuitivos y sensibilidad profesional, pero ofrece control absoluto en sus ajustes para activar temporalidades menores (5m, 15m, 30m), mostrar las líneas del ADX o ajustar los periodos del canal de Keltner y las Bandas de Bollinger.
(Descargo de responsabilidad: Este indicador es una herramienta de análisis técnico y no constituye asesoramiento financiero. Úsalo en confluencia con tu propia gestión de riesgo). Indicator

Tidal Volume Oscillator [JOAT]Tidal Volume Oscillator
Introduction
The Tidal Volume Oscillator is a separate-pane oscillator that attempts to answer a single question: is the current price movement being carried by genuine volume participation, or is it occurring on weak flow? It constructs a volume-weighted momentum score, normalizes it to a bounded range of −100 to +100, applies a Fourier-inspired exponential decay smoothing pass to reduce noise without introducing phase lag, and then scales the result with an adaptive trend filter. A flow momentum line tracks the acceleration of the oscillator itself. A divergence engine scans for all four divergence types simultaneously — regular bullish, regular bearish, hidden bullish, and hidden bearish — and plots them directly in the oscillator panel.
The indicator does not predict future price. It contextualizes current price movement relative to volume behavior and flags when price action and volume-weighted momentum are moving in opposite directions, which historically precedes changes in directional character — though not always, and not reliably in all instruments or conditions.
---
Core Concepts
The VZO Foundation
The Volume Zone Oscillator (VZO) is an established concept that categorizes volume as positive or negative based on the direction of price change, then computes a ratio of positive to negative volume over a rolling window. This indicator rebuilds that concept from the ground up using a different normalization approach:
Relative Volume: Instead of using raw volume, the oscillator first normalizes each bar's volume against a rolling SMA of volume. This produces a relative volume reading — a value above 1.0 means the bar traded heavier than average, below 1.0 means lighter. This step removes the absolute scale of volume from the calculation, allowing the oscillator to behave comparably across instruments with vastly different volume profiles and across timeframes where absolute volume differs by orders of magnitude.
Volume-Weighted Momentum: The price change on each bar is smoothed via EMA, and the relative volume is separately smoothed via EMA. Multiplying these two smoothed values produces a volume-weighted momentum signal. This is then smoothed again to form a base momentum reading.
RSI-Style Normalization: Positive and negative portions of the base momentum are separated, each independently smoothed, and their ratio is fed into an RSI-style formula: vzo = 100 * (ratio - 1) / (ratio + 1) . This bounds the oscillator strictly between −100 and +100 and gives it a symmetric zero-line structure where positive values indicate dominant upward volume momentum and negative values indicate dominant downward volume momentum.
Fourier Exponential Decay Smoothing
After the initial VZO is computed, a second smoothing pass is applied using exponential decay weights. For each bar, the contribution of each of the prior N bars is weighted by exp(-i / (len * 0.3)) , where i is the number of bars back. This means the most recent bar carries maximum weight and each earlier bar contributes exponentially less. The window clips naturally as the weights approach zero.
The result is a smoothing pass that is inspired by frequency-domain thinking: it emphasizes recent values and de-emphasizes older values in a continuous decay rather than in the binary on/off fashion of a simple rolling average. The smoothed output tracks the oscillator's underlying shape while suppressing high-frequency noise without the phase shift that a centered moving average would introduce.
ADF Trend Filter
An adaptive multiplier is derived by comparing a short SMA and a long SMA of price, normalizing their difference by the rolling standard deviation of price over a matching window. This produces a dimensionless value that reflects the strength of the current trend relative to recent volatility — conceptually analogous to the logic behind an Augmented Dickey-Fuller trend test applied in a simplified real-time form.
This multiplier is kept close to 1.0 intentionally. Its role is not to dramatically change the oscillator's value but to apply a mild scaling that slightly amplifies the VZO when trend conditions are strong and slightly suppresses it during choppy, mean-reverting conditions. The effect is subtle but helps the oscillator's readings align better with the underlying market character.
Final Blended VZO
The final oscillator value blends the EMA-smoothed VZO and the Fourier-smoothed VZO according to a blend parameter, scales the result by the ADF multiplier, and clamps the output to the range. The blend parameter controls how much weight goes to the Fourier-smoothed version versus the EMA-smoothed version, allowing the user to tune between responsiveness and smoothness.
Flow Momentum Line
A secondary line is plotted alongside the main oscillator, computed as:
flow_momentum = (vzo - ema(vzo, lookback)) * 0.5
This measures the rate of change of the oscillator — its acceleration — and scales it to stay visually proportional. When the flow momentum line is rising, the oscillator is accelerating upward. When it is falling, the oscillator is losing momentum regardless of its absolute level. Crossovers between the oscillator and the flow momentum line can highlight inflection points in volume-weighted momentum.
Divergence Engine
The divergence engine uses pivot high and pivot low detection to identify four divergence types:
Regular Bullish Divergence: Price makes a lower low while the oscillator makes a higher low. Suggests weakening downward volume participation on the new price low.
Regular Bearish Divergence: Price makes a higher high while the oscillator makes a lower high. Suggests weakening upward volume participation on the new price high.
Hidden Bullish Divergence: Price makes a higher low while the oscillator makes a lower low. Often associated with pullbacks within an established uptrend where volume momentum remains stronger than the pullback's depth implies.
Hidden Bearish Divergence: Price makes a lower high while the oscillator makes a higher high. Often associated with rallies within an established downtrend where volume momentum is failing to confirm the price bounce.
The engine uses ta.valuewhen to retrieve the oscillator's value at the most recent prior pivot of the same type, then compares it to the current pivot. Lines and labels are drawn directly in the oscillator pane, keeping all divergence context in a single panel.
Dynamic Color Blending
The oscillator line and histogram (if enabled) use color blending that responds to both the direction of the oscillator and the intensity of the flow momentum. Colors transition smoothly between bull and bear palettes as conditions shift, with intensity modulated by momentum acceleration. This avoids binary color flips and gives a continuous visual read of the oscillator's strength and direction.
---
Features
Relative-volume-normalized VZO foundation — removes absolute volume scale bias
RSI-style normalization producing a symmetric −100 to +100 oscillator
Fourier exponential decay smoothing pass for noise reduction without phase lag
ADF-inspired adaptive trend multiplier for regime-sensitive scaling
Blended output combining EMA and Fourier smoothing with user-adjustable weighting
Flow momentum line showing oscillator acceleration
Full four-type divergence engine: regular bull/bear and hidden bull/bear
Divergence lines and labels rendered directly in the oscillator pane
Dynamic color blending based on direction and momentum intensity
Overbought/oversold level lines at user-defined thresholds (default ±80)
Fully toggleable visual components including divergence types individually
---
Input Parameters
VZO Length: Primary lookback for the volume-weighted momentum and normalization calculations (default: 14)
Smoothing Length: Short EMA length used in the initial volume-weighted momentum construction (default: 5)
Signal Length: EMA length applied to the final VZO for the signal/flow line (default: 9)
Fourier Window: Number of bars used in the exponential decay smoothing pass (default: 20)
Fourier Blend: Proportion of the final output taken from the Fourier-smoothed VZO versus the EMA-smoothed VZO (default: 0.4, meaning 40% Fourier / 60% EMA)
Overbought Level: Upper reference line threshold (default: +80)
Oversold Level: Lower reference line threshold (default: −80)
Pivot Bars: Number of bars on each side required to confirm a pivot high or low for divergence detection
Visual Toggles: Individual controls for divergence types (regular bull, regular bear, hidden bull, hidden bear), flow momentum line, bar coloring, and OB/OS lines
---
How to Use
Reading the oscillator: Values above zero indicate that volume-weighted momentum favors buyers over the lookback window. Values below zero indicate it favors sellers. The magnitude reflects how dominant one side is. A reading of +60 is meaningfully different from +20 — the former suggests strong participation on the upside, the latter suggests modest positive lean.
Overbought/oversold levels: The default ±80 levels are deliberately set wide. Reaching ±80 indicates a statistically strong skew in volume momentum, not simply a directional bias. A reading at +85 that begins to decline is worth noting; a reading that has been above +80 for many bars without declining suggests strong persistent flow, not an automatic reversal condition.
Flow momentum line: Use the flow momentum line to identify when the oscillator is accelerating or decelerating. If the oscillator is above zero but the flow momentum line is falling and crossing below the oscillator, volume-weighted momentum is losing strength even if it has not crossed zero. This can be an early warning of a fading move.
Divergences: Divergence signals appear as labeled lines in the oscillator pane. They flag a disagreement between price structure and volume momentum structure. Regular divergences are typically associated with potential trend reversal conditions; hidden divergences are typically associated with trend continuation conditions during a pullback. Neither type is a standalone entry signal — they require context from price structure, higher timeframe trend, and other confirmation.
Combining types: A regular bearish divergence occurring while the oscillator is above +60 and the flow momentum line is declining is a more compelling condition than a divergence occurring at a neutral oscillator reading. Look for confluence between divergence signals, oscillator level, and flow momentum direction.
Timeframe notes: On lower timeframes, the divergence engine will fire frequently and many signals will resolve as noise. On higher timeframes, divergence signals are structurally more significant but rarer. The Fourier blend and VZO length should be calibrated to the timeframe being traded.
---
Limitations
This indicator does not predict future price movement. All readings are computed from past and current bar data.
Volume data quality varies significantly across instruments and data providers. On instruments with unreliable, synthetic, or missing volume data (some forex pairs, certain CFDs, spread-betting instruments), the oscillator's readings will be distorted or meaningless.
Divergences are detected only at confirmed pivot points, which by definition require a lookback into past bars. A divergence signal will appear after the pivot is confirmed, not at the pivot bar itself. This is inherent to pivot-based divergence detection and is not a bug.
Hidden divergences can occur frequently during strong trends and produce many signals that resolve without follow-through on shorter timeframes.
The ADF-inspired filter is a simplified heuristic, not a formal statistical test. It does not guarantee that the adaptive scaling accurately reflects whether a market is trending or mean-reverting at any given moment.
The Fourier exponential decay smoothing is not a formal frequency-domain Fourier transform. The term is used descriptively to indicate the exponential weighting pattern, not to imply that the calculation resolves into sinusoidal components.
Extreme or sustained overbought/oversold readings do not guarantee a reversal. Strong trends can keep the oscillator pinned at extremes for extended periods.
The oscillator is bounded at ±100 by construction. This means that at extreme readings, additional strengthening of volume momentum does not move the line further — the clamping obscures incremental changes at extremes.
Past divergence performance on a given instrument is not indicative of future performance.
---
Originality Statement
The VZO concept is established in the public domain. This implementation departs from the standard in several meaningful ways. Using relative volume (each bar's volume divided by a rolling SMA of volume) rather than raw volume removes the absolute scale of volume from the oscillator's behavior — a standard VZO applied to a futures contract and a low-float equity will behave differently purely due to volume magnitude; this version will not. The RSI-style normalization of the volume-weighted momentum ratio is retained from the VZO concept but is applied to a momentum signal constructed differently from the standard signed-volume approach. The Fourier exponential decay smoothing layer is an original addition: it is not a standard EMA, WMA, or VWMA — it applies a decaying weight function that is conceptually distinct from any standard Pine Script built-in smoothing function, producing a cleaner oscillator output with less phase distortion than an equivalent EMA. The ADF-inspired adaptive multiplier is a real-time regime-sensitivity mechanism not present in any standard oscillator. The four-type divergence engine built into the same panel, detecting all four divergence classes simultaneously using pivot comparison logic, provides complete divergence coverage without requiring additional scripts or manual line drawing. The combination of these elements — relative-volume normalization, Fourier decay smoothing, adaptive trend scaling, blended output, flow momentum line, and full-coverage divergence detection — into a single oscillator panel represents an original synthesis that is not replicated by any standard built-in indicator.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Past performance of any indicator or strategy is not indicative of future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Indicator

Indicator

Vigilant Asset Allocation (VAA)1. Where VAA comes from
The basic observation behind VAA is not new. Jegadeesh and Titman showed in 1993 that stocks with strong recent returns keep outperforming for roughly three to twelve months. That finding was initially confined to equities, but Asness, Moskowitz and Pedersen (2013) later confirmed that the same pattern holds across bonds, currencies and commodities. Momentum, it turns out, is not just a stock-picking anomaly. It works at the asset-class level too.
Moskowitz, Ooi and Pedersen (2012) took this one step further. They looked at time-series momentum rather than cross-sectional momentum. The distinction matters: cross-sectional momentum asks "which asset is doing best?", while time-series momentum asks "is this asset going up at all?". VAA uses both questions, but the time-series version is what drives the breadth filter.
Faber (2007) probably deserves credit for bringing momentum into mainstream tactical allocation. His rule was simple: hold an asset when it trades above its ten-month average, sell when it drops below. Crude, but it cut drawdowns significantly. Antonacci (2014) refined this into dual momentum, combining trend direction with relative strength across two universes.
Keller and Keuning (2017) built on all of this but added something the earlier models lacked: a breadth dimension. Instead of looking at each asset independently, they count how many offensive assets carry positive momentum. If even one drops below zero (in the aggressive B=1 variant), the entire allocation goes defensive. The reasoning is straightforward. When breadth deteriorates, trouble is usually on the way. Waiting for every asset to turn negative is waiting too long.
In their original backtest (1970-2016, using Shiller extended data for the early period and ETF prices from inception), VAA-G4 produced roughly 17.7% annualised with a maximum drawdown of about 16.1% (Keller and Keuning, 2017, Table 2). These are in-sample numbers. They tell you what happened, not what will happen.
2. How the model works
2.1 Momentum scoring
Every asset gets a 13612W score, a weighted combination of four return lookbacks:
mom = 12 * r1 + 4 * r3 + 2 * r6 + r12
The r values are simple returns: r1 = close / close - 1, and so on for 63, 126 and 252 bars. The one-month return gets the heaviest weight (12), the twelve-month return the lightest (1). Recent momentum matters more, but the yearly anchor keeps the score from overreacting to short-term noise.
There is no normalisation. The raw score is used only for two things: ranking assets within each universe, and checking whether it is positive or negative for the breadth count.
2.2 The two universes
Keller and Keuning specified these defaults:
Offensive (growth):
- SPY (S&P 500)
- EFA (international developed)
- EEM (emerging markets)
- AGG (US aggregate bonds)
Defensive (preservation):
- LQD (investment-grade corporate bonds)
- IEF (7-10 year treasuries)
- SHY (1-3 year treasuries)
All seven are changeable in the settings. If you swap in other ETFs, make sure they have enough history.
2.3 The breadth rule
Each day the indicator counts how many offensive assets have positive momentum. Call the count of non-positive ones n_negative. The rule:
- n_negative >= B (default 1): go to the top defensive asset
- n_negative < B: go to the top offensive asset
With B=1, one single negative asset triggers the switch. That is aggressive in the sense of being quick to flee. Keller and Keuning argue this is the right trade-off. Breadth erosion tends to precede broader sell-offs, so early rotation is worth the occasional whipsaw.
2.4 Rebalancing
The paper prescribes monthly rebalancing. The indicator locks the allocation at the close of the last trading day of each month. Everything that happens between rebalances is monitoring only. The dashboard shows both the locked position ("held") and what the model would do today ("live").
Daily rebalancing is available as an option. It is not what the paper tested.
2.5 Ties
When two assets have the exact same momentum score, the one listed first wins. Sounds arbitrary because it is. But four overlapping return windows make exact ties rare in practice.
3. What you need
- PulseWire, any plan (free works, Pro lifts the alert cap)
- A daily chart. The lookbacks assume daily bars. On weekly or intraday charts the periods are wrong and the dashboard flags it.
- 252 bars of history for every symbol. Until that is available, the model shows "warming up".
4. Setup and settings
4.1 Getting started
Add the indicator to any daily chart via the PulseWire indicator search. It loads with the Keller/Keuning defaults. The status row at the bottom of the dashboard tells you when the model is ready.
4.2 Strategy
Breadth Threshold (B): 1 matches the paper. Raising it to 2 means two assets have to go negative before the model rotates. Fewer whipsaws, slower reaction.
Monthly Rebalancing: On by default. Off gives you daily updates, which is useful for experimentation but not what the literature tested.
4.3 Symbols
Offensive and defensive universes are fully configurable. If you replace an ETF, check that PulseWire has daily data going back at least a year.
4.4 Visuals
Background Mode: "Position" tints the background green (offensive) or red (defensive). "Off" removes it.
Candle Colouring: Paints candles by breadth strength. Full green at 4/4 positive, full red at 0/4, faded tones in between. Transparency is adjustable.
Color Theme: Eight palettes. All of them work in both dark and light mode.
Glow Effect: Adds layered transparent lines behind the main plot. Useful if the signal gets lost in a busy chart. Off by default.
4.5 Dashboard
The table in the top right (moveable) shows:
- Regime: offensive or defensive, with the breadth count
- Allocate: which specific ETF to hold (100% always)
- Live: intra-month reading (only visible in monthly mode)
- Individual asset rows: 13612W scores and a trend arrow (up, down, or flat compared to 5 bars ago)
- Status: "active", "warming up", or "wrong timeframe"
4.6 Alerts
Five conditions, all behind a master switch:
- Regime switches to offensive at month-end
- Regime switches to defensive at month-end
- Held asset changed (same regime, different pick)
- Live breadth dropped between rebalances
- Live breadth recovered between rebalances
The live alerts are early warnings, not trade signals. They tell you the next rebalance might produce a change.
5. Reading the chart
The step line maps the breadth count to a 0-10 scale:
| Breadth | Value | What it means |
| 4/4 positive | 0.0 | Everything trending up |
| 3/4 positive | 2.5 | One weak link, still offensive with B=1 |
| 2/4 positive | 5.0 | Defensive if B is 2 or below |
| 1/4 positive | 7.5 | Broad weakness |
| 0/4 positive | 10.0 | Nothing working |
The threshold line sits at B * 2.5. Above it means defensive. The zone fill below the threshold marks the offensive region.
One thing to keep in mind: the distances between these steps do not mean anything quantitative. 5.0 is not "twice as bad" as 2.5. It is an ordinal display, not a risk score.
6. How to actually use it
The simplest workflow: check the dashboard on the last trading day of the month. Look at the "Allocate" row. Buy that ETF at the open of the next session. Done until next month.
If you want a heads-up, turn on the live alerts. A "breadth dropped" alert mid-month tells you the next rebalance might flip regimes. That gives you time to plan, not to act early. The month-end values are what count.
VAA does not know about your taxes, your broker fees, or your risk tolerance. Treat it as one input to your decision process, not the whole process.
7. What the model does not do
It does not model execution. There is no bid-ask spread, no slippage, no market impact.
It cannot protect you from whipsaws. Momentum systems by nature struggle in choppy, directionless markets. The breadth filter helps, but a month where sentiment flips back and forth will still produce unnecessary trades.
Monthly rebalancing is both a feature and a weakness. It keeps you from overtrading, but it also means a crash in the middle of a month does not trigger any action until month-end.
The backtests in the paper used extended data that goes back to 1970. The actual ETFs (EEM, AGG) only started trading in 2003. PulseWire data will not replicate the full historical period.
The model is always invested. There is no cash option. You are either in the top offensive or the top defensive ETF.
Momentum can stop working. Correlations change. What the academic literature documents as a persistent anomaly can go through multi-year stretches of underperformance. The 2009 recovery, for instance, was fast enough to catch most trend-following systems off-guard.
8. Common questions
Why does it say "warming up"?
The model needs 252 daily bars per symbol. Loading the indicator on a chart without enough history means it cannot compute the twelve-month return component.
Can I run this on a 4-hour chart?
You can, but 21 bars on a 4-hour chart is not a month. The lookbacks will be wrong. The dashboard will flag this.
I changed the symbols and the readings look off.
Make sure the replacement ETFs actually have a year of daily data on PulseWire. Some regional ETFs or newer funds do not.
The live reading disagrees with the held position.
That is expected in monthly mode. The held position only updates at month-end. The live reading shows what would happen if you rebalanced today. They diverge by design.
Should I trade every time the live reading changes?
No. Unless you deliberately turned off monthly rebalancing, the live reading is for awareness, not for execution.
References
Antonacci, G. (2014) Dual Momentum Investing: An Innovative Strategy for Higher Returns with Lower Risk. New York: McGraw-Hill.
Asness, C.S., Moskowitz, T.J. and Pedersen, L.H. (2013) 'Value and Momentum Everywhere', The Journal of Finance, 68(3), pp. 929-985. doi:10.1111/jofi.12021.
Faber, M.T. (2007) 'A Quantitative Approach to Tactical Asset Allocation', The Journal of Wealth Management, 9(4), pp. 69-79.
Jegadeesh, N. and Titman, S. (1993) 'Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency', The Journal of Finance, 48(1), pp. 65-91. doi:10.1111/j.1540-6261.1993.tb04702.x.
Keller, W. and Keuning, J.W. (2017) 'Breadth Momentum and Vigilant Asset Allocation (VAA): Winning More by Losing Less', SSRN Electronic Journal. doi:10.2139/ssrn.3002624.
Moskowitz, T.J., Ooi, Y.H. and Pedersen, L.H. (2012) 'Time series momentum', Journal of Financial Economics, 104(2), pp. 228-250. doi:10.1016/j.jfineco.2011.11.003.
Indicator

Indicator

Apex Volatility Squeeze & Breakout [Pineify]Apex Volatility Squeeze & Breakout
The Apex Volatility Squeeze & Breakout indicator is a dynamic volatility analysis tool that identifies market compression (squeeze) phases and highlights potential breakout opportunities in real time. Built on the well-established principles of Bollinger Bands and Keltner Channels, this indicator synthesizes both into a single, unified volatility channel with a clear three-state trend system — giving traders an intuitive and actionable view of market volatility conditions on any symbol and timeframe.
Key Features
Unified volatility channel combining Bollinger Band width and Keltner Channel (ATR) threshold
Three-state trend detection: Bullish, Bearish, and Squeeze (consolidation)
Smoothed bands using EMA to reduce noise and false signals
Color-coded volatility cloud with dynamic candle coloring
Built-in Buy and Sell breakout signal labels
Alert conditions for automated trading notifications
Fully customizable parameters for lookback period, multipliers, smoothing, and colors
How It Works
This indicator operates on a core concept: when volatility contracts, a breakout is imminent . Here is how the calculation pipeline works:
A Simple Moving Average (SMA) of the close price is calculated over the user-defined lookback period to establish the basis line.
Standard deviation of price is computed and scaled by a Band Multiplier to determine the upper and lower Bollinger-style volatility bands.
The Average True Range (ATR) is computed over the same period and scaled by a Squeeze Multiplier to establish the Keltner Channel threshold.
A squeeze state is detected when the Bollinger Band width (scaled standard deviation) is less than the Keltner Channel width (scaled ATR) — this means volatility has compressed below normal levels.
Both the upper band, lower band, and basis are smoothed using an Exponential Moving Average (EMA) to produce a clean, noiseless visual channel.
A trend state machine determines the current market phase: Bullish (+1) when price trades above the upper band outside a squeeze, Bearish (-1) when price trades below the lower band outside a squeeze, and Squeeze (0) when volatility is compressed.
Trading Ideas and Insights
The squeeze state is the most critical signal this indicator provides. When the bands contract and the channel turns orange (default squeeze color), the market is consolidating and building energy. Traders should watch closely for the following scenarios:
A bullish breakout occurs when price crosses above the upper smoothed band after a squeeze period, indicating upward momentum.
A bearish breakout occurs when price crosses below the lower smoothed band after a squeeze period, indicating downward momentum.
During the squeeze phase, traders may choose to reduce position sizes and wait for directional confirmation.
The color transition of the volatility cloud — from orange (squeeze) to green (bullish) or red (bearish) — provides a clear visual cue for trend changes.
How Multiple Indicators Work Together
This script merges two complementary volatility methodologies into a single coherent system:
Bollinger Bands (Standard Deviation) measure statistical volatility — how far price deviates from the mean. They expand during volatile markets and contract during quiet markets.
Keltner Channels (ATR) measure range-based volatility — the average true range of price movement. They provide a more stable, less reactive volatility baseline.
By comparing these two measures, the indicator identifies squeeze conditions: when the faster-reacting Bollinger Band width falls below the slower ATR threshold, it signals abnormal compression. This is the classic "squeeze" concept pioneered by John Carter's TTM Squeeze, adapted here with EMA smoothing for cleaner signals.
The EMA smoothing layer is applied on top of the raw bands to eliminate whipsaw noise. This creates a smoother channel that is easier to read and trade, especially on lower timeframes.
The trend state machine ties everything together by classifying the market into three clear phases, which then drive the dynamic coloring of the bands, cloud fill, and candle colors — creating a unified visual experience.
Unique Aspects
Unlike standard squeeze indicators that only display a binary squeeze/no-squeeze state, this indicator provides a full directional trend classification with three states, color-coded across all visual elements.
The EMA-smoothed volatility channel is visually cleaner than traditional Bollinger Bands or Keltner Channels, making it easier to identify trend direction at a glance.
The volatility cloud fill adapts its color in real time based on the current trend state, providing immediate visual feedback on whether the market is trending bullish, bearish, or consolidating.
Candle coloring is also driven by the volatility state, allowing traders to spot trend alignment without needing to inspect the bands directly.
How to Use
Add the indicator to your chart. It overlays directly on the price chart.
Watch for the orange squeeze zone — this indicates low volatility and a potential breakout ahead.
When the channel transitions from orange to green, the market is breaking out bullish. When it turns red, the breakout is bearish.
Use the BUY and SELL labels as entry signals when price escapes the squeeze zone and crosses the smoothed bands.
Set up alerts using the built-in alert conditions ("Bullish Volatility Breakout" and "Bearish Volatility Breakout") to receive notifications without watching the chart.
Combine with volume analysis or momentum oscillators for additional confirmation of breakout strength.
Customization
Lookback Length (default: 20) — The period for calculating the SMA, Standard Deviation, and ATR. Shorter periods make the indicator more reactive; longer periods produce smoother, more reliable signals.
Band Multiplier (StDev) (default: 2.0) — Controls the width of the volatility bands. Higher values create wider bands and fewer breakout signals.
Squeeze Multiplier (ATR) (default: 1.5) — Sets the threshold for squeeze detection. Lower values detect squeezes more aggressively; higher values require stronger compression.
Band Smoothing (default: 5) — The EMA smoothing period applied to the bands. Higher values produce smoother bands with more lag.
Color Settings — Fully customizable colors for bullish, bearish, and squeeze states.
Candle Coloring — Toggle on/off to color candles based on the current volatility trend state.
Conclusion
The Apex Volatility Squeeze & Breakout indicator offers traders a clean, intuitive way to identify low-volatility squeeze conditions and potential breakout points. By fusing Bollinger Band width analysis with Keltner Channel ATR thresholds and applying EMA smoothing, it delivers a unified volatility channel that is both visually elegant and analytically powerful. Whether you trade stocks, forex, crypto, or futures, this tool helps you spot the moments when the market is coiling for its next big move — and positions you to act on it with confidence. Indicator

Strategy

MACD Pro Signals Full v8.52. Detailed Description (Large Text Box)
🌟 Indicator Introduction
This is a full-featured enhanced MACD indicator. Based on the classic MACD formula, it adds advanced visual upgrades, signal enhancements, and automatic divergence detection. It is suitable for all markets such as Stocks, Futures, Forex, and Cryptocurrencies.
It helps you quickly identify trends, momentum, trading signals, and reversal opportunities at a glance.
✨ Core Features
Color-Coded Momentum HistogramAutomatically distinguishes 4 states: Strong Bullish / Weak Bullish / Strong Bearish / Weak Bearish.Clearly shows the strength of current momentum and trend continuity, making it easy to judge whether the price is accelerating or weakening.
MACD & Signal Line Candle VisualizationConverts the traditional MACD line and Signal line into candlestick style.The color changes automatically with upward/downward trends, making trend turning points and momentum more intuitive than traditional lines.
Dual-Position Golden/Death Cross Markers
Main Chart: Displays "👍" (Golden Cross) and "👎" (Death Cross) above/below price bars for clear entry signals.
Subwindow: Synchronous markers on the MACD area, no overlap on the main chart, double confirmation without missing signals.
Auto Bullish/Bearish Divergence DetectionAutomatically scans price and MACD divergence structures.Draws divergence lines in the subwindow and marks strength percentage (0-100%) on the main chart.Perfect for capturing high-probability trend reversals.
Full CustomizationSupports adjusting MACD periods, all element colors, label offsets, and pivot parameters.Adaptable to different assets and time frames.
📊 How to Use
Bullish Signal: Golden Cross 👍 + Zero Line Above + Expanding Bullish Histogram + Bullish Divergence = Strong Long Opportunity
Bearish Signal: Death Cross 👎 + Zero Line Below + Expanding Bearish Histogram + Bearish Divergence = Strong Short Opportunity
Divergence Usage: The higher the percentage, the stronger the divergence signal, and the higher the probability of a trend reversal. Indicator

Strategy

QuantEdge Momentum ML [PRO]🟦 QuantEdge Momentum ML PRO is a k-Nearest Neighbors driven momentum oscillator built on an adaptive machine-learning core. Unlike RSI, Stochastic, or MACD — which apply the same static formula to every asset — QE-ML PRO learns the dual-horizon RSI fingerprints that have historically led to bullish versus bearish outcomes on the exact instrument being traded, then scores the current bar against the N closest historical matches. The result is a non-parametric, self-calibrating oscillator whose decision boundary is shaped by the asset's own behaviour rather than a hard-coded curve.
The indicator integrates nine independent layers — feature engine, training sampler, k-NN predictor, WMA signal line, stdev-adjusted OB/OS bands, filtered signal dots, gradient channel, theme-adaptive dashboard, and a nine-theme palette — all rendered on a single, clean oscillator panel.
🟦 HOW THE CORE ENGINE WORKS
**Dual-Horizon RSI Feature Vector**
Each bar, the Feature Engine computes two RSI values at different lookback windows and smooths both through a shared trend-length WMA:
- `rsiFast = WMA(RSI(close, FastPeriod), TrendLength)` — reactive short-term momentum
- `rsiSlow = WMA(RSI(close, SlowPeriod), TrendLength)` — structural mid-term momentum
The pair `(rsiSlow, rsiFast)` is a 2-dimensional point in RSI feature space. Every training sample stores one such point along with a ±1 label that records whether price rose or fell since the previous sample. Over time the dataset accumulates a cloud of labelled points that maps which RSI states historically preceded up-moves versus down-moves on this exact asset.
**Training Sampler — Multi-Trigger Collector**
Three collection modes decide when to append a new labelled sample:
| Mode | Trigger | Use Case |
|---|---|---|
| **MA Crossover** | Fast WMA crosses Slow WMA | Clean, sparse samples — classic single-trigger behaviour |
| **Periodic** | Every N bars (user-set) | Fills dataset fast on new / low-history charts |
| **Hybrid** | MA crossover **OR** every N bars | Richest training set — recommended for fresh assets |
Sampling is gated by `barstate.isconfirmed` so the dataset never absorbs unconfirmed values from a flickering live bar.
**k-NN Predictor with Adaptive k**
On every bar, the predictor computes Euclidean distance in the 2D RSI feature space between the live `(rsiSlow, rsiFast)` point and every historical sample:
```
d = sqrt((rsiSlow_now - rsiSlow_hist)² + (rsiFast_now - rsiFast_hist)²)
```
The K closest historical points vote by summing their ±1 labels. The effective K is resolved adaptively using the classical statistical heuristic:
```
kEff = max(3, min(kMax, floor(sqrt(N))))
```
This means early bars — when only a handful of samples exist — use a small K, and the value stabilises as the dataset fills. On a fresh chart you never get a noisy prediction from an undersized neighborhood, and on a mature dataset K automatically scales up for smoother output.
**Bias Correction — Label-Mean Recentering**
Raw k-NN output is biased whenever the label distribution is skewed. On a trending asset, Periodic sampling fills the dataset with mostly +1 (or mostly −1) labels, pushing every prediction off zero. QE-ML PRO subtracts the expected value from the raw sum:
```
prediction = neighborLabelSum − (kEff × meanLabelAcrossDataset)
```
This keeps the mid-level visually centred at zero regardless of how trending the underlying asset has been. The correction is applied on every bar and is what makes the oscillator read cleanly on both sideways and strongly trending markets.
**Minimum Sample Gate**
Until the dataset has reached the user-defined Minimum Training Samples threshold, the predictor outputs exactly zero. This prevents unreliable readings during the warm-up phase on fresh charts.
**FIFO Rotation**
The dataset is hard-capped at Max Dataset Size. Once the cap is reached, the oldest sample is discarded on every new insertion — classical rolling window memory that keeps the k-NN scan bounded and the indicator fast on long histories.
🟦 PREDICTION LINE — FIVE VISUAL STYLES
All five styles are line-based. Only the visual effect differs — the underlying k-NN math is identical across styles.
| Style | Character |
|---|---|
| **Stratum** | Thick adaptive line with zone-based opacity: solid in extreme zones, semi-transparent in the mid zone. Layered intensity aesthetic — default |
| **Neon** | Bright core line with an outer glow halo. Cyberpunk luminous effect, best on dark backgrounds |
| **Resonance** | LRI-style gradient line that fades near the midline and brightens toward the rolling extremes |
| **Pulse** | Adaptive bull/bear color (above midline = bull, below = bear) plus the WMA signal line. The QE-ML PRO classic look |
| **Mono** | Single flat theme-bull line, no gradient, no adaptive coloring. Minimalist single-color silhouette |
🟦 SIGNAL LINE
A WMA of the raw prediction output, used as a crossover trigger line in the MACD convention. Crossovers between the prediction and signal line mark momentum regime changes.
**Two Visual Styles**
| Style | Rendering |
|---|---|
| **Neon** | Bright core line wrapped in a wider semi-transparent glow halo — cyberpunk aesthetic |
| **Flat** | Plain single-color line, no halo, no gradient — minimalist clean look |
🟦 SIGNAL DOTS — FILTERED CROSSOVER MARKERS
A two-layer neon cross-dot renderer fires on every Prediction × Signal crossover that survives the active filter mode. Four progressive filters decide which raw crosses reach the chart:
| Filter Mode | Behaviour | Signal Count |
|---|---|---|
| **All Crosses** | Every cross becomes a dot | Highest — noisy on choppy assets |
| **Zone Only** | Only crosses inside an OB or OS strip | Mean-reversion triggers — strongest reversal setups |
| **Mid Aligned** | Bull dots only above mid, bear dots only below | Trend-following — keeps you on regime side |
| **Strict** | Zone Only + Mid Aligned + extra strength multiplier on mid-zone crosses | Fewest signals, highest conviction — default |
Two additional gates filter out whipsaws:
- **Cooldown (bars)** — minimum spacing between consecutive dots, prevents cluster spam in ranges
- **Min Strength** — minimum `|prediction − signal|` separation at the moment of the cross, drops razor-thin crossovers that close back on themselves
Each dot is a two-layer plot: an outer glow halo with user-adjustable size and opacity, and a bright solid core on top — independently sized and opacity-controlled so users can dial in the exact visual weight they want.
The dot is placed at the actual cross point: bull dots at `min(prediction, signalLine)`, bear dots at `max(prediction, signalLine)`.
🟦 DYNAMIC BANDS — STDEV-ADJUSTED OB / OS ZONES
QE-ML PRO does not use fixed 80 / 20 overbought / oversold levels. Instead, the bands adapt to the actual historical range of the prediction output:
- **Channel Extremes** — rolling highest / lowest of the prediction over a user-configurable lookback
- **Stdev Band** — EMA of rolling standard deviation of the prediction, multiplied by the user's stdev length
- **OB Level** = `rangeHi − stdevBand` (inner boundary of the overbought strip)
- **OS Level** = `rangeLo + stdevBand` (inner boundary of the oversold strip)
The result is a pair of mean-reversion zones that tighten during quiet markets and widen during volatile ones — no manual recalibration needed across assets.
The strips are rendered as gradient fills anchored on the live prediction plot, so they only appear visually while the prediction is actually inside the zone.
🟦 CHANNEL GRADIENT
Two symmetric gradient fills bracket the mid line. The upper fill stretches from `midValue` to `rangeHi`, the lower fill from `midValue` to `rangeLo`. Opacity fades from full intensity at the extremes to fully transparent at the midline — a visual range meter showing how close the prediction is sitting to its historical boundaries.
Colors are pulled from the active Theme. A single opacity slider controls the gradient intensity.
🟦 DASHBOARD — LIVE DATA PANEL
A compact 2-column × 7-row monospace panel drawn on the last bar only (zero historical overhead). Every field updates in real time on the live bar.
| Row | Left | Right |
|---|---|---|
| Header | QE-ML PRO | Regime (▲ BULL / ▼ BEAR / ■ NEUTRAL) |
| Row 1 | Prediction | Raw value + trend arrow vs previous bar |
| Row 2 | Signal | WMA trigger line value |
| Row 3 | Strength | 10-block gauge of `|prediction − signal|` normalised against rolling channel |
| Row 4 | Zone | OB / MID / OS tag |
| Row 5 | Dataset | Sample count / effective k |
| Row 6 | Mode | Active Learning Mode (MA Cross / Periodic / Hybrid) |
**Theme-Aware Auto-Invert**
The panel background scaffolds auto-switch:
- **Tropic / Amber / Pastel / Cyber / Gold / Electric / Candy** → dark panel with bright theme accent text
- **Midnight / Graphite** → light panel with dark theme accent text
This guarantees legibility on every theme without breaking the theme's color identity — because Midnight and Graphite use deep dark bull tones that would drown against a black panel.
**Direction via Glyphs, Not Color**
Both columns share the same full-strength theme tone. Regime direction is conveyed by `▲ ▼ ■` glyphs rather than color shifts, which keeps the panel reading cleanly even on the most minimal themes.
🟦 NINE COLOR THEMES
One theme selector drives every colored component — Prediction line, Signal line, Channel fill, OB / OS strips, Mid-level line, Signal Dots, and Dashboard panel. No per-color manual inputs.
| Theme | Character | Bull | Bear |
|---|---|---|---|
| **Tropic** | Cyan steel + deep orange — electric contrast (default) | Cyan | Deep Orange |
| **Amber** | Warm amber + indigo blue — fire tones | Amber | Red |
| **Pastel** | Sky blue + soft lavender — cool arctic glow | Sky Blue | Lavender |
| **Cyber** | Neon lime + hot crimson — cyber terminal | Neon Green | Crimson |
| **Gold** | Bright gold + scarlet — solar warmth | Yellow Gold | Red |
| **Electric** | Electric aqua + magenta — high-voltage neon | Aqua | Magenta |
| **Candy** | Neon green + hot pink — dark energy pop | Mint Green | Hot Pink |
| **Midnight** | Deep navy + dark crimson — dark depth (auto light dashboard) | Navy Blue | Dark Red |
| **Graphite** | Near-black + silver grey — monochrome minimal (auto light dashboard) | Near Black | Grey |
🟦 ALERT SYSTEM — TEN CONDITIONS
Every alert is gated by its matching "Show X" visibility toggle — if a component is hidden from the chart, its alerts are automatically suppressed. This eliminates the mismatch between visual signals and alert signals that plagues many indicators.
| Alert | Condition | Gated By |
|---|---|---|
| Crossover OB | Prediction crosses above the overbought boundary | Show OB/OS Fill |
| Crossunder OB | Prediction crosses back down through OB | Show OB/OS Fill |
| Crossover OS | Prediction crosses up through oversold boundary | Show OB/OS Fill |
| Crossunder OS | Prediction crosses below the oversold boundary | Show OB/OS Fill |
| Crossover Mid | Prediction crosses above the mid line — bullish regime flip | Show Mid Level |
| Crossunder Mid | Prediction crosses below the mid line — bearish regime flip | Show Mid Level |
| Crossover Signal | Prediction crosses above its WMA signal line (MACD bullish) | Show Signal Line |
| Crossunder Signal | Prediction crosses below its WMA signal line (MACD bearish) | Show Signal Line |
| Bull Signal Dot | A filtered Bull Signal Dot is plotted (uses Filter Mode + Cooldown + Min Strength) | Show Signal Dots |
| Bear Signal Dot | A filtered Bear Signal Dot is plotted (uses Filter Mode + Cooldown + Min Strength) | Show Signal Dots |
🟦 SETTINGS REFERENCE
**Visual**
- Theme — nine cohesive palettes. Default: Tropic
**Machine Learning**
- Neighbors (k) — upper bound on neighbors used by the predictor. Default: 100
- Adaptive k — scales k with dataset size using the `floor(sqrt(N))` heuristic. Default: ON
- Learning Mode — MA Crossover / Periodic / Hybrid. Default: MA Crossover
- Sample Every (bars) — bar interval for the Periodic / Hybrid trigger. Default: 5
- Minimum Training Samples — warm-up gate, predictor outputs zero until reached. Default: 30
- Max Dataset Size — hard FIFO cap. Default: 500 (safe on all timeframes)
**Feature Engine**
- Trend Length — WMA smoothing applied to both RSI features. Default: 20
- RSI Fast Period — first feature dimension. Default: 5
- RSI Slow Period — second feature dimension. Default: 20
- MA Fast Period — fast WMA for the crossover training trigger. Default: 5
- MA Slow Period — slow WMA for the crossover training trigger. Default: 20
**Prediction Line**
- Show Prediction Line — master toggle. Default: ON
- Prediction Style — Stratum / Neon / Resonance / Pulse / Mono. Default: Stratum
- Prediction Width — 1 to 5. Default: 2
**Signal Line**
- Show Signal Line — toggle. Default: ON
- Signal Style — Neon / Flat. Default: Neon
- Signal Period — WMA length of the signal line. Default: 20
- Signal Width — 1 to 5. Default: 1
**Signal Dots**
- Show Signal Dots — toggle. Default: ON
- Filter Mode — All Crosses / Zone Only / Mid Aligned / Strict. Default: Strict
- Cooldown (bars) — minimum spacing between dots. Default: 5
- Min Strength — minimum `|prediction − signal|` at the cross. Default: 0.5
- Core Dot Size — 1 to 8. Default: 3
- Core Dot Opacity — 0 to 100. Default: 100
- Glow Dot Size — 1 to 12. Default: 8
- Glow Dot Opacity — 0 to 100. Default: 30
**Channel Fill**
- Show Channel Fill — toggle. Default: ON
- Channel Opacity — 0 to 100. Default: 25
- Channel Lookback — rolling highest / lowest window. Default: 500
**OB / OS Fill**
- Show OB/OS Fill — toggle. Default: ON
- Zone Stdev Length — stdev window that offsets the OB / OS boundaries inward. Default: 20
**Mid Level**
- Show Mid Level — toggle. Default: ON
- Mid Level Value — Y-value of the reference line. Default: 0
- Mid Level Style — Solid / Dashed / Dotted. Default: Dashed
**Dashboard**
- Show Dashboard — toggle. Default: ON
- Panel Position — six slots (Top/Middle/Bottom × Right/Left). Default: Middle Right
- Panel Text Size — Tiny / Small / Normal / Large. Default: Small
**Alerts**
- Ten opt-in toggles, one per alert condition. All default: ON
🟦 TRADER PRESETS — SETTINGS BY STYLE
QE-ML PRO is volatility-agnostic thanks to the adaptive bands and bias correction, but the reactivity of the predictor scales directly with the feature and sampler parameters. The four presets below are tested starting points you can drop straight into the settings panel — adjust by ±20% to taste.
---
** SCALPER — 1m / 3m / 5m**
High-frequency entries, tight stops, many signals per session. Priority is reaction speed — you want the predictor to flip states within a handful of bars of an actual move.
| Setting | Value |
|---|---|
| Trend Length | 10 |
| RSI Fast Period | 3 |
| RSI Slow Period | 14 |
| MA Fast Period | 3 |
| MA Slow Period | 10 |
| Signal Period | 8 |
| Neighbors (k) | 40 |
| Adaptive k | ON |
| Learning Mode | **Hybrid** |
| Sample Every | 2 |
| Minimum Training Samples | 20 |
| Max Dataset Size | **300** (keeps 1m charts fast) |
| Filter Mode | **All Crosses** or Zone Only |
| Cooldown | 2 |
| Min Strength | 0.3 |
| Channel Lookback | 200 |
| Zone Stdev Length | 10 |
| Prediction Style | Neon or Stratum |
**Why:** Low smoothing (Trend=10) + short RSI pair (3/14) keeps the features razor-sharp. Hybrid learning means you never wait for an MA crossover during quiet 1m sessions. Max Dataset capped at 300 protects you from the PulseWire per-bar calculation limit on long 1m histories.
---
** DAY TRADER — 15m / 30m / 1H**
Balanced reactivity and conviction — the default profile. You want clean crosses without noise spam, and signals that survive the open / close volatility spikes.
| Setting | Value |
|---|---|
| Trend Length | 20 (default) |
| RSI Fast Period | 5 (default) |
| RSI Slow Period | 20 (default) |
| MA Fast Period | 5 (default) |
| MA Slow Period | 20 (default) |
| Signal Period | 20 (default) |
| Neighbors (k) | 100 (default) |
| Adaptive k | ON |
| Learning Mode | **MA Crossover** (default) |
| Minimum Training Samples | 30 (default) |
| Max Dataset Size | 500 (default) |
| Filter Mode | **Strict** (default) |
| Cooldown | 5 (default) |
| Min Strength | 0.5 (default) |
| Channel Lookback | 500 (default) |
| Zone Stdev Length | 20 (default) |
| Prediction Style | Stratum (default) |
**Why:** Every default value was tuned for this range. Strict filter + 5-bar cooldown keeps the dot count honest on a 30m chart. MA Crossover sampling gives you clean sparse data since 15m+ charts already have enough crossover events.
---
** SWING TRADER — 4H / 1D**
Lower signal frequency, higher conviction per signal. You're holding for days or weeks — every dot needs to mean something.
| Setting | Value |
|---|---|
| Trend Length | 30 |
| RSI Fast Period | 7 |
| RSI Slow Period | 30 |
| MA Fast Period | 7 |
| MA Slow Period | 30 |
| Signal Period | 30 |
| Neighbors (k) | 150 |
| Adaptive k | ON |
| Learning Mode | MA Crossover |
| Minimum Training Samples | 50 |
| Max Dataset Size | 800 |
| Filter Mode | **Strict** |
| Cooldown | 10 |
| Min Strength | 0.8 |
| Channel Lookback | 800 |
| Zone Stdev Length | 30 |
| Prediction Style | Stratum or Mono |
**Why:** Longer feature periods mean the predictor only moves on genuine structural shifts. Larger k (150) + bigger dataset (800) gives the k-NN vote a wider base so outliers don't flip the sign. Cooldown of 10 bars on a 4H chart = 40 hours minimum between dots — exactly what a swing trader wants.
---
** POSITION / LONG-TERM — 1D / 1W / 1M**
Macro regime detection. You're looking for the handful of generational setups per year — noise is the enemy.
| Setting | Value |
|---|---|
| Trend Length | 50 |
| RSI Fast Period | 10 |
| RSI Slow Period | 40 |
| MA Fast Period | 10 |
| MA Slow Period | 40 |
| Signal Period | 40 |
| Neighbors (k) | 200 |
| Adaptive k | ON |
| Learning Mode | **Hybrid** |
| Sample Every | 3 |
| Minimum Training Samples | 40 |
| Max Dataset Size | 1000 |
| Filter Mode | **Strict** |
| Cooldown | 15 |
| Min Strength | 1.0 |
| Channel Lookback | 1000 |
| Zone Stdev Length | 40 |
| Prediction Style | Mono or Pulse |
**Why:** Weekly and monthly charts have few crossover events per year — without Hybrid mode the dataset starves. Sample Every = 3 on a weekly chart means one sample every 3 weeks, which is plenty of structural density. Min Strength 1.0 filters out every shallow cross — you only see dots on generational momentum inflections.
---
**Tuning Tip**
If the predictor feels **too reactive** → increase Trend Length and Signal Period by 25%, raise Cooldown.
If the predictor feels **too sluggish** → switch Learning Mode to Hybrid, decrease Min Samples, lower Trend Length.
If the dashboard shows **Dataset N is stuck low** → switch Learning Mode from MA Crossover to Hybrid — crossover events are too rare on your current settings.
If you see **runtime / timeout errors** on long histories → drop Max Dataset Size to 300 and Channel Lookback to 300.
🟦 COMPATIBILITY
Works on all asset classes and all timeframes in PulseWire Pine Script v6.
- **Crypto** — Spot, futures, perpetual contracts
- **Forex** — All pairs
- **Equities** — Stocks, ETFs, indices
- **Commodities** — Metals, energy, agriculture
- **Timeframes** — 1m through Monthly
The k-NN engine learns each asset's own RSI fingerprint distribution, and the stdev-adjusted bands auto-scale to the volatility of that distribution, so the indicator is truly self-calibrating across assets and timeframes — no manual recalibration required.
🟦 TECHNICAL NOTES
- Pine Script v6
- No repainting — training samples are gated by `barstate.isconfirmed` so the dataset never absorbs unconfirmed live-bar values
- Dataset is hard-capped via FIFO rotation; no unbounded memory growth
- Dashboard renders only on `barstate.islast` — zero historical overhead
- All drawing objects are stateless plots (no label / box / line object pools), so `max_*_count` limits cannot be exceeded
- k-NN distance pass is O(N), sort is O(N log N), both bounded by Max Dataset Size
- Default Max Dataset Size of 500 is tuned to stay within PulseWire's per-bar calculation budget on histories up to ~50,000 bars
- Bias correction uses a single extra accumulator pass during the distance sweep — no performance penalty
🟦 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. The k-NN engine learns from historical patterns, but markets do not guarantee that historical patterns will repeat. Always conduct your own analysis and apply proper risk management. Indicator

Anchored Value Distribution Oscillator (Zeiierman)█ Overview
Anchored Value Distribution Oscillator (Zeiierman) is a structure-driven oscillator that models price as a dynamic value distribution, then measures where price is positioned within that structure to reveal balance, imbalance, and shifting market conditions.
Instead of relying purely on price momentum, the indicator builds a rolling, volume-weighted distribution of price over time. From this structure, it extracts key reference levels such as the value center, high/low distribution bands, and peak activity zones. These are then used to normalize the price into a bounded oscillator.
Alongside the distribution, the script constructs an adaptive trailing anchor that reacts to structural shifts and volatility. The oscillator combines both the structural distribution and the adaptive anchor into a single positioning score, producing a contextual view of trend, extension, and balance.
The result is an oscillator that reflects not just direction, but where price sits within its evolving value landscape.
█ How It Works
⚪ Distribution Engine (Value Model)
The core of the indicator is a rolling value distribution built from price and volume.
Each bar contributes to a log-scaled price histogram, where:
price ranges are segmented into rows
volume is distributed across those rows
candle bodies and wicks are weighted differently
older data gradually decays over time
This produces a continuously updating view of:
Point of Control (vp)
Value High / Value Low (vh / vl)
Outer extremes (xh / xl)
Distribution center (cen)
Unlike a static volume profile, this model evolves with the market and adapts to both recent and historical activity.
⚪ Adaptive Anchor (Trend Engine)
On top of the distribution, the script builds an adaptive trend anchor (anc).
The anchor is derived from a structural base:
blended from the distribution center and peak activity
offset using volatility (ATR)
constrained to trail price in the active direction
The anchor flips direction when the price crosses it, and then trails using a volatility-adjusted distance.
This creates a structure-aware trend model that behaves similarly to a trailing stop, but is grounded in value distribution rather than raw price movement.
⚪ Normalized Positioning Model
The oscillator converts price into a normalized position within the distribution.
Two independent scores are calculated:
Position relative to the adaptive anchor (scAnc)
Position relative to the value distribution (scVp)
Each score maps price into a bounded range:
-50 → extreme downside
-25 - 20 → fair value
+50 → extreme upside
These scores are then combined into a single output using a weighted blend.
A confidence factor reduces the distribution score's contribution when it disagrees with the anchor, ensuring cleaner signals in conflicting conditions.
⚪ Smoothed Oscillator Output
The final oscillator (outAvg) is a smoothed combination of:
trend-aware positioning (anchor)
structure-aware positioning (distribution)
█ How to Use
⚪ Read Position Relative to Value
Use the oscillator to understand where the price sits within its value distribution:
Above 25 → price is positioned above fair value
Below -25 → price is positioned below fair value
Near extremes (±50) → price is extended relative to structure
This helps distinguish between:
continuation conditions
mean reversion zones
balanced market states
⚪ Follow the Adaptive Trend Anchor
The trailing anchor provides a clear trend reference:
Price above anchor → bullish regime
Price below anchor → bearish regime
Anchor flips → potential regime shift
█ Settings
Lookback – Controls how much historical data is used to build the value distribution. Higher values produce smoother structure, while lower values increase responsiveness.
Canvas Pad – Expands the distribution range to include more extreme price levels. Increasing this captures broader moves but reduces precision.
Rebuild Drift – Determines how much the distribution can drift before being recalculated. Lower values rebuild more frequently, higher values allow more continuity.
Signal Length – Controls the smoothing of the signal line. Higher values reduce noise but increase lag.
Profile Center Bias – Blends between the value distribution center and the point of control to define the structural base. Higher values anchor the trail to the broader distribution center, while lower values make it follow peak activity more closely.
Trail Acceleration – Controls how quickly the trailing stop tightens as the price accelerates. Higher values make the trail react more aggressively to impulsive moves, reducing lag during strong trends.
Max Trail Acceleration – Limits how much the acceleration can compress the trailing distance. Higher values allow the stop to tighten more during rapid expansion, while lower values keep behavior closer to the original, smoother trail.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Indicator

Adaptive Pivot-Length RSIAdaptive Pivot-Length RSI (APL-RSI)
An RSI that tunes its own length to whatever cycle the market is actually trading, rather than locking you into a fixed 14-period window.
How it works
The indicator runs a multi-scale pivot sweep across strengths from 14 to 100, measuring the distance between consecutive confirmed swing highs and lows. Those distances build a probability mass function (PMF) of the market’s dominant pivot spacing. The mode of that PMF — the most frequently occurring swing-to-swing length — becomes the RSI period. Updates are sticky (gated by a tolerance threshold) to prevent length flicker, and the engine waits for a minimum sample count before engaging. An “alternate H/L only” toggle enforces true zig-zag spacing by ignoring same-type pivots in a row.
The RSI itself is a true Wilder implementation with manually maintained gain/loss state (α = 1/L), which avoids the unreliability of ta.rma when fed a series-int length. A companion smoothed line uses a WMA of length √L, which preserves phase at the dominant cycle rather than lagging it.
Levels
Instead of fixed 70/30 thresholds, overbought/oversold and upper/lower mid-bands are computed as empirical percentiles of the adaptive RSI’s own distribution over a configurable lookback. A live percent-rank readout shows where the current value sits in that distribution.
Readouts
The info table shows the current adaptive length, smoothing length, divergence pivot length, total pivot samples collected, current RSI value, self-percentile rank, OB/OS levels, and zone state (OB / Upper / Mid / Lower / OS).
Notes
All pivots are confirmed (non-repainting). Bar coloring and optional signal shapes are available in the UI Options. Alerts fire on OB/OS crosses and divergence detections. Indicator

Seykota Trend SystemHere's a breakdown of everything the script does:
EMA Engine
Three EMAs: fast (default 15), slow (default 150), and a signal EMA (default 9) used as a confirmation layer. The 150/15 pairing mirrors Seykota's published S&P model on his TSP website. The cloud fill between fast and slow gives an instant read on trend health — teal when bullish, red when bearish.
Trailing Stop — Two Modes
ATR mode ratchets the stop upward in a long (or downward in a short) so it can never move against you. Swing mode uses the highest/lowest bar over a lookback period instead — closer to how Seykota described using support/resistance corridors in his Gold model. Switch between them in settings.
Position Sizing Output
The core Seykota formula: Units = (Account × Risk%) ÷ Stop Distance. Every entry label shows the calculated position size live on the chart. As volatility expands (wider ATR → wider stop → fewer units), the system automatically sizes down. As volatility contracts, it sizes up. This is the mechanism behind "keep bets small" — it's dynamic, not a fixed number.
ADX Filter
Seykota only wanted to be in trending markets. The ADX filter blocks signals when ADX is below your threshold (default 20), keeping the system out of choppy sideways conditions where trend-following underperforms.
Volume Filter
Optional confirmation that the move has institutional participation behind it — volume must be above its MA multiplied by a factor you control.
HUD Table
Bottom-right panel shows live: trend state, both EMAs, ATR, trailing stop level, ADX reading, risk dollars per trade, and current position size.
Alerts
Four alert conditions are wired up — long signal, short signal, trend flip to bull, trend flip to bear — ready to connect to PulseWire webhooks or notifications.
Suggested starting parameters by market:
Futures/commodities: 150/15 EMA, ATR ×3.0, ADX 20
Equities (daily): 200/50 EMA, ATR ×2.5, ADX 20
Crypto (daily): 100/25 EMA, ATR ×2.0, ADX 25 (crypto is noisier) Indicator

Indicator
