OPEN-SOURCE SCRIPT
AetherEdge Hybrid Quantum-Inspired Predictor

🖊️ Overview
AetherEdge Hybrid Quantum-Inspired Predictor is a next-generation 3-class (UP/DOWN/SIDE) probability prediction engine that fuses three heterogeneous models: a quantum-mechanical wavefunction approach, a K-Nearest Neighbors historical analog search, and a self-learning neural network. Born-rule probabilities derived from complex amplitudes ψ, distance-weighted K-NN voting, and Softmax-based self-optimizing neurons all converge into a single ensemble distribution. With a complete visualization system featuring a radar chart, pie chart, and historical analogs, it decodes the market's "superposition state."
🔶 Key Features
3-Layer Hybrid Architecture: Quantum + KNN + Neural
Quantum Layer: Complex wavefunction ψ, Gaussian amplitudes, decoherence, phase
KNN Layer: K-nearest analog search in 3D feature space
Neural Layer: Online gradient descent + Softmax + Weight decay
3-Class Classification: UP/DOWN/SIDE probability distribution
3 Core Features: Price Structure / Liquidity / Sentiment Proxy
On-Chart Radar Chart: 3-axis visualization
On-Chart Pie Chart: Instant state distribution view
Historical Analogs Display: Top-3 similar past patterns
Quantum Internal State Monitor: Re(ψ), Im(ψ), |ψ|², entropy
State Flip Markers: Auto-detection of directional transitions
Strategy Suggestion Engine: LONG BIAS / SHORT BIAS / RANGE FADE, etc.
🧠 Technical Architecture
This indicator is designed as an ensemble predictor of three heterogeneous models.
Feature Engineering:
Price Structure: EMA20/50/100 + RSI + ATR-deviation composite (tanh normalized)
Liquidity: Close position + wick asymmetry + VWAP deviation + sweep detection
Sentiment Proxy: Vol-Z + price-volume divergence + A/D + volume spike
Quantum Layer:
Wavefunction Construction: ψ_state = Σ A·e^(iθ) per feature
Gaussian Amplitude: A(f, target) = exp(-(f-target)²/(2σ²))
Phase Intensity: θ = f × qPhase × π/2 + offset
Born Rule: P_state = |ψ|² / Σ|ψ|²
Decoherence: P' = (1-γ)·P + γ/3 for quantum→classical transition
Quantum Coherence: 1 - H/log(3) state clarity
KNN Layer:
Euclidean distance search in 3D feature space
Distance-weighted voting w = 1/(1+d)
Aggregates labels (UP/DOWN/SIDE) at past kHorizon-bar future
Records Top-3 analogs (rank, distance, realized return)
Neural Layer:
3-class Softmax classifier (3 inputs → 3 outputs, 12 parameters)
Cross-Entropy Gradient: g = p - target
Update Rule: w_new = w·decay - lr·g·feature
Weight Decay: Prevents overfitting + forgets old patterns
Ensemble Integration:
Weighted average: P = (q·P_q + k·P_k + n·P_n) / Σw
After normalization, max-probability class becomes dominant state
Strategy Engine:
domProb ≥ 0.55 + UP → LONG BIAS
domProb ≥ 0.55 + DOWN → SHORT BIAS
domProb ≥ 0.55 + SIDE → RANGE FADE
confidence < 0.15 → HIGH UNCERTAINTY
⚙️ Recommended Settings & Tuning Guide
Crypto Defaults:
BTC (4H): qWeight=0.35, kWeight=0.35, nWeight=0.30, kK=20
ETH (1H): qWeight=0.30, kWeight=0.40, nWeight=0.30, kHorizon=5
SOL (high-vol): qSigma=1.5, qDecoher=0.15, kThresh=0.5
XRP (short-term): kHorizon=3, kThresh=0.2, nLR=0.02
Quantum Layer:
qWeight=0.20: Conservative (suppress quantum contribution)
qWeight=0.35: Standard
qWeight=0.50: Experimental (quantum-dominant)
qSigma=0.8: Sharp (clear states)
qSigma=1.2: Standard
qSigma=2.0: Smooth (high uncertainty)
qDecoher=0.05: Pure quantum
qDecoher=0.10: Standard
qDecoher=0.30: Strong classical approximation
KNN Layer:
kK=10: Curated matches (sharp)
kK=20: Standard
kK=40: Smooth (conservative)
kLookback=300: Lightweight
kLookback=500: Standard
kLookback=1000: Long-term patterns
kThresh=0.2%: Sensitive (short TF)
kThresh=0.3%: Standard
kThresh=0.5%: Conservative (long TF)
Neural Layer:
nLR=0.005: Cautious learning (stable)
nLR=0.015: Standard
nLR=0.05: Fast adaptation (unstable)
nDecay=0.999: Long-term memory
nDecay=0.997: Standard
nDecay=0.99: Quick forgetting
💡 How to Use in Practice
LONG BIAS + High Q-Coherence: Strongest buy signal, consider entry
SHORT BIAS + High Confidence: Strongest sell signal, build short
RANGE FADE: Range strategies, sell premium, fade both extremes
HIGH UNCERTAINTY: Reduce positions, observe mode
State Flip → UP: Early trend transition, early entry
All Top-3 Analogs Same Direction: Strong historical evidence, raise confidence
3-Model Consensus: Quantum/KNN/Neural all UP → highest confidence
3-Model Divergence: Split opinion, exercise caution
Dir Bias > 0.3: Strong upward bias
Vol Anomaly Detected: Suspend forecasts during normal-time logic
AetherEdge Synergy:
Self-Evolving S/R Grid: LONG BIAS + support reaction = high-win-rate entry
Volatility Regime GAN: SHORT BIAS + EXPAND forecast = powerful drop setup
SMC AI Confidence: 3-model consensus + high-conf zone = conviction entry
Neural Divergence Hunter: State Flip + divergence = reversal confirmation
⚠️ Important Notes
Initial Learning Period: Neural & KNN immature until bar_index > 110
Model Divergence: Split opinions signal weak signal strength
Quantum is Approximation: Mathematical analogy, not actual quantum computing
History Dependent: Cannot handle unprecedented market events
Computation Load: Radar & pie rendering slightly heavy
Repaint: Runs at barstate.islast, displayed only at last bar
Neural Weights: Reset to defaults on chart reload
Confidence < 0.15: Near-uniform distribution, recommend avoiding trades
🚨 Disclaimer
This indicator is an advanced hybrid prediction tool for educational and research purposes only and does not constitute financial advice. "Quantum-inspired" is a mathematical analogy, not actual quantum computing. The 3-model ensemble prediction is a probabilistic method and does not guarantee future price movements. Use with thorough validation and proper risk management.
AetherEdge Hybrid Quantum-Inspired Predictor is a next-generation 3-class (UP/DOWN/SIDE) probability prediction engine that fuses three heterogeneous models: a quantum-mechanical wavefunction approach, a K-Nearest Neighbors historical analog search, and a self-learning neural network. Born-rule probabilities derived from complex amplitudes ψ, distance-weighted K-NN voting, and Softmax-based self-optimizing neurons all converge into a single ensemble distribution. With a complete visualization system featuring a radar chart, pie chart, and historical analogs, it decodes the market's "superposition state."
🔶 Key Features
3-Layer Hybrid Architecture: Quantum + KNN + Neural
Quantum Layer: Complex wavefunction ψ, Gaussian amplitudes, decoherence, phase
KNN Layer: K-nearest analog search in 3D feature space
Neural Layer: Online gradient descent + Softmax + Weight decay
3-Class Classification: UP/DOWN/SIDE probability distribution
3 Core Features: Price Structure / Liquidity / Sentiment Proxy
On-Chart Radar Chart: 3-axis visualization
On-Chart Pie Chart: Instant state distribution view
Historical Analogs Display: Top-3 similar past patterns
Quantum Internal State Monitor: Re(ψ), Im(ψ), |ψ|², entropy
State Flip Markers: Auto-detection of directional transitions
Strategy Suggestion Engine: LONG BIAS / SHORT BIAS / RANGE FADE, etc.
🧠 Technical Architecture
This indicator is designed as an ensemble predictor of three heterogeneous models.
Feature Engineering:
Price Structure: EMA20/50/100 + RSI + ATR-deviation composite (tanh normalized)
Liquidity: Close position + wick asymmetry + VWAP deviation + sweep detection
Sentiment Proxy: Vol-Z + price-volume divergence + A/D + volume spike
Quantum Layer:
Wavefunction Construction: ψ_state = Σ A·e^(iθ) per feature
Gaussian Amplitude: A(f, target) = exp(-(f-target)²/(2σ²))
Phase Intensity: θ = f × qPhase × π/2 + offset
Born Rule: P_state = |ψ|² / Σ|ψ|²
Decoherence: P' = (1-γ)·P + γ/3 for quantum→classical transition
Quantum Coherence: 1 - H/log(3) state clarity
KNN Layer:
Euclidean distance search in 3D feature space
Distance-weighted voting w = 1/(1+d)
Aggregates labels (UP/DOWN/SIDE) at past kHorizon-bar future
Records Top-3 analogs (rank, distance, realized return)
Neural Layer:
3-class Softmax classifier (3 inputs → 3 outputs, 12 parameters)
Cross-Entropy Gradient: g = p - target
Update Rule: w_new = w·decay - lr·g·feature
Weight Decay: Prevents overfitting + forgets old patterns
Ensemble Integration:
Weighted average: P = (q·P_q + k·P_k + n·P_n) / Σw
After normalization, max-probability class becomes dominant state
Strategy Engine:
domProb ≥ 0.55 + UP → LONG BIAS
domProb ≥ 0.55 + DOWN → SHORT BIAS
domProb ≥ 0.55 + SIDE → RANGE FADE
confidence < 0.15 → HIGH UNCERTAINTY
⚙️ Recommended Settings & Tuning Guide
Crypto Defaults:
BTC (4H): qWeight=0.35, kWeight=0.35, nWeight=0.30, kK=20
ETH (1H): qWeight=0.30, kWeight=0.40, nWeight=0.30, kHorizon=5
SOL (high-vol): qSigma=1.5, qDecoher=0.15, kThresh=0.5
XRP (short-term): kHorizon=3, kThresh=0.2, nLR=0.02
Quantum Layer:
qWeight=0.20: Conservative (suppress quantum contribution)
qWeight=0.35: Standard
qWeight=0.50: Experimental (quantum-dominant)
qSigma=0.8: Sharp (clear states)
qSigma=1.2: Standard
qSigma=2.0: Smooth (high uncertainty)
qDecoher=0.05: Pure quantum
qDecoher=0.10: Standard
qDecoher=0.30: Strong classical approximation
KNN Layer:
kK=10: Curated matches (sharp)
kK=20: Standard
kK=40: Smooth (conservative)
kLookback=300: Lightweight
kLookback=500: Standard
kLookback=1000: Long-term patterns
kThresh=0.2%: Sensitive (short TF)
kThresh=0.3%: Standard
kThresh=0.5%: Conservative (long TF)
Neural Layer:
nLR=0.005: Cautious learning (stable)
nLR=0.015: Standard
nLR=0.05: Fast adaptation (unstable)
nDecay=0.999: Long-term memory
nDecay=0.997: Standard
nDecay=0.99: Quick forgetting
💡 How to Use in Practice
LONG BIAS + High Q-Coherence: Strongest buy signal, consider entry
SHORT BIAS + High Confidence: Strongest sell signal, build short
RANGE FADE: Range strategies, sell premium, fade both extremes
HIGH UNCERTAINTY: Reduce positions, observe mode
State Flip → UP: Early trend transition, early entry
All Top-3 Analogs Same Direction: Strong historical evidence, raise confidence
3-Model Consensus: Quantum/KNN/Neural all UP → highest confidence
3-Model Divergence: Split opinion, exercise caution
Dir Bias > 0.3: Strong upward bias
Vol Anomaly Detected: Suspend forecasts during normal-time logic
AetherEdge Synergy:
Self-Evolving S/R Grid: LONG BIAS + support reaction = high-win-rate entry
Volatility Regime GAN: SHORT BIAS + EXPAND forecast = powerful drop setup
SMC AI Confidence: 3-model consensus + high-conf zone = conviction entry
Neural Divergence Hunter: State Flip + divergence = reversal confirmation
⚠️ Important Notes
Initial Learning Period: Neural & KNN immature until bar_index > 110
Model Divergence: Split opinions signal weak signal strength
Quantum is Approximation: Mathematical analogy, not actual quantum computing
History Dependent: Cannot handle unprecedented market events
Computation Load: Radar & pie rendering slightly heavy
Repaint: Runs at barstate.islast, displayed only at last bar
Neural Weights: Reset to defaults on chart reload
Confidence < 0.15: Near-uniform distribution, recommend avoiding trades
🚨 Disclaimer
This indicator is an advanced hybrid prediction tool for educational and research purposes only and does not constitute financial advice. "Quantum-inspired" is a mathematical analogy, not actual quantum computing. The 3-model ensemble prediction is a probabilistic method and does not guarantee future price movements. Use with thorough validation and proper risk management.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.