OPEN-SOURCE SCRIPT
Reflexivity Resonance Factor (RRF) - Quantum Flow

Reflexivity Resonance Factor (RRF) – Quantum Flow
See the Feedback Loops. Anticipate the Regime Shift.
What is the RRF – Quantum Flow?
The Reflexivity Resonance Factor (RRF) – Quantum Flow is a next-generation market regime detector and energy oscillator, inspired by George Soros’ theory of reflexivity and modern complexity science. It is designed for traders who want to visualize the hidden feedback loops between market perception and participation, and to anticipate explosive regime shifts before they unfold.
Unlike traditional oscillators, RRF does not just measure price momentum or volatility. Instead, it models the dynamic feedback between how the market perceives itself (perception) and how it acts on that perception (participation). When these feedback loops synchronize, they create “resonance” – a state of amplified reflexivity that often precedes major market moves.
Theoretical Foundation
Reflexivity: Markets are not just driven by external information, but by participants’ perceptions and their actions, which in turn influence future perceptions. This feedback loop can create self-reinforcing trends or sudden reversals.
Resonance: When perception and participation align and reinforce each other, the market enters a high-energy, reflexive state. These “resonance” events often mark the start of new trends or the climax of existing ones.
Energy Field: The indicator quantifies the “energy” of the market’s reflexivity, allowing you to see when the crowd is about to act in unison.
How RRF – Quantum Flow Works
Perception Proxy: Measures the rate of change in price (ROC) over a configurable period, then smooths it with an EMA. This models how quickly the market’s collective perception is shifting.
Participation Proxy: Uses a fast/slow ATR ratio to gauge the intensity of market participation (volatility expansion/contraction).
Reflexivity Core: Multiplies perception and participation to model the feedback loop.
Resonance Detection: Applies Z-score normalization to the absolute value of reflexivity, highlighting when current feedback is unusually strong compared to recent history.
Energy Calculation: Scales resonance to a 0–100 “energy” value, visualized as a dynamic background.
Regime Strength: Tracks the percentage of bars in a lookback window where resonance exceeded the threshold, quantifying the persistence of reflexive regimes.
Inputs:
🧬 Core Parameters
Perception Period (pp_roc_len, default 14): Lookback for price ROC.
Lower (5–10): More sensitive, for scalping (1–5min).
Default (14): Balanced, for 15min–1hr.
Higher (20–30): Smoother, for 4hr–daily.
Perception Smooth (pp_smooth_len, default 7): EMA smoothing for perception.
Lower (3–5): Faster, more detail.
Default (7): Balanced.
Higher (10–15): Smoother, less noise.
Participation Fast (prp_fast_len, default 7): Fast ATR for immediate volatility.
5–7: Scalping.
7–10: Day trading.
10–14: Swing trading.
Participation Slow (prp_slow_len, default 21): Slow ATR for baseline volatility.
Should be 2–4x fast ATR.
Default (21): Works with fast=7.
⚡ Signal Configuration
Resonance Window (res_z_window, default 50): Z-score lookback for resonance normalization.
20–30: More reactive.
50: Medium-term.
100+: Very stable.
Primary Threshold (rrf_threshold, default 1.5): Z-score level for “Active” resonance.
1.0–1.5: More signals.
1.5: Balanced.
2.0+: Only strong signals.
Extreme Threshold (rrf_extreme, default 2.5): Z-score for “Extreme” resonance.
2.5: Major regime shifts.
3.0+: Only the most extreme.
Regime Window (regime_window, default 100): Lookback for regime strength (% of bars with resonance spikes).
Higher: More context, slower.
Lower: Adapts quickly.
🎨 Visual Settings
Show Resonance Flow (show_flow, default true): Plots the main resonance line with glow effects.
Show Signal Particles (show_particles, default true): Circular markers at active/extreme resonance points.
Show Energy Field (show_energy, default true): Background color based on resonance energy.
Show Info Dashboard (show_dashboard, default true): Status panel with resonance metrics.
Show Trading Guide (show_guide, default true): On-chart quick reference for interpreting signals.
Color Mode (color_mode, default "Spectrum"): Visual theme for all elements.
“Spectrum”: Cyan→Magenta (high contrast)
“Heat”: Yellow→Red (heat map)
“Ocean”: Blue gradients (easy on eyes)
“Plasma”: Orange→Purple (vibrant)
Color Schemes
Dynamic color gradients are used for all plots and backgrounds, adapting to both resonance intensity and direction:
Spectrum: Cyan/Magenta for bullish/bearish resonance.
Heat: Yellow/Red for bullish, Blue/Purple for bearish.
Ocean: Blue gradients for both directions.
Plasma: Orange/Purple for high-energy states.
Glow and aura effects: The resonance line is layered with multiple glows for depth and signal strength.
Background energy field: Darker = higher energy = stronger reflexivity.
Visual Logic
Main Resonance Line: Shows the smoothed resonance value, color-coded by direction and intensity.
Glow/Aura: Multiple layers for visual depth and to highlight strong signals.
Threshold Zones: Dotted lines and filled areas mark “Active” and “Extreme” resonance zones.
Signal Particles: Circular markers at each “Active” (primary threshold) and “Extreme” (extreme threshold) event.
Dashboard: Top-right panel shows current status (Dormant, Building, Active, Extreme), resonance value, energy %, and regime strength.
Trading Guide: Bottom-right panel explains all states and how to interpret them.
How to Use RRF – Quantum Flow
Dormant (💤): Market is in equilibrium. Wait for resonance to build.
Building (🌊): Resonance is rising but below threshold. Prepare for a move.
Active (🔥): Resonance exceeds primary threshold. Reflexivity is significant—consider entries or exits.
Extreme (⚡): Resonance exceeds extreme threshold. Major regime shift likely—watch for trend acceleration or reversal.
Energy >70%: High conviction, crowd is acting in unison.
Above 0: Bullish reflexivity (positive feedback).
Below 0: Bearish reflexivity (negative feedback).
Regime Strength: % of bars in “Active” state—higher = more persistent regime.
Tips:
- Use lower lookbacks for scalping, higher for swing trading.
- Combine with price action or your own system for confirmation.
- Works on all assets and timeframes—tune to your style.
Alerts
RRF Activation: Resonance crosses above primary threshold.
RRF Extreme: Resonance crosses above extreme threshold.
RRF Deactivation: Resonance falls below primary threshold.
Originality & Usefulness
RRF – Quantum Flow is not a mashup of existing indicators. It is a novel oscillator that models the feedback loop between perception and participation, then quantifies and visualizes the resulting resonance. The multi-layered color logic, energy field, and regime strength dashboard are unique to this script. It is designed for anticipation, not confirmation—helping you see regime shifts before they are obvious in price.
Chart Info
Script Name: Reflexivity Resonance Factor (RRF) – Quantum Flow
Recommended Use: Any asset, any timeframe. Tune parameters to your style.
Disclaimer
This script is for research and educational purposes only. It does not provide financial advice or direct buy/sell signals. Always use proper risk management and combine with your own strategy. Past performance is not indicative of future results.
Trade with insight. Trade with anticipation.
— Dskyz, for DAFE Trading Systems
See the Feedback Loops. Anticipate the Regime Shift.
What is the RRF – Quantum Flow?
The Reflexivity Resonance Factor (RRF) – Quantum Flow is a next-generation market regime detector and energy oscillator, inspired by George Soros’ theory of reflexivity and modern complexity science. It is designed for traders who want to visualize the hidden feedback loops between market perception and participation, and to anticipate explosive regime shifts before they unfold.
Unlike traditional oscillators, RRF does not just measure price momentum or volatility. Instead, it models the dynamic feedback between how the market perceives itself (perception) and how it acts on that perception (participation). When these feedback loops synchronize, they create “resonance” – a state of amplified reflexivity that often precedes major market moves.
Theoretical Foundation
Reflexivity: Markets are not just driven by external information, but by participants’ perceptions and their actions, which in turn influence future perceptions. This feedback loop can create self-reinforcing trends or sudden reversals.
Resonance: When perception and participation align and reinforce each other, the market enters a high-energy, reflexive state. These “resonance” events often mark the start of new trends or the climax of existing ones.
Energy Field: The indicator quantifies the “energy” of the market’s reflexivity, allowing you to see when the crowd is about to act in unison.
How RRF – Quantum Flow Works
Perception Proxy: Measures the rate of change in price (ROC) over a configurable period, then smooths it with an EMA. This models how quickly the market’s collective perception is shifting.
Participation Proxy: Uses a fast/slow ATR ratio to gauge the intensity of market participation (volatility expansion/contraction).
Reflexivity Core: Multiplies perception and participation to model the feedback loop.
Resonance Detection: Applies Z-score normalization to the absolute value of reflexivity, highlighting when current feedback is unusually strong compared to recent history.
Energy Calculation: Scales resonance to a 0–100 “energy” value, visualized as a dynamic background.
Regime Strength: Tracks the percentage of bars in a lookback window where resonance exceeded the threshold, quantifying the persistence of reflexive regimes.
Inputs:
🧬 Core Parameters
Perception Period (pp_roc_len, default 14): Lookback for price ROC.
Lower (5–10): More sensitive, for scalping (1–5min).
Default (14): Balanced, for 15min–1hr.
Higher (20–30): Smoother, for 4hr–daily.
Perception Smooth (pp_smooth_len, default 7): EMA smoothing for perception.
Lower (3–5): Faster, more detail.
Default (7): Balanced.
Higher (10–15): Smoother, less noise.
Participation Fast (prp_fast_len, default 7): Fast ATR for immediate volatility.
5–7: Scalping.
7–10: Day trading.
10–14: Swing trading.
Participation Slow (prp_slow_len, default 21): Slow ATR for baseline volatility.
Should be 2–4x fast ATR.
Default (21): Works with fast=7.
⚡ Signal Configuration
Resonance Window (res_z_window, default 50): Z-score lookback for resonance normalization.
20–30: More reactive.
50: Medium-term.
100+: Very stable.
Primary Threshold (rrf_threshold, default 1.5): Z-score level for “Active” resonance.
1.0–1.5: More signals.
1.5: Balanced.
2.0+: Only strong signals.
Extreme Threshold (rrf_extreme, default 2.5): Z-score for “Extreme” resonance.
2.5: Major regime shifts.
3.0+: Only the most extreme.
Regime Window (regime_window, default 100): Lookback for regime strength (% of bars with resonance spikes).
Higher: More context, slower.
Lower: Adapts quickly.
🎨 Visual Settings
Show Resonance Flow (show_flow, default true): Plots the main resonance line with glow effects.
Show Signal Particles (show_particles, default true): Circular markers at active/extreme resonance points.
Show Energy Field (show_energy, default true): Background color based on resonance energy.
Show Info Dashboard (show_dashboard, default true): Status panel with resonance metrics.
Show Trading Guide (show_guide, default true): On-chart quick reference for interpreting signals.
Color Mode (color_mode, default "Spectrum"): Visual theme for all elements.
“Spectrum”: Cyan→Magenta (high contrast)
“Heat”: Yellow→Red (heat map)
“Ocean”: Blue gradients (easy on eyes)
“Plasma”: Orange→Purple (vibrant)
Color Schemes
Dynamic color gradients are used for all plots and backgrounds, adapting to both resonance intensity and direction:
Spectrum: Cyan/Magenta for bullish/bearish resonance.
Heat: Yellow/Red for bullish, Blue/Purple for bearish.
Ocean: Blue gradients for both directions.
Plasma: Orange/Purple for high-energy states.
Glow and aura effects: The resonance line is layered with multiple glows for depth and signal strength.
Background energy field: Darker = higher energy = stronger reflexivity.
Visual Logic
Main Resonance Line: Shows the smoothed resonance value, color-coded by direction and intensity.
Glow/Aura: Multiple layers for visual depth and to highlight strong signals.
Threshold Zones: Dotted lines and filled areas mark “Active” and “Extreme” resonance zones.
Signal Particles: Circular markers at each “Active” (primary threshold) and “Extreme” (extreme threshold) event.
Dashboard: Top-right panel shows current status (Dormant, Building, Active, Extreme), resonance value, energy %, and regime strength.
Trading Guide: Bottom-right panel explains all states and how to interpret them.
How to Use RRF – Quantum Flow
Dormant (💤): Market is in equilibrium. Wait for resonance to build.
Building (🌊): Resonance is rising but below threshold. Prepare for a move.
Active (🔥): Resonance exceeds primary threshold. Reflexivity is significant—consider entries or exits.
Extreme (⚡): Resonance exceeds extreme threshold. Major regime shift likely—watch for trend acceleration or reversal.
Energy >70%: High conviction, crowd is acting in unison.
Above 0: Bullish reflexivity (positive feedback).
Below 0: Bearish reflexivity (negative feedback).
Regime Strength: % of bars in “Active” state—higher = more persistent regime.
Tips:
- Use lower lookbacks for scalping, higher for swing trading.
- Combine with price action or your own system for confirmation.
- Works on all assets and timeframes—tune to your style.
Alerts
RRF Activation: Resonance crosses above primary threshold.
RRF Extreme: Resonance crosses above extreme threshold.
RRF Deactivation: Resonance falls below primary threshold.
Originality & Usefulness
RRF – Quantum Flow is not a mashup of existing indicators. It is a novel oscillator that models the feedback loop between perception and participation, then quantifies and visualizes the resulting resonance. The multi-layered color logic, energy field, and regime strength dashboard are unique to this script. It is designed for anticipation, not confirmation—helping you see regime shifts before they are obvious in price.
Chart Info
Script Name: Reflexivity Resonance Factor (RRF) – Quantum Flow
Recommended Use: Any asset, any timeframe. Tune parameters to your style.
Disclaimer
This script is for research and educational purposes only. It does not provide financial advice or direct buy/sell signals. Always use proper risk management and combine with your own strategy. Past performance is not indicative of future results.
Trade with insight. Trade with anticipation.
— Dskyz, for DAFE Trading Systems
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Empowering everyday traders | DAFE Trading Systems
DAFETradingSystems.com
DAFETradingSystems.com
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Empowering everyday traders | DAFE Trading Systems
DAFETradingSystems.com
DAFETradingSystems.com
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。