OPEN-SOURCE SCRIPT

Quantum Flux Oscillator [JOAT]

1 290
Quantum Flux Oscillator [JOAT]

Introduction

The Quantum Flux Oscillator is an advanced open-source momentum detection system that synthesizes six distinct analytical methodologies into a unified institutional-grade oscillator. This indicator combines Volume Flux Indicator (VFI), Laguerre RSI, Fisher Transform, True Strength Index (TSI), Money Flow Index (MFI), and On-Balance Volume (OBV) with Accumulation/Distribution analysis to create a comprehensive momentum engine that reveals institutional positioning and market regime shifts.

Unlike traditional single-dimension oscillators, the Quantum Flux Oscillator provides multi-layered momentum intelligence through weighted composite calculations, regime classification, velocity tracking, and divergence detection. The indicator is designed for traders who understand that momentum precedes price and that institutional footprints can be detected through systematic multi-indicator confluence.

snapshot

Why This Indicator Exists

This indicator addresses a critical gap in momentum analysis: the ability to detect institutional momentum shifts before they become obvious to retail traders. By combining multiple momentum methodologies with volume-weighted analysis, this indicator reveals:

  • Volume Flux Intelligence: Detects unusual volume-price relationships that signal institutional activity
  • Laguerre RSI: Zero-centered adaptive RSI that responds faster to price changes while filtering noise
  • Fisher Transform: Converts momentum into a Gaussian normal distribution for clearer extreme identification
  • True Strength Index: Double-smoothed momentum that separates genuine trends from noise
  • Money Flow Analysis: Tracks buying and selling pressure through volume-weighted price movements
  • Volume Confirmation: Integrates OBV and A/D Line to confirm momentum with volume flow
  • Regime Classification: Categorizes market conditions as Extreme Bull, Bullish, Neutral, Bearish, or Extreme Bear
  • Multi-Timeframe Alignment: Confirms momentum across higher timeframes for conviction measurement


Each component provides a different perspective on momentum. VFI shows volume-driven momentum, Laguerre RSI shows adaptive momentum, Fisher Transform shows statistical extremes, TSI shows smoothed directional momentum, MFI shows money flow momentum, and OBV/A/D show cumulative volume momentum. Together, they create a comprehensive view of institutional momentum positioning.

Core Components Explained

1. Volume Flux Indicator (VFI)

VFI measures the relationship between price movement and volume to identify institutional accumulation or distribution. The calculation uses logarithmic price changes and volume cutoffs to filter significant moves:

The indicator classifies volume-price relationships by comparing actual volume against average volume with a cutoff threshold. When price moves significantly with volume above the cutoff, it signals institutional participation. VFI is scaled and smoothed to create a momentum baseline that responds to volume-confirmed price movements.

2. Laguerre RSI (Zero-Centered)

Laguerre RSI applies a four-stage Laguerre filter to price data, creating an adaptive RSI that responds faster to recent price changes while maintaining smoothness. The zero-centered output ranges from -50 to +50, making it easier to identify bullish and bearish momentum:

The Laguerre filter uses a gamma parameter (default 0.4) to control responsiveness. Lower gamma values create faster response, while higher values create smoother output. The zero-centered format allows direct comparison with other momentum components.

3. Fisher Transform

The Fisher Transform converts the composite momentum into a Gaussian normal distribution, making extreme values more identifiable. This transformation compresses the middle range and expands the tails, creating clearer overbought and oversold signals:

The Fisher Transform output oscillates around zero with extreme values typically beyond +2 and -2. These extremes often precede reversals as momentum reaches unsustainable levels.

4. True Strength Index (TSI)

TSI applies double exponential smoothing to price momentum, creating a smooth oscillator that filters out short-term noise while preserving trend direction. The calculation uses two EMA periods (default 25 and 13) to separate signal from noise:

TSI values above zero indicate bullish momentum, while values below zero indicate bearish momentum. The double smoothing reduces whipsaws while maintaining responsiveness to genuine momentum shifts.

5. Money Flow Index (MFI)

MFI is a volume-weighted RSI that measures buying and selling pressure. It calculates the ratio of positive money flow (volume on up days) to negative money flow (volume on down days):

MFI values above 80 indicate overbought conditions with high volume, while values below 20 indicate oversold conditions with high volume. The indicator normalizes MFI to a zero-centered scale for integration with other components.

6. On-Balance Volume (OBV) and Accumulation/Distribution (A/D)

OBV and A/D track cumulative volume flow to confirm momentum direction. OBV adds volume on up days and subtracts on down days, while A/D weights volume by the close's position within the day's range:

Both indicators are normalized to a 0-100 scale and then zero-centered for composite integration. Rising OBV/A/D with rising momentum confirms institutional accumulation, while falling OBV/A/D with rising price warns of distribution.

Quantum Flux Core Calculation

The Quantum Flux Core combines all components using weighted averaging:

Quantum Flux = (VFI × 0.20) + (Laguerre RSI × 0.20) + (Fisher × 0.15) + (TSI × 0.15) + (MFI × 0.10) + (OBV × 0.10) + (A/D × 0.05) + (CMF × 0.05)

This weighted approach emphasizes volume-driven components (VFI, Laguerre) while incorporating smoothed momentum (Fisher, TSI) and volume confirmation (MFI, OBV, A/D, CMF). The result is smoothed with an EMA to create the final Quantum Flux line.

Regime Classification System

The indicator classifies market conditions into five regimes based on Quantum Flux levels:

  • Extreme Bull (QF > 35): Institutional buying pressure at extreme levels, potential exhaustion
  • Bullish (QF > 25): Strong bullish momentum with institutional participation
  • Neutral (-25 < QF < 25): Balanced conditions, no clear institutional bias
  • Bearish (QF < -25): Strong bearish momentum with institutional selling
  • Extreme Bear (QF < -35): Institutional selling pressure at extreme levels, potential capitulation


Regime shifts often precede significant price moves as institutional positioning changes. The indicator tracks regime changes and generates signals when momentum confirms directional bias.

Multi-Timeframe Alignment

The indicator requests Quantum Flux data from three customizable higher timeframes (default: 5m, 15m, 60m) and calculates alignment:

  • Strong Aligned (3/3): All timeframes show bullish/bearish momentum - high conviction
  • Aligned (2/3): Majority timeframes confirm - moderate conviction
  • Weak (1/3): Only one timeframe confirms - low conviction
  • No Alignment (0/3): No timeframe confirmation - conflicting signals


Strong alignment across multiple timeframes indicates institutional participation at scale, as large orders are often split across timeframes to minimize market impact.

Velocity and Acceleration Tracking

The indicator calculates momentum velocity (rate of change) and acceleration (change in velocity):

  • Velocity: Current Quantum Flux minus previous bar's value
  • Acceleration: Current velocity minus previous velocity (second derivative)


Accelerating momentum often precedes breakouts as institutional orders hit the market. Decelerating momentum warns of potential reversals or consolidation.

Visual Elements

  • Quantum Flux Line: Main oscillator with regime-based color coding (cyan = extreme bull, aqua = bullish, yellow = neutral, red = bearish, magenta = extreme bear)
  • Threshold Lines: Horizontal lines at +35 (extreme overbought), +25 (overbought), 0 (zero line), -25 (oversold), -35 (extreme oversold)
  • Velocity Histogram: Shows momentum velocity with color-coded bars (green = rising, red = falling)
  • Acceleration Columns: Displays momentum acceleration to identify momentum shifts early
  • Regime Strength Bars: Visual regime indicator showing current market condition strength
  • Gradient Glow Effect: Multiple layered fills create a glowing effect that emphasizes momentum intensity
  • Information Dashboard: Comprehensive table displaying all metrics in real-time with color-coded cells


The dashboard displays 10 key metrics: Regime, Flux Value, HTF Confirmation, MFI, CMF, Velocity, Divergence, Volume, and Signal status.

snapshot

Signal Generation

The indicator generates two types of signals:

Primary Reversal Signals:
  • Bullish Reversal: Quantum Flux in extreme oversold (< -35), rising momentum, positive velocity acceleration, and HTF confirmation
  • Bearish Reversal: Quantum Flux in extreme overbought (> 35), falling momentum, negative velocity acceleration, and HTF confirmation


Momentum Crossover Signals:
  • Bullish Momentum: Quantum Flux crosses above -25 (oversold threshold) with positive velocity and volume confirmation
  • Bearish Momentum: Quantum Flux crosses below +25 (overbought threshold) with negative velocity and volume confirmation


Signals include anti-overlap logic to prevent signal clustering and ensure clean chart presentation.

Divergence Detection

The indicator detects both regular and hidden divergences between price and Quantum Flux:

  • Regular Bullish Divergence: Price makes lower low, Quantum Flux makes higher low (potential reversal up)
  • Regular Bearish Divergence: Price makes higher high, Quantum Flux makes lower high (potential reversal down)
  • Hidden Bullish Divergence: Price makes higher low, Quantum Flux makes lower low (trend continuation up)
  • Hidden Bearish Divergence: Price makes lower high, Quantum Flux makes higher high (trend continuation down)


Divergences are drawn with clean lines (solid for regular, dashed for hidden) without text clutter.

How to Use This Indicator

Step 1: Monitor Regime Classification
Watch for regime shifts between Extreme Bear, Bearish, Neutral, Bullish, and Extreme Bull. Regime changes often precede significant price moves.

Step 2: Check Multi-Timeframe Alignment
Strong alignment (3/3) across timeframes confirms institutional conviction. Weak or no alignment suggests retail-driven moves that may lack follow-through.

Step 3: Analyze Velocity and Acceleration
Accelerating momentum (positive acceleration) often precedes breakouts. Decelerating momentum (negative acceleration) warns of potential reversals.

Step 4: Look for Divergences
Regular divergences at extreme levels (QF > 35 or < -35) often signal reversals. Hidden divergences confirm trend continuation.

Step 5: Confirm with Volume Metrics
Check MFI, CMF, OBV, and A/D for confirmation. Rising volume metrics with rising Quantum Flux confirms institutional accumulation.

Step 6: Wait for Signal Confirmation
Primary reversal signals at extreme levels with HTF confirmation provide highest probability setups. Momentum crossover signals work best in trending markets.

Best Practices

  • Use on liquid instruments (major forex pairs, large-cap stocks, major crypto) for most reliable signals
  • Combine with price action analysis - momentum shows intent, price shows result
  • Pay attention to extreme levels (QF > 35 or < -35) as these often precede reversals
  • MTF alignment is most reliable in trending markets, less reliable in choppy conditions
  • Extreme momentum can persist longer than expected during strong trends - use stops
  • Look for momentum divergences at key support/resistance levels for highest probability setups
  • Monitor velocity and acceleration for early warning signs of momentum shifts
  • Use the dashboard to quickly assess overall market condition and signal status


Indicator Limitations

  • Momentum analysis works best on liquid instruments with consistent volume patterns
  • Low-volume instruments or off-market hours can produce unreliable readings
  • MTF alignment requires sufficient data on all timeframes - may not work on newly listed instruments
  • Momentum precedes price but doesn't guarantee direction - high momentum can occur on both breakouts and fakeouts
  • Extreme momentum levels can persist longer than expected during major news events or market dislocations
  • The indicator shows what is happening, not why - fundamental catalysts can override technical momentum patterns
  • Divergences are more reliable at extreme levels than in neutral zones
  • Multiple components mean the indicator can be slower to respond than single-component oscillators


Input Parameters

Core Engine:
  • Primary Length: Period for momentum calculations (default: 14)
  • Smoothing Period: EMA smoothing for final output (default: 7)
  • Sensitivity Factor: Multiplier for Fisher Transform input (default: 1.5)


Volume Flux Engine:
  • VFI Coefficient: Cutoff multiplier for significant moves (default: 0.2)
  • Volume Cutoff: Maximum volume multiplier (default: 2.5)
  • Scale Multiplier: VFI output scaling (default: 4.0)


Laguerre Transform:
  • Gamma: Responsiveness parameter (default: 0.4, lower = faster)


Threshold Zones:
  • Extreme Overbought: Upper extreme threshold (default: 35)
  • Overbought: Upper threshold (default: 25)
  • Oversold: Lower threshold (default: -25)
  • Extreme Oversold: Lower extreme threshold (default: -35)


Money Flow & Volume:
  • MFI Length: Period for Money Flow Index (default: 14)
  • OBV Smoothing: Smoothing period for OBV (default: 14)
  • A/D Smoothing: Smoothing period for A/D Line (default: 14)


Multi-Timeframe Analysis:
  • Enable Higher Timeframe: Toggle MTF calculations (default: enabled)
  • HTF Timeframe 1/2/3: Customizable timeframes (default: 5m, 15m, 60m)


Visual Configuration:
  • Color Theme: Choose from Gradient Glow, Professional Dark, Neon Spectrum, or Institutional Grey
  • Bullish/Bearish Spectrum: Customizable colors for momentum direction
  • Glow Layers: Number of gradient layers for glow effect (default: 20)
  • Show Divergence: Toggle divergence detection (default: enabled)
  • Show Volume Profile: Toggle volume profile histogram (default: enabled)


Technical Implementation

Built with Pine Script v6 using:
  • Custom VFI calculations with logarithmic price changes and volume cutoffs
  • Four-stage Laguerre filter for adaptive RSI
  • Fisher Transform for Gaussian distribution conversion
  • Double-smoothed TSI for noise filtering
  • Volume-weighted MFI calculations
  • Normalized OBV and A/D Line integration
  • Multi-timeframe security requests with proper lookahead settings
  • Velocity and acceleration calculations for momentum derivatives
  • Real-time regime classification system
  • Dynamic dashboard with 10 metrics and color-coded cells
  • Gradient glow effect with multiple layered fills
  • Divergence detection with pivot analysis


The code is fully open-source and can be modified to suit individual trading styles and preferences.

Originality Statement

This indicator is original in its comprehensive integration approach. While individual components (VFI, Laguerre RSI, Fisher Transform, TSI, MFI, OBV, A/D) are established concepts, this indicator is justified because:

  • It synthesizes six distinct momentum methodologies into a unified weighted composite system
  • The regime classification provides institutional momentum measurement not available in standard oscillators
  • Multi-timeframe alignment detection measures institutional conviction across timeframes
  • Velocity and acceleration calculations provide early warning of momentum shifts
  • The gradient glow visualization creates intuitive momentum intensity display
  • Integration of volume-weighted components (VFI, MFI) with smoothed momentum (Fisher, TSI) and cumulative volume (OBV, A/D) creates layered confirmation
  • The comprehensive dashboard presents 10 metrics simultaneously for holistic momentum analysis


Each component contributes unique information: VFI shows volume-driven momentum, Laguerre RSI shows adaptive momentum, Fisher Transform shows statistical extremes, TSI shows smoothed momentum, MFI shows money flow, OBV shows cumulative volume, and A/D shows distribution. The indicator's value lies in presenting these complementary perspectives simultaneously with a unified regime classification system.

Disclaimer

This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.

Momentum analysis is a tool for understanding market dynamics, not a crystal ball for predicting future price movement. High momentum does not guarantee profitable trades. Past momentum patterns do not guarantee future momentum patterns. Market conditions change, and strategies that worked historically may not work in the future.

The metrics displayed are mathematical calculations based on current market data, not predictions of future price movement. Extreme momentum levels, regime classifications, and signal generation do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.

Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.

The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.

-Made with passion by officialjackofalltrades

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.