PROTECTED SOURCE SCRIPT
Malama's Quantum Swing Modulator

# Multi-Indicator Swing Analysis with Probability Scoring
## What Makes This Script Original
This script combines pivot point detection with a **weighted scoring system** that dynamically adjusts indicator weights based on market regime (trending vs. ranging). Unlike standard multi-indicator approaches that use fixed weightings, this implementation uses ADX to detect market conditions and automatically rebalances the influence of RSI, MFI, and price deviation components accordingly.
## Core Methodology
**Dynamic Weight Allocation System:**
- **Trending Markets (ADX > 25):** Prioritizes momentum (50% weight) with reduced oscillator influence (20% each for RSI/MFI)
- **Ranging Markets (ADX < 25):** Emphasizes mean reversion signals (40% each for RSI/MFI) with no momentum bias
- **Price Wave Component:** Uses EMA deviation normalized by ATR to measure distance from central tendency
**Pivot-Based Level Analysis:**
- Detects swing highs/lows using configurable left/right lookback periods
- Maintains the most recent pivot levels as key reference points
- Calculates proximity scores based on current price distance from these levels
**Volume Confirmation Logic:**
- Defines "volume entanglement" when current volume exceeds SMA by user-defined factor
- Integrates volume confirmation into confidence scoring rather than signal generation
## Technical Implementation Details
**Scoring Algorithm:**
The script calculates separate bullish and bearish "superposition" scores using:
```
Bullish Score = (RSI_bull × weight) + (MFI_bull × weight) + (price_wave × weight × position_filter) + (momentum × weight)
```
Where:
- RSI_bull = 100 - RSI (inverted for oversold bias)
- MFI_bull = 100 - MFI (inverted for oversold bias)
- Position_filter = Only applies when price is below EMA for bullish signals
- Momentum component = Only active in trending markets
**Confidence Calculation:**
Base confidence starts at 25% and increases based on:
- Market regime alignment (trending/ranging appropriate conditions)
- Volume confirmation presence
- Oscillator extreme readings (RSI < 30 or > 70 in ranging markets)
- Price position relative to wave function (EMA)
**Probability Output:**
Final probability = (Base Score × 0.6) + (Proximity Score × 0.4)
This balances indicator confluence with proximity to identified levels.
## Key Differentiators
**vs. Standard Multi-Indicator Scripts:** Uses regime-based dynamic weighting instead of fixed combinations
**vs. Simple Pivot Indicators:** Adds quantified probability and confidence scoring to pivot levels
**vs. Basic Oscillator Combinations:** Incorporates market structure analysis through ADX regime detection
## Visual Components
**Wave Function Display:** EMA with ATR-based uncertainty bands for trend context
**Pivot Markers:** Clear visualization of detected swing highs and lows
**Analysis Table:** Real-time probability, confidence, and action recommendations for current pivot levels
## Practical Application
The dynamic weighting system helps avoid common pitfalls of multi-indicator analysis:
- Reduces oscillator noise during strong trends by emphasizing momentum
- Increases mean reversion sensitivity during sideways markets
- Provides quantified probability rather than subjective signal interpretation
## Important Limitations
- Requires sufficient historical data for pivot detection and volume calculations
- Probability scores are based on current market regime and may change as conditions evolve
- The scoring system is designed for confluence analysis, not standalone trading decisions
- Past probability accuracy does not guarantee future performance
## Technical Requirements
- Works on all timeframes but requires adequate lookback history
- Volume data required for entanglement calculations
- Best suited for liquid instruments where volume patterns are meaningful
This approach provides a systematic framework for evaluating swing trading opportunities while acknowledging the probabilistic nature of technical analysis.
## What Makes This Script Original
This script combines pivot point detection with a **weighted scoring system** that dynamically adjusts indicator weights based on market regime (trending vs. ranging). Unlike standard multi-indicator approaches that use fixed weightings, this implementation uses ADX to detect market conditions and automatically rebalances the influence of RSI, MFI, and price deviation components accordingly.
## Core Methodology
**Dynamic Weight Allocation System:**
- **Trending Markets (ADX > 25):** Prioritizes momentum (50% weight) with reduced oscillator influence (20% each for RSI/MFI)
- **Ranging Markets (ADX < 25):** Emphasizes mean reversion signals (40% each for RSI/MFI) with no momentum bias
- **Price Wave Component:** Uses EMA deviation normalized by ATR to measure distance from central tendency
**Pivot-Based Level Analysis:**
- Detects swing highs/lows using configurable left/right lookback periods
- Maintains the most recent pivot levels as key reference points
- Calculates proximity scores based on current price distance from these levels
**Volume Confirmation Logic:**
- Defines "volume entanglement" when current volume exceeds SMA by user-defined factor
- Integrates volume confirmation into confidence scoring rather than signal generation
## Technical Implementation Details
**Scoring Algorithm:**
The script calculates separate bullish and bearish "superposition" scores using:
```
Bullish Score = (RSI_bull × weight) + (MFI_bull × weight) + (price_wave × weight × position_filter) + (momentum × weight)
```
Where:
- RSI_bull = 100 - RSI (inverted for oversold bias)
- MFI_bull = 100 - MFI (inverted for oversold bias)
- Position_filter = Only applies when price is below EMA for bullish signals
- Momentum component = Only active in trending markets
**Confidence Calculation:**
Base confidence starts at 25% and increases based on:
- Market regime alignment (trending/ranging appropriate conditions)
- Volume confirmation presence
- Oscillator extreme readings (RSI < 30 or > 70 in ranging markets)
- Price position relative to wave function (EMA)
**Probability Output:**
Final probability = (Base Score × 0.6) + (Proximity Score × 0.4)
This balances indicator confluence with proximity to identified levels.
## Key Differentiators
**vs. Standard Multi-Indicator Scripts:** Uses regime-based dynamic weighting instead of fixed combinations
**vs. Simple Pivot Indicators:** Adds quantified probability and confidence scoring to pivot levels
**vs. Basic Oscillator Combinations:** Incorporates market structure analysis through ADX regime detection
## Visual Components
**Wave Function Display:** EMA with ATR-based uncertainty bands for trend context
**Pivot Markers:** Clear visualization of detected swing highs and lows
**Analysis Table:** Real-time probability, confidence, and action recommendations for current pivot levels
## Practical Application
The dynamic weighting system helps avoid common pitfalls of multi-indicator analysis:
- Reduces oscillator noise during strong trends by emphasizing momentum
- Increases mean reversion sensitivity during sideways markets
- Provides quantified probability rather than subjective signal interpretation
## Important Limitations
- Requires sufficient historical data for pivot detection and volume calculations
- Probability scores are based on current market regime and may change as conditions evolve
- The scoring system is designed for confluence analysis, not standalone trading decisions
- Past probability accuracy does not guarantee future performance
## Technical Requirements
- Works on all timeframes but requires adequate lookback history
- Volume data required for entanglement calculations
- Best suited for liquid instruments where volume patterns are meaningful
This approach provides a systematic framework for evaluating swing trading opportunities while acknowledging the probabilistic nature of technical analysis.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.