OPEN-SOURCE SCRIPT

Gabriel's Andean Oscillator

84
📈 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

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.