LONG TERM INVESTMENT TECHNICAL STRATEGY SCRIPT200 - WEEKLY MOVING AVERAGE
GREEN LINE IS 200 WEEKS MOVING AVERAGE OF CLOSE
BLUE LINE IS 200 WEEKS MOVING AVERAGE OF LOW MULTIPLIED BY 0.90
RED LINE IS 100 WEEKS MOVING AVERAGE OF CLOSE
CONDITION: GREEN LINE SHOULD BE ABOVE RED LINE AND PRICE SHOULD BE ABOVE GREEN LINE
BUY ONCE THE PRICE IS ABOVE GREEN LINE AND FULFILLS THE CONDITION.
TARGET 1 FOR TIME FRAME 1 YEAR= 2 X GREEN LINE VALUE WHEN PRICE CROSSED IT
TARGET 2 FOR TIME FRAME 3 YEARS= 3 X GREEN LINE VALUE WHEN PRICE CROSSED IT
TARGET 3 FOR TIME FRAME 5 YEARS= 5 X GREEN LINE VALUE WHEN PRICE CROSSED IT
TARGET 4 FOR TIME FRAME 10 YEARS= 10 X GREEN LINE VALUE WHEN PRICE CROSSED IT
STOP LOSS IS TRAILING TO BLUE LINE
Buscar en scripts para "200亿美元是多少人民币"
200 SMA with EMA Ribbon (Custom Colors)Simple Moving Average with the longer- time based line analyzing both shorter and longer trends
200 SMA (5%/-3% Buffer) for SPY & QQQ In my testing TQQQ is an absolute monster of an ETF that performs extremely well even from a buy and hold standpoint over long periods of time, its largest drawback is the massive drawdown exposure that it faces which can be easily sidestepped with this strategy.
This strategy is meant to basically abuse TQQQ's insane outperformance while augmenting the typical 200SMA strategy in a way that uses all of its strengths while avoiding getting whipsawed in sideways markets.
The strategy BUYS when price crosses 5% over the 200SMA and then SELLS when price drops 3% below the 200SMA. Between trades I'll be parking my entire account in SGOV.
So maximizing profit while minimizing risk.
You use the strategy based off of QQQ and then make the trades on TQQQ when it tells you to BUY/SELL.
Here are some reasons why I will be using this strategy:
Simple emotionless BUY and SELL signals where I don't care who the president is, what is happening in the world, who is bombing who, who the leadership team is, no attachment to individual companies and diversified across the NASDAQ.
~85% win percentage and when it does lose the loses are nothing compared to the wins and after a loss you're basically set up for a massive win in the next trade.
Max drawdown of around 53% when using TQQQ
You benefit massively when the market is doing well and when there is a recession you basically sit in SGOV for a year and then are set up for a monster recovery with a clear easy BUY signal. So as long as you're patient you win regardless of what happens.
The trades are often very long term resulting in you taking advantage of Long Term Capital Gains tax advantage which could mean saving up to 15-20% in taxes.
With only a few trades you can spend time doing other stuff and don't have to track or pay attention to anything that is happening.
Simple, easy, and massively profitable.
200 Week Moving Average HeatmapСolors part of the SMA depending on the change in % (delta %) to the previous value. From blue(none to low increase) through green(moderate increase) to red(high increase).
200/150
This a variation to my 120/60 Trend Model for the daily chart on Bitcoin, which has quite reliably been determining the over all trend as well as low risk entries within a longer term trend. It's a combination of 150 & 220 SMA, used on the 1D chart. Once price closes below both SMAs trend is an early bearish signal, while the SMAs flipping to red is later but more reliable bearish signal. For bullish trend it is the same thing just the opposite. Once the "cloud" switches red trend is bearish while once it switches green it's bullish.
Bitcoin tends to get rejected by the cloud during bullish and bearish trends. Once Bitcoin pushes through the cloud the trend will typically reverse.
Bitcoin trading within or close to the cloud is generally a good long or short entries, depending on the color of the cloud (red: short & green: long).
Daily Moving Averages (EMAs + SMAs) to Intraday Chart200 SMA, 100 SMA, 50 EMA, and 20 EMA daily averages to intraday chart
Multi-Timeframe EMA & SMA Scanner - Price Level LabelsOverview
A powerful multi-timeframe moving average scanner that displays EMA and SMA levels from up to 8 different timeframes simultaneously on your chart. Perfect for identifying key support/resistance levels, confluence zones, and multi-timeframe trend analysis.
Key Features
📊 Multi-Timeframe Analysis
Monitor up to 8 different timeframes simultaneously (5m, 10m, 15m, 30m, 1H, 4H, 1D, 1W)
Each timeframe can be independently enabled/disabled
Fully customizable timeframe selection
📈 Comprehensive Moving Averages
5 configurable EMA periods (default: 8, 21, 50, 100, 200)
2 configurable SMA periods (default: 200, 400)
All periods are fully customizable to match your trading strategy
🎯 Smart Price Level Labels
Labels positioned at actual price levels (not in a list)
Color-coded labels for easy identification
Dynamic text color: Green when price is above, Red when below
Compact notation: E8-5m means EMA 8 on 5-minute timeframe
Adjustable label offset from current price
📉 Optional Horizontal Lines
Dotted reference lines at each MA level
Color-matched to corresponding MA type
Can be toggled on/off independently
📋 Comprehensive Data Table
Shows all MA values organized by timeframe
Displays percentage distance from current price
Trend indicator (Strong Up/Up/Neutral/Down/Strong Down)
EMA alignment status (Bullish/Bearish/Mixed)
Color-coded cells for quick visual analysis
🎨 Full Customization
Individual color settings for each MA type
Adjustable table size (Tiny/Small/Normal/Large)
Choose table position (Left/Right)
Toggle any MA or timeframe on/off
🔔 Built-in Alerts
Golden Cross detection (EMA 50 crosses above EMA 200)
Death Cross detection (EMA 50 crosses below EMA 200)
Price crossing major EMAs
Available for multiple timeframes
How to Use
For Day Traders:
Enable lower timeframes (5m, 10m, 15m, 30m)
Focus on faster EMAs (8, 21, 50)
Watch for confluence zones where multiple timeframe MAs cluster
For Swing Traders:
Enable higher timeframes (1H, 4H, 1D)
Use all EMAs plus SMAs for broader perspective
Look for alignment across timeframes for high-probability setups
For Position Traders:
Focus on daily and weekly timeframes
Emphasize 100, 200 EMAs and 200, 400 SMAs
Use for long-term trend confirmation
Understanding the Labels
Label Format: E8-5m 45250.50
E8 = EMA with period 8
5m = 5-minute timeframe
45250.50 = Current price level
Green text = Price is currently above this level (potential support)
Red text = Price is currently below this level (potential resistance)
For SMAs: S200-1D 44500.00
S200 = SMA with period 200
1D = Daily timeframe
Trading Applications
Support/Resistance Identification
MAs act as dynamic support and resistance levels
Multiple timeframe MAs create stronger zones
Confluence Trading
When multiple MAs from different timeframes cluster together, it creates high-probability zones
These areas often result in strong reactions
Trend Analysis
Check the Alignment column: Bullish alignment = all EMAs in ascending order
Trend column shows overall price position relative to all MAs
Entry/Exit Timing
Use lower timeframe MAs for precise entries
Use higher timeframe MAs for trend direction and exits
Settings Guide
Timeframes Section:
Select and enable/disable up to 8 timeframes
Default: 5m, 10m, 15m, 30m, 1H, 4H, 1D, 1W
MA Periods Section:
Customize all EMA and SMA periods
Default EMAs: 8, 21, 50, 100, 200
Default SMAs: 200, 400
Display Section:
Toggle price labels and horizontal lines
Adjust label offset (distance from right edge)
Show/hide data table
Choose table position and size
Colors Section:
Customize colors for each MA type
Each MA has independent color control
Pro Tips
✅ Start with default settings and adjust based on your trading style
✅ Disable timeframes/MAs you don't use to reduce chart clutter
✅ Use the data table for quick overview, labels for precise levels
✅ Look for "confluence clusters" where multiple MAs from different timeframes align
✅ Green labels = potential support, Red labels = potential resistance
✅ Set alerts on key crossovers for automated notifications
Technical Specifications
Pine Script v6
Overlay indicator (displays on main chart)
Maximum 500 labels supported
Real-time updates on each bar close
Compatible with all instruments and timeframes
Perfect For:
Day traders seeking multi-timeframe confirmation
Swing traders looking for high-probability setups
Position traders monitoring long-term trends
Anyone using moving averages as part of their strategy
Note: This indicator does not provide buy/sell signals. It's a tool for analysis and should be used in conjunction with your trading strategy and risk management rules.
paigep.llc - SuperMASuperMA is a multi-layered moving-average and candle-coloring system that combines SMA, EMA, and optional HMA logic to help traders visualize trend shifts, pullbacks, and momentum changes in a clean, structured way.
The script includes multiple modules: trend-based moving averages, pullback signals, exit logic, and an optional HMA cross engine.
📌 Core Features
1. Full SMA + EMA Framework
The indicator plots multiple moving averages (8, 9, 13, 20, 50, 200) using both SMA and EMA calculations. Each line automatically colors bullish or bearish based on its relationship to the 200-period baseline.Users can toggle SMAs and EMAs independently for clearer chart control.
2. Main Trend Entry & Exit Logic (8×200 and 8×20)
Built-in crossover logic detects:
Main Entry: SMA 8 crossing above/below EMA 200
Main Exit: SMA 8 and SMA 20 cross (with an option to choose which SMA is treated as the “fast” leg)
A “first exit only” option allows the script to ignore additional exit signals until a new trend regime begins.
3. Pullback Module (20 SMA Interaction)
Pullback entries and exits occur when price crosses the 20 SMA during existing trend conditions.
This includes:
Pullback entries through the 20 SMA
Pullback exits back across the 20 SMA
Labels and candle colors are available for all pullback events.
4. Optional HMA Cross Module
A separate module allows traders to use two Hull Moving Averages (HMA) with customizable:
Lengths
Independent timeframes
Line colors
Cross-based entries and exits
This module has its own events, labels, and optional candle coloring.
5. Advanced Candle Coloring System
Candle coloring is layered in priority order, based on:
Main trend entries
Main exits
HMA entries
HMA exits
Pullback entries
Pullback exits
Trend-only candles (based on SMA 8 relative to EMA 200)
Users may also independently color wicks and borders.
6. Configurable Alerts (Fully Decoupled from Visuals)
Alerts are available for all major events, including:
Main Entries (8×200)
Main Exits (8×20)
Pullback Entries and Exits
HMA Entries and Exits
Bull or Bear Trend candles
Any colored candle event
Alerts can fire on bar close only or intrabar, depending on user preference.
📌 Use Cases
SuperMA helps traders visualize:
Trend direction using SMA/EMA structure
Momentum shifts through HMA crosses
Pullback zones around the 20 SMA
Early regime transitions based on the 8×200 relationship
Candle-level context through color-coded bars
The indicator works across all markets and timeframes.
⚠️ Note
This tool is for visual and analytical assistance only. It does not guarantee future performance and should be combined with additional analysis and risk management.
paigep.llc - SuperMA
SuperMA is a multi-layered moving-average and candle-coloring system that combines SMA, EMA, and optional HMA logic to help traders visualize trend shifts, pullbacks, and momentum changes in a clean, structured way.
The script includes multiple modules: trend-based moving averages, pullback signals, exit logic, and an optional HMA cross engine.
📌 Core Features
1. Full SMA + EMA Framework
The indicator plots multiple moving averages (8, 9, 13, 20, 50, 200) using both SMA and EMA calculations. Each line automatically colors bullish or bearish based on its relationship to the 200-period baseline. Users can toggle SMAs and EMAs independently for clearer chart control.
2. Main Trend Entry & Exit Logic (8×200 and 8×20)
Built-in crossover logic detects:
Main Entry: SMA 8 crossing above/below EMA 200
Main Exit: SMA 8 and SMA 20 cross (with an option to choose which SMA is treated as the “fast” leg)
A “first exit only” option allows the script to ignore additional exit signals until a new trend regime begins.
3. Pullback Module (20 SMA Interaction)
Pullback entries and exits occur when price crosses the 20 SMA during existing trend conditions.
This includes:
Pullback entries through the 20 SMA
Pullback exits back across the 20 SMA
Labels and candle colors are available for all pullback events.
4. Optional HMA Cross Module
A separate module allows traders to use two Hull Moving Averages (HMA) with customizable:
Lengths
Independent timeframes
Line colors
Cross-based entries and exits
This module has its own events, labels, and optional candle coloring.
5. Advanced Candle Coloring System
Candle coloring is layered in priority order, based on:
Main trend entries
Main exits
HMA entries
HMA exits
Pullback entries
Pullback exits
Trend-only candles (based on SMA 8 relative to EMA 200)
Users may also independently color wicks and borders.
6. Configurable Alerts (Fully Decoupled from Visuals)
Alerts are available for all major events, including:
Main Entries (8×200)
Main Exits (8×20)
Pullback Entries and Exits
HMA Entries and Exits
Bull or Bear Trend candles
Any colored candle event
Alerts can fire on bar close only or intrabar, depending on user preference.
Use Cases
SuperMA helps traders visualize:
Trend direction using SMA/EMA structure
Momentum shifts through HMA crosses
Pullback zones around the 20 SMA
Early regime transitions based on the 8×200 relationship
Candle-level context through color-coded bars
The indicator works across all markets and timeframes.
⚠️ Note
This tool is for visual and analytical assistance only. It does not guarantee future performance and should be combined with additional analysis and risk management.
Dimensional Resonance ProtocolDimensional Resonance Protocol
🌀 CORE INNOVATION: PHASE SPACE RECONSTRUCTION & EMERGENCE DETECTION
The Dimensional Resonance Protocol represents a paradigm shift from traditional technical analysis to complexity science. Rather than measuring price levels or indicator crossovers, DRP reconstructs the hidden attractor governing market dynamics using Takens' embedding theorem, then detects emergence —the rare moments when multiple dimensions of market behavior spontaneously synchronize into coherent, predictable states.
The Complexity Hypothesis:
Markets are not simple oscillators or random walks—they are complex adaptive systems existing in high-dimensional phase space. Traditional indicators see only shadows (one-dimensional projections) of this higher-dimensional reality. DRP reconstructs the full phase space using time-delay embedding, revealing the true structure of market dynamics.
Takens' Embedding Theorem (1981):
A profound mathematical result from dynamical systems theory: Given a time series from a complex system, we can reconstruct its full phase space by creating delayed copies of the observation.
Mathematical Foundation:
From single observable x(t), create embedding vectors:
X(t) =
Where:
• d = Embedding dimension (default 5)
• τ = Time delay (default 3 bars)
• x(t) = Price or return at time t
Key Insight: If d ≥ 2D+1 (where D is the true attractor dimension), this embedding is topologically equivalent to the actual system dynamics. We've reconstructed the hidden attractor from a single price series.
Why This Matters:
Markets appear random in one dimension (price chart). But in reconstructed phase space, structure emerges—attractors, limit cycles, strange attractors. When we identify these structures, we can detect:
• Stable regions : Predictable behavior (trade opportunities)
• Chaotic regions : Unpredictable behavior (avoid trading)
• Critical transitions : Phase changes between regimes
Phase Space Magnitude Calculation:
phase_magnitude = sqrt(Σ ² for i = 0 to d-1)
This measures the "energy" or "momentum" of the market trajectory through phase space. High magnitude = strong directional move. Low magnitude = consolidation.
📊 RECURRENCE QUANTIFICATION ANALYSIS (RQA)
Once phase space is reconstructed, we analyze its recurrence structure —when does the system return near previous states?
Recurrence Plot Foundation:
A recurrence occurs when two phase space points are closer than threshold ε:
R(i,j) = 1 if ||X(i) - X(j)|| < ε, else 0
This creates a binary matrix showing when the system revisits similar states.
Key RQA Metrics:
1. Recurrence Rate (RR):
RR = (Number of recurrent points) / (Total possible pairs)
• RR near 0: System never repeats (highly stochastic)
• RR = 0.1-0.3: Moderate recurrence (tradeable patterns)
• RR > 0.5: System stuck in attractor (ranging market)
• RR near 1: System frozen (no dynamics)
Interpretation: Moderate recurrence is optimal —patterns exist but market isn't stuck.
2. Determinism (DET):
Measures what fraction of recurrences form diagonal structures in the recurrence plot. Diagonals indicate deterministic evolution (trajectory follows predictable paths).
DET = (Recurrence points on diagonals) / (Total recurrence points)
• DET < 0.3: Random dynamics
• DET = 0.3-0.7: Moderate determinism (patterns with noise)
• DET > 0.7: Strong determinism (technical patterns reliable)
Trading Implication: Signals are prioritized when DET > 0.3 (deterministic state) and RR is moderate (not stuck).
Threshold Selection (ε):
Default ε = 0.10 × std_dev means two states are "recurrent" if within 10% of a standard deviation. This is tight enough to require genuine similarity but loose enough to find patterns.
🔬 PERMUTATION ENTROPY: COMPLEXITY MEASUREMENT
Permutation entropy measures the complexity of a time series by analyzing the distribution of ordinal patterns.
Algorithm (Bandt & Pompe, 2002):
1. Take overlapping windows of length n (default n=4)
2. For each window, record the rank order pattern
Example: → pattern (ranks from lowest to highest)
3. Count frequency of each possible pattern
4. Calculate Shannon entropy of pattern distribution
Mathematical Formula:
H_perm = -Σ p(π) · ln(p(π))
Where π ranges over all n! possible permutations, p(π) is the probability of pattern π.
Normalized to :
H_norm = H_perm / ln(n!)
Interpretation:
• H < 0.3 : Very ordered, crystalline structure (strong trending)
• H = 0.3-0.5 : Ordered regime (tradeable with patterns)
• H = 0.5-0.7 : Moderate complexity (mixed conditions)
• H = 0.7-0.85 : Complex dynamics (challenging to trade)
• H > 0.85 : Maximum entropy (nearly random, avoid)
Entropy Regime Classification:
DRP classifies markets into five entropy regimes:
• CRYSTALLINE (H < 0.3): Maximum order, persistent trends
• ORDERED (H < 0.5): Clear patterns, momentum strategies work
• MODERATE (H < 0.7): Mixed dynamics, adaptive required
• COMPLEX (H < 0.85): High entropy, mean reversion better
• CHAOTIC (H ≥ 0.85): Near-random, minimize trading
Why Permutation Entropy?
Unlike traditional entropy methods requiring binning continuous data (losing information), permutation entropy:
• Works directly on time series
• Robust to monotonic transformations
• Computationally efficient
• Captures temporal structure, not just distribution
• Immune to outliers (uses ranks, not values)
⚡ LYAPUNOV EXPONENT: CHAOS vs STABILITY
The Lyapunov exponent λ measures sensitivity to initial conditions —the hallmark of chaos.
Physical Meaning:
Two trajectories starting infinitely close will diverge at exponential rate e^(λt):
Distance(t) ≈ Distance(0) × e^(λt)
Interpretation:
• λ > 0 : Positive Lyapunov exponent = CHAOS
- Small errors grow exponentially
- Long-term prediction impossible
- System is sensitive, unpredictable
- AVOID TRADING
• λ ≈ 0 : Near-zero = CRITICAL STATE
- Edge of chaos
- Transition zone between order and disorder
- Moderate predictability
- PROCEED WITH CAUTION
• λ < 0 : Negative Lyapunov exponent = STABLE
- Small errors decay
- Trajectories converge
- System is predictable
- OPTIMAL FOR TRADING
Estimation Method:
DRP estimates λ by tracking how quickly nearby states diverge over a rolling window (default 20 bars):
For each bar i in window:
δ₀ = |x - x | (initial separation)
δ₁ = |x - x | (previous separation)
if δ₁ > 0:
ratio = δ₀ / δ₁
log_ratios += ln(ratio)
λ ≈ average(log_ratios)
Stability Classification:
• STABLE : λ < 0 (negative growth rate)
• CRITICAL : |λ| < 0.1 (near neutral)
• CHAOTIC : λ > 0.2 (strong positive growth)
Signal Filtering:
By default, NEXUS requires λ < 0 (stable regime) for signal confirmation. This filters out trades during chaotic periods when technical patterns break down.
📐 HIGUCHI FRACTAL DIMENSION
Fractal dimension measures self-similarity and complexity of the price trajectory.
Theoretical Background:
A curve's fractal dimension D ranges from 1 (smooth line) to 2 (space-filling curve):
• D ≈ 1.0 : Smooth, persistent trending
• D ≈ 1.5 : Random walk (Brownian motion)
• D ≈ 2.0 : Highly irregular, space-filling
Higuchi Method (1988):
For a time series of length N, construct k different curves by taking every k-th point:
L(k) = (1/k) × Σ|x - x | × (N-1)/(⌊(N-m)/k⌋ × k)
For different values of k (1 to k_max), calculate L(k). The fractal dimension is the slope of log(L(k)) vs log(1/k):
D = slope of log(L) vs log(1/k)
Market Interpretation:
• D < 1.35 : Strong trending, persistent (Hurst > 0.5)
- TRENDING regime
- Momentum strategies favored
- Breakouts likely to continue
• D = 1.35-1.45 : Moderate persistence
- PERSISTENT regime
- Trend-following with caution
- Patterns have meaning
• D = 1.45-1.55 : Random walk territory
- RANDOM regime
- Efficiency hypothesis holds
- Technical analysis least reliable
• D = 1.55-1.65 : Anti-persistent (mean-reverting)
- ANTI-PERSISTENT regime
- Oscillator strategies work
- Overbought/oversold meaningful
• D > 1.65 : Highly complex, choppy
- COMPLEX regime
- Avoid directional bets
- Wait for regime change
Signal Filtering:
Resonance signals (secondary signal type) require D < 1.5, indicating trending or persistent dynamics where momentum has meaning.
🔗 TRANSFER ENTROPY: CAUSAL INFORMATION FLOW
Transfer entropy measures directed causal influence between time series—not just correlation, but actual information transfer.
Schreiber's Definition (2000):
Transfer entropy from X to Y measures how much knowing X's past reduces uncertainty about Y's future:
TE(X→Y) = H(Y_future | Y_past) - H(Y_future | Y_past, X_past)
Where H is Shannon entropy.
Key Properties:
1. Directional : TE(X→Y) ≠ TE(Y→X) in general
2. Non-linear : Detects complex causal relationships
3. Model-free : No assumptions about functional form
4. Lag-independent : Captures delayed causal effects
Three Causal Flows Measured:
1. Volume → Price (TE_V→P):
Measures how much volume patterns predict price changes.
• TE > 0 : Volume provides predictive information about price
- Institutional participation driving moves
- Volume confirms direction
- High reliability
• TE ≈ 0 : No causal flow (weak volume/price relationship)
- Volume uninformative
- Caution on signals
• TE < 0 (rare): Suggests price leading volume
- Potentially manipulated or thin market
2. Volatility → Momentum (TE_σ→M):
Does volatility expansion predict momentum changes?
• Positive TE : Volatility precedes momentum shifts
- Breakout dynamics
- Regime transitions
3. Structure → Price (TE_S→P):
Do support/resistance patterns causally influence price?
• Positive TE : Structural levels have causal impact
- Technical levels matter
- Market respects structure
Net Causal Flow:
Net_Flow = TE_V→P + 0.5·TE_σ→M + TE_S→P
• Net > +0.1 : Bullish causal structure
• Net < -0.1 : Bearish causal structure
• |Net| < 0.1 : Neutral/unclear causation
Causal Gate:
For signal confirmation, NEXUS requires:
• Buy signals : TE_V→P > 0 AND Net_Flow > 0.05
• Sell signals : TE_V→P > 0 AND Net_Flow < -0.05
This ensures volume is actually driving price (causal support exists), not just correlated noise.
Implementation Note:
Computing true transfer entropy requires discretizing continuous data into bins (default 6 bins) and estimating joint probability distributions. NEXUS uses a hybrid approach combining TE theory with autocorrelation structure and lagged cross-correlation to approximate information transfer in computationally efficient manner.
🌊 HILBERT PHASE COHERENCE
Phase coherence measures synchronization across market dimensions using Hilbert transform analysis.
Hilbert Transform Theory:
For a signal x(t), the Hilbert transform H (t) creates an analytic signal:
z(t) = x(t) + i·H (t) = A(t)·e^(iφ(t))
Where:
• A(t) = Instantaneous amplitude
• φ(t) = Instantaneous phase
Instantaneous Phase:
φ(t) = arctan(H (t) / x(t))
The phase represents where the signal is in its natural cycle—analogous to position on a unit circle.
Four Dimensions Analyzed:
1. Momentum Phase : Phase of price rate-of-change
2. Volume Phase : Phase of volume intensity
3. Volatility Phase : Phase of ATR cycles
4. Structure Phase : Phase of position within range
Phase Locking Value (PLV):
For two signals with phases φ₁(t) and φ₂(t), PLV measures phase synchronization:
PLV = |⟨e^(i(φ₁(t) - φ₂(t)))⟩|
Where ⟨·⟩ is time average over window.
Interpretation:
• PLV = 0 : Completely random phase relationship (no synchronization)
• PLV = 0.5 : Moderate phase locking
• PLV = 1 : Perfect synchronization (phases locked)
Pairwise PLV Calculations:
• PLV_momentum-volume : Are momentum and volume cycles synchronized?
• PLV_momentum-structure : Are momentum cycles aligned with structure?
• PLV_volume-structure : Are volume and structural patterns in phase?
Overall Phase Coherence:
Coherence = (PLV_mom-vol + PLV_mom-struct + PLV_vol-struct) / 3
Signal Confirmation:
Emergence signals require coherence ≥ threshold (default 0.70):
• Below 0.70: Dimensions not synchronized, no coherent market state
• Above 0.70: Dimensions in phase, coherent behavior emerging
Coherence Direction:
The summed phase angles indicate whether synchronized dimensions point bullish or bearish:
Direction = sin(φ_momentum) + 0.5·sin(φ_volume) + 0.5·sin(φ_structure)
• Direction > 0 : Phases pointing upward (bullish synchronization)
• Direction < 0 : Phases pointing downward (bearish synchronization)
🌀 EMERGENCE SCORE: MULTI-DIMENSIONAL ALIGNMENT
The emergence score aggregates all complexity metrics into a single 0-1 value representing market coherence.
Eight Components with Weights:
1. Phase Coherence (20%):
Direct contribution: coherence × 0.20
Measures dimensional synchronization.
2. Entropy Regime (15%):
Contribution: (0.6 - H_perm) / 0.6 × 0.15 if H < 0.6, else 0
Rewards low entropy (ordered, predictable states).
3. Lyapunov Stability (12%):
• λ < 0 (stable): +0.12
• |λ| < 0.1 (critical): +0.08
• λ > 0.2 (chaotic): +0.0
Requires stable, predictable dynamics.
4. Fractal Dimension Trending (12%):
Contribution: (1.45 - D) / 0.45 × 0.12 if D < 1.45, else 0
Rewards trending fractal structure (D < 1.45).
5. Dimensional Resonance (12%):
Contribution: |dimensional_resonance| × 0.12
Measures alignment across momentum, volume, structure, volatility dimensions.
6. Causal Flow Strength (9%):
Contribution: |net_causal_flow| × 0.09
Rewards strong causal relationships.
7. Phase Space Embedding (10%):
Contribution: min(|phase_magnitude_norm|, 3.0) / 3.0 × 0.10 if |magnitude| > 1.0
Rewards strong trajectory in reconstructed phase space.
8. Recurrence Quality (10%):
Contribution: determinism × 0.10 if DET > 0.3 AND 0.1 < RR < 0.8
Rewards deterministic patterns with moderate recurrence.
Total Emergence Score:
E = Σ(components) ∈
Capped at 1.0 maximum.
Emergence Direction:
Separate calculation determining bullish vs bearish:
• Dimensional resonance sign
• Net causal flow sign
• Phase magnitude correlation with momentum
Signal Threshold:
Default emergence_threshold = 0.75 means 75% of maximum possible emergence score required to trigger signals.
Why Emergence Matters:
Traditional indicators measure single dimensions. Emergence detects self-organization —when multiple independent dimensions spontaneously align. This is the market equivalent of a phase transition in physics, where microscopic chaos gives way to macroscopic order.
These are the highest-probability trade opportunities because the entire system is resonating in the same direction.
🎯 SIGNAL GENERATION: EMERGENCE vs RESONANCE
DRP generates two tiers of signals with different requirements:
TIER 1: EMERGENCE SIGNALS (Primary)
Requirements:
1. Emergence score ≥ threshold (default 0.75)
2. Phase coherence ≥ threshold (default 0.70)
3. Emergence direction > 0.2 (bullish) or < -0.2 (bearish)
4. Causal gate passed (if enabled): TE_V→P > 0 and net_flow confirms direction
5. Stability zone (if enabled): λ < 0 or |λ| < 0.1
6. Price confirmation: Close > open (bulls) or close < open (bears)
7. Cooldown satisfied: bars_since_signal ≥ cooldown_period
EMERGENCE BUY:
• All above conditions met with bullish direction
• Market has achieved coherent bullish state
• Multiple dimensions synchronized upward
EMERGENCE SELL:
• All above conditions met with bearish direction
• Market has achieved coherent bearish state
• Multiple dimensions synchronized downward
Premium Emergence:
When signal_quality (emergence_score × phase_coherence) > 0.7:
• Displayed as ★ star symbol
• Highest conviction trades
• Maximum dimensional alignment
Standard Emergence:
When signal_quality 0.5-0.7:
• Displayed as ◆ diamond symbol
• Strong signals but not perfect alignment
TIER 2: RESONANCE SIGNALS (Secondary)
Requirements:
1. Dimensional resonance > +0.6 (bullish) or < -0.6 (bearish)
2. Fractal dimension < 1.5 (trending/persistent regime)
3. Price confirmation matches direction
4. NOT in chaotic regime (λ < 0.2)
5. Cooldown satisfied
6. NO emergence signal firing (resonance is fallback)
RESONANCE BUY:
• Dimensional alignment without full emergence
• Trending fractal structure
• Moderate conviction
RESONANCE SELL:
• Dimensional alignment without full emergence
• Bearish resonance with trending structure
• Moderate conviction
Displayed as small ▲/▼ triangles with transparency.
Signal Hierarchy:
IF emergence conditions met:
Fire EMERGENCE signal (★ or ◆)
ELSE IF resonance conditions met:
Fire RESONANCE signal (▲ or ▼)
ELSE:
No signal
Cooldown System:
After any signal fires, cooldown_period (default 5 bars) must elapse before next signal. This prevents signal clustering during persistent conditions.
Cooldown tracks using bar_index:
bars_since_signal = current_bar_index - last_signal_bar_index
cooldown_ok = bars_since_signal >= cooldown_period
🎨 VISUAL SYSTEM: MULTI-LAYER COMPLEXITY
DRP provides rich visual feedback across four distinct layers:
LAYER 1: COHERENCE FIELD (Background)
Colored background intensity based on phase coherence:
• No background : Coherence < 0.5 (incoherent state)
• Faint glow : Coherence 0.5-0.7 (building coherence)
• Stronger glow : Coherence > 0.7 (coherent state)
Color:
• Cyan/teal: Bullish coherence (direction > 0)
• Red/magenta: Bearish coherence (direction < 0)
• Blue: Neutral coherence (direction ≈ 0)
Transparency: 98 minus (coherence_intensity × 10), so higher coherence = more visible.
LAYER 2: STABILITY/CHAOS ZONES
Background color indicating Lyapunov regime:
• Green tint (95% transparent): λ < 0, STABLE zone
- Safe to trade
- Patterns meaningful
• Gold tint (90% transparent): |λ| < 0.1, CRITICAL zone
- Edge of chaos
- Moderate risk
• Red tint (85% transparent): λ > 0.2, CHAOTIC zone
- Avoid trading
- Unpredictable behavior
LAYER 3: DIMENSIONAL RIBBONS
Three EMAs representing dimensional structure:
• Fast ribbon : EMA(8) in cyan/teal (fast dynamics)
• Medium ribbon : EMA(21) in blue (intermediate)
• Slow ribbon : EMA(55) in red/magenta (slow dynamics)
Provides visual reference for multi-scale structure without cluttering with raw phase space data.
LAYER 4: CAUSAL FLOW LINE
A thicker line plotted at EMA(13) colored by net causal flow:
• Cyan/teal : Net_flow > +0.1 (bullish causation)
• Red/magenta : Net_flow < -0.1 (bearish causation)
• Gray : |Net_flow| < 0.1 (neutral causation)
Shows real-time direction of information flow.
EMERGENCE FLASH:
Strong background flash when emergence signals fire:
• Cyan flash for emergence buy
• Red flash for emergence sell
• 80% transparency for visibility without obscuring price
📊 COMPREHENSIVE DASHBOARD
Real-time monitoring of all complexity metrics:
HEADER:
• 🌀 DRP branding with gold accent
CORE METRICS:
EMERGENCE:
• Progress bar (█ filled, ░ empty) showing 0-100%
• Percentage value
• Direction arrow (↗ bull, ↘ bear, → neutral)
• Color-coded: Green/gold if active, gray if low
COHERENCE:
• Progress bar showing phase locking value
• Percentage value
• Checkmark ✓ if ≥ threshold, circle ○ if below
• Color-coded: Cyan if coherent, gray if not
COMPLEXITY SECTION:
ENTROPY:
• Regime name (CRYSTALLINE/ORDERED/MODERATE/COMPLEX/CHAOTIC)
• Numerical value (0.00-1.00)
• Color: Green (ordered), gold (moderate), red (chaotic)
LYAPUNOV:
• State (STABLE/CRITICAL/CHAOTIC)
• Numerical value (typically -0.5 to +0.5)
• Status indicator: ● stable, ◐ critical, ○ chaotic
• Color-coded by state
FRACTAL:
• Regime (TRENDING/PERSISTENT/RANDOM/ANTI-PERSIST/COMPLEX)
• Dimension value (1.0-2.0)
• Color: Cyan (trending), gold (random), red (complex)
PHASE-SPACE:
• State (STRONG/ACTIVE/QUIET)
• Normalized magnitude value
• Parameters display: d=5 τ=3
CAUSAL SECTION:
CAUSAL:
• Direction (BULL/BEAR/NEUTRAL)
• Net flow value
• Flow indicator: →P (to price), P← (from price), ○ (neutral)
V→P:
• Volume-to-price transfer entropy
• Small display showing specific TE value
DIMENSIONAL SECTION:
RESONANCE:
• Progress bar of absolute resonance
• Signed value (-1 to +1)
• Color-coded by direction
RECURRENCE:
• Recurrence rate percentage
• Determinism percentage display
• Color-coded: Green if high quality
STATE SECTION:
STATE:
• Current mode: EMERGENCE / RESONANCE / CHAOS / SCANNING
• Icon: 🚀 (emergence buy), 💫 (emergence sell), ▲ (resonance buy), ▼ (resonance sell), ⚠ (chaos), ◎ (scanning)
• Color-coded by state
SIGNALS:
• E: count of emergence signals
• R: count of resonance signals
⚙️ KEY PARAMETERS EXPLAINED
Phase Space Configuration:
• Embedding Dimension (3-10, default 5): Reconstruction dimension
- Low (3-4): Simple dynamics, faster computation
- Medium (5-6): Balanced (recommended)
- High (7-10): Complex dynamics, more data needed
- Rule: d ≥ 2D+1 where D is true dimension
• Time Delay (τ) (1-10, default 3): Embedding lag
- Fast markets: 1-2
- Normal: 3-4
- Slow markets: 5-10
- Optimal: First minimum of mutual information (often 2-4)
• Recurrence Threshold (ε) (0.01-0.5, default 0.10): Phase space proximity
- Tight (0.01-0.05): Very similar states only
- Medium (0.08-0.15): Balanced
- Loose (0.20-0.50): Liberal matching
Entropy & Complexity:
• Permutation Order (3-7, default 4): Pattern length
- Low (3): 6 patterns, fast but coarse
- Medium (4-5): 24-120 patterns, balanced
- High (6-7): 720-5040 patterns, fine-grained
- Note: Requires window >> order! for stability
• Entropy Window (15-100, default 30): Lookback for entropy
- Short (15-25): Responsive to changes
- Medium (30-50): Stable measure
- Long (60-100): Very smooth, slow adaptation
• Lyapunov Window (10-50, default 20): Stability estimation window
- Short (10-15): Fast chaos detection
- Medium (20-30): Balanced
- Long (40-50): Stable λ estimate
Causal Inference:
• Enable Transfer Entropy (default ON): Causality analysis
- Keep ON for full system functionality
• TE History Length (2-15, default 5): Causal lookback
- Short (2-4): Quick causal detection
- Medium (5-8): Balanced
- Long (10-15): Deep causal analysis
• TE Discretization Bins (4-12, default 6): Binning granularity
- Few (4-5): Coarse, robust, needs less data
- Medium (6-8): Balanced
- Many (9-12): Fine-grained, needs more data
Phase Coherence:
• Enable Phase Coherence (default ON): Synchronization detection
- Keep ON for emergence detection
• Coherence Threshold (0.3-0.95, default 0.70): PLV requirement
- Loose (0.3-0.5): More signals, lower quality
- Balanced (0.6-0.75): Recommended
- Strict (0.8-0.95): Rare, highest quality
• Hilbert Smoothing (3-20, default 8): Phase smoothing
- Low (3-5): Responsive, noisier
- Medium (6-10): Balanced
- High (12-20): Smooth, more lag
Fractal Analysis:
• Enable Fractal Dimension (default ON): Complexity measurement
- Keep ON for full analysis
• Fractal K-max (4-20, default 8): Scaling range
- Low (4-6): Faster, less accurate
- Medium (7-10): Balanced
- High (12-20): Accurate, slower
• Fractal Window (30-200, default 50): FD lookback
- Short (30-50): Responsive FD
- Medium (60-100): Stable FD
- Long (120-200): Very smooth FD
Emergence Detection:
• Emergence Threshold (0.5-0.95, default 0.75): Minimum coherence
- Sensitive (0.5-0.65): More signals
- Balanced (0.7-0.8): Recommended
- Strict (0.85-0.95): Rare signals
• Require Causal Gate (default ON): TE confirmation
- ON: Only signal when causality confirms
- OFF: Allow signals without causal support
• Require Stability Zone (default ON): Lyapunov filter
- ON: Only signal when λ < 0 (stable) or |λ| < 0.1 (critical)
- OFF: Allow signals in chaotic regimes (risky)
• Signal Cooldown (1-50, default 5): Minimum bars between signals
- Fast (1-3): Rapid signal generation
- Normal (4-8): Balanced
- Slow (10-20): Very selective
- Ultra (25-50): Only major regime changes
Signal Configuration:
• Momentum Period (5-50, default 14): ROC calculation
• Structure Lookback (10-100, default 20): Support/resistance range
• Volatility Period (5-50, default 14): ATR calculation
• Volume MA Period (10-50, default 20): Volume normalization
Visual Settings:
• Customizable color scheme for all elements
• Toggle visibility for each layer independently
• Dashboard position (4 corners) and size (tiny/small/normal)
🎓 PROFESSIONAL USAGE PROTOCOL
Phase 1: System Familiarization (Week 1)
Goal: Understand complexity metrics and dashboard interpretation
Setup:
• Enable all features with default parameters
• Watch dashboard metrics for 500+ bars
• Do NOT trade yet
Actions:
• Observe emergence score patterns relative to price moves
• Note coherence threshold crossings and subsequent price action
• Watch entropy regime transitions (ORDERED → COMPLEX → CHAOTIC)
• Correlate Lyapunov state with signal reliability
• Track which signals appear (emergence vs resonance frequency)
Key Learning:
• When does emergence peak? (usually before major moves)
• What entropy regime produces best signals? (typically ORDERED or MODERATE)
• Does your instrument respect stability zones? (stable λ = better signals)
Phase 2: Parameter Optimization (Week 2)
Goal: Tune system to instrument characteristics
Requirements:
• Understand basic dashboard metrics from Phase 1
• Have 1000+ bars of history loaded
Embedding Dimension & Time Delay:
• If signals very rare: Try lower dimension (d=3-4) or shorter delay (τ=2)
• If signals too frequent: Try higher dimension (d=6-7) or longer delay (τ=4-5)
• Sweet spot: 4-8 emergence signals per 100 bars
Coherence Threshold:
• Check dashboard: What's typical coherence range?
• If coherence rarely exceeds 0.70: Lower threshold to 0.60-0.65
• If coherence often >0.80: Can raise threshold to 0.75-0.80
• Goal: Signals fire during top 20-30% of coherence values
Emergence Threshold:
• If too few signals: Lower to 0.65-0.70
• If too many signals: Raise to 0.80-0.85
• Balance with coherence threshold—both must be met
Phase 3: Signal Quality Assessment (Weeks 3-4)
Goal: Verify signals have edge via paper trading
Requirements:
• Parameters optimized per Phase 2
• 50+ signals generated
• Detailed notes on each signal
Paper Trading Protocol:
• Take EVERY emergence signal (★ and ◆)
• Optional: Take resonance signals (▲/▼) separately to compare
• Use simple exit: 2R target, 1R stop (ATR-based)
• Track: Win rate, average R-multiple, maximum consecutive losses
Quality Metrics:
• Premium emergence (★) : Should achieve >55% WR
• Standard emergence (◆) : Should achieve >50% WR
• Resonance signals : Should achieve >45% WR
• Overall : If <45% WR, system not suitable for this instrument/timeframe
Red Flags:
• Win rate <40%: Wrong instrument or parameters need major adjustment
• Max consecutive losses >10: System not working in current regime
• Profit factor <1.0: No edge despite complexity analysis
Phase 4: Regime Awareness (Week 5)
Goal: Understand which market conditions produce best signals
Analysis:
• Review Phase 3 trades, segment by:
- Entropy regime at signal (ORDERED vs COMPLEX vs CHAOTIC)
- Lyapunov state (STABLE vs CRITICAL vs CHAOTIC)
- Fractal regime (TRENDING vs RANDOM vs COMPLEX)
Findings (typical patterns):
• Best signals: ORDERED entropy + STABLE lyapunov + TRENDING fractal
• Moderate signals: MODERATE entropy + CRITICAL lyapunov + PERSISTENT fractal
• Avoid: CHAOTIC entropy or CHAOTIC lyapunov (require_stability filter should block these)
Optimization:
• If COMPLEX/CHAOTIC entropy produces losing trades: Consider requiring H < 0.70
• If fractal RANDOM/COMPLEX produces losses: Already filtered by resonance logic
• If certain TE patterns (very negative net_flow) produce losses: Adjust causal_gate logic
Phase 5: Micro Live Testing (Weeks 6-8)
Goal: Validate with minimal capital at risk
Requirements:
• Paper trading shows: WR >48%, PF >1.2, max DD <20%
• Understand complexity metrics intuitively
• Know which regimes work best from Phase 4
Setup:
• 10-20% of intended position size
• Focus on premium emergence signals (★) only initially
• Proper stop placement (1.5-2.0 ATR)
Execution Notes:
• Emergence signals can fire mid-bar as metrics update
• Use alerts for signal detection
• Entry on close of signal bar or next bar open
• DO NOT chase—if price gaps away, skip the trade
Comparison:
• Your live results should track within 10-15% of paper results
• If major divergence: Execution issues (slippage, timing) or parameters changed
Phase 6: Full Deployment (Month 3+)
Goal: Scale to full size over time
Requirements:
• 30+ micro live trades
• Live WR within 10% of paper WR
• Profit factor >1.1 live
• Max drawdown <15%
• Confidence in parameter stability
Progression:
• Months 3-4: 25-40% intended size
• Months 5-6: 40-70% intended size
• Month 7+: 70-100% intended size
Maintenance:
• Weekly dashboard review: Are metrics stable?
• Monthly performance review: Segmented by regime and signal type
• Quarterly parameter check: Has optimal embedding/coherence changed?
Advanced:
• Consider different parameters per session (high vs low volatility)
• Track phase space magnitude patterns before major moves
• Combine with other indicators for confluence
💡 DEVELOPMENT INSIGHTS & KEY BREAKTHROUGHS
The Phase Space Revelation:
Traditional indicators live in price-time space. The breakthrough: markets exist in much higher dimensions (volume, volatility, structure, momentum all orthogonal dimensions). Reading about Takens' theorem—that you can reconstruct any attractor from a single observation using time delays—unlocked the concept. Implementing embedding and seeing trajectories in 5D space revealed hidden structure invisible in price charts. Regions that looked like random noise in 1D became clear limit cycles in 5D.
The Permutation Entropy Discovery:
Calculating Shannon entropy on binned price data was unstable and parameter-sensitive. Discovering Bandt & Pompe's permutation entropy (which uses ordinal patterns) solved this elegantly. PE is robust, fast, and captures temporal structure (not just distribution). Testing showed PE < 0.5 periods had 18% higher signal win rate than PE > 0.7 periods. Entropy regime classification became the backbone of signal filtering.
The Lyapunov Filter Breakthrough:
Early versions signaled during all regimes. Win rate hovered at 42%—barely better than random. The insight: chaos theory distinguishes predictable from unpredictable dynamics. Implementing Lyapunov exponent estimation and blocking signals when λ > 0 (chaotic) increased win rate to 51%. Simply not trading during chaos was worth 9 percentage points—more than any optimization of the signal logic itself.
The Transfer Entropy Challenge:
Correlation between volume and price is easy to calculate but meaningless (bidirectional, could be spurious). Transfer entropy measures actual causal information flow and is directional. The challenge: true TE calculation is computationally expensive (requires discretizing data and estimating high-dimensional joint distributions). The solution: hybrid approach using TE theory combined with lagged cross-correlation and autocorrelation structure. Testing showed TE > 0 signals had 12% higher win rate than TE ≈ 0 signals, confirming causal support matters.
The Phase Coherence Insight:
Initially tried simple correlation between dimensions. Not predictive. Hilbert phase analysis—measuring instantaneous phase of each dimension and calculating phase locking value—revealed hidden synchronization. When PLV > 0.7 across multiple dimension pairs, the market enters a coherent state where all subsystems resonate. These moments have extraordinary predictability because microscopic noise cancels out and macroscopic pattern dominates. Emergence signals require high PLV for this reason.
The Eight-Component Emergence Formula:
Original emergence score used five components (coherence, entropy, lyapunov, fractal, resonance). Performance was good but not exceptional. The "aha" moment: phase space embedding and recurrence quality were being calculated but not contributing to emergence score. Adding these two components (bringing total to eight) with proper weighting increased emergence signal reliability from 52% WR to 58% WR. All calculated metrics must contribute to the final score. If you compute something, use it.
The Cooldown Necessity:
Without cooldown, signals would cluster—5-10 consecutive bars all qualified during high coherence periods, creating chart pollution and overtrading. Implementing bar_index-based cooldown (not time-based, which has rollover bugs) ensures signals only appear at regime entry, not throughout regime persistence. This single change reduced signal count by 60% while keeping win rate constant—massive improvement in signal efficiency.
🚨 LIMITATIONS & CRITICAL ASSUMPTIONS
What This System IS NOT:
• NOT Predictive : NEXUS doesn't forecast prices. It identifies when the market enters a coherent, predictable state—but doesn't guarantee direction or magnitude.
• NOT Holy Grail : Typical performance is 50-58% win rate with 1.5-2.0 avg R-multiple. This is probabilistic edge from complexity analysis, not certainty.
• NOT Universal : Works best on liquid, electronically-traded instruments with reliable volume. Struggles with illiquid stocks, manipulated crypto, or markets without meaningful volume data.
• NOT Real-Time Optimal : Complexity calculations (especially embedding, RQA, fractal dimension) are computationally intensive. Dashboard updates may lag by 1-2 seconds on slower connections.
• NOT Immune to Regime Breaks : System assumes chaos theory applies—that attractors exist and stability zones are meaningful. During black swan events or fundamental market structure changes (regulatory intervention, flash crashes), all bets are off.
Core Assumptions:
1. Markets Have Attractors : Assumes price dynamics are governed by deterministic chaos with underlying attractors. Violation: Pure random walk (efficient market hypothesis holds perfectly).
2. Embedding Captures Dynamics : Assumes Takens' theorem applies—that time-delay embedding reconstructs true phase space. Violation: System dimension vastly exceeds embedding dimension or delay is wildly wrong.
3. Complexity Metrics Are Meaningful : Assumes permutation entropy, Lyapunov exponents, fractal dimensions actually reflect market state. Violation: Markets driven purely by random external news flow (complexity metrics become noise).
4. Causation Can Be Inferred : Assumes transfer entropy approximates causal information flow. Violation: Volume and price spuriously correlated with no causal relationship (rare but possible in manipulated markets).
5. Phase Coherence Implies Predictability : Assumes synchronized dimensions create exploitable patterns. Violation: Coherence by chance during random period (false positive).
6. Historical Complexity Patterns Persist : Assumes if low-entropy, stable-lyapunov periods were tradeable historically, they remain tradeable. Violation: Fundamental regime change (market structure shifts, e.g., transition from floor trading to HFT).
Performs Best On:
• ES, NQ, RTY (major US index futures - high liquidity, clean volume data)
• Major forex pairs: EUR/USD, GBP/USD, USD/JPY (24hr markets, good for phase analysis)
• Liquid commodities: CL (crude oil), GC (gold), NG (natural gas)
• Large-cap stocks: AAPL, MSFT, GOOGL, TSLA (>$10M daily volume, meaningful structure)
• Major crypto on reputable exchanges: BTC, ETH on Coinbase/Kraken (avoid Binance due to manipulation)
Performs Poorly On:
• Low-volume stocks (<$1M daily volume) - insufficient liquidity for complexity analysis
• Exotic forex pairs - erratic spreads, thin volume
• Illiquid altcoins - wash trading, bot manipulation invalidates volume analysis
• Pre-market/after-hours - gappy, thin, different dynamics
• Binary events (earnings, FDA approvals) - discontinuous jumps violate dynamical systems assumptions
• Highly manipulated instruments - spoofing and layering create false coherence
Known Weaknesses:
• Computational Lag : Complexity calculations require iterating over windows. On slow connections, dashboard may update 1-2 seconds after bar close. Signals may appear delayed.
• Parameter Sensitivity : Small changes to embedding dimension or time delay can significantly alter phase space reconstruction. Requires careful calibration per instrument.
• Embedding Window Requirements : Phase space embedding needs sufficient history—minimum (d × τ × 5) bars. If embedding_dimension=5 and time_delay=3, need 75+ bars. Early bars will be unreliable.
• Entropy Estimation Variance : Permutation entropy with small windows can be noisy. Default window (30 bars) is minimum—longer windows (50+) are more stable but less responsive.
• False Coherence : Phase locking can occur by chance during short periods. Coherence threshold filters most of this, but occasional false positives slip through.
• Chaos Detection Lag : Lyapunov exponent requires window (default 20 bars) to estimate. Market can enter chaos and produce bad signal before λ > 0 is detected. Stability filter helps but doesn't eliminate this.
• Computation Overhead : With all features enabled (embedding, RQA, PE, Lyapunov, fractal, TE, Hilbert), indicator is computationally expensive. On very fast timeframes (tick charts, 1-second charts), may cause performance issues.
⚠️ RISK DISCLOSURE
Trading futures, forex, stocks, options, and cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Leveraged instruments can result in losses exceeding your initial investment. Past performance, whether backtested or live, is not indicative of future results.
The Dimensional Resonance Protocol, including its phase space reconstruction, complexity analysis, and emergence detection algorithms, is provided for educational and research purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any security or instrument.
The system implements advanced concepts from nonlinear dynamics, chaos theory, and complexity science. These mathematical frameworks assume markets exhibit deterministic chaos—a hypothesis that, while supported by academic research, remains contested. Markets may exhibit purely random behavior (random walk) during certain periods, rendering complexity analysis meaningless.
Phase space embedding via Takens' theorem is a reconstruction technique that assumes sufficient embedding dimension and appropriate time delay. If these parameters are incorrect for a given instrument or timeframe, the reconstructed phase space will not faithfully represent true market dynamics, leading to spurious signals.
Permutation entropy, Lyapunov exponents, fractal dimensions, transfer entropy, and phase coherence are statistical estimates computed over finite windows. All have inherent estimation error. Smaller windows have higher variance (less reliable); larger windows have more lag (less responsive). There is no universally optimal window size.
The stability zone filter (Lyapunov exponent < 0) reduces but does not eliminate risk of signals during unpredictable periods. Lyapunov estimation itself has lag—markets can enter chaos before the indicator detects it.
Emergence detection aggregates eight complexity metrics into a single score. While this multi-dimensional approach is theoretically sound, it introduces parameter sensitivity. Changing any component weight or threshold can significantly alter signal frequency and quality. Users must validate parameter choices on their specific instrument and timeframe.
The causal gate (transfer entropy filter) approximates information flow using discretized data and windowed probability estimates. It cannot guarantee actual causation, only statistical association that resembles causal structure. Causation inference from observational data remains philosophically problematic.
Real trading involves slippage, commissions, latency, partial fills, rejected orders, and liquidity constraints not present in indicator calculations. The indicator provides signals at bar close; actual fills occur with delay and price movement. Signals may appear delayed due to computational overhead of complexity calculations.
Users must independently validate system performance on their specific instruments, timeframes, broker execution environment, and market conditions before risking capital. Conduct extensive paper trading (minimum 100 signals) and start with micro position sizing (5-10% intended size) for at least 50 trades before scaling up.
Never risk more capital than you can afford to lose completely. Use proper position sizing (0.5-2% risk per trade maximum). Implement stop losses on every trade. Maintain adequate margin/capital reserves. Understand that most retail traders lose money. Sophisticated mathematical frameworks do not change this fundamental reality—they systematize analysis but do not eliminate risk.
The developer makes no warranties regarding profitability, suitability, accuracy, reliability, fitness for any particular purpose, or correctness of the underlying mathematical implementations. Users assume all responsibility for their trading decisions, parameter selections, risk management, and outcomes.
By using this indicator, you acknowledge that you have read, understood, and accepted these risk disclosures and limitations, and you accept full responsibility for all trading activity and potential losses.
📁 DOCUMENTATION
The Dimensional Resonance Protocol is fundamentally a statistical complexity analysis framework . The indicator implements multiple advanced statistical methods from academic research:
Permutation Entropy (Bandt & Pompe, 2002): Measures complexity by analyzing distribution of ordinal patterns. Pure statistical concept from information theory.
Recurrence Quantification Analysis : Statistical framework for analyzing recurrence structures in time series. Computes recurrence rate, determinism, and diagonal line statistics.
Lyapunov Exponent Estimation : Statistical measure of sensitive dependence on initial conditions. Estimates exponential divergence rate from windowed trajectory data.
Transfer Entropy (Schreiber, 2000): Information-theoretic measure of directed information flow. Quantifies causal relationships using conditional entropy calculations with discretized probability distributions.
Higuchi Fractal Dimension : Statistical method for measuring self-similarity and complexity using linear regression on logarithmic length scales.
Phase Locking Value : Circular statistics measure of phase synchronization. Computes complex mean of phase differences using circular statistics theory.
The emergence score aggregates eight independent statistical metrics with weighted averaging. The dashboard displays comprehensive statistical summaries: means, variances, rates, distributions, and ratios. Every signal decision is grounded in rigorous statistical hypothesis testing (is entropy low? is lyapunov negative? is coherence above threshold?).
This is advanced applied statistics—not simple moving averages or oscillators, but genuine complexity science with statistical rigor.
Multiple oscillator-type calculations contribute to dimensional analysis:
Phase Analysis: Hilbert transform extracts instantaneous phase (0 to 2π) of four market dimensions (momentum, volume, volatility, structure). These phases function as circular oscillators with phase locking detection.
Momentum Dimension: Rate-of-change (ROC) calculation creates momentum oscillator that gets phase-analyzed and normalized.
Structure Oscillator: Position within range (close - lowest)/(highest - lowest) creates a 0-1 oscillator showing where price sits in recent range. This gets embedded and phase-analyzed.
Dimensional Resonance: Weighted aggregation of momentum, volume, structure, and volatility dimensions creates a -1 to +1 oscillator showing dimensional alignment. Similar to traditional oscillators but multi-dimensional.
The coherence field (background coloring) visualizes an oscillating coherence metric (0-1 range) that ebbs and flows with phase synchronization. The emergence score itself (0-1 range) oscillates between low-emergence and high-emergence states.
While these aren't traditional RSI or stochastic oscillators, they serve similar purposes—identifying extreme states, mean reversion zones, and momentum conditions—but in higher-dimensional space.
Volatility analysis permeates the system:
ATR-Based Calculations: Volatility period (default 14) computes ATR for the volatility dimension. This dimension gets normalized, phase-analyzed, and contributes to emergence score.
Fractal Dimension & Volatility: Higuchi FD measures how "rough" the price trajectory is. Higher FD (>1.6) correlates with higher volatility/choppiness. FD < 1.4 indicates smooth trends (lower effective volatility).
Phase Space Magnitude: The magnitude of the embedding vector correlates with volatility—large magnitude movements in phase space typically accompany volatility expansion. This is the "energy" of the market trajectory.
Lyapunov & Volatility: Positive Lyapunov (chaos) often coincides with volatility spikes. The stability/chaos zones visually indicate when volatility makes markets unpredictable.
Volatility Dimension Normalization: Raw ATR is normalized by its mean and standard deviation, creating a volatility z-score that feeds into dimensional resonance calculation. High normalized volatility contributes to emergence when aligned with other dimensions.
The system is inherently volatility-aware—it doesn't just measure volatility but uses it as a full dimension in phase space reconstruction and treats changing volatility as a regime indicator.
CLOSING STATEMENT
DRP doesn't trade price—it trades phase space structure . It doesn't chase patterns—it detects emergence . It doesn't guess at trends—it measures coherence .
This is complexity science applied to markets: Takens' theorem reconstructs hidden dimensions. Permutation entropy measures order. Lyapunov exponents detect chaos. Transfer entropy reveals causation. Hilbert phases find synchronization. Fractal dimensions quantify self-similarity.
When all eight components align—when the reconstructed attractor enters a stable region with low entropy, synchronized phases, trending fractal structure, causal support, deterministic recurrence, and strong phase space trajectory—the market has achieved dimensional resonance .
These are the highest-probability moments. Not because an indicator said so. Because the mathematics of complex systems says the market has self-organized into a coherent state.
Most indicators see shadows on the wall. DRP reconstructs the cave.
"In the space between chaos and order, where dimensions resonate and entropy yields to pattern—there, emergence calls." DRP
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
PRO Triple+ Confirmation Overlay SignalsThis script uses the 200 SMA + RSI + MACD confirmations as buy and sell signals. It only give a signal if all three line up. works well for general market direction signals. It also has a higher time frame filter that will filter out 70%-90% of traps and counter trend signals. MACD momentum trigger times entries with momentum shifts. RSI confirmation as well as volume confirmation to remove entries in low volume dead markets.
Futures Momentum Scanner – jyoti//@version=5
indicator("Futures Momentum Scanner – Avvu Edition", overlay=false, max_lines_count=500)
//------------------------------
// USER INPUTS
//------------------------------
rsiLen = input.int(14, "RSI Length")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
stLength = input.int(10, "Supertrend Length")
stMult = input.float(3.0, "Supertrend Multiplier")
//------------------------------
// SUPER TREND
//------------------------------
= ta.supertrend(stMult, stLength)
trendUp = stDirection == 1
//------------------------------
// RSI
//------------------------------
rsi = ta.rsi(close, rsiLen)
rsiBull = rsi > 50 and rsi < 65
//------------------------------
// MACD
//------------------------------
= ta.macd(close, macdFast, macdSlow, macdSignal)
macdBull = macd > signal and macd > 0
//------------------------------
// MOVING AVERAGE TREND
//------------------------------
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
trendStack = ema20 > ema50 and ema50 > ema200
//------------------------------
// BREAKOUT LOGIC
//------------------------------
prevHigh = ta.highest(high, 20)
breakout = close > prevHigh
//------------------------------
// FINAL SCANNER LOGIC
//------------------------------
bullishCandidate = trendUp and rsiBull and macdBull and trendStack and breakout
//------------------------------
// TABLE OUTPUT FOR SCANNER FEEL
//------------------------------
var table t = table.new(position.top_right, 1, 1)
if barstate.islast
msg = bullishCandidate ? "✔ BUY Candidate" : "– Not a Setup"
table.cell(t, 0, 0, msg, bgcolor=bullishCandidate ? color.new(color.green, 0) : color.new(color.red, 70))
//------------------------------
// ALERT
//------------------------------
alertcondition(bullishCandidate, title="Scanner Trigger", message="This stock meets Avvu's futures scanner criteria!")
EMA Dynamic Crossover Detector with Real-Time Signal TableDescriptionWhat This Indicator Does:This indicator monitors all possible crossovers between four key exponential moving averages (20, 50, 100, and 200 periods) and displays them both visually on the chart and in an organized data table. Unlike standard EMA indicators that only plot the lines, this tool actively detects every crossover event, marks the exact crossover point with a circle, records the precise price level, and maintains a running log of all crossovers during the trading session. It's designed for traders who want comprehensive EMA crossover analysis without manually watching multiple moving average pairs.Key Features:
Four Essential EMAs: Plots 20, 50, 100, and 200-period exponential moving averages with color-coded thin lines for clean chart presentation
Complete Crossover Detection: Monitors all 6 possible EMA pair combinations (20×50, 20×100, 20×200, 50×100, 50×200, 100×200) in both directions
Precise Price Marking: Places colored circles at the exact average price where crossovers occur (not just at candle close)
Real-Time Signal Table: Displays up to 10 most recent crossovers with timestamp, direction, exact price, and signal type
Session Filtering: Only records crossovers during active trading hours (10:00-18:00 Istanbul time) to avoid noise from low-liquidity periods
Automatic Daily Reset: Clears the signal table at the start of each new trading day for fresh analysis
Built-In Alerts: Two alert conditions (bullish and bearish crossovers) that can be configured to send notifications
How It Works:The indicator calculates four exponential moving averages using the standard EMA formula, then continuously monitors for crossover events using Pine Script's ta.crossover() and ta.crossunder() functions:Bullish Crossovers (Green ▲):
When a faster EMA crosses above a slower EMA, indicating potential upward momentum:
20 crosses above 50, 100, or 200
50 crosses above 100 or 200
100 crosses above 200 (Golden Cross when it's the 50×200)
Bearish Crossovers (Red ▼):
When a faster EMA crosses below a slower EMA, indicating potential downward momentum:
20 crosses below 50, 100, or 200
50 crosses below 100 or 200
100 crosses below 200 (Death Cross when it's the 50×200)
Price Calculation:
Instead of marking crossovers at the candle's close price (which might not be where the actual cross occurred), the indicator calculates the average price between the two crossing EMAs, providing a more accurate representation of the crossover point.Signal Table Structure:The table in the top-right corner displays four columns:
Saat (Time): Exact time of crossover in HH:MM format
Yön (Direction): Arrow indicator (▲ green for bullish, ▼ red for bearish)
Fiyat (Price): Calculated average price at the crossover point
Durum (Status): Signal classification ("ALIŞ" for buy signals, "SATIŞ" for sell signals) with color-coded background
The table shows up to 10 most recent crossovers, automatically updating as new signals appear. If no crossovers have occurred during the session within the time filter, it displays "Henüz kesişim yok" (No crossovers yet).EMA Color Coding:
EMA 20 (Aqua/Turquoise): Fastest-reacting, most sensitive to recent price changes
EMA 50 (Green): Short-term trend indicator
EMA 100 (Yellow): Medium-term trend indicator
EMA 200 (Red): Long-term trend baseline, key support/resistance level
How to Use:For Day Traders:
Monitor 20×50 crossovers for quick entry/exit signals within the day
Use the time filter (10:00-18:00) to focus on high-volume trading hours
Check the signal table throughout the session to track momentum shifts
Look for confirmation: if 20 crosses above 50 and price is above EMA 200, bullish bias is stronger
For Swing Traders:
Focus on 50×200 crossovers (Golden Cross/Death Cross) for major trend changes
Use higher timeframes (4H, Daily) for more reliable signals
Wait for price to close above/below the crossover point before entering
Combine with support/resistance levels for better entry timing
For Position Traders:
Monitor 100×200 crossovers on daily/weekly charts for long-term trend changes
Use as confirmation of major market shifts
Don't react to every crossover—wait for sustained movement after the cross
Consider multiple timeframe analysis (if crossovers align on weekly and daily, signal is stronger)
Understanding EMA Hierarchies:The indicator becomes most powerful when you understand EMA relationships:Bullish Hierarchy (Strongest to Weakest):
All EMAs ascending (20 > 50 > 100 > 200): Strong uptrend
20 crosses above 50 while both are above 200: Pullback ending in uptrend
50 crosses above 200 while 20/50 below: Early trend reversal signal
Bearish Hierarchy (Strongest to Weakest):
All EMAs descending (20 < 50 < 100 < 200): Strong downtrend
20 crosses below 50 while both are below 200: Rally ending in downtrend
50 crosses below 200 while 20/50 above: Early trend reversal signal
Trading Strategy Examples:Pullback Entry Strategy:
Identify major trend using EMA 200 (price above = uptrend, below = downtrend)
Wait for pullback (20 crosses below 50 in uptrend, or above 50 in downtrend)
Enter when 20 re-crosses 50 in the trend direction
Place stop below/above the recent swing point
Exit when 20 crosses 50 against the trend again
Golden Cross/Death Cross Strategy:
Wait for 50×200 crossover (appears in the signal table)
Verify: Check if crossover occurs with increasing volume
Entry: Enter in the direction of the cross after a pullback
Stop: Place stop below/above the 200 EMA
Target: Swing high/low or when opposite crossover occurs
Multi-Crossover Confirmation:
Watch for multiple crossovers in the same direction within a short period
Example: 20×50 crossover followed by 20×100 = strengthening momentum
Enter after the second confirmation crossover
More crossovers = stronger signal but also means you're entering later
Time Filter Benefits:The 10:00-18:00 Istanbul time filter prevents recording crossovers during:
Pre-market volatility and gaps
Low-volume overnight sessions (for 24-hour markets)
After-hours erratic movements
Multi SMA + Golden/Death + Heatmap + BB**Multi SMA (50/100/200) + Golden/Death + Candle Heatmap + BB**
A practical trend toolkit that blends classic 50/100/200 SMAs with clear crossover labels, special 🚀 Golden / 💀 Death Cross markers, and a readable candle heatmap based on a dynamic regression midline and volatility bands. Optional Bollinger Bands are included for context.
* See trend direction at a glance with SMAs.
* Get minimal, de-cluttered labels on important crosses (50↔100, 50↔200, 100↔200).
* Highlight big regime shifts with special Golden/Death tags.
* Read momentum and volatility with the candle heatmap.
* Add Bollinger Bands if you want classic mean-reversion context.
Designed to be lightweight, non-repainting on confirmed bars, and flexible across timeframes.
# What This Indicator Does (plain English)
* **Tracks trend** using **SMA 50/100/200** and lets you optionally compute each SMA on a higher or different timeframe (HTF-safe, no lookahead).
* **Prints labels** when SMAs cross each other (up or down). You can force signals only after bar close to avoid repaint.
* **Marks Golden/Death Crosses** (50 over/under 200) with special labels so major regime changes stand out.
* **Colors candles** with a **heatmap** built from a regression midline and volatility bands—greenish above, reddish below, with a smooth gradient.
* **Optionally shows Bollinger Bands** (basis SMA + stdev bands) and fills the area between them.
* **Includes alert conditions** for Golden and Death Cross so you can automate notifications.
---
# Settings — Simple Explanations
## Source
* **Source**: Price source used to calculate SMAs and Bollinger basis. Default: `close`.
## SMA 50
* **Show 50**: Turn the SMA(50) line on/off.
* **Length 50**: How many bars to average. Lower = faster but noisier.
* **Color 50** / **Width 50**: Visual style.
* **Timeframe 50**: Optional alternate timeframe for SMA(50). Leave empty to use the chart timeframe.
## SMA 100
* **Show 100**: Turn the SMA(100) line on/off.
* **Length 100**: Bars used for the mid-term trend.
* **Color 100** / **Width 100**: Visual style.
* **Timeframe 100**: Optional alternate timeframe for SMA(100).
## SMA 200
* **Show 200**: Turn the SMA(200) line on/off.
* **Length 200**: Bars used for the long-term trend.
* **Color 200** / **Width 200**: Visual style.
* **Timeframe 200**: Optional alternate timeframe for SMA(200).
## Signals (crossover labels)
* **Show crossover signals**: Prints triangle labels on SMA crosses (50↔100, 50↔200, 100↔200).
* **Wait for bar close (confirmed)**: If ON, signals only appear after the candle closes (reduces repaint).
* **Min bars between same-pair signals**: Minimum spacing to avoid duplicate labels from the same SMA pair too often.
* **Trend filter (buy: 50>100>200, sell: 50<100<200)**: Only show bullish labels when SMAs are stacked bullish (50 above 100 above 200), and only show bearish labels when stacked bearish.
### Label Offset
* **Offset mode**: Choose how to push labels away from price:
* **Percent**: Offset is a % of price.
* **ATR x**: Offset is ATR(14) × multiplier.
* **Percent of price (%)**: Used when mode = Percent.
* **ATR multiplier (for ‘ATR x’)**: Used when mode = ATR x.
### Label Colors
* **Bull color** / **Bear color**: Background of triangle labels.
* **Bull label text color** / **Bear label text color**: Text color inside the triangles.
## Golden / Death Cross
* **Show 🚀 Golden Cross (50↑200)**: Show a special “Golden” label when SMA50 crosses above SMA200.
* **Golden label color** / **Golden text color**: Styling for Golden label.
* **Show 💀 Death Cross (50↓200)**: Show a special “Death” label when SMA50 crosses below SMA200.
* **Death label color** / **Death text color**: Styling for Death label.
## Candle Heatmap
* **Enable heatmap candle colors**: Turns the heatmap on/off.
* **Length**: Lookback for the regression midline and volatility measure.
* **Deviation Multiplier**: Band width around the midline (bigger = wider).
* **Volatility basis**:
* **RMA Range** (smoothed high-low range)
* **Stdev** (standard deviation of close)
* **Upper/Middle/Lower color**: Gradient colors for the heatmap.
* **Heatmap transparency (0..100)**: 0 = solid, 100 = invisible.
* **Force override base candles**: Repaint base candles so heatmap stays visible even if your chart has custom coloring.
## Bollinger Bands (optional)
* **Show Bollinger Bands**: Toggle the overlay on/off.
* **Length**: Basis SMA length.
* **StdDev Multiplier**: Distance of bands from the basis in standard deviations.
* **Basis color** / **Band color**: Line colors for basis and bands.
* **Bands fill transparency**: Opacity of the fill between upper/lower bands.
---
# Features & How It Works
## 1) HTF-Safe SMAs
Each SMA can be calculated on the chart timeframe or a higher/different timeframe you choose. The script pulls HTF values **without lookahead** (non-repainting on confirmed bars).
## 2) Crossover Labels (Three Pairs)
* **50↔100**, **50↔200**, **100↔200**:
* **Triangle Up** label when the first SMA crosses **above** the second.
* **Triangle Down** label when it crosses **below**.
* Optional **Trend Filter** ensures only signals aligned with the overall stack (50>100>200 for bullish, 50<100<200 for bearish).
* **Debounce** spacing avoids repeated labels for the same pair too close together.
## 3) Golden / Death Cross Highlights
* **🚀 Golden Cross**: SMA50 crosses **above** SMA200 (often a longer-term bullish regime shift).
* **💀 Death Cross**: SMA50 crosses **below** SMA200 (often a longer-term bearish regime shift).
* Separate styling so they stand out from regular cross labels.
## 4) Candle Heatmap
* Builds a **regression midline** with **volatility bands**; colors candles by their position inside that channel.
* Smooth gradient: lower side → reddish, mid → yellowish, upper side → greenish.
* Helps you see momentum and “where price sits” relative to a dynamic channel.
## 5) Bollinger Bands (Optional)
* Classic **basis SMA** ± **StdDev** bands.
* Light visual context for mean-reversion and volatility expansion.
## 6) Alerts
* **Golden Cross**: `🚀 GOLDEN CROSS: SMA 50 crossed ABOVE SMA 200`
* **Death Cross**: `💀 DEATH CROSS: SMA 50 crossed BELOW SMA 200`
Add these to your alerts to get notified automatically.
---
# Tips & Notes
* For fewer false positives, keep **“Wait for bar close”** ON, especially on lower timeframes.
* Use the **Trend Filter** to align signals with the broader stack and cut noise.
* For HTF context, set **Timeframe 50/100/200** to higher frames (e.g., H1/H4/D) while you trade on a lower frame.
* Heatmap “Length” and “Deviation Multiplier” control smoothness and channel width—tune for your asset’s volatility.
Support and resistance levels (Day, Week, Month) + EMAs + SMAs(ENG): This Pine 5 script provides various tools for configuring and displaying different support and resistance levels, as well as moving averages (EMA and SMA) on charts. Using these tools is an essential strategy for determining entry and exit points in trades.
Support and Resistance Levels
Daily, weekly, and monthly support and resistance levels play a key role in analyzing price movements:
Daily levels: Represent prices where a cryptocurrency has tended to bounce within the current trading day.
Weekly levels: Reflect strong prices that hold throughout the week.
Monthly levels: Indicate the most significant levels that can influence price movement over the month.
When trading cryptocurrencies, traders use these levels to make decisions about entering or exiting positions. For example, if a cryptocurrency approaches a weekly resistance level and fails to break through it, this may signal a sell opportunity. If the price reaches a daily support level and starts to bounce up, it may indicate a potential long position.
Market context and trading volumes are also important when analyzing support and resistance levels. High volume near a level can confirm its significance and the likelihood of subsequent price movement. Traders often combine analysis across different time frames to get a more complete picture and improve the accuracy of their trading decisions.
Moving Averages
Moving averages (EMA and SMA) are another important tool in the technical analysis of cryptocurrencies:
EMA (Exponential Moving Average): Gives more weight to recent prices, allowing it to respond more quickly to price changes.
SMA (Simple Moving Average): Equally considers all prices over a given period.
Key types of moving averages used by traders:
EMA 50 and 200: Often used to identify trends. The crossing of the 50-day EMA with the 200-day EMA is called a "golden cross" (buy signal) or a "death cross" (sell signal).
SMA 50, 100, 150, and 200: These periods are often used to determine long-term trends and support/resistance levels. Similar to the EMA, the crossings of these averages can signal potential trend changes.
Settings Groups:
EMA Golden Cross & Death Cross: A setting to display the "golden cross" and "death cross" for the EMA.
EMA 50 & 200: A setting to display the 50-day and 200-day EMA.
Support and Resistance Levels: Includes settings for daily, weekly, and monthly levels.
SMA 50, 100, 150, 200: A setting to display the 50, 100, 150, and 200-day SMA.
SMA Golden Cross & Death Cross: A setting to display the "golden cross" and "death cross" for the SMA.
Components:
Enable/disable the display of support and resistance levels.
Show level labels.
Parameters for adjusting offset, display of EMA and SMA, and their time intervals.
Parameters for configuring EMA and SMA Golden Cross & Death Cross.
EMA Parameters:
Enable/disable the display of 50 and 200-day EMA.
Color and style settings for EMA.
Options to use bar gaps and the "LookAhead" function.
SMA Parameters:
Enable/disable the display of 50, 100, 150, and 200-day SMA.
Color and style settings for SMA.
Options to use bar gaps and the "LookAhead" function.
Effective use of support and resistance levels, as well as moving averages, requires an understanding of technical analysis, discipline, and the ability to adapt the strategy according to changing market conditions.
(RUS) Данный Pine 5 скрипт предоставляет разнообразные инструменты для настройки и отображения различных уровней поддержки и сопротивления, а также скользящих средних (EMA и SMA) на графиках. Использование этих инструментов является важной стратегией для определения точек входа и выхода из сделок.
Уровни поддержки и сопротивления
Дневные, недельные и месячные уровни поддержки и сопротивления играют ключевую роль в анализе движения цен:
Дневные уровни: Представляют собой цены, на которых криптовалюта имела тенденцию отскакивать в течение текущего торгового дня.
Недельные уровни: Отражают сильные цены, которые сохраняются в течение недели.
Месячные уровни: Указывают на наиболее значимые уровни, которые могут влиять на движение цены в течение месяца.
При торговле криптовалютами трейдеры используют эти уровни для принятия решений о входе в позицию или закрытии сделки. Например, если криптовалюта приближается к недельному уровню сопротивления и не удается его преодолеть, это может стать сигналом для продажи. Если цена достигает дневного уровня поддержки и начинает отскакивать вверх, это может указывать на возможность открытия длинной позиции.
Контекст рынка и объемы торговли также важны при анализе уровней поддержки и сопротивления. Высокий объем при приближении к уровню может подтвердить его значимость и вероятность последующего движения цены. Трейдеры часто комбинируют анализ различных временных рамок для получения более полной картины и улучшения точности своих торговых решений.
Скользящие средние
Скользящие средние (EMA и SMA) являются еще одним важным инструментом в техническом анализе криптовалют:
EMA (Exponential Moving Average): Экспоненциальная скользящая средняя, которая придает большее значение последним ценам. Это позволяет более быстро реагировать на изменения в ценах.
SMA (Simple Moving Average): Простая скользящая средняя, которая равномерно учитывает все цены в заданном периоде.
Основные виды скользящих средних, которые используются трейдерами:
EMA 50 и 200: Часто используются для выявления трендов. Пересечение 50-дневной EMA с 200-дневной EMA называется "золотым крестом" (сигнал на покупку) или "крестом смерти" (сигнал на продажу).
SMA 50, 100, 150 и 200: Эти периоды часто используются для определения долгосрочных трендов и уровней поддержки/сопротивления. Аналогично EMA, пересечения этих средних могут сигнализировать о возможных изменениях тренда.
Группы настроек:
EMA Golden Cross & Death Cross: Настройка для отображения "золотого креста" и "креста смерти" для EMA.
EMA 50 & 200: Настройка для отображения 50-дневной и 200-дневной EMA.
Уровни поддержки и сопротивления: Включает настройки для дневных, недельных и месячных уровней.
SMA 50, 100, 150, 200: Настройка для отображения 50, 100, 150 и 200-дневных SMA.
SMA Golden Cross & Death Cross: Настройка для отображения "золотого креста" и "креста смерти" для SMA.
Компоненты:
Включение/отключение отображения уровней поддержки и сопротивления.
Показ ярлыков уровней.
Параметры для настройки смещения, отображения EMA и SMA, а также их временных интервалов.
Параметры для настройки EMA и SMA Golden Cross & Death Cross.
Параметры EMA:
Включение/отключение отображения 50 и 200-дневных EMA.
Настройки цвета и стиля для EMA.
Опции для использования разрыва баров и функции "LookAhead".
Параметры SMA:
Включение/отключение отображения 50, 100, 150 и 200-дневных SMA.
Настройки цвета и стиля для SMA.
Опции для использования разрыва баров и функции "LookAhead".
Эффективное использование уровней поддержки и сопротивления, а также скользящих средних, требует понимания технического анализа, дисциплины и умения адаптировать стратегию в зависимости от изменяющихся условий рынка.
QTrade Golden, Bronze & Death, Bubonic Cross AlertsThis indicator highlights key EMA regime shifts with simple, color-coded triangles:
- Golden / Death Cross — 50 EMA crossing above/below the 200 EMA.
- Bronze / Bubonic Cross — 50 EMA crossing above/below the 100 EMA.
- Early-Warning Proxy — tiny triangles for the 4 EMA vs. 200 EMA (4↑200 and 4↓200). These often fire before the 50/100 and 50/200 crosses.
No text clutter on the chart—just triangles. Colors: gold (50↑200), red (50↓200), darker-yellow bronze (50↑100), burgundy (50↓100), turquoise (4↑200), purple (4↓200).
What it tells you (in order of warning → confirmation)
- First warning: 4 EMA crosses the 200 EMA (proxy for price shifting around the 200 line).
- Second warning: 50 EMA crosses the 100 EMA (Bronze/Bubonic).
- Confirmation: 50 EMA crosses the 200 EMA (Golden/Death).
Alerts included
- Golden Cross (50↑200) and Death Cross (50↓200)
- Bronze Cross (50↑100) and Bubonic Cross (50↓100)
- 4 EMA vs. 200 EMA crosses (up & down) — early-warning proxy
- Price–100 EMA events (touch/cross, if enabled in settings)
Big Candle Identifier with RSI Divergence and Advanced Stops1. Strategy Objective
The main goal of this strategy is to:
Identify significant price momentum (big candles).
Enter trades at opportune moments based on market signals (candlestick patterns and RSI divergence).
Limit initial risk through a fixed stop loss.
Maximize profits by using a trailing stop that activates only after the trade moves a specified distance in the profitable direction.
2. Components of the Strategy
A. Big Candle Identification
The strategy identifies big candles as indicators of strong momentum.
A big candle is defined as:
The body (absolute difference between close and open) of the current candle (body0) is larger than the bodies of the last five candles.
The candle is:
Bullish Big Candle: If close > open.
Bearish Big Candle: If open > close.
Purpose: Big candles signal potential continuation or reversal of trends, serving as the primary entry trigger.
B. RSI Divergence
Relative Strength Index (RSI): A momentum oscillator used to detect overbought/oversold conditions and divergence.
Fast RSI: A 5-period RSI, which is more sensitive to short-term price movements.
Slow RSI: A 14-period RSI, which smoothens fluctuations over a longer timeframe.
Divergence: The difference between the fast and slow RSIs.
Positive divergence (divergence > 0): Bullish momentum.
Negative divergence (divergence < 0): Bearish momentum.
Visualization: The divergence is plotted on the chart, helping traders confirm momentum shifts.
C. Stop Loss
Initial Stop Loss:
When entering a trade, an immediate stop loss of 200 points is applied.
This stop loss ensures the maximum risk is capped at a predefined level.
Implementation:
Long Trades: Stop loss is set below the entry price at low - 200 points.
Short Trades: Stop loss is set above the entry price at high + 200 points.
Purpose:
Prevents significant losses if the price moves against the trade immediately after entry.
D. Trailing Stop
The trailing stop is a dynamic risk management tool that adjusts with price movements to lock in profits. Here’s how it works:
Activation Condition:
The trailing stop only starts trailing when the trade moves 200 ticks (profit) in the right direction:
Long Position: close - entry_price >= 200 ticks.
Short Position: entry_price - close >= 200 ticks.
Trailing Logic:
Once activated, the trailing stop:
For Long Positions: Trails behind the price by 150 ticks (trail_stop = close - 150 ticks).
For Short Positions: Trails above the price by 150 ticks (trail_stop = close + 150 ticks).
Exit Condition:
The trade exits automatically if the price touches the trailing stop level.
Purpose:
Ensures profits are locked in as the trade progresses while still allowing room for price fluctuations.
E. Trade Entry Logic
Long Entry:
Triggered when a bullish big candle is identified.
Stop loss is set at low - 200 points.
Short Entry:
Triggered when a bearish big candle is identified.
Stop loss is set at high + 200 points.
F. Trade Exit Logic
Trailing Stop: Automatically exits the trade if the price touches the trailing stop level.
Fixed Stop Loss: Exits the trade if the price hits the predefined stop loss level.
G. 21 EMA
The strategy includes a 21-period Exponential Moving Average (EMA), which acts as a trend filter.
EMA helps visualize the overall market direction:
Price above EMA: Indicates an uptrend.
Price below EMA: Indicates a downtrend.
H. Visualization
Big Candle Identification:
The open and close prices of big candles are plotted for easy reference.
Trailing Stop:
Plotted on the chart to visualize its progression during the trade.
Green Line: Indicates the trailing stop for long positions.
Red Line: Indicates the trailing stop for short positions.
RSI Divergence:
Positive divergence is shown in green.
Negative divergence is shown in red.
3. Key Parameters
trail_start_ticks: The number of ticks required before the trailing stop activates (default: 200 ticks).
trail_distance_ticks: The distance between the trailing stop and price once the trailing stop starts (default: 150 ticks).
initial_stop_loss_points: The fixed stop loss in points applied at entry (default: 200 points).
tick_size: Automatically calculates the minimum tick size for the trading instrument.
4. Workflow of the Strategy
Step 1: Entry Signal
The strategy identifies a big candle (bullish or bearish).
If conditions are met, a trade is entered with a fixed stop loss.
Step 2: Initial Risk Management
The trade starts with an initial stop loss of 200 points.
Step 3: Trailing Stop Activation
If the trade moves 200 ticks in the profitable direction:
The trailing stop is activated and follows the price at a distance of 150 ticks.
Step 4: Exit the Trade
The trade is exited if:
The price hits the trailing stop.
The price hits the initial stop loss.
5. Advantages of the Strategy
Risk Management:
The fixed stop loss ensures that losses are capped.
The trailing stop locks in profits after the trade becomes profitable.
Momentum-Based Entries:
The strategy uses big candles as entry triggers, which often indicate strong price momentum.
Divergence Confirmation:
RSI divergence helps validate momentum and avoid false signals.
Dynamic Profit Protection:
The trailing stop adjusts dynamically, allowing the trade to capture larger moves while protecting gains.
6. Ideal Market Conditions
This strategy performs best in:
Trending Markets:
Big candles and momentum signals are more effective in capturing directional moves.
High Volatility:
Larger price swings improve the probability of reaching the trailing stop activation level (200 ticks).
Fibonacci Channel Standard Deviation levels based off 200MAThis script dynamically combines Fibonacci levels with the 200-period simple moving average (SMA), offering a powerful tool for identifying high-probability support and resistance zones. By adjusting to the changing 200 SMA, the script remains relevant across different market phases.
Key Features:
Dynamic Fibonacci Levels:
The script automatically calculates Fibonacci retracements and extensions relative to the 200 SMA.
These levels adapt to market trends, offering more relevant zones compared to static Fibonacci tools.
Support and Resistance Zones:
In uptrends, price often respects retracement levels above the 200 SMA (e.g., 38.2%, 50%, 61.8%).
In downtrends, price may interact with retracements and extensions below the 200 SMA (e.g., 23.6%, 1.618).
Customizable Confluence Zones:
Key levels such as the golden pocket (61.8%–65%) are highlighted as high-probability zones for reversals or continuations.
Extensions (e.g., 1.618) can serve as profit targets or bearish continuation points.
Practical Applications:
Identifying Reversal Zones:
Look for confluence between Fibonacci levels and the 200 SMA to identify potential reversal points.
Example: A pullback to the 61.8%–65% golden pocket near the 200 SMA often signals a bullish reversal.
Trend Confirmation:
In uptrends, price respecting Fibonacci retracements above the 200 SMA (e.g., 38.2%, 50%) confirms strength.
Use Fibonacci extensions (e.g., 1.618) as profit targets during strong trends.
Dynamic Risk Management:
Place stop-losses just below key Fibonacci retracement levels near the 200 SMA to minimize risk.
Bearish Scenarios:
Below the 200 SMA, Fibonacci retracements and extensions act as resistance levels and bearish targets.
How to Use:
Volume Confirmation: Watch for volume spikes near Fibonacci levels to confirm support or resistance.
Price Action: Combine with candlestick patterns (e.g., engulfing candles, pin bars) for precise entries.
Trend Indicators: Use in conjunction with shorter moving averages or RSI to confirm market direction.
Example Setup:
Scenario: Price retraces to the 61.8% Fibonacci level while holding above the 200 SMA.
Confirmation: Volume spikes, and a bullish engulfing candle forms.
Action: Enter long with a stop-loss just below the 200 SMA and target extensions like 1.618.
Key Takeaways:
The 200 SMA serves as a reliable long-term trend anchor.
Fibonacci retracements and extensions provide dynamic zones for trade entries, exits, and risk management.
Combining this tool with volume, price action, or other indicators enhances its effectiveness.
Wavelet-Trend ML Integration [Alpha Extract]Alpha-Extract Volatility Quality Indicator
The Alpha-Extract Volatility Quality (AVQ) Indicator provides traders with deep insights into market volatility by measuring the directional strength of price movements. This sophisticated momentum-based tool helps identify overbought and oversold conditions, offering actionable buy and sell signals based on volatility trends and standard deviation bands.
🔶 CALCULATION
The indicator processes volatility quality data through a series of analytical steps:
Bar Range Calculation: Measures true range (TR) to capture price volatility.
Directional Weighting: Applies directional bias (positive for bullish candles, negative for bearish) to the true range.
VQI Computation: Uses an exponential moving average (EMA) of weighted volatility to derive the Volatility Quality Index (VQI).
Smoothing: Applies an additional EMA to smooth the VQI for clearer signals.
Normalization: Optionally normalizes VQI to a -100/+100 scale based on historical highs and lows.
Standard Deviation Bands: Calculates three upper and lower bands using standard deviation multipliers for volatility thresholds.
Signal Generation: Produces overbought/oversold signals when VQI reaches extreme levels (±200 in normalized mode).
Formula:
Bar Range = True Range (TR)
Weighted Volatility = Bar Range × (Close > Open ? 1 : Close < Open ? -1 : 0)
VQI Raw = EMA(Weighted Volatility, VQI Length)
VQI Smoothed = EMA(VQI Raw, Smoothing Length)
VQI Normalized = ((VQI Smoothed - Lowest VQI) / (Highest VQI - Lowest VQI) - 0.5) × 200
Upper Band N = VQI Smoothed + (StdDev(VQI Smoothed, VQI Length) × Multiplier N)
Lower Band N = VQI Smoothed - (StdDev(VQI Smoothed, VQI Length) × Multiplier N)
🔶 DETAILS
Visual Features:
VQI Plot: Displays VQI as a line or histogram (lime for positive, red for negative).
Standard Deviation Bands: Plots three upper and lower bands (teal for upper, grayscale for lower) to indicate volatility thresholds.
Reference Levels: Horizontal lines at 0 (neutral), +100, and -100 (in normalized mode) for context.
Zone Highlighting: Overbought (⋎ above bars) and oversold (⋏ below bars) signals for extreme VQI levels (±200 in normalized mode).
Candle Coloring: Optional candle overlay colored by VQI direction (lime for positive, red for negative).
Interpretation:
VQI ≥ 200 (Normalized): Overbought condition, strong sell signal.
VQI 100–200: High volatility, potential selling opportunity.
VQI 0–100: Neutral bullish momentum.
VQI 0 to -100: Neutral bearish momentum.
VQI -100 to -200: High volatility, strong bearish momentum.
VQI ≤ -200 (Normalized): Oversold condition, strong buy signal.
🔶 EXAMPLES
Overbought Signal Detection: When VQI exceeds 200 (normalized), the indicator flags potential market tops with a red ⋎ symbol.
Example: During strong uptrends, VQI reaching 200 has historically preceded corrections, allowing traders to secure profits.
Oversold Signal Detection: When VQI falls below -200 (normalized), a lime ⋏ symbol highlights potential buying opportunities.
Example: In bearish markets, VQI dropping below -200 has marked reversal points for profitable long entries.
Volatility Trend Tracking: The VQI plot and bands help traders visualize shifts in market momentum.
Example: A rising VQI crossing above zero with widening bands indicates strengthening bullish momentum, guiding traders to hold or enter long positions.
Dynamic Support/Resistance: Standard deviation bands act as dynamic volatility thresholds during price movements.
Example: Price reversals often occur near the third standard deviation bands, providing reliable entry/exit points during volatile periods.
🔶 SETTINGS
Customization Options:
VQI Length: Adjust the EMA period for VQI calculation (default: 14, range: 1–50).
Smoothing Length: Set the EMA period for smoothing (default: 5, range: 1–50).
Standard Deviation Multipliers: Customize multipliers for bands (defaults: 1.0, 2.0, 3.0).
Normalization: Toggle normalization to -100/+100 scale and adjust lookback period (default: 200, min: 50).
Display Style: Switch between line or histogram plot for VQI.
Candle Overlay: Enable/disable VQI-colored candles (lime for positive, red for negative).
The Alpha-Extract Volatility Quality Indicator empowers traders with a robust tool to navigate market volatility. By combining directional price range analysis with smoothed volatility metrics, it identifies overbought and oversold conditions, offering clear buy and sell signals. The customizable standard deviation bands and optional normalization provide precise context for market conditions, enabling traders to make informed decisions across various market cycles.
Volatility Quality [Alpha Extract]The Alpha-Extract Volatility Quality (AVQ) Indicator provides traders with deep insights into market volatility by measuring the directional strength of price movements. This sophisticated momentum-based tool helps identify overbought and oversold conditions, offering actionable buy and sell signals based on volatility trends and standard deviation bands.
🔶 CALCULATION
The indicator processes volatility quality data through a series of analytical steps:
Bar Range Calculation: Measures true range (TR) to capture price volatility.
Directional Weighting: Applies directional bias (positive for bullish candles, negative for bearish) to the true range.
VQI Computation: Uses an exponential moving average (EMA) of weighted volatility to derive the Volatility Quality Index (VQI).
vqiRaw = ta.ema(weightedVol, vqiLen)
Smoothing: Applies an additional EMA to smooth the VQI for clearer signals.
Normalization: Optionally normalizes VQI to a -100/+100 scale based on historical highs and lows.
Standard Deviation Bands: Calculates three upper and lower bands using standard deviation multipliers for volatility thresholds.
vqiStdev = ta.stdev(vqiSmoothed, vqiLen)
upperBand1 = vqiSmoothed + (vqiStdev * stdevMultiplier1)
upperBand2 = vqiSmoothed + (vqiStdev * stdevMultiplier2)
upperBand3 = vqiSmoothed + (vqiStdev * stdevMultiplier3)
lowerBand1 = vqiSmoothed - (vqiStdev * stdevMultiplier1)
lowerBand2 = vqiSmoothed - (vqiStdev * stdevMultiplier2)
lowerBand3 = vqiSmoothed - (vqiStdev * stdevMultiplier3)
Signal Generation: Produces overbought/oversold signals when VQI reaches extreme levels (±200 in normalized mode).
Formula:
Bar Range = True Range (TR)
Weighted Volatility = Bar Range × (Close > Open ? 1 : Close < Open ? -1 : 0)
VQI Raw = EMA(Weighted Volatility, VQI Length)
VQI Smoothed = EMA(VQI Raw, Smoothing Length)
VQI Normalized = ((VQI Smoothed - Lowest VQI) / (Highest VQI - Lowest VQI) - 0.5) × 200
Upper Band N = VQI Smoothed + (StdDev(VQI Smoothed, VQI Length) × Multiplier N)
Lower Band N = VQI Smoothed - (StdDev(VQI Smoothed, VQI Length) × Multiplier N)
🔶 DETAILS
Visual Features:
VQI Plot: Displays VQI as a line or histogram (lime for positive, red for negative).
Standard Deviation Bands: Plots three upper and lower bands (teal for upper, grayscale for lower) to indicate volatility thresholds.
Reference Levels: Horizontal lines at 0 (neutral), +100, and -100 (in normalized mode) for context.
Zone Highlighting: Overbought (⋎ above bars) and oversold (⋏ below bars) signals for extreme VQI levels (±200 in normalized mode).
Candle Coloring: Optional candle overlay colored by VQI direction (lime for positive, red for negative).
Interpretation:
VQI ≥ 200 (Normalized): Overbought condition, strong sell signal.
VQI 100–200: High volatility, potential selling opportunity.
VQI 0–100: Neutral bullish momentum.
VQI 0 to -100: Neutral bearish momentum.
VQI -100 to -200: High volatility, strong bearish momentum.
VQI ≤ -200 (Normalized): Oversold condition, strong buy signal.
🔶 EXAMPLES
Overbought Signal Detection: When VQI exceeds 200 (normalized), the indicator flags potential market tops with a red ⋎ symbol.
Example: During strong uptrends, VQI reaching 200 has historically preceded corrections, allowing traders to secure profits.
Oversold Signal Detection: When VQI falls below -200 (normalized), a lime ⋏ symbol highlights potential buying opportunities.
Example: In bearish markets, VQI dropping below -200 has marked reversal points for profitable long entries.
Volatility Trend Tracking: The VQI plot and bands help traders visualize shifts in market momentum.
Example: A rising VQI crossing above zero with widening bands indicates strengthening bullish momentum, guiding traders to hold or enter long positions.
Dynamic Support/Resistance: Standard deviation bands act as dynamic volatility thresholds during price movements.
Example: Price reversals often occur near the third standard deviation bands, providing reliable entry/exit points during volatile periods.
🔶 SETTINGS
Customization Options:
VQI Length: Adjust the EMA period for VQI calculation (default: 14, range: 1–50).
Smoothing Length: Set the EMA period for smoothing (default: 5, range: 1–50).
Standard Deviation Multipliers: Customize multipliers for bands (defaults: 1.0, 2.0, 3.0).
Normalization: Toggle normalization to -100/+100 scale and adjust lookback period (default: 200, min: 50).
Display Style: Switch between line or histogram plot for VQI.
Candle Overlay: Enable/disable VQI-colored candles (lime for positive, red for negative).
The Alpha-Extract Volatility Quality Indicator empowers traders with a robust tool to navigate market volatility. By combining directional price range analysis with smoothed volatility metrics, it identifies overbought and oversold conditions, offering clear buy and sell signals. The customizable standard deviation bands and optional normalization provide precise context for market conditions, enabling traders to make informed decisions across various market cycles.
Market Breadth Peaks & Troughs IndicatorIndicator Overview
Market Breadth (S5TH) visualizes extremes of market strength and weakness by overlaying -
a 200-period EMA (long-term trend)
a 5-period EMA (short-term trend, user-adjustable)
on the percentage of S&P 500 constituents trading above their 200-day SMA (INDEX:S5TH).
Peaks (▼) and troughs (▲) are detected with prominence filters so you can quickly spot overbought and oversold conditions.
⸻
1. Core Logic
Component Description
Breadth series INDEX:S5TH — % of S&P 500 stocks above their 200-SMA
Long EMA 200-EMA to capture the primary trend
Short EMA 5-EMA (default, editable) for short-term swings
Peak detection ta.pivothigh + prominence ⇒ major peaks marked with red ▼
Trough detection (200 EMA) ta.pivotlow + prominence + value < longTroughLvl ⇒ blue ▲
Trough detection (5 EMA) ta.pivotlow + prominence + value < shortTroughLvl ⇒ green ▲
Background shading Pink when 200 EMA slope is down and 5 EMA sits below 200 EMA
⸻
2. Adjustable Parameters (input())
Group Variable Default Purpose
Symbol breadthSym INDEX:S5TH Breadth index
Long EMA longLen 200 Period of long EMA
Short EMA shortLen 5 Period of short EMA
Pivot width (long) pivotLen 20 Bars left/right for 200-EMA peaks/troughs
Pivot width (short) pivotLenS 10 Bars for 5-EMA troughs
Prominence (long) promThresh 0.5 %-pt Depth filter for 200-EMA pivots
Prominence (short) promThreshS 3.0 %-pt Depth filter for 5-EMA pivots
Trough level (long) longTroughLvl 50 % Max value to accept a 200-EMA trough
Trough level (short) shortTroughLvl 30 % Max value to accept a 5-EMA trough
⸻
3. Signal Guide
Marker / Color Meaning Typical reading
Red ▼ Major breadth peak Overbought / possible top
Blue ▲ Deep 200-EMA trough End of mid-term correction
Green ▲ Shallow 5-EMA trough (early) Short-term rebound setup
Pink background Long-term down-trend and short-term weak Risk-off phase
⸻
4. Typical Use Cases
1. Counter-trend timing
• Fade greed: trim longs on red ▼
• Buy fear: scale in on green ▲; add on blue ▲
2. Trend filter
• Avoid new longs while the background is pink; wait for a trough & recovery.
3. Risk management
• Reduce exposure when peaks appear, reload partial size on confirmed troughs.
⸻
5. Notes & Tips
• INDEX:S5TH is sourced from TradingView and may be back-adjusted when index membership changes.
• Fine-tune pivotLen, promThresh, and level thresholds to match current volatility before relying on alerts or automated rules.
• Slope thresholds (±0.10 %-pt) that trigger background shading can also be customized for different market regimes.
Stochastic RSI Strategy with Inverted Trend LogicOverview:
The Stochastic RSI Strategy with Inverted Trend Logic is a custom-built Pine Script indicator that leverages the Stochastic RSI and a 200-period moving average to generate precise buy and sell signals. It is specifically designed for traders looking to capture opportunities during short-term market movements while factoring in broader trend conditions.
Key Components:
Stochastic RSI:
Stochastic RSI is a momentum indicator that applies stochastic calculations to the standard Relative Strength Index (RSI), rather than price data. This makes it particularly sensitive to market momentum changes, which is essential for timing entries and exits.
K Line and D Line: The indicator calculates and smooths both the K and D lines to capture momentum shifts more accurately.
200-Period Moving Average:
The 200-period Simple Moving Average (SMA) is used as a trend filter.
If the price is above the 200-period SMA, the trend is considered bullish.
If the price is below the 200-period SMA, the trend is considered bearish.
Inverted Trading Logic:
The trading logic is inverted from traditional strategies:
Long trades are executed only when the market is in a bearish trend (price below the 200-period moving average).
Short trades are executed only when the market is in a bullish trend (price above the 200-period moving average).
This inversion allows traders to take advantage of potential trend reversals by entering positions in the opposite direction of the prevailing trend.
Trading Rules:
Long Trade Conditions (Buy Signal):
The Stochastic RSI K line must be below 5 for 4 consecutive candles (oversold condition).
The price must be below the 200-period SMA (indicating a bearish trend).
Once these conditions are met, the indicator will generate a buy signal on the close of the 4th candle.
Exit Condition: The long position is exited when the Stochastic RSI K line crosses above 50 (neutral level).
Short Trade Conditions (Sell Signal):
The Stochastic RSI K line must be above 95 for 4 consecutive candles (overbought condition).
The price must be above the 200-period SMA (indicating a bullish trend).
Once these conditions are met, the indicator will generate a sell signal on the close of the 4th candle.
Exit Condition: The short position is exited when the Stochastic RSI K line crosses below 50.
Visual Signals on the Chart:
Buy Signal:
A green triangle below the bar is displayed on the chart when a buy condition is met, indicating a potential long trade opportunity.
The text "BUY" is displayed for further clarity.
Sell Signal:
A red triangle above the bar is displayed on the chart when a sell condition is met, indicating a potential short trade opportunity.
The text "SELL" is displayed for further clarity.
How to Use the Indicator:
Attach the Indicator: Apply the indicator to your desired chart (works on any time frame, but is optimized for short- to medium-term trading).
Monitor Signals: Watch for buy and sell signals on the chart:
Buy Signal: Enter long positions when a green triangle appears below the candle.
Sell Signal: Enter short positions when a red triangle appears above the candle.
Exit Positions: Exit long positions when the Stochastic RSI crosses above the 50 level, and exit short positions when the Stochastic RSI crosses below the 50 level.
Indicator Display:
Stochastic RSI: A visual representation of the Stochastic RSI (K and D lines) is plotted below the price chart, with overbought (100), midpoint (50), and oversold (0) levels clearly marked.
200-period SMA: The 200-period moving average is plotted on the price chart, giving a clear indication of the broader trend direction (orange line).
Key Benefits:
Reversal Opportunities: This strategy allows traders to capture reversal trades by using an inverted logic where longs are taken in bearish conditions and shorts are taken in bullish conditions. This can help capitalize on potential trend exhaustion and reversals.
Clear and Simple Rules: The use of Stochastic RSI and the 200-period moving average ensures the strategy remains simple yet effective, making it easy for traders to follow.
Visual Alerts: The indicator provides clear buy and sell signals, making it easy for traders to spot trading opportunities in real-time without needing to monitor multiple conditions manually.
Limitations and Considerations:
Trend Changes: Since the strategy is designed to work during trend reversals, it might not perform as well during strong, prolonged trends where price continues moving in one direction without significant pullbacks.
Time Frame Suitability: While the indicator works on any time frame, shorter time frames may result in more frequent signals and higher trade frequency, whereas higher time frames will provide fewer but potentially stronger signals.
Conclusion:
The Stochastic RSI Strategy with Inverted Trend Logic is a powerful tool for traders looking to capture market reversals by entering trades against the prevailing trend direction based on momentum exhaustion. Its simple and clear logic, combined with easy-to-understand visual signals, makes it a versatile indicator for both novice and experienced traders.






















