Gabriel's Relative Strength Scatter PlotHow to apply it to a portfolio (no fluff)
1) Choose your universe + benchmark wisely
Universe = the things you’re willing to own. Keep it consistent (e.g., 11 GICS sectors, your 26 megacaps, or your watchlist).
Benchmark (your symBench) should match the mandate (SPX for US large caps, QQQ for tech-tilt, BTC for crypto, etc.). RS is only as good as the yardstick.
2) Work on the right timeframe
For rotation/investing: Weekly chart with length = 20~63 is a sweet spot (roughly one trading quarter of memory).
For swing trading: Daily; for strategic: Monthly. Keep the indicator timeframe and rebalance cadence aligned.
3) Read the quadrants like a checklist
Leading (RS>100 & MOM>100): core holdings, add on pullbacks.
Improving (RS<100 & MOM>100): fresh candidates; buy breakouts/confirmations.
Weakening (RS>100 & MOM<100): trim/hold, don’t add; momentum fading.
Lagging (RS<100 & MOM<100): avoid/short (or underweight).
4) Select systematically
Pick the top N names by a score (examples below) and cap single-name weight.
Good composite score: Score = 0.7 * (RS-Ratio-100) + 0.3 * (RS-Momentum-100)
(weighting privileges persistent outperformance, with a nod to acceleration).
5) Rebalance on a schedule
Monthly works well for weekly inputs. Only trade when membership changes or weights drift > X%.
Use the alerts to catch entries into Improving/Leading and exits into Lagging.
6) Risk guardrails
Max position (e.g., 10%/name), max sector (e.g., 30%), cash/defensive sleeve when breadth is poor.
Simple regime filter: risk-on only if bench > bench SMA(20/200); otherwise shrink exposure or rotate to defensives (e.g., XLP/XLU/TLT/SHY).
7) Sanity checks
Don’t chase when tails are very long and curling down (late cycle).
Prefer Improving → Leading transitions with shallow pullbacks.
Keep slippage/fees real for shorter cadences.
Best during Market cycles, or catching deep value equity plays.
GABRIEL
US Macro Cycle (Z-Score Model)US Macro Cycle (Z-Score Model)
This indicator tracks the US economic cycle in real time using a weighted composite of seven macro and market-based indicators, each converted into a rolling Z-score for comparability. The model identifies the current phase of the cycle — Expansion, Peak, Contraction, or Recovery — and suggests sector tilts based on historical performance in each phase.
Core Components:
Yield Curve (10y–2y): Positive & steepening = growth; inverted = slowdown risk.
Credit Spreads (HYG/LQD): Tightening = risk-on; widening = risk-off.
Sector Leadership (Cyclicals vs. Defensives): Measures market leadership regime.
Copper/Gold Ratio: Higher copper = growth signal; higher gold = defensive.
SPY vs. 200-day MA: Equity trend strength.
SPY/IEF Ratio: Stocks vs. bonds relative strength.
VIX (Inverted): Low/falling volatility = supportive; high/rising = risk-off.
Methodology:
Each series is transformed into a rolling Z-score over the selected lookback period (optionally using median/MAD for robustness and winsorization to clip outliers).
Z-scores are combined using user-defined weights and normalized.
The smoothed composite is compared against phase thresholds to classify the macro environment.
Features:
Customizable Weights: Emphasize the indicators most relevant to your strategy.
Adjustable Thresholds: Fine-tune cycle phase definitions.
Background Coloring: Visual cue for the current phase.
Summary Table: Displays composite Z, confidence %, and individual Z-scores.
Alerts: Trigger when the phase changes, with details on the composite score and recommended tilt.
Use Cases:
Align sector rotation or relative strength strategies with the macro backdrop.
Identify favorable or defensive phases for tactical allocation.
Monitor macro turning points to manage portfolio risk.
It's doesn't fill nan gaps so there is quite a bit of zeroes, non-repainting.
Fabian Z-ScoreFabian Z-Score — % Distance & Z-Scores for SPX / DJI / XLU
What it does
This indicator measures how far three market proxies are from a moving average and standardizes those distances into z-scores so you can spot stretch/mean-reversion and relative out/under-performance.
Universe: S&P 500 (SPX), Dow Jones (DJI) and Utilities (XLU). You can change any of these in Inputs.
Anchor MA: user-selectable MA type (SMA/EMA/RMA/WMA/VWMA/HMA/LSMA/ALMA) and length (default 39; a popular weekly anchor).
Outputs
% from MA: 100 × (𝐶𝑙𝑜𝑠𝑒 − 𝑀𝐴) / 𝑀𝐴
Time-series Z: z-score of the last N % distances (default 39) → “how stretched vs its own history?”
Cross-sectional Z: z-score of each % distance within the trio on this bar → “who’s strongest vs the others right now?”
A compact mini table (top-right) shows the latest values for each symbol: % from MA, Z(ts) and Z(xsec).
Panels & Visualization
Toggle what you want to see in View:
Plot % distance — raw % above/below the MA (0% line shown).
Plot time-series Z — standardized stretch with ±Threshold guides (default ±2σ).
Plot cross-sectional Z — relative z across SPX, DJI, XLU (0 = at the trio’s mean).
Smoothing — optional light MA on the plotted series (set to 1 for none).
A price-panel Moving Average is drawn with your chosen type/length for visual context.
Colors: SPX = teal, DJI = orange, XLU = purple.
Alerts
Two built-in alert conditions (time-series Z only):
“Z(ts) crosses up +Thr” — any of the three crosses above +Threshold.
“Z(ts) crosses down -Thr” — any crosses below −Threshold.
When enabled, the chart background tints faint green (up cross) or red (down cross) on those bars.
How to use (ideas, not advice)
On weekly charts, a 39-length MA/Z lookback often captures major risk-on/off swings. (Fabian Timing)
Deep negative Z(ts) (e.g., ≤ −2σ or −3σ) frequently accompanies panic and mean-reversion setups.
High positive Z(ts) suggests over-extension; watch for momentum fades.
Cross-sectional Z helps rank leadership today:
Z(xsec) > 0 → stronger than the trio’s mean this bar; Z(xsec) < 0 → weaker.
Utilities (XLU) turning positive x-sec while the others are negative can hint at defensive rotation.
If all 3 are above 0, go long, if below 0 go cash.
Combine: look for extreme Z(ts) aligning with lead/lag Z(xsec) to time entries/exits or hedges.
Inputs (quick reference)
Symbols: SPX / DJI / XLU (editable).
MA type & length: SMA, EMA, RMA, WMA, VWMA, HMA, LSMA, ALMA; default EMA(39).
Z-score lookback (ts): default 39.
Smoothing on plots: default 1 (off).
Z threshold (±): default 2.0 (guide lines & alerts).
SPX HL Range Stats (Ticks) — Pro📈 SPX HL Range Stats (Ticks) — Pro
A volatility regime detection tool for SPX, ES, or MES that measures daily high–low (or alternate OHLC-based estimators) in min-ticks to assess market expansion, contraction, and outlier days.
🔍 How It Works
Range Estimators: Choose from High–Low, True Range, Parkinson, Garman–Klass, or Rogers–Satchell.
Conversion to Min-Ticks: Uses a 0.25 index point tick size (SPX/ES standard) for precise scaling.
Winsorization: Optional tail-clamping to reduce the influence of extreme outliers (e.g., CPI/FOMC days).
Variance Metrics:
Sample Variance (ticks²) → measures historical dispersion of daily ranges.
EWMA Variance → adaptive regime detection using RiskMetrics smoothing.
Z-Score: Detects when the current day’s range is statistically unusual compared to recent history.
📊 Trading Approach
This indicator does not give buy/sell calls; instead, it defines volatility regimes so you can adapt your existing strategy:
Regime Condition Suggested Bias
Low Vol / Contracting Range < Mean, Variance falling Mean-reversion scalps favored; avoid breakout chases
Normal Vol Range ≈ Mean, stable variance Use your standard setups and sizing
High Vol / Expanding Range > Mean, Variance rising Breakouts have better follow-through; widen stops and reduce size
Extreme Vol z-score ≥ 2 or variance > threshold Go risk-off unless strategy is high-volatility-optimized
⚙️ Settings
Estimator: Pick the volatility calculation method.
Lookback: Controls the averaging window for mean/variance.
Winsor P: Tail clamp % per side (e.g., 0.02 = 2%).
Tick Size: Default 0.25 for SPX/ES/MES.
EWMA λ: Higher values slow adaptation; lower values react faster.
📢 Alerts
Variance Alert: Fires when sample variance exceeds your threshold → possible breakout regime shift.
Z-Score Alert: Fires when today’s range is statistically extreme → possible start/end of volatility cluster.
💡 Pro Tips
Works best on Daily timeframe with SPX, ES, or MES.
Pair with a trend filter (e.g., 200-day SMA) for directional bias.
Combine with market internals or VIX for confirmation before switching strategies.
For ES/MES, convert ticks to dollar risk easily:
ES: Ticks × $12.50
MES: Ticks × $1.25
Gabriel's Weibull Stdv. SuperTrend📈 Gabriel's Weibull Stdv. SuperTrend
Description:
Gabriel’s Weibull Stdv. SuperTrend is a custom trend-following indicator that blends the statistical rigor of the Weibull Moving Average with the adaptive nature of the Standard Deviation-based SuperTrend.
This hybrid system dynamically adjusts its trend bands using a Weibull-weighted average, emphasizing more recent price action while allowing the curve to flexibly adapt based on two key Weibull parameters: Shape (k) and Scale (λ). The bands themselves are shifted by a multiple of standard deviation, offering a volatility-sensitive approach to trend detection.
🔧 Key Components:
Weibull Moving Average (WMA):
A smoothing function that assigns weights to historical prices using the Weibull distribution, controlled via Shape and Scale parameters.
SuperTrend Logic with Adaptive Bands:
Standard deviation is calculated over a user-defined length and scaled with a factor to set upper and lower thresholds around the WMA.
Trend Direction Detection:
The algorithm identifies bullish or bearish states based on crossover logic relative to the dynamic bands.
Visual Enhancements:
Bright green/red lines for SuperTrend direction.
Midpoint overlay and color-coded candles for clarity.
Filled zones between price and trend for visual emphasis.
⚙️ User Inputs:
Source: Price data to analyze (default: close).
Stdv. Length: Period for calculating standard deviation.
Factor: Multiplier to widen or narrow the SuperTrend bands.
Window Length: Lookback period for the Weibull MA.
Shape (k): Controls the skewness of the Weibull distribution.
Scale (λ): Stretches or compresses the weighting curve.
Location (θ) : Shift influence of historical data forward/backward.
🔔 Alerts:
Long Entry Alert: Triggered when the trend flips bullish.
Short Entry Alert: Triggered when the trend flips bearish.
🧠 Use Cases:
Catch early reversals using custom-tailored smoothing.
Identify high-confidence trend shifts with dynamic volatility.
Combine with other confirmation indicators for enhanced entries.
Gabriel's KusKus Starlight✨ Gabriel’s KusKus Starlight – Volume-Powered Momentum & Reversal Signals
Overview:
Gabriel’s KusKus Starlight is a powerful momentum and reversal indicator that uses Cumulative Volume Delta (CVD) to detect where the real market pressure is—behind the candles. Instead of just watching price, this tool listens to the story told by volume and trader aggression, making it especially effective during choppy or manipulative markets.
🧠 What Makes It Unique?
📦 Volume-Driven Core (CVD):
Tracks whether buyers or sellers are in control by accumulating volume differences between bullish and bearish candles.
🎯 Fisher Transform Smoothing:
Transforms CVD signals into a more readable, Gaussian-like curve to detect turning points more clearly.
🌀 Double Smoothing for Stability:
Adjustable smoothing settings give you full control over how reactive or calm the signal behaves.
📉 Jurik Moving Average (JMA) Signal Line:
Smooth, adaptive trendline that helps confirm entries and filters out noise. Think of it as a trend “compass” for your oscillator.
📊 Z-Score Highlighting:
Uses statistical normalization to flag overbought and oversold conditions with lime and fuchsia highlights when things get extreme.
🚀 Velocity of Z-Score (Bonus Signal):
Measures how fast momentum is changing, helping you spot accelerations in sentiment before price catches up. Typically Oscillator values below this shaded area, are underwater.
📊 Divergence Detection Suite
🔍 Supports
📈 Regular Divergences (trend reversal signals)
📉 Hidden Divergences (trend continuation signals)
🕰 Timeframe Flexibility
📊 Works on the primary chart or
⏳ Alternate timeframe for higher-timeframe confirmation
🎯 Pivot Sources
🌟 Starlight Momentum (Fisher-based)
📏 Jurik Signal Line
📊 Z-Score of Momentum
⚡ Velocity of Momentum
⚙ Customization
🎚 Configurable pivot sensitivity
📏 Adjustable maximum bars to check
🎨 Custom line styles/colors for easy chart interpretation
🔔 Alerts Included:
✅ Bullish CVD Signal: When momentum flips above zero and Z-Score is rising.
❌ Bearish CVD Signal: When momentum dips below zero and Z-Score is falling.
🎨 How to Read It:
Lime bars = Strong bullish breakout building
Green bars = Uptrend holding
Fuchsia bars = Strong bearish breakdown forming
Red bars = Downtrend continuing
Yellow line = Jurik signal MA (watch slope)
Blue area = Speed of change in momentum (Z-Score velocity)
Faded Teal and Maroon lines = Divergence Engine
🧪 Best Use Cases:
Spot early trend reversals powered by actual volume behavior.
Confirm or fade breakouts with real-time buyer/seller strength.
Pair with price action or divergence for high-conviction entries.
Use the Z-Score background highlight for potential exhaustion zones.
⚙️ Fully Customizable Inputs:
Input Description
CVD Range Periods Defines the lookback range for volume shifts
Fisher Smoothing Controls how reactive the Fisher transform is
Index Smoothing Smooths the Fisher output even further
Jurik MA Length Governs the adaptive smoothing of the signal line
📌 Final Word:
If you’re tired of laggy indicators or false signals in low-volume zones, Gabriel’s KusKus Starlight gives you true market intent—based on volume delta, not guesses. It's simple to read, surprisingly deep, and battle-tested.
3/2 Stochastic Volatility ProxyThis indicator, "3/2 Stochastic Volatility Proxy", implements a realized volatility model that incorporates advanced digital signal processing techniques, such as Butterworth filtering, super smoothing, RMS normalization, and optionally Z-Score transformation, to capture and visualize shifts in market volatility.
🔍 Indicator Overview: "3/2 Stochastic Volatility Proxy"
🎯 Purpose
To act as a momentum-based volatility proxy, estimating realized volatility and applying a 3/2 power transformation—a known mathematical volatility model—to better detect volatility regimes and potential price explosions or contractions.
📐 Core Mathematical Model: The 3/2 Stochastic Volatility Model
The 3/2 stochastic volatility model is defined in continuous time as:
🔑 Key Idea:
The variance follows a mean-reverting process, but the diffusion term has scaling. This makes the volatility more reactive to spikes, creating more realistic behavior for modeling risk, especially under high-volatility periods (tail events).
🧠 Indicator Components Explained
1. 🧮 Realized Variance Estimation
pinescript
Copy
Edit
ret = math.log(close / close ) // Log returns
vari = ta.sma(ret * ret, length) // Realized variance
volatility_proxy = math.pow(vari, 1.5) // Raise to 3/2 power
This transforms log returns into variance using a simple moving average.
The variance is then raised to the 3/2 power, per the 3/2 volatility model.
2. 🧹 Smoothing Options
Two smoothing techniques are available:
✅ Option 1: Z-Score Smoothing (Ehlers Loop logic)
pinescript
Copy
Edit
f_zscore(volatility_proxy, smoothing)
Normalizes the series to its statistical deviation from the mean.
Useful for spotting regime changes (e.g., +2σ or -2σ extremes).
✅ Option 2: RMS Scaled Filtering
pinescript
Copy
Edit
scaledFilt(volatility_proxy, ..., ..., ...)
This applies three steps:
Butterworth Highpass Filter → Removes slow drift, isolates cycles.
Super Smoother Filter → Reduces aliasing and short-term noise.
Fast RMS Normalization → Stabilizes the scale across varying regimes.
🛠 Filters and Utilities (Detailed)
🔸 butterworthHP()
A 2-pole high-pass filter that removes low-frequency trends to highlight cyclic components of volatility.
🔸 superSmoother()
Ehlers’ 2-pole smoother that attenuates high-frequency noise more effectively than EMA or SMA.
🔸 fastRMS()
An efficient way to estimate root mean square, normalizing the filtered signal to control amplitude.
📈 Plot and Alerts
🔸 plot(smoothed_vol)
Plots the smoothed, normalized volatility proxy:
Above 0 → Rising volatility.
Below 0 → Falling volatility.
Above +2σ / Below -2σ → Extreme volatility alerts.
🔸 Alert Conditions:
🔔 Cross Above 0 → Bullish volatility expansion.
🔔 Cross Below 0 → Bearish contraction or mean reversion.
🔔 Crossing ±2σ → Overheated or overcooled volatility zones.
🧪 Practical Use Cases
Volatility Momentum Proxy
Use this as a signal that volatility is accelerating (breakout environment).
Risk-on / Risk-off Filter
High values may warn of regime shifts; low values indicate calm markets.
Pair with Trend or Mean-Reverting Strategies
Helps determine if the current volatility favors breakouts or reversions.
Kent Directional Filter🧭 Kent Directional Filter
Author: GabrielAmadeusLau
Type: Filter
📖 What It Is
The Kent Directional Filter is a directionality-sensitive smoothing tool inspired by the Kent distribution, a probability model used to describe directional and elliptical shapes on a sphere. In this context, it's repurposed for analyzing the angular trajectory of price movements and smoothing them for actionable insights.
It’s ideal for:
Detecting directional bias with probabilistic weighting
Enhancing momentum or trend-following systems
Filtering non-linear price action
🔬 How It Works
Price Angle Estimation:
Computes a rough angular shift in price using atan(src - src ) to estimate direction.
Kent Distribution Weighting:
κ (kappa) controls concentration strength (how sharply it prefers a direction).
β (beta) controls ellipticity (bias toward curved vs. linear moves).
These parameters influence how strongly the indicator favors movements at ~45° angles, simulating a directional “lens.”
Smoothing:
A Simple Moving Average (SMA) is applied over the raw directional probabilities to reduce noise and highlight the underlying trend signal.
⚙️ Inputs
Source: Price series used for angle calculation (default: close)
Smoothing Length: Window size for the moving average
Pi Divisor: Pi / 4 would be 45 degrees, you can change the 4 to 3, 2, etc.
Kappa (κ): Controls how focused the directionality is (higher = sharper filter)
Beta (β): Adds curvature sensitivity; higher values accentuate asymmetrical moves
🧠 Tips for Best Results
Use κ = 1–2 for moderate directional filtering, and β = 0.3–0.7 for smooth elliptical bias.
Combine with volume-based indicators to confirm breakout strength.
Works best in higher timeframes (1h–1D) to capture macro directional structure.
I might revisit this.
Better MACD📘 Better MACD – Adaptive Momentum & Divergence Suite
Better MACD is a comprehensive momentum-trend tool that evolves the traditional MACD into a multi-dimensional, divergence-aware oscillator. It leverages exponential smoothing across logarithmic rate-of-change of OHLC data, adaptive signal processing, and intelligent divergence detection logic to provide traders with earlier, smoother, and more reliable momentum signals.
This indicator is built for professional-level analysis, suitable for scalping, swing trading, and trend-following systems.
🧬 Core Concept
Unlike the classic MACD which subtracts two EMAs of price, Better MACD constructs a signal by:
Applying logarithmic transformation on the change between OHLC components (Close, High, Low, Open).
Using double EMA smoothing to filter noise and volatility, Triangular method. 1st to 2nd Smoothing.
Averaging and de-biasing the results through a custom linear regression model, 4th Smoothing.
Subtracting a fast SMA and slow SMA response to yield a dynamic MACD value, 3rd Smoothing.
The result is a smooth, adaptive, and high-resolution MACD-style oscillator that responds more naturally to trend conditions and price geometry.
🧠 Features Breakdown
1. 📈 Multi-Layer MACD Engine
Src1: Smoothed Log Rate-of-Change on Close
Src2: Smoothed Log Rate-of-Change on High
Src3: Smoothed Log Rate-of-Change on Low
Src4: Smoothed Log Rate-of-Change on Open
These are blended using highest high, lowest low, and average Close price over a configurable window for more complete trend detection. The open-based Src4 is subtracted using SMA.
2. 🧮 Signal Line
A fast EMA (signalLength) of the Better MACD value is used for crossover logic.
Crossovers of MACD and Signal line signal potential entries or exits.
3. 📊 MACD Histogram
Visualizes the difference between MACD and Signal line.
Dynamically color-coded:
Green/Light Green for bullish impulse
Red/Pink for bearish impulse
Width and color intensity reflect strength and momentum slope.
🎨 Visual Enhancements
Feature Description
✅ Ribbon Fill Optional fill between MACD and Signal line, colored by trend direction
✅ Zero-Line Background Background highlights above/below 0 to easily read bullish/bearish bias
✅ Crossover Highlights Tiny circles plotted when MACD crosses Signal line
🔍 Divergence Detection Suite
The script includes a full Divergence Engine to detect:
🔼 Bullish Regular Divergence (Price lower lows + Indicator higher lows)
🔽 Bearish Regular Divergence (Price higher highs + Indicator lower highs)
🟢 Bullish Hidden Divergence (Price higher lows + Indicator lower lows)
🔴 Bearish Hidden Divergence (Price lower highs + Indicator higher highs)
🧩 Divergence Modes:
Supports both Regular, Hidden, or Both simultaneously
Detects from either Close Price or Heikin Ashi-derived candles
Uses dynamic pivot tracking with configurable lookback and divergence sensitivity
Divergence lines are labeled, colored, and plotted in real-time
🔁 Styling & Customization:
Choose from Solid, Dashed, or Dotted line styles
Configure separate colors and widths for all divergence types
Control number of divergence lines visible or only show the most recent
Divergences update live without repainting
⚠️ Alerts
Alerts are built-in for real-time notification:
MACD Histogram reversals (rising → falling, or vice versa)
Divergence signals (all 4 types, grouped and individually)
Combines seamlessly with TradingView alerts for actionable triggers
🔧 Input Controls (Grouped by Purpose)
Better MACD Group
1st–4th Smoothing Lengths: Controls responsiveness of MACD core engine
Signal Length: Smoothness of signal line
Toggles for crossover highlights, zero cross fills, and ribbon fills
Divergence Settings
Enable/disable divergence lines
Choose divergence type (Regular, Hidden, Both)
Set confirmation requirements
Customize pivot detection and bar search depth
Styling Options
Colors, line widths, and line styles for each divergence type
Heikin Ashi Mode for smoother pivots and divergences
🧠 How to Use
✅ For Trend Traders:
Use MACD > Signal + Histogram > 0 → Bullish confirmation
MACD < Signal + Histogram < 0 → Bearish confirmation
Wait for pullbacks with hidden divergences to enter in trend direction
✅ For Reversal Traders:
Look for Regular Divergences at trend exhaustion points
Combine with price action (e.g., support/resistance or candle pattern)
✅ For Swing & Day Traders:
Enable Heikin Ashi Mode for smoother divergence pivots
Use zero line background + histogram color to time entries
📌 Summary
Feature Description
🚀 Advanced MACD Core Smoother, more reliable, multi-source-based MACD
🔍 Divergence Engine Detects 4 divergence types with pivot logic
🎯 Real-Time Alerts Alerts for histogram slope and divergences
🎛️ Deep Customization Full styling, smoothing, and detection controls
📉 Heikin Ashi Support Improved signal quality in trend-based markets
Gabriel's Andean Oscillator📈 Gabriel's Andean Oscillator — Enhanced Trend-Momentum Hybrid
Gabriel's Andean Oscillator is a sophisticated trend-momentum indicator inspired by Alex Grover’s original Andean Oscillator concept. This enhanced version integrates multiple envelope types, smoothing options, and the ability to track volatility from both open/close and high/low dynamics—making it more responsive, adaptable, and visually intuitive.
🔍 What It Does
This oscillator measures bullish and bearish "energy" by calculating variance envelopes around price. Instead of traditional momentum formulas, it builds two exponential variance envelopes—one capturing the downside (bullish potential) and the other capturing the upside (bearish pressure). The result is a smoothed oscillator that reflects internal market tension and potential breakouts.
⚙️ Key Features
📐 Envelope Types:
Choose between:
"Regular" – Uses single EMA-based smoothing on open/close variance. Ideal for shorter timeframes.
"Double Smoothed" – Adds an extra layer of smoothing for noise reduction. Ideal for longer timeframes.
📊 Bullish & Bearish Components:
Bull = Measures potential upside using price lows (or open/close).
Bear = Measures downside pressure using highs (or open/close).
These can optionally be derived from high/low or open/close for flexible interpretation.
📏 Signal Line:
A customizable EMA of the dominant component to confirm momentum direction.
📉 Break Zone Area Plot:
An optional filled area showing when bull > bear or vice versa, useful for detecting expansion/contraction phases.
🟢 High/Low Overlay Option (Use Highs and Lows?):
Visualize secondary components derived from high/low prices to compare against the open/close dynamics and highlight volatility asymmetry.
🧠 How to Use It
Trend Confirmation:
When bull > bear and rising above signal → bullish bias.
When bear > bull and rising above signal → bearish bias.
Breakout Potential:
Watch the Break area plot (√(bull - bear)) for rapid expansion, signaling volatility bursts or directional moves.
High/Low Envelope Divergence:
Enabling the high/low comparison reveals hidden strength or weakness not visible in open/close alone.
🛠 Customizable Inputs
Envelope Type: Regular vs. Double Smoothed
EMA Envelope Lengths: For both regular and smoothed logic
Signal Length: Controls EMA smoothing for the signal
Use Highs and Lows?: Toggles second set of envelopes; the original doesn't include highs and lows.
Plot Breaks: Enables the filled “break” zone area, the squared difference between Open and Close.
🧪 Based On:
Andean Oscillator - Alpaca Markets
Licensed under CC BY-NC-SA 4.0
Developed by Gabriel, based on the work of Alex Grover
London/NY Sessions + SMC Levels📜 Indicator Description: London/NY Sessions + SMC Levels
Overview: This indicator highlights the key trading sessions — London, New York, NY Lunch, and Asian Range — providing structured visual guides based on Smart Money Concepts (SMC) and ICT principles.
It dynamically plots:
Session Backgrounds and Boxes for London, NY, Lunch, and Asian sessions
Reference Levels for the High, Low, and Close from today, previous day, or weekly data
Midnight Open line for ICT-style power of three setups
Real-time alerts for session starts, session closes, and important price level crossings
Features:
🕰️ Session Visualization:
Toggle London, NY, Lunch, and Asian session ranges individually, with customizable colors and transparent backgrounds.
🔔 Built-in Alerts:
Alerts for:
Price crossing the previous day's high/low
Price crossing the Midnight Open
Start and end of major sessions (London, NY, Lunch, Asian)
🟩 Reference Levels:
Plot selectable session reference levels:
Today’s intraday High/Low/Close
Previous Day’s High/Low/Close
This Week’s or Previous Week’s levels for broader context.
🌙 Midnight Open:
Track the Midnight New York Open as a reference point for daily bias shifts.
🎯 Customizable Settings:
Choose your session time zones (UTC, New York, London, etc.)
Customize all border colors, background colors, and session hours.
Use Cases:
Identify killzones and optimal trade entry windows for Smart Money Concepts (SMC) and ICT strategies.
Monitor liquidity pool sweeps and session transitions.
Confirm or refine your intraday or swing trading setups by referencing session highs/lows.
Recommended For:
ICT traders
Smart Money Concepts (SMC) practitioners
Forex, indices, crypto, and futures traders focusing on session-based volatility patterns
Anyone wanting a clean, professional session mapping tool
📈
Designed to help you trade with session precision and Smart Money accuracy.
Integrates seamlessly into any ICT, Wyckoff, or Liquidity-based trading approach.
Gabriel's Adaptive MA📜 Gabriel's Adaptive MA — Indicator Description
Gabriel's Adaptive Moving Average (GAMA) is a dynamic trend-following indicator that intelligently adjusts its smoothing based on both trend strength and market volatility.
It is designed to provide faster responsiveness during strong moves while maintaining stability during choppy or consolidating periods.
🧠 What it does:
This indicator plots a custom-built, highly dynamic Moving Average that adapts itself intelligently based on:
Trend Strength (via Perry Kaufman's Efficiency Ratio)
Market Volatility (via Tushar Chande's Volatility Ratio)
It reacts faster when the market is trending strongly and/or highly volatile,
and it smooths out and slows down when the market is choppy or calm.
🔍 How it works (step-by-step):
1. User Inputs:
length: (default 14)
How many bars to look back for calculations.
fastSC: Fastest possible smoothing constant (hardcoded as 2 / (2+1))
slowSC: Slowest possible smoothing constant (hardcoded as 2 / (30+1))
(These are used to control how fast/slow the KAMA can react.)
2. Calculate Trendiness — Kaufman Efficiency Ratio (ER):
Net Change = Absolute difference between current close and close from length bars ago.
Sum of Absolute Changes = Sum of absolute price changes between every bar inside the length window.
Efficiency Ratio (ER) = Net Change divided by Sum of Changes.
✅ If ER is close to 1 → Smooth, trending market.
✅ If ER is close to 0 → Choppy, sideways market.
3. Calculate Bumpiness — Volatility Ratio (VR):
Short-Term Volatility = Standard deviation of close over length.
Long-Term Volatility = Standard deviation of close over length * 2.
Volatility Ratio (VR) = Short-Term Volatility divided by Long-Term Volatility.
✅ If VR is >1 → Market is becoming more volatile recently.
✅ If VR is <1 → Market is calming down.
4. Create the Hybrid Alpha:
Multiply ER × VR.
Then square the result (math.pow(..., 2)).
This hybrid alpha decides how aggressive the MA should be based on both trend and volatility.
If ER and VR are both strong → big alpha → fast movement.
If ER and/or VR are weak → small alpha → slow movement.
5. Calculate the Final Adaptive Smoothing Constant (hybridSC):
hybridSC = slowSC + hybridAlpha × (fastSC - slowSC)
This smoothly interpolates between the slowest and fastest smoothing depending on market conditions.
6. Calculate and Plot the Adaptive MA:
The moving average is manually calculated:
hybridMA := na(hybridMA ) ? close : hybridMA + hybridSC * (close - hybridMA )
It behaves like an EMA but with dynamic smoothing, not a fixed alpha.
✅ If hybridSC is high → MA hugs the price closely.
✅ If hybridSC is low → MA stays smooth and resists noise.
Finally, it plots this Adaptive MA on the chart in blue color.
📊 Visual Summary
Market Type What Happens to GAMA
Trending hard + volatile Follows price quickly
Trending hard + calm Follows steadily but carefully
Sideways + volatile Reacts carefully (won't chase noise)
Sideways + calm Smooths heavily (avoids fakeouts)
✨ Main Strengths:
Adapts automatically without you tuning settings manually every time market changes.
Responds smartly to both trend quality (ER) and market energy (VR).
Reduces lag during real moves.
Filters out false signals during choppy mess.
🧪 Key Innovation compared to normal MAs:
Traditional MA Gabriel's Adaptive MA
Same smoothing every bar Dynamic smoothing every bar
Slow during fast moves Adapts fast during real moves
No understanding of volatility or trendiness Full market sensitivity
⚡ **Simple One-Line Description:**
"Gabriel's Adaptive MA is a dynamic, trend-and-volatility-sensitive moving average that intelligently adjusts its speed to match market conditions."