Indicator

Indicator

Indicator

Indicator

Iteratively Reweighted Least Squares (IRLS) [Jamallo]Author's Note: This script is published as a unique mathematical contribution to PulseWire's open-source public library. It is intended to introduce a novel application of a robust statistical method for the community and developers to study, adapt, and build upon, rather than to serve as a standalone, out-of-the-box trading strategy.
Introduction
Almost all moving averages and smoothing filters in technical analysis treat historical price data equally or apply a fixed mathematical decay (like an EMA). The problem? A massive, anomalous wick or a sudden volatility spike will inevitably drag the average away from the true underlying market consensus.
Enter Iteratively Reweighted Least Squares (IRLS) .
IRLS is a robust statistical method that calculates a "consensus" price by actively identifying and down-weighting outliers. Instead of letting a large wick distort the line, the algorithm assigns less weight to prices that deviate furthest from the current estimate. The result is a filter that cuts through noise, ignores price-distant spikes, and naturally locks onto the dominant, high-density price levels.
How It Works
The indicator uses the Hardy weight function to determine how heavily each historical candle influences the current estimate. On every bar, the algorithm checks the distance of each sample from the current consensus and iteratively refines the line until it converges on a robust mean. Epsilon — the outlier rejection scale — is derived dynamically from the average High–Low range, keeping the filter dimensionless and consistent across all instruments and timeframes.
Parameters
Window Size (N) : The rolling lookback window of historical samples the kernel considers. Larger values produce a smoother, slower-responding line.
Sparsity (s/N) : The core behavioral control. Dictates the fraction of the window allowed to "vote" on the estimate.
Low Sparsity (e.g., 0.1) : Only the 10% of samples closest to the current estimate participate. Produces a snappy, selective line that locks tightly onto the most dominant price cluster.
High Sparsity (e.g., 1.0) : All samples participate, resulting in a smoother, more conventional robust mean.
Gamma (ε scale) : Controls the strength of outlier rejection. Lower values enforce harsh, median-like rejection. Higher values soften the rejection toward a standard weighted mean.
Iterations : The number of reweighting convergence passes per bar. 2–3 is sufficient for practical convergence.
Potential Applications
The Hardy IRLS filter provides a unique lens into market structure by shifting the focus from simple time-averaged prices to spatial price consensus. Because it rejects price-distant wicks and noise spikes by design, it can serve as a foundation for:
Custom trailing stops
Dynamic support and resistance trackers
Baseline trend or regime filters
Feel free to inspect the open-source code, experiment with extreme sparsity and gamma settings, and integrate the IRLS core into your own quantitative projects.
References
Li Shuang, "Sparse Representation of Hardy Function by Iteratively Reweighted Least Squares," 2020 International Symposium on Computer Engineering and Intelligent Communications (ISCEIC), IEEE, 2020. DOI: 10.1109/ISCEIC51027.2020.00020
Indicator

Tidal Volume Oscillator [JOAT]Tidal Volume Oscillator
Introduction
The Tidal Volume Oscillator is a separate-pane oscillator that attempts to answer a single question: is the current price movement being carried by genuine volume participation, or is it occurring on weak flow? It constructs a volume-weighted momentum score, normalizes it to a bounded range of −100 to +100, applies a Fourier-inspired exponential decay smoothing pass to reduce noise without introducing phase lag, and then scales the result with an adaptive trend filter. A flow momentum line tracks the acceleration of the oscillator itself. A divergence engine scans for all four divergence types simultaneously — regular bullish, regular bearish, hidden bullish, and hidden bearish — and plots them directly in the oscillator panel.
The indicator does not predict future price. It contextualizes current price movement relative to volume behavior and flags when price action and volume-weighted momentum are moving in opposite directions, which historically precedes changes in directional character — though not always, and not reliably in all instruments or conditions.
---
Core Concepts
The VZO Foundation
The Volume Zone Oscillator (VZO) is an established concept that categorizes volume as positive or negative based on the direction of price change, then computes a ratio of positive to negative volume over a rolling window. This indicator rebuilds that concept from the ground up using a different normalization approach:
Relative Volume: Instead of using raw volume, the oscillator first normalizes each bar's volume against a rolling SMA of volume. This produces a relative volume reading — a value above 1.0 means the bar traded heavier than average, below 1.0 means lighter. This step removes the absolute scale of volume from the calculation, allowing the oscillator to behave comparably across instruments with vastly different volume profiles and across timeframes where absolute volume differs by orders of magnitude.
Volume-Weighted Momentum: The price change on each bar is smoothed via EMA, and the relative volume is separately smoothed via EMA. Multiplying these two smoothed values produces a volume-weighted momentum signal. This is then smoothed again to form a base momentum reading.
RSI-Style Normalization: Positive and negative portions of the base momentum are separated, each independently smoothed, and their ratio is fed into an RSI-style formula: vzo = 100 * (ratio - 1) / (ratio + 1) . This bounds the oscillator strictly between −100 and +100 and gives it a symmetric zero-line structure where positive values indicate dominant upward volume momentum and negative values indicate dominant downward volume momentum.
Fourier Exponential Decay Smoothing
After the initial VZO is computed, a second smoothing pass is applied using exponential decay weights. For each bar, the contribution of each of the prior N bars is weighted by exp(-i / (len * 0.3)) , where i is the number of bars back. This means the most recent bar carries maximum weight and each earlier bar contributes exponentially less. The window clips naturally as the weights approach zero.
The result is a smoothing pass that is inspired by frequency-domain thinking: it emphasizes recent values and de-emphasizes older values in a continuous decay rather than in the binary on/off fashion of a simple rolling average. The smoothed output tracks the oscillator's underlying shape while suppressing high-frequency noise without the phase shift that a centered moving average would introduce.
ADF Trend Filter
An adaptive multiplier is derived by comparing a short SMA and a long SMA of price, normalizing their difference by the rolling standard deviation of price over a matching window. This produces a dimensionless value that reflects the strength of the current trend relative to recent volatility — conceptually analogous to the logic behind an Augmented Dickey-Fuller trend test applied in a simplified real-time form.
This multiplier is kept close to 1.0 intentionally. Its role is not to dramatically change the oscillator's value but to apply a mild scaling that slightly amplifies the VZO when trend conditions are strong and slightly suppresses it during choppy, mean-reverting conditions. The effect is subtle but helps the oscillator's readings align better with the underlying market character.
Final Blended VZO
The final oscillator value blends the EMA-smoothed VZO and the Fourier-smoothed VZO according to a blend parameter, scales the result by the ADF multiplier, and clamps the output to the range. The blend parameter controls how much weight goes to the Fourier-smoothed version versus the EMA-smoothed version, allowing the user to tune between responsiveness and smoothness.
Flow Momentum Line
A secondary line is plotted alongside the main oscillator, computed as:
flow_momentum = (vzo - ema(vzo, lookback)) * 0.5
This measures the rate of change of the oscillator — its acceleration — and scales it to stay visually proportional. When the flow momentum line is rising, the oscillator is accelerating upward. When it is falling, the oscillator is losing momentum regardless of its absolute level. Crossovers between the oscillator and the flow momentum line can highlight inflection points in volume-weighted momentum.
Divergence Engine
The divergence engine uses pivot high and pivot low detection to identify four divergence types:
Regular Bullish Divergence: Price makes a lower low while the oscillator makes a higher low. Suggests weakening downward volume participation on the new price low.
Regular Bearish Divergence: Price makes a higher high while the oscillator makes a lower high. Suggests weakening upward volume participation on the new price high.
Hidden Bullish Divergence: Price makes a higher low while the oscillator makes a lower low. Often associated with pullbacks within an established uptrend where volume momentum remains stronger than the pullback's depth implies.
Hidden Bearish Divergence: Price makes a lower high while the oscillator makes a higher high. Often associated with rallies within an established downtrend where volume momentum is failing to confirm the price bounce.
The engine uses ta.valuewhen to retrieve the oscillator's value at the most recent prior pivot of the same type, then compares it to the current pivot. Lines and labels are drawn directly in the oscillator pane, keeping all divergence context in a single panel.
Dynamic Color Blending
The oscillator line and histogram (if enabled) use color blending that responds to both the direction of the oscillator and the intensity of the flow momentum. Colors transition smoothly between bull and bear palettes as conditions shift, with intensity modulated by momentum acceleration. This avoids binary color flips and gives a continuous visual read of the oscillator's strength and direction.
---
Features
Relative-volume-normalized VZO foundation — removes absolute volume scale bias
RSI-style normalization producing a symmetric −100 to +100 oscillator
Fourier exponential decay smoothing pass for noise reduction without phase lag
ADF-inspired adaptive trend multiplier for regime-sensitive scaling
Blended output combining EMA and Fourier smoothing with user-adjustable weighting
Flow momentum line showing oscillator acceleration
Full four-type divergence engine: regular bull/bear and hidden bull/bear
Divergence lines and labels rendered directly in the oscillator pane
Dynamic color blending based on direction and momentum intensity
Overbought/oversold level lines at user-defined thresholds (default ±80)
Fully toggleable visual components including divergence types individually
---
Input Parameters
VZO Length: Primary lookback for the volume-weighted momentum and normalization calculations (default: 14)
Smoothing Length: Short EMA length used in the initial volume-weighted momentum construction (default: 5)
Signal Length: EMA length applied to the final VZO for the signal/flow line (default: 9)
Fourier Window: Number of bars used in the exponential decay smoothing pass (default: 20)
Fourier Blend: Proportion of the final output taken from the Fourier-smoothed VZO versus the EMA-smoothed VZO (default: 0.4, meaning 40% Fourier / 60% EMA)
Overbought Level: Upper reference line threshold (default: +80)
Oversold Level: Lower reference line threshold (default: −80)
Pivot Bars: Number of bars on each side required to confirm a pivot high or low for divergence detection
Visual Toggles: Individual controls for divergence types (regular bull, regular bear, hidden bull, hidden bear), flow momentum line, bar coloring, and OB/OS lines
---
How to Use
Reading the oscillator: Values above zero indicate that volume-weighted momentum favors buyers over the lookback window. Values below zero indicate it favors sellers. The magnitude reflects how dominant one side is. A reading of +60 is meaningfully different from +20 — the former suggests strong participation on the upside, the latter suggests modest positive lean.
Overbought/oversold levels: The default ±80 levels are deliberately set wide. Reaching ±80 indicates a statistically strong skew in volume momentum, not simply a directional bias. A reading at +85 that begins to decline is worth noting; a reading that has been above +80 for many bars without declining suggests strong persistent flow, not an automatic reversal condition.
Flow momentum line: Use the flow momentum line to identify when the oscillator is accelerating or decelerating. If the oscillator is above zero but the flow momentum line is falling and crossing below the oscillator, volume-weighted momentum is losing strength even if it has not crossed zero. This can be an early warning of a fading move.
Divergences: Divergence signals appear as labeled lines in the oscillator pane. They flag a disagreement between price structure and volume momentum structure. Regular divergences are typically associated with potential trend reversal conditions; hidden divergences are typically associated with trend continuation conditions during a pullback. Neither type is a standalone entry signal — they require context from price structure, higher timeframe trend, and other confirmation.
Combining types: A regular bearish divergence occurring while the oscillator is above +60 and the flow momentum line is declining is a more compelling condition than a divergence occurring at a neutral oscillator reading. Look for confluence between divergence signals, oscillator level, and flow momentum direction.
Timeframe notes: On lower timeframes, the divergence engine will fire frequently and many signals will resolve as noise. On higher timeframes, divergence signals are structurally more significant but rarer. The Fourier blend and VZO length should be calibrated to the timeframe being traded.
---
Limitations
This indicator does not predict future price movement. All readings are computed from past and current bar data.
Volume data quality varies significantly across instruments and data providers. On instruments with unreliable, synthetic, or missing volume data (some forex pairs, certain CFDs, spread-betting instruments), the oscillator's readings will be distorted or meaningless.
Divergences are detected only at confirmed pivot points, which by definition require a lookback into past bars. A divergence signal will appear after the pivot is confirmed, not at the pivot bar itself. This is inherent to pivot-based divergence detection and is not a bug.
Hidden divergences can occur frequently during strong trends and produce many signals that resolve without follow-through on shorter timeframes.
The ADF-inspired filter is a simplified heuristic, not a formal statistical test. It does not guarantee that the adaptive scaling accurately reflects whether a market is trending or mean-reverting at any given moment.
The Fourier exponential decay smoothing is not a formal frequency-domain Fourier transform. The term is used descriptively to indicate the exponential weighting pattern, not to imply that the calculation resolves into sinusoidal components.
Extreme or sustained overbought/oversold readings do not guarantee a reversal. Strong trends can keep the oscillator pinned at extremes for extended periods.
The oscillator is bounded at ±100 by construction. This means that at extreme readings, additional strengthening of volume momentum does not move the line further — the clamping obscures incremental changes at extremes.
Past divergence performance on a given instrument is not indicative of future performance.
---
Originality Statement
The VZO concept is established in the public domain. This implementation departs from the standard in several meaningful ways. Using relative volume (each bar's volume divided by a rolling SMA of volume) rather than raw volume removes the absolute scale of volume from the oscillator's behavior — a standard VZO applied to a futures contract and a low-float equity will behave differently purely due to volume magnitude; this version will not. The RSI-style normalization of the volume-weighted momentum ratio is retained from the VZO concept but is applied to a momentum signal constructed differently from the standard signed-volume approach. The Fourier exponential decay smoothing layer is an original addition: it is not a standard EMA, WMA, or VWMA — it applies a decaying weight function that is conceptually distinct from any standard Pine Script built-in smoothing function, producing a cleaner oscillator output with less phase distortion than an equivalent EMA. The ADF-inspired adaptive multiplier is a real-time regime-sensitivity mechanism not present in any standard oscillator. The four-type divergence engine built into the same panel, detecting all four divergence classes simultaneously using pivot comparison logic, provides complete divergence coverage without requiring additional scripts or manual line drawing. The combination of these elements — relative-volume normalization, Fourier decay smoothing, adaptive trend scaling, blended output, flow momentum line, and full-coverage divergence detection — into a single oscillator panel represents an original synthesis that is not replicated by any standard built-in indicator.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Past performance of any indicator or strategy is not indicative of future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Indicator

MA Phase Visualizer🔹 Logic
This indicator classifies market conditions into six phases based on the relative ordering (rank structure) of three moving averages: Short, Mid, and Long.
All possible permutations of these three moving averages are mapped into background colors, allowing the current structural state of the market to be visualized in real time directly on the chart.
🔹 Phase Definitions
Phases are defined by the relative positioning of the moving averages (Short: S, Mid: M, Long: L):
Phase 1 (Red): S > M > L
Phase 2 (Orange): M > S > L
Phase 3 (Yellow): M > L > S
Phase 4 (Green): L > M > S
Phase 5 (Blue): L > S > M
Phase 6 (Purple): S > L > M
💻 Key Features
1. MA Options
Supports five types of moving averages: SMA, EMA, RMA, WMA, and VWMA, allowing flexible adaptation to different trading styles.
2. Mapping
Each phase is mapped to a distinct background color, enabling intuitive identification of the current market structure.
3. Structural Persistence Tracking
Allows users to visually assess how long a given structural arrangement persists over time.
4. Visual Optimization
Adjustable background transparency (bgAlpha) for improved readability and integration with other chart elements.
💡 Interpretation Guide
1. Trending Market
When Phase 1 (uptrend) or Phase 4 (downtrend) persists over an extended period,
the market can be interpreted as being in a structurally stable trending condition.
2. Structural Transitions
Transitions from Phase 1 or 4 into Phase 2 or 5 represent temporary structural shifts.
Monitoring whether the structure returns to the original phase or progresses into a different phase provides insight into trend continuation or breakdown.
3. Ranging Market (Sideways Condition)
When Phase 1 and 4 appear briefly while Phases 2, 3, 5, and 6 alternate frequently over short intervals, the moving averages are converging, indicating a loss of directional structure and a ranging (sideways) market.
⚠️ Notes
This indicator is designed to visualize market structure through moving average ordering.
It classifies the current market state into one of six structural phases based on the relative position of the Short, Mid, and Long moving averages.
The indicator is intended to support market condition analysis and structural interpretation.
For clarity, the three moving averages used in phase classification are displayed on the chart. Indicator

AG Pro Moving Average Ribbon Stress Meter [AGPro Series]AG Pro Moving Average Ribbon Stress Meter
Overview / What It Does
This indicator is designed to read the internal condition of a moving-average ribbon rather than treating the ribbon as a simple trend overlay. Instead of asking only whether the ribbon is bullish or bearish, it asks a different question: is the ribbon structurally calm, starting to load, becoming strained, or losing internal order.
The script builds a six-line moving-average ribbon, measures how those averages interact with each other, and converts that interaction into a stress framework. The result is a visual map that helps show whether the ribbon is organized, stretched, unstable, or resetting after stress.
In practical terms, the script is built to help users evaluate ribbon quality, internal synchronization, and the degree of structural pressure inside the moving-average stack. It is not intended to forecast future prices, call tops or bottoms, or replace broader market analysis. Its purpose is to organize what the ribbon is doing now and how stable or unstable that structure appears to be.
The chart output combines multiple layers: the ribbon itself, a central stress spine, edge bands, optional stress aura, event labels, and a compact status panel. Together, these elements aim to make the ribbon easier to interpret without requiring the user to manually inspect every moving average line on every bar.
Unique Edge
Many ribbon-style tools focus on directional bias, crossovers, or broad expansion and contraction. This script focuses on internal ribbon stress.
Its main distinction is that it does not treat all ribbon trends as equal. A ribbon can be rising while still carrying internal disagreement. A ribbon can also look compressed or visually clean while underlying alignment, slope behavior, width dynamics, or price stretch are beginning to deteriorate. This script is built to surface those conditions.
The goal is not to reduce the market to a single signal. The goal is to provide a structured visual read on whether the moving-average stack is operating in a calm state, a loaded state, a strained state, or a more unstable condition. That makes it more useful as a workflow tool than as a simple trend-colour overlay.
Another point of differentiation is presentation. The script uses a ribbon-focused visual design so that the user can read internal condition directly from the chart. Focus modes, theme presets, stress spine layering, and a compact panel are included to keep the display informative without turning the chart into a dense dashboard.
Methodology
The script evaluates ribbon condition through five stress components.
1) Order Stress
This measures whether the moving averages are stacked cleanly or whether their order is becoming mixed. Lower stress suggests cleaner structural order. Higher stress suggests more internal disorder.
2) Slope Dispersion Stress
This evaluates how consistently the moving averages are sloping together. When the ribbon lines are moving with similar directional agreement, synchronization is stronger. When their slopes diverge, internal stress rises.
3) Width Instability Stress
This tracks whether the ribbon width is behaving in a stable or unstable way. A ribbon can widen in an orderly way or in a more erratic way. This component attempts to distinguish between those conditions.
4) Curvature Stress
This evaluates bending in the ribbon core. Strong changes in ribbon curvature may indicate increasing internal pressure or transition.
5) Price Stretch Stress
This measures how far price is moving from the ribbon core relative to ribbon width and ATR-based normalization. This is not a directional claim. It is a structure-based distance measure.
These components are weighted and blended into a smoothed Stress Score. That score then feeds the state engine.
Primary states include Calm, Loaded, Strained, Critical, Fractured, and Recovery. The panel and visual styling use those states to summarize the ribbon condition at the current bar.
Signals & Alerts
This script is built around state transitions and structural events rather than buy/sell promises.
Depending on settings, users may see event labels and alerts such as:
Stress Build
Shows that stress has crossed into an early loading phase.
Strained
Shows that the ribbon has moved into a more stressed internal state.
Critical Load
Highlights a higher-pressure condition where instability has become more meaningful.
Ribbon Fracture
Marks a stronger structural failure condition when stress and ribbon order deterioration align.
Stress Reset
Shows that a previously elevated stress condition has cooled enough to register recovery.
Order Restored
Highlights improvement in ribbon order after disorder had been present.
These events are not trade instructions. They are context markers intended to help users track shifts in ribbon condition. Alerts should be interpreted together with market structure, timeframe context, volatility, and personal risk management.
Key Inputs
Source and MA Type
The ribbon can be built from different moving-average types and data sources.
Ribbon Lengths
Users can define the six ribbon lengths to fit their preferred structure and timeframe.
Stress Engine Inputs
ATR length, slope lookback, width lookback, curvature lookback, smoothing, and component references allow users to calibrate how sensitive the stress model should be.
Weights
The script includes separate weights for order stress, slope dispersion, width instability, curvature stress, and price stretch stress.
Thresholds
Loaded, Strained, Critical, and Fracture thresholds can be adjusted for tighter or looser state transitions.
Theme Presets and Focus Mode
Theme presets and focus modes allow the ribbon to be displayed in different visual styles while preserving the same logic.
Events and Panel
Users can control label density, label spacing, marker visibility, and panel position.
Limitations & Transparency
This script is an interpretation framework built around moving-average relationships. It does not know future price movement, and it does not claim certainty. Like any model built on smoothed market data, it will react more slowly in some environments and may produce fewer useful transitions in others.
Different assets and timeframes can produce different ribbon personalities. A threshold or weight set that feels balanced on one market may feel too sensitive or too quiet on another. Users should expect to adapt settings if they move between instruments with very different volatility or trend behavior.
The stress model is also deliberately selective. It does not try to label every fluctuation or classify every candle. Its purpose is to organize ribbon condition, not to describe every possible market state.
This indicator should also not be confused with a complete trading plan. It does not define entries, exits, position sizing, or account risk. It is best used as a structural context tool inside a broader workflow.
Risk Disclosure
This script is for chart analysis and educational use. It is not financial advice, investment advice, or a promise of outcome.
No indicator can guarantee performance, remove risk, or eliminate false readings. Market conditions change, correlations shift, and trend behavior can weaken or reverse without warning. Any decision taken from this script should be made within a broader framework that includes price structure, liquidity, volatility, timeframe alignment, and risk control.
Users are responsible for testing settings, understanding the limitations of moving-average tools, and deciding whether the information produced by the script fits their own process.
Indicator

Indicator

Indicator

EMA Color Plus [ChartWhizzperer]EMA Colour Plus PRO | Momentum Guard by ChartWhizzperer
The clinical approach to momentum filtering.
Moving averages are the foundation of trend analysis, but standard EMAs are inherently flawed. They fall victim to market noise, consume valuable indicator slots on your chart, and frequently suffer from toxic higher-timeframe repainting.
As a system architect, I engineered the EMA Colour Plus to eradicate these inefficiencies. This open-source script is not just a moving average; it is a multi-dimensional momentum guard designed for uncompromising precision and chart hygiene.
CORE ARCHITECTURE (Why this filter outperforms standard EMAs):
Repaint-Proof MTF Protocol: When utilising the higher-timeframe (HTF) functionality, the algorithm strictly locks onto confirmed historical closures. There are no real-time illusions and no retrospective repainting. The line is carved in stone.
The Slot-Saver Integration: Free users are heavily restricted by indicator limits. This script integrates a dynamic EMA, Bollinger Bands, RSI momentum gating, and ROC filtering into a single, highly optimised mathematical unit.
Data-Vacuum Failsafe: Standard Volume Weighted Moving Averages (VWMA) crash when broker feeds temporarily drop volume data (common in Forex). This script features a custom fallback injection that simulates baseline volume during data vacuums, ensuring the indicator never disappears from your chart.
Mathematical Symmetry: Momentum thresholds (like RSI) are perfectly mirrored against the median, reducing input clutter while maintaining strict logic for both bullish and bearish state transitions.
Examine the source code: You will find clean, single-line compiled logic and a flawless security protocol for MTF data retrieval.
However, an EMA does not pull the trigger. Ask me for more!
Disclaimer
Signals and alerts are provided for informational purposes only and do not constitute financial advice or a recommendation to buy or sell.
Trading involves substantial risk and may result in the total loss of capital. Execution via third-party tools may differ from alerts. Past performance is not indicative of future results. Indicator

Sovereign Execution [JOAT]Sovereign Execution
Introduction
Sovereign Execution is an open-source multi-layer trading strategy that synthesizes five independent analytical engines into a unified execution framework. Rather than relying on a single indicator or a simple crossover, this strategy requires alignment across regime classification, momentum displacement, session timing, imbalance confluence, and multi-timeframe bias scoring before any trade is taken. The result is a highly selective system that filters out low-conviction setups and only enters when multiple independent analytical dimensions agree.
The strategy uses ATR-based adaptive stop-losses, configurable risk-reward ratio targets, optional trailing stops, and multiple exit conditions including regime flips and opposite displacement detection. It is designed for traders who want a systematic, rules-based approach to execution with full transparency into every decision the system makes.
Why This Strategy Exists
Most trading strategies suffer from one of two problems: they are either too simple (single-indicator entries that generate excessive noise) or too complex (dozens of conditions that are impossible to understand or debug). Sovereign Execution occupies the middle ground by using exactly five analytical layers, each addressing a different aspect of market conditions:
Regime Cipher: Is the market trending or compressing? Only trade in trending regimes.
Displacement Lens: Is there institutional momentum right now? Only enter on confirmed displacement.
Session Filter: Is the market in an active trading session? Avoid low-liquidity periods.
Imbalance Confluence: Is there a Fair Value Gap nearby? Optional confirmation of institutional interest.
Confluence Ledger: Do multiple timeframes agree on direction? Only trade when the score exceeds the threshold.
Each layer acts as an independent filter. A trade only fires when ALL active filters align simultaneously. This multi-gate approach dramatically reduces false signals compared to single-indicator strategies.
Module 1: Regime Cipher — Trend and Volatility Classification
The regime engine uses an Outlier-Resistant Moving Average (ORMA) as its foundation. The ORMA applies a square-root transformation to price, calculates a base moving average (configurable: EMA, SMA, RMA, WMA, HMA, DEMA, or TEMA), then applies a volatility-dampening filter using the ratio of full ATR to half-period ATR. This creates a moving average that is responsive to genuine trend changes but resistant to outlier spikes.
ATR-based bands are drawn above and below the ORMA. When price closes above the upper band, the regime is classified as Trending Bull. When price closes below the lower band, Trending Bear. The strategy also monitors Bollinger Band width relative to its 50-bar average to detect compression (BB width below 85% of average) and expansion (above 110%).
The key rule: the strategy only takes trades when the regime is Trending (not Compressed or Transitional). This single filter eliminates the majority of choppy, range-bound conditions where most strategies bleed money.
Module 2: Displacement Lens — Momentum Timing
The displacement engine normalizes three momentum oscillators (Bollinger %B, CCI, ROC) to a scale and blends them with a volume-weighted candle body analysis. The composite is smoothed with an EMA and compared against adaptive threshold bands calculated from the signal's own standard deviation.
A "strong bull displacement" occurs when the composite exceeds the upper threshold — meaning momentum, volume, and candle structure all confirm bullish institutional activity. Strong bear displacement is the mirror condition. The strategy only enters when displacement confirms the regime direction.
Module 3: Session Filter
Trading sessions are defined by UTC hour ranges (configurable for Asia, London, and New York). When the session filter is enabled (default), the strategy only takes trades during active sessions. This avoids entries during low-liquidity periods (overnight gaps, holiday hours) where spreads widen and price action is unreliable.
The session filter is optional — it can be disabled for instruments that trade 24/7 with consistent liquidity (e.g., major crypto pairs).
Module 4: FVG Confluence (Optional)
When enabled, the strategy scans the last 10 bars for Fair Value Gaps in the entry direction. A bullish FVG (gap up in price delivery) near the entry confirms institutional buying interest. A bearish FVG confirms selling interest. This filter is optional (default off) because not all valid setups occur near FVGs, but when enabled, it adds an additional layer of institutional confirmation.
Module 5: Confluence Score — Multi-Timeframe Bias Gate
The strategy calculates a simplified confluence score combining trend alignment, momentum, volatility state, market structure, and volume conviction on the current timeframe, then blends it with a higher timeframe score (default 4H) at a 40/60 weighting (HTF gets more weight).
The score is mapped to 0-100. Long entries require the score to exceed the long threshold (default 60). Short entries require the score to be below the short threshold (default 40). This ensures the strategy only trades when multiple analytical dimensions across timeframes agree on direction.
Entry Conditions
A long entry requires ALL of the following simultaneously:
Regime is Trending Bull (price above upper ORMA band, not compressing)
Confluence score >= long threshold (default 60)
Strong bullish displacement (composite above adaptive threshold)
Active session (if session filter enabled)
Recent bullish FVG (if FVG filter enabled)
Bar is confirmed (barstate.isconfirmed — no intrabar entries)
Short entries require the bearish mirror of all conditions. Edge detection ensures each signal fires only once — no repeated entries on the same setup.
Risk Management
Stop-Loss: ATR-based adaptive stop calculated as ATR(14) multiplied by the stop multiplier (default 1.5). For longs, the stop is placed below the entry price by this distance. For shorts, above. This means the stop automatically adapts to the instrument's current volatility — wider stops in volatile markets, tighter stops in calm markets.
Take-Profit: Calculated as the stop distance multiplied by the reward-risk ratio (default 2.0). A 1.5 ATR stop with a 2.0 R:R produces a 3.0 ATR take-profit target.
Trailing Stop: When enabled (default), the stop is trailed upward (for longs) or downward (for shorts) using the trail ATR multiplier (default 2.0). The trail only moves in the favorable direction — it never moves against the position.
Exit Conditions
Beyond the TP/SL levels, the strategy has two additional exit conditions:
Regime Flip: If the regime changes from Trending Bull to Trending Bear (or vice versa), or enters Compression, the position is closed immediately. The thesis for the trade no longer holds.
Opposite Displacement: If strong displacement fires in the opposite direction of the trade, the position is closed. Institutional momentum has shifted against the position.
Default Strategy Properties
These are the exact values used in the strategy's Properties dialog:
Initial Capital: $100,000 — a realistic account size for the average trader
Default Quantity: 5% of equity per trade — conservative position sizing
Commission: 0.04% per trade (round-trip 0.08%) — realistic for most exchanges
Slippage: 2 ticks per order — accounts for execution delay and spread
Pyramiding: 0 — only one position at a time
Calc on Every Tick: false — entries only on bar close for realistic execution
These settings are intentionally conservative. The commission and slippage values are included to produce realistic backtesting results. Traders should adjust these values to match their specific broker/exchange conditions.
Visualization
Regime MA: The ORMA line plotted with a glow effect (crisp line + transparent wider line) colored by trend state — teal for bullish, rose for bearish, gray for neutral
ATR Bands: Upper and lower bands showing the regime breakout thresholds
SL/TP Levels: When a position is active, the stop-loss (red), take-profit (green), and entry price (gray) are plotted as horizontal lines
Gradient Candles: Candles colored by the confluence score — transitioning from bearish rose (low score) to bullish teal (high score)
Session Background: Subtle amber tint when an active session is in progress
10-Row Dashboard
Row 1: Header — "SOVEREIGN EXECUTION"
Row 2: Regime — TREND LONG / TREND SHORT / COMPRESSED / TRANSITIONAL
Row 3: Displacement — BULL DISP / BEAR DISP / NEUTRAL
Row 4: Session — ASIA / LONDON / NEW YORK / OFF-SESSION
Row 5: Confluence — Score value + bias classification
Row 6: Volatility — EXPANDING / COMPRESSED / NORMAL
Row 7: Position — LONG / SHORT / FLAT
Row 8: Entry — Entry price when in a trade
Row 9: Stop — Current stop-loss level
Row 10: Target — Current take-profit level
Input Parameters
Execution Parameters:
Risk Per Trade % (default 1.5) — percentage of equity risked per trade
Reward:Risk Ratio (default 2.0) — take-profit as multiple of stop distance
ATR Stop Multiplier (default 1.5) — stop distance as ATR multiple
Use Trailing Stop (default on), Trail ATR Multiplier (default 2.0)
Entry Filters:
Confluence Threshold Long (default 60) — minimum score for long entries
Confluence Threshold Short (default 40) — maximum score for short entries
Require Active Session (default on)
Require FVG Confluence (default off)
Regime Cipher Parameters:
Adaptive MA Length (default 27), ATR Length (default 14), ATR Factor (default 1.05)
Base MA type (default EMA, options: RMA/SMA/EMA/WMA/HMA/DEMA/TEMA)
Displacement Parameters:
BB Length (20), BB Multiplier (2.0), CCI Length (23), ROC Length (50)
Displacement Smoothing (default 5)
Session Filter (UTC):
Asia Start/End (0/8), London Start/End (8/14), NY Start/End (14/21)
Strategy Limitations and Compromises
Every strategy involves design compromises. Here are the key ones for Sovereign Execution:
Selectivity vs Frequency: The multi-gate filter approach produces fewer trades than single-indicator strategies. On some instruments/timeframes, the strategy may go days without a signal. This is by design — it prioritizes quality over quantity — but it means the strategy needs sufficient historical data to produce a meaningful sample size.
Regime Lag: The ORMA-based regime classification has inherent lag. It will not catch the exact top or bottom of a trend. The strategy enters after the trend is confirmed, which means it misses the first portion of moves.
Session Filter Limitation: The UTC-based session filter works well for forex and indices but may need adjustment for instruments with non-standard trading hours. Crypto traders may want to disable the session filter entirely.
Single Timeframe Execution: While the confluence score incorporates HTF data, entries and exits are executed on the chart's timeframe. Very fast timeframes (1m) may produce noisy signals despite the filters.
Backtesting Caveats: All backtesting results are historical and do not guarantee future performance. The strategy uses calc_on_every_tick=false and barstate.isconfirmed to produce realistic entries, but real-world execution will always differ from backtesting due to slippage, partial fills, and latency.
No Guarantee of Profitability: This strategy is a systematic framework, not a profit guarantee. Market conditions change, and strategies that worked historically may underperform in different regimes.
Recommended Usage
Use on liquid instruments (major forex pairs, large-cap stocks, major crypto) for most reliable signals
Test on the 15m to 4H timeframe range — these provide enough bars for the regime and displacement engines while maintaining meaningful session context
Ensure the backtest produces at least 100 trades for statistical significance before drawing conclusions
Adjust commission and slippage to match your specific broker/exchange
Consider the strategy as one component of a broader trading plan, not a standalone system
Originality Statement
This strategy is original in its multi-layer filter architecture. While individual components (moving averages, momentum oscillators, session filters) are established concepts, this strategy is justified because:
It synthesizes five independent analytical engines (regime classification, displacement measurement, session timing, imbalance confluence, multi-TF scoring) into a unified execution framework where ALL must align for entry
The ORMA-based regime engine uses a volatility-dampened, outlier-resistant moving average with ATR bands — not a standard MA crossover
The displacement engine normalizes three oscillators and blends them with volume-weighted candle body analysis for institutional-grade momentum confirmation
The confluence score combines five analytical dimensions with HTF weighting, producing a quantitative bias gate rather than a subjective assessment
Multiple exit conditions (regime flip, opposite displacement, trailing stop, TP/SL) provide layered risk management beyond simple stop-loss
The strategy uses realistic default settings (commission, slippage, position sizing) and documents all Properties values for transparent backtesting
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Backtesting results shown are historical and do not guarantee future performance. The results of a single backtest run do not constitute proof that the strategy will be profitable in the future. Market conditions change, and strategies that performed well historically may underperform or lose money in different market environments.
The default settings (commission 0.04%, slippage 2 ticks, 5% equity per trade, $100,000 initial capital) are designed to produce realistic results. Users should verify these match their trading conditions and adjust accordingly.
Always use proper risk management. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategy

AG Pro VWMA Dislocation Map [AGPro Series]AG Pro VWMA Dislocation Map
OVERVIEW
AG Pro VWMA Dislocation Map is a state-based charting tool designed to measure how far price is trading from its volume-weighted mean, how persistent that displacement has become, and whether the move is still expanding or beginning to normalize.
This script is built around a simple but often underexplored idea: distance from a moving average is not equally meaningful in all situations. A small deviation can matter when it is persistent and building under directional participation, while a larger deviation can become less informative when the move is already mature and beginning to contract. Instead of treating every separation from the mean as identical, this script organizes that behavior into a structured framework.
The result is a visual map centered on VWMA behavior rather than a classic crossover model. The goal is not to guess tops or bottoms, and it is not to replace broader market structure analysis. The goal is to help the user read displacement quality, persistence, and normalization pressure around a volume-weighted equilibrium reference.
This makes the script useful in two very different but related contexts. In intraday use, it can help identify when a move is still building away from the mean versus when extension may already be mature. In swing use, it can help frame whether price is holding a healthy distance from its weighted mean or rotating back toward equilibrium.
WHAT MAKES IT DIFFERENT
This script is not presented as “another moving average” and it is not intended to function as a simple VWMA trend filter. Its design focus is the behavior around VWMA, not the line by itself.
The main distinction is the state model. Instead of reducing the chart to a binary above/below interpretation, the script tracks whether displacement is mild, active, persistent, extended, overextended, re-approaching, or rebalanced. That adds context to moves that may otherwise look similar at first glance but are materially different in maturity and behavior.
A second distinction is normalization. Raw distance in price units can be misleading across different symbols, different volatility conditions, and different phases of the same market. For that reason, the script evaluates displacement relative to a normalization unit rather than using absolute price distance alone. This is intended to make the map more comparable and more structurally meaningful.
A third distinction is presentation. The indicator is designed as a chart-reading framework, with a central weighted-mean structure, layered displacement bands, background state context, a last-bar state label, and a compact information panel. The output is meant to be descriptive and contextual rather than promotional or predictive.
METHODOLOGY
The script begins with a VWMA reference built from user-defined length and source settings. Around that reference, it measures normalized price displacement. The normalization can be based on ATR, standard deviation, or a hybrid approach, depending on the selected mode.
From there, the script derives several internal components:
1. Distance
This reflects how far price is trading from the VWMA after normalization. The purpose is to measure relative displacement rather than raw tick or point difference.
2. Persistence
This tracks how long the current directional displacement has remained active. A move that has stayed consistently above or below the weighted mean for multiple bars may carry a different interpretation than a one-bar separation.
3. Expansion
This evaluates whether the displacement is still building. Rising displacement can indicate that price is not merely away from the mean, but continuing to separate from it.
4. Normalization
This evaluates whether the displacement is beginning to contract toward the mean. It does not forecast reversal by itself. It is intended to show whether the existing separation is losing expansion pressure and moving into a more balanced phase.
5. Regime
The script also classifies contextual slope behavior into a simplified regime reading. This is not meant to be a full market regime engine. It is a compact contextual aid for distinguishing broader trend-like conditions from quieter or more balanced environments.
These components feed the state engine and the panel metrics. The result is not a claim of certainty, but a structured way to read where price is operating relative to a volume-weighted center.
STATE MODEL
The indicator organizes behavior into discrete chart states. These states are designed for interpretation, not for deterministic outcome prediction.
Balanced
Price is trading close to the VWMA and displacement is limited.
Early Dislocation
Price is beginning to separate from the weighted mean, but the move is still in an early stage.
Persistent Dislocation
Distance is no longer only emerging; it has remained active for a more sustained period.
Extended
The move has reached a stronger separation from the mean and may require more caution in interpretation.
Overextended
Displacement is extreme relative to the current normalization model. This does not mean price must reverse immediately. It indicates an elevated extension condition.
Re-approaching
Distance is beginning to contract and the move may be rotating back toward VWMA equilibrium.
Rebalanced
Price has moved back toward the mean after a prior displacement phase.
The practical value of this model is that it helps separate fresh movement from mature movement. Two charts can both be above VWMA, but one may be in an early building phase while another may already be extended and normalizing.
HOW TO READ THE PANEL
The information panel is designed to provide a quick summary of the current state without overwhelming the chart.
Score
A composite reading of displacement behavior. This is a contextual score, not a performance metric and not a probability estimate.
Bias
A directional summary based on price relative to VWMA.
Regime
A simplified context tag derived from the weighted-mean behavior.
Distance
The current normalized displacement from VWMA.
Persistence
The number of bars associated with the current directional displacement run.
Normalization
A compact measure of contraction pressure toward the weighted mean.
Footer interpretation
A short descriptive line showing the current qualitative state context and whether displacement is expanding or contracting.
The panel is intended to summarize current conditions, not to replace full chart reading.
VISUAL STRUCTURE
The chart output is designed to be read in layers.
The central weighted-mean structure provides the equilibrium reference.
The inner visual structure highlights the core region around VWMA.
The displacement bands expand outward to show increasingly stretched conditions relative to the normalization thresholds.
The background tint provides a broad state cue so users can quickly identify periods of balance, active displacement, or higher extension.
The last-bar state label is included to make the current state readable at a glance without scanning the full panel.
This layered design is intentional. It allows the script to remain visually expressive while still communicating a hierarchy: center, displacement, extension, and normalization.
HOW THIS TOOL MAY BE USED
Some users may apply the script as a continuation context tool. In that workflow, the focus is less on exact entries and more on whether a move is still developing in a healthy way away from the weighted mean.
Some users may apply it as an extension-awareness tool. In that workflow, the purpose is to identify when a move may already be mature and when aggressive continuation assumptions deserve more caution.
Others may use it as a mean-normalization context tool. In that workflow, the interest is not whether price is simply above or below VWMA, but whether the separation is holding, expanding, or rotating back toward equilibrium.
Because of this flexibility, the script is not restricted to one market style. It can be used as an analytical overlay in trending markets, in rotational conditions, or as part of a broader discretionary review process.
SIGNALS AND ALERTS
The script includes alerts tied to state transitions and context changes. These alerts are descriptive events based on the model, not trade promises.
Persistent Dislocation
Triggers when the script enters the Persistent Dislocation state.
Extended
Triggers when the script enters the Extended state.
Overextended
Triggers when the script enters the Overextended state.
Re-approaching
Triggers when the script enters the Re-approaching state.
Rebalanced
Triggers when price rotates back toward the weighted mean after prior displacement.
Score Threshold Cross
Triggers when the composite score crosses above the user-defined threshold.
Bias Flip
Triggers when directional bias flips across VWMA.
These alerts are intended to support monitoring and workflow organization. They should be interpreted in the context of the broader chart.
KEY INPUTS
VWMA Length
Controls the length of the volume-weighted mean.
Normalization Mode
Selects whether normalized displacement is built from ATR, standard deviation, or a hybrid of the two.
Normalization Length
Controls the lookback used in the normalization engine.
Distance Smoothing
Adjusts smoothing applied to the displacement behavior.
Regime Lookback
Controls the lookback used in the regime context calculation.
State Thresholds
Define how mild, active, strong, and extreme displacement are classified.
Persistence Confirmation Bars
Helps distinguish brief separation from more sustained displacement.
Re-Approach Confirmation Bars
Controls how quickly the script recognizes contraction back toward the mean.
Visual Settings
Allow the user to manage bands, background context, VWMA visibility, line strength, opacity behavior, and label placement.
Panel Settings
Allow layout, position, theme, and text sizing adjustments.
The script is intended to be configurable so the same framework can be adapted to different symbols and timeframes without changing its core logic.
LIMITATIONS AND TRANSPARENCY
This script does not predict future price direction.
It is not a standalone trading system, not an execution engine, and not a substitute for full chart analysis.
A strong displacement can remain strong for longer than expected. An overextended reading does not guarantee immediate reversal. A re-approaching or rebalanced state does not guarantee that a larger directional move has ended.
Like any normalized framework, the output depends on the settings chosen by the user. Different symbols, timeframes, volatility environments, and threshold selections can meaningfully change the visual behavior and state classification.
The script should be understood as a descriptive map around a volume-weighted mean, not as a promise of edge by itself.
RISK DISCLOSURE
This indicator is for analytical and educational charting use only.
It does not provide financial advice, investment advice, or guaranteed outcomes.
All trading and investing involve risk. Users should evaluate any signal, state change, or alert in the context of their own process, market conditions, risk controls, and independent judgment.
AG Pro VWMA Dislocation Map is designed to help structure interpretation around VWMA displacement behavior. It is not designed to remove uncertainty from markets, and it should not be used as the sole basis for financial decisions.
Indicator

Turbulence Fractal Scanner [JOAT]Turbulence Fractal Scanner
Introduction
The Turbulence Fractal Scanner is an advanced open-source volatility chaos prediction engine that combines ATR, Bollinger Band Width, Keltner Channels, Historical Volatility, and Squeeze detection into a unified volatility analysis system. This indicator measures market turbulence across multiple dimensions, creating a comprehensive volatility index that reveals expansion/contraction cycles, squeeze conditions, and breakout predictions.
Unlike single-dimension volatility indicators, the Turbulence Fractal Scanner provides multi-layered volatility intelligence through percentile ranking, composite indexing, regime classification, and squeeze detection. The indicator is designed for traders who understand that volatility precedes price movement and that multi-dimensional volatility analysis provides early warning of significant market shifts.
Why This Indicator Exists
This indicator addresses the need for comprehensive volatility analysis that goes beyond simple ATR or Bollinger Bands. By combining five distinct volatility methodologies, it reveals:
ATR Analysis: Average True Range measures actual price movement volatility
Bollinger Band Width: Measures price dispersion relative to moving average
Keltner Channels: ATR-based bands for volatility envelope detection
Historical Volatility: Statistical measure of price returns volatility
Squeeze Detection: Identifies when Bollinger Bands contract inside Keltner Channels
Composite Volatility Index: Unified measure combining all five components
Regime Classification: Categorizes volatility as Low, Normal, High, or Squeeze
Breakout Prediction: Detects squeeze breakouts with directional bias
Core Components Explained
1. ATR (Average True Range) Analysis
ATR measures the average range of price movement:
True Range: Maximum of (high - low), (high - previous close), (previous close - low)
ATR Calculation: Moving average of true range over period (default 14)
ATR Smoothing: Additional EMA smoothing (default 7) reduces noise
ATR Percent: ATR divided by close, expressed as percentage
ATR Percentile: ATR ranked against 100-bar history (0-100 scale)
ATR percentile shows whether current volatility is high or low relative to recent history. High percentile (> 70) indicates elevated volatility, low percentile (< 30) indicates compressed volatility.
2. Bollinger Band Width Analysis
BB Width measures price dispersion:
Bollinger Bands: SMA ± (standard deviation × multiplier)
BB Width: (Upper band - Lower band) / Middle band × 100
BB Width Percentile: Current width ranked against 100-bar history
Narrow BB Width indicates low volatility and potential breakout setup. Wide BB Width indicates high volatility and potential mean reversion.
3. Keltner Channel Analysis
Keltner Channels use ATR for volatility bands:
Basis: EMA of close (default 20 periods)
Range: ATR × multiplier (default 1.5)
Upper/Lower: Basis ± Range
Keltner Channels adapt to volatility changes and are used in squeeze detection.
4. Squeeze Detection
Squeeze occurs when Bollinger Bands contract inside Keltner Channels:
Squeeze On: BB Lower > KC Lower AND BB Upper < KC Upper
Squeeze Off: Bands no longer contracted
Squeeze Breakout: Transition from Squeeze On to Squeeze Off
Breakout Direction: Determined by close comparison (close > close = bullish)
Squeezes indicate extreme volatility compression. Breakouts from squeezes often lead to significant directional moves.
5. Historical Volatility (HV) Calculation
HV measures statistical volatility of returns:
Returns: Logarithmic price changes (log(close / close ))
Standard Deviation: StdDev of returns over period (default 20)
Annualization: Multiply by sqrt(252) for annual volatility (optional)
HV Percentile: Current HV ranked against 100-bar history
HV provides a statistical measure of actual price volatility, complementing the technical measures (ATR, BB Width).
6. Composite Volatility Index
All three percentile measures are combined into a unified index:
Volatility Index = (ATR Percentile + BB Width Percentile + HV Percentile) / 3
This composite index provides a balanced view of volatility across multiple methodologies. Values range from 0 (extremely low volatility) to 100 (extremely high volatility).
7. Volatility Regime Classification
The indicator classifies volatility into four regimes:
Squeeze (Priority): When squeeze is active, regardless of volatility index
Low Volatility: Volatility Index < threshold (default 30)
Normal Volatility: Volatility Index between low and high thresholds (30-70)
High Volatility: Volatility Index > threshold (default 70)
Regime classification helps traders adapt strategies to current volatility conditions.
8. Volatility Trend Analysis
The indicator tracks volatility direction:
Volatility Trend: 5-period SMA of Volatility Index
Rising Volatility: Trend rising for 3+ consecutive bars
Falling Volatility: Trend falling for 3+ consecutive bars
Expansion: Volatility Index rising for 3+ consecutive bars
Contraction: Volatility Index falling for 3+ consecutive bars
Volatility trends help predict whether turbulence is increasing or decreasing.
9. Breakout Prediction System
The indicator predicts breakouts from squeeze conditions:
Squeeze Breakout: Detected when squeeze transitions from On to Off
Direction: Bullish if close > close , bearish if close < close
Volatility Confirmation: Best breakouts occur when Volatility Index < 40 (compressed)
Breakouts from low volatility squeezes often lead to sustained directional moves.
10. Turbulence Shift Detection
The indicator identifies regime changes:
Regime Shift: When volatility regime changes (Low ↔ Normal ↔ High ↔ Squeeze)
Anti-Overlap: Minimum 10 bars between shift signals
High Vol Entry: Shift into High Volatility regime
Low Vol Entry: Shift into Low Volatility regime
Regime shifts provide early warning of changing market conditions.
Visual Elements
Volatility Index Line: Main line showing composite volatility with regime-based coloring (purple = squeeze, red = high, cyan = low, yellow = normal)
Component Lines: Three thin lines showing ATR, BB Width, and HV percentiles
Volatility Trend Line: Step-line showing smoothed volatility trend
Threshold Lines: Horizontal lines at high (70) and low (30) thresholds, plus median (50)
Zone Fills: Shaded areas above high threshold (red) and below low threshold (cyan)
Squeeze Background: Purple background when squeeze is active
Breakout Signals: Triangles marking squeeze breakouts (cyan = bullish, red/orange = bearish)
Regime Shift Circles: Small circles marking regime transitions
Information Dashboard: Displays regime, volatility index, ATR/BB/HV percentiles, squeeze status, volatility trend, expansion/contraction, breakout status, ATR/BB values, and overall signal
How to Use This Indicator
Step 1: Check Volatility Regime
Monitor the dashboard for current regime (Squeeze, Low Vol, Normal, High Vol). Adapt strategy to regime.
Step 2: Monitor Volatility Index
Volatility Index < 30 = compressed (potential breakout setup)
Volatility Index > 70 = elevated (potential mean reversion or continuation)
Step 3: Watch for Squeeze Conditions
Purple background indicates squeeze. Prepare for breakout when squeeze ends.
Step 4: Identify Breakout Direction
When squeeze breakout occurs, triangle color shows direction (cyan = bullish, red = bearish).
Step 5: Check Volatility Trend
Rising volatility = increasing turbulence, falling volatility = calming conditions.
Step 6: Monitor Expansion/Contraction
Expanding volatility often precedes strong moves. Contracting volatility suggests consolidation.
Step 7: Use Regime Shifts as Alerts
Shifts into High Vol or Low Vol regimes provide early warning of changing conditions.
Best Practices
Trade breakouts from squeeze conditions with low volatility index (< 40)
Avoid trend-following strategies in high volatility regimes (> 70)
Use low volatility regimes (< 30) to prepare for breakout setups
Monitor all three components (ATR, BB, HV) for confirmation
Rising volatility in low regime warns of impending breakout
Falling volatility in high regime suggests consolidation ahead
Combine with trend indicators - volatility shows when, trend shows direction
Be cautious of false breakouts - wait for volatility confirmation
Input Parameters
ATR Configuration:
ATR Length: Period for ATR calculation (default: 14)
ATR Smoothing: EMA smoothing period (default: 7)
Bollinger Bands:
BB Length: Period for BB calculation (default: 20)
BB Multiplier: Standard deviation multiplier (default: 2.0)
Keltner Channels:
KC Length: Period for KC basis (default: 20)
KC Multiplier: ATR multiplier for bands (default: 1.5)
Historical Volatility:
HV Length: Period for HV calculation (default: 20)
Annualize HV: Convert to annual volatility (default: enabled)
Regime Thresholds:
Low Volatility: Threshold for low regime (default: 30)
High Volatility: Threshold for high regime (default: 70)
Visual Configuration:
Low/Normal/High/Squeeze Colors: Customizable regime colors
Originality Statement
This indicator is original in its comprehensive volatility analysis approach. While individual components (ATR, BB, KC, HV, Squeeze) are established concepts, this indicator is justified because:
It combines five distinct volatility methodologies into a unified composite index
Percentile ranking normalizes all components to a common 0-100 scale
The regime classification system categorizes volatility conditions systematically
Squeeze detection with breakout prediction provides actionable trading signals
Volatility trend and expansion/contraction analysis predict volatility direction
Turbulence shift detection identifies regime changes early
The comprehensive dashboard presents all volatility dimensions simultaneously
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Volatility analysis does not guarantee profitable trades. Low volatility does not guarantee breakouts. High volatility does not guarantee reversals. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by officialjackofalltrades Indicator

TTT - Trend Identification Moving AveragesWhat This Indicator Does
This indicator is designed to help traders identify and stay aligned with the dominant market trend by combining multiple moving averages with volume analysis. It provides a structured framework to evaluate trend direction, momentum, and participation—without relying on news, fundamentals, or opinions.
The Philosophy Behind It
Markets move in trends—and those trends tend to persist far longer than most investors expect. The biggest mistake traders make is trying to predict reversals instead of recognizing and following the current trend.
This tool is built on a simple principle: Trade with the trend, not against it.
As outlined in Technical Trading Mastery, price action reflects all known information, often reversing well before economic data or news confirms the move . By focusing on price and trend structure, traders can position themselves on the right side of the market rather than reacting emotionally.
How It Works
1. Multi-Timeframe Trend Structure
This indicator uses a combination of short-, intermediate-, and long-term moving averages:
5 EMA → Short-term momentum
20 EMA → Near-term trend direction
50 EMA → Intermediate trend
150 SMA → Long-term market direction
These averages act as dynamic support and resistance levels while also defining trend alignment .
2. Trend Confirmation Logic
The relationship between moving averages helps define market conditions:
- When shorter-term averages are above longer-term averages → Uptrend
- When shorter-term averages fall below longer-term averages → Downtrend
- When averages compress or move sideways → Consolidation / indecision
A key concept:
- When the 50 EMA is above the 150 SMA, the market is considered in a healthy uptrend
- When the 50 EMA falls below the 150 SMA, it signals a potential shift to a bearish environment
This provides a clear, rules-based way to stay aligned with the dominant trend.
3. Entry & Pullback Context
Trends do not move in straight lines—they move in waves. Price will naturally pull back toward moving averages during trends.
These areas can act as:
- Support in uptrends
- Resistance in downtrends
This allows traders to evaluate whether price is:
- Extending (higher risk)
- Pulling back (potential opportunity)
- Breaking trend (potential warning)
4. Volume as Participation Insight
Volume is displayed to provide context behind price movement.
- Rising price with increasing volume → stronger participation
- Rising price with declining volume → weaker conviction
- Sharp volume spikes → potential emotional or institutional activity
Markets are driven by waves of capital flow and crowd psychology, not just price alone . Volume helps reveal when those waves are gaining or losing strength.
Why This Matters
Most traders struggle not because they lack indicators—but because they lack structure and discipline.
This indicator simplifies decision-making by focusing on three key elements:
- Trend direction (Are you aligned with the market?)
- Price location (Are you chasing or buying weakness?)
- Participation (Is there real conviction behind the move?)
Instead of reacting to headlines or emotions, this framework encourages a rules-based approach to understanding market behavior.
How To Use It
- Focus on trading in the direction of the dominant trend
- Use moving averages as a guide for trend alignment and structure
- Observe how price reacts near key averages for potential continuation or warning signals
- Use volume to confirm whether moves are supported by participation
Final Perspective
This tool is not about predicting tops or bottoms.
It is about recognizing trends, understanding market structure, and staying positioned with the flow of capital.
Because in the end, the market rewards those who follow it—not those who fight it. Indicator

Divergence Constellation [JOAT]Divergence Constellation
Introduction
The Divergence Constellation is an advanced open-source multi-oscillator divergence detection system that combines RSI, MACD, TSI, and Stochastic analysis with sophisticated pivot detection and confluence scoring. This indicator identifies both regular and hidden divergences across multiple oscillators simultaneously, creating a constellation of divergence signals that reveal potential reversals and trend continuations with high probability.
Unlike single-oscillator divergence tools, the Divergence Constellation provides multi-dimensional divergence analysis through composite oscillator calculation, four-oscillator confluence scoring, regular and hidden divergence detection, and chart projection. The indicator is designed for traders who understand that divergences confirmed across multiple oscillators provide significantly higher probability setups than single-oscillator divergences.
Why This Indicator Exists
This indicator addresses the need for systematic multi-oscillator divergence analysis. By combining four distinct oscillators with confluence scoring, it reveals:
Regular Bullish Divergence: Price makes lower low, oscillators make higher low (reversal up signal)
Regular Bearish Divergence: Price makes higher high, oscillators make lower high (reversal down signal)
Hidden Bullish Divergence: Price makes higher low, oscillators make lower low (trend continuation up)
Hidden Bearish Divergence: Price makes lower high, oscillators make higher high (trend continuation down)
Confluence Scoring: Counts how many oscillators confirm the divergence (1-4 score)
Composite Oscillator: Unified oscillator combining all four components
Chart Projection: Divergence lines drawn on both oscillator pane and main chart
Core Components Explained
1. Four-Oscillator System
The indicator calculates four distinct oscillators, each providing unique momentum perspective:
RSI (Relative Strength Index):
Measures momentum by comparing average gains to average losses
Zero-centered (subtracts 50) for composite integration
Sensitive to overbought/oversold conditions
Default period: 14
MACD (Moving Average Convergence Divergence):
Measures relationship between two exponential moving averages
Histogram shows momentum acceleration/deceleration
Responsive to trend changes
Default periods: 12, 26, 9
TSI (True Strength Index):
Double-smoothed momentum indicator
Filters noise while preserving trend direction
Excellent for divergence detection
Default periods: 25, 13
Stochastic:
Compares close to recent high-low range
Zero-centered (subtracts 50) for composite integration
Identifies overbought/oversold extremes
Default periods: 14, 3
2. Composite Oscillator Calculation
All four oscillators are combined into a unified composite:
Composite = (RSI + MACD + TSI + Stochastic) / 4
This composite oscillator provides a balanced view of momentum across all four methodologies. Divergences are detected on the composite, then confirmed by checking individual oscillators.
3. Pivot Detection System
The indicator uses sophisticated pivot detection to identify divergence points:
Pivot Left/Right: Number of bars on each side for pivot confirmation (default: 5)
Price Pivots: Identifies swing highs and lows in price
Oscillator Pivots: Identifies swing highs and lows in each oscillator
Lookback Range: Min (5) to Max (60) bars for comparing pivots
Pivots must be confirmed (bars on both sides) before divergence analysis begins.
4. Regular Divergence Detection
Regular divergences signal potential reversals:
Regular Bullish Divergence:
Price makes lower low (current pivot low < previous pivot low)
Composite oscillator makes higher low (current pivot low > previous pivot low)
Indicates weakening downward momentum - potential reversal up
Best at oversold levels (composite < -20)
Regular Bearish Divergence:
Price makes higher high (current pivot high > previous pivot high)
Composite oscillator makes lower high (current pivot high < previous pivot high)
Indicates weakening upward momentum - potential reversal down
Best at overbought levels (composite > 20)
5. Hidden Divergence Detection
Hidden divergences signal trend continuation:
Hidden Bullish Divergence:
Price makes higher low (current pivot low > previous pivot low)
Composite oscillator makes lower low (current pivot low < previous pivot low)
Indicates strong underlying bullish momentum - trend continuation up
Confirms uptrend strength
Hidden Bearish Divergence:
Price makes lower high (current pivot high < previous pivot high)
Composite oscillator makes higher high (current pivot high > previous pivot high)
Indicates strong underlying bearish momentum - trend continuation down
Confirms downtrend strength
6. Confluence Scoring System
When a divergence is detected on the composite, the indicator checks all four individual oscillators:
Score 1/4: Only one oscillator confirms - weak divergence
Score 2/4: Two oscillators confirm - moderate divergence (minimum for signals)
Score 3/4: Three oscillators confirm - strong divergence
Score 4/4: All four oscillators confirm - extreme divergence (highest probability)
The minimum confluence score (default 2) filters out weak divergences that lack multi-oscillator confirmation.
7. Signal Generation Logic
Signals are generated only at extreme oscillator levels with anti-overlap logic:
Bullish Signals:
Regular bullish divergence detected
Composite oscillator < -20 (oversold)
Confluence score >= minimum (default 2)
At least 20 bars since last bullish signal (anti-overlap)
Bearish Signals:
Regular bearish divergence detected
Composite oscillator > 20 (overbought)
Confluence score >= minimum (default 2)
At least 20 bars since last bearish signal (anti-overlap)
Extreme Signals:
Confluence score = 4/4 (all oscillators confirm)
Composite at extreme levels (< -30 or > 30)
Displayed as diamond shapes for emphasis
8. Visual Divergence Lines
Divergence lines are drawn connecting pivot points:
Regular Divergences: Solid lines (green = bullish, red = bearish)
Hidden Divergences: Dashed lines (cyan = bullish, orange = bearish)
Oscillator Pane: Lines drawn on composite oscillator
Chart Projection: Lines also drawn on main price chart (optional)
Lines provide visual confirmation of the divergence pattern and help identify the exact pivot points involved.
Visual Elements
Four Oscillator Lines: Thick colored lines showing RSI (cyan), MACD (magenta), TSI (yellow), and Stochastic (green)
Composite Line: White line showing unified oscillator
Zero Line: Gray horizontal line at zero
Overbought/Oversold Zones: Shaded areas at +30/-30 levels
Divergence Lines: Solid/dashed lines connecting pivot points
Signal Triangles: Small triangles at signal generation points
Extreme Diamonds: Larger diamonds for 4/4 confluence signals
Information Dashboard: Displays composite position, confluence score, RSI/MACD/TSI/Stochastic status, composite value, divergence types, signal strength, extreme events, and overall verdict
How to Use This Indicator
Step 1: Monitor Composite Position
Check if composite oscillator is at extreme levels (> 30 overbought, < -30 oversold). Divergences at extremes have highest probability.
Step 2: Check Confluence Score
Look for confluence scores of 3/4 or 4/4. Higher scores indicate stronger divergence confirmation across multiple oscillators.
Step 3: Identify Divergence Type
Regular divergences signal reversals, hidden divergences signal trend continuation. Trade accordingly.
Step 4: Wait for Signal Confirmation
Don't trade divergence lines alone. Wait for signal triangles that confirm divergence meets all criteria (extreme level, confluence, anti-overlap).
Step 5: Look for Extreme Events
Diamond shapes indicate 4/4 confluence at extreme levels - highest probability setups.
Step 6: Confirm with Price Action
Use divergence signals as alerts, then confirm with price action, support/resistance, or other indicators before entering.
Step 7: Check Individual Oscillators
Dashboard shows status of each oscillator. All four overbought/oversold provides additional confirmation.
Best Practices
Trade only divergences with confluence score >= 2 (default minimum)
Focus on regular divergences at extreme levels (< -30 or > 30) for reversals
Use hidden divergences to confirm trend continuation, not as standalone entries
Wait for signal triangles - don't front-run divergence lines
4/4 confluence signals (diamonds) offer highest probability setups
Combine with support/resistance levels for additional confirmation
Avoid divergences in middle range (-20 to +20) - wait for extremes
Use higher timeframe divergences for stronger significance
Input Parameters
Pivot Detection:
Pivot Left: Bars to left of pivot (default: 5)
Pivot Right: Bars to right of pivot (default: 5)
Max Lookback: Maximum bars to compare pivots (default: 60)
Min Lookback: Minimum bars to compare pivots (default: 5)
Oscillator Configuration:
RSI Length: Period for RSI (default: 14)
MACD Fast: Fast EMA period (default: 12)
MACD Slow: Slow EMA period (default: 26)
MACD Signal: Signal line period (default: 9)
TSI Long: Long smoothing period (default: 25)
TSI Short: Short smoothing period (default: 13)
Stochastic K: K period (default: 14)
Stochastic D: D smoothing (default: 3)
Divergence Rules:
Show Regular Divergence: Toggle regular divergence detection (default: enabled)
Show Hidden Divergence: Toggle hidden divergence detection (default: enabled)
Min Confluence Score: Minimum oscillators that must confirm (default: 2)
Project on Chart: Draw divergence lines on main chart (default: enabled)
Visual Configuration:
Bullish/Bearish Divergence Colors: Colors for regular divergences
Hidden Bullish/Bearish Colors: Colors for hidden divergences
Originality Statement
This indicator is original in its multi-oscillator confluence approach. While individual oscillators and divergence concepts are established, this indicator is justified because:
It combines four distinct oscillators into a unified composite system
The confluence scoring system measures divergence strength across multiple oscillators
Automatic detection of both regular and hidden divergences with pivot analysis
Signal generation includes extreme level filtering and anti-overlap logic
Chart projection allows divergence visualization on both oscillator and price chart
The comprehensive dashboard presents all oscillator states and divergence metrics simultaneously
Integration of multiple oscillator perspectives creates higher probability divergence signals
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Divergence analysis does not guarantee profitable trades or reversals. Past divergences do not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by officialjackofalltrades Indicator

Smart Reversal EntrySmart Reversal Entry
Smart Reversal Entry is an open-source reversal-entry indicator built around one specific analytical idea:
after a short, directional three-candle expansion move, the first confirmed candle closing back in the opposite direction can create a structured reversal-entry opportunity when it appears in the correct EMA context.
This script is not designed to mark every bullish or bearish candle, and it is not intended to behave like a generic trend-following overlay, a standard candlestick-pattern indicator, or a broad “signal generator” that reacts to every small reversal. Its purpose is to measure short-term directional exhaustion in a standardized way, filter that move through an EMA context, require close-confirmed reversal behavior, and then project a fixed-risk trade structure directly on the chart for analysis and review.
The script also includes an internal background optimizer and review tables so users can compare how the same reversal framework behaves under different parameter combinations. These review tools are included to support study and comparison, not to imply future performance.
OPEN-SOURCE NOTE
This script is published open-source so users can inspect the logic directly, verify what the script is doing, and adapt parts of the workflow for their own research if they wish.
Even though the code is open, this description is intentionally detailed because many PulseWire users do not read Pine Script. The goal is for a user to understand what the script does, how it works, why its parts belong together, and how it may be used in practice without having to study the code line by line.
OVERVIEW
At a high level, the script does six things:
1. It measures whether the last three candles produced a directional move large enough to matter in pip terms.
2. It checks whether price is positioned on the correct side of a selected EMA filter.
3. It requires the current candle to close in the opposite direction as confirmation of a possible reversal.
4. It maps a fixed stop-loss and a selectable take-profit multiple directly onto the chart.
5. It tracks projected trade outcomes and summarizes them in a review table and a daily PnL table.
6. It runs a hidden background optimizer over multiple EMA and move-threshold combinations so the user can compare the current settings to an internal parameter sweep.
The script is therefore meant to function as a complete reversal-entry and review framework rather than as a single-purpose candle-pattern marker.
CORE IDEA
Many reversal-style tools identify isolated candles or basic candlestick formations, but they do not standardize the market context around them.
This script is built around the idea that a reversal signal becomes more meaningful when three specific things happen together:
1. price has already made a clear short-term directional move,
2. that move is large enough to matter relative to the chosen pip structure,
3. and the next confirmed candle closes back in the opposite direction while price remains on the correct side of an EMA filter.
The model is intentionally narrow.
It does not try to identify every turning point in the market.
It does not try to classify broad market structure.
It does not use discretionary support and resistance interpretation.
It does not rely on vague candle descriptions such as “looks weak” or “looks exhausted”.
Instead, it defines reversal-entry conditions using a fixed sequence:
first measure a three-candle directional push,
then filter it using EMA context,
then require an opposite close-confirmed candle,
then project a standardized risk framework,
then review the resulting projected outcomes over time.
That narrower focus is the main reason this script exists in its current form.
WHY THIS SCRIPT IS NOT A SIMPLE MASHUP
This script combines multiple components, but they are not included simply to place more features into one publication.
Each component has a specific function inside the same analytical workflow:
- The EMA filter defines directional context.
- The three-candle move measurement defines whether a short-term push is large enough to qualify.
- The reversal candle confirmation defines the actual entry trigger.
- The pip-based stop-loss and RR framework standardize trade projection.
- The summary and daily review tables organize projected outcomes into a readable review structure.
- The internal optimizer compares the same reversal logic across multiple hidden EMA and move-threshold combinations.
These layers are interdependent.
Without the three-candle move measurement, the script would react to many small candles that do not represent meaningful short-term expansion.
Without the EMA filter, the script would lose its directional context and become a more generic reversal marker.
Without the close-confirmed reversal candle, the script would identify momentum but not the actual reversal-entry moment.
Without the risk projection layer, the user would still need to manually draw the entry, stop, and target after every signal.
Without the review tables, the user would have less organized feedback when reviewing results under the selected settings.
Without the internal optimizer, the user would see only the current configuration and not how the same logic behaves across a broader parameter range.
For that reason, the script is intended as a single reversal-entry framework, not as a random collection of unrelated features.
WHAT THE SCRIPT DOES
The script identifies reversal-entry setups using a strict, rule-based structure.
Long setup requirements:
- price must be above the selected EMA,
- the prior three candles must all be bearish,
- the combined bearish move across that sequence must reach the minimum pip threshold,
- the current candle must close bullish.
Short setup requirements:
- price must be below the selected EMA,
- the prior three candles must all be bullish,
- the combined bullish move across that sequence must reach the minimum pip threshold,
- the current candle must close bearish.
When a valid signal appears, the script can:
- place a BUY or SELL label,
- project a fixed stop loss in pips,
- project a take-profit level using the selected RR multiple,
- draw TP/SL boxes,
- draw an entry line,
- keep historical projected trades visible for later review,
- summarize projected outcomes in a summary table,
- summarize recent daily projected behavior in a daily PnL table.
The script also evaluates an internal optimizer in the background. That optimizer tests multiple EMA lengths and minimum-move combinations using the same reversal logic and displays the best-performing parameter combination inside the summary table over the shared analysis window.
HOW THE SCRIPT WORKS
1) EMA CONTEXT FILTER
The script uses a single EMA as a directional filter.
For long setups:
price must close above the selected EMA.
For short setups:
price must close below the selected EMA.
This does not turn the script into a pure trend-following system. Instead, it acts as a directional context filter so that reversal entries are only considered when price is positioned on the chosen side of the EMA.
In practical terms, the EMA filter is used to reduce context-free reversal signals. A bullish candle appearing after a bearish push is not enough by itself. The script still wants price to be trading above the selected EMA for longs, and below it for shorts.
2) THREE-CANDLE DIRECTIONAL MOVE MEASUREMENT
The script looks at the three candles immediately before the signal candle.
For a long setup:
those three candles must all be bearish.
For a short setup:
those three candles must all be bullish.
The script then measures the total directional move across that sequence in pip terms.
For long setups, it calculates the bearish move from the open of the first candle in the sequence to the close of the third bearish candle.
For short setups, it calculates the bullish move from the open of the first candle in the sequence to the close of the third bullish candle.
That move must be at least as large as the user-defined “Minimum 3-Candle Move (Pips)” setting.
This is one of the key parts of the script’s logic. It ensures that the setup is not based on three arbitrary candles, but on a directional push that is large enough to meet the minimum threshold selected by the user.
3) REVERSAL CANDLE CONFIRMATION
After the three-candle directional push is identified, the current candle must close in the opposite direction.
For long setups:
the current candle must close bullish.
For short setups:
the current candle must close bearish.
This requirement is intentionally strict. The script does not treat intrabar movement or unfinished candles as a valid signal. Signals are confirmed only when the bar closes.
This matters because a reversal that looks valid intrabar can disappear by the close. By waiting for close confirmation, the script reduces premature signal marking.
4) COOLDOWN FILTER
The script includes a cooldown period between signals.
Once a signal has fired, a new signal is not allowed until a defined number of bars has passed. In the current implementation, that cooldown is handled internally.
The purpose of this filter is to reduce signal clustering and prevent the chart from producing multiple nearby entries from the same short-term market behavior.
5) PIP-BASED RISK PROJECTION
When a valid signal appears, the script creates a projected trade framework using:
- entry at the signal close,
- a fixed stop-loss distance in pips,
- a take-profit level based on the selected risk/reward multiple.
This makes the projection logic standardized across signals.
For long setups:
- stop loss is placed below entry,
- take profit is placed above entry.
For short setups:
- stop loss is placed above entry,
- take profit is placed below entry.
The script can draw:
- entry line,
- TP box,
- SL box,
- BUY / SELL label,
- TP / SL hit labels.
This projection layer is not meant to claim that a setup will succeed. Its purpose is to reduce manual chart annotation and make the behavior of the signal model easier to inspect after the fact.
6) SAME-BAR TP/SL PRIORITY RULE
The script uses a strict and conservative rule when both target and stop would appear to be touched on the same bar after entry:
if TP and SL are both reached on the same bar, SL takes priority.
This is an important implementation detail because it directly affects projected statistics. It makes the review logic more conservative and avoids optimistic ambiguity when bar data alone cannot determine exact intrabar order.
7) SHARED ANALYSIS WINDOW
The script uses a shared analysis window internally.
Projected results and optimizer comparisons are evaluated over a rolling historical range rather than over the full unlimited chart history. This keeps the internal review process more controlled and makes the optimizer comparison consistent inside the same defined lookback window.
8) INTERNAL OPTIMIZER
One of the script’s more advanced components is the internal optimizer.
The optimizer runs in the background and is intentionally not exposed as a user-facing optimization panel. Instead of asking the user to manually test every variation, the script internally evaluates combinations of:
- 10 EMA values,
- 10 minimum-move thresholds.
That produces 100 total internal combinations.
Each combination uses the same reversal logic:
- EMA context,
- three-candle directional sequence,
- minimum move threshold,
- opposite close-confirmed candle,
- same stop-loss and RR structure.
The optimizer then tracks projected wins, losses, net R, gross profit, and gross loss for each combination, and the summary table displays the current best combination based on the script’s internal comparison rules.
This optimizer is not intended to present a “perfect setting”. It is a comparative review aid that helps the user understand how the same reversal framework behaves across multiple hidden parameter combinations.
WHAT MAKES THIS SCRIPT ORIGINAL
This script uses familiar technical-analysis building blocks such as:
- EMA filtering,
- candle-sequence logic,
- pip-based move measurement,
- fixed stop-loss projection,
- risk/reward mapping,
- performance review tables.
Those building blocks are not original by themselves.
The originality of this script is not in inventing a completely new primitive indicator. The originality lies in how these familiar elements are arranged into one tightly defined reversal-entry workflow:
EMA context
→ three-candle directional expansion
→ minimum pip-threshold validation
→ opposite candle close confirmation
→ fixed-risk trade projection
→ on-chart review
→ internal background parameter comparison
That full sequence is the main reason this script exists as its own publication.
It is not intended to be simply another EMA filter, another candlestick marker, another TP/SL visualizer, or another optimizer dashboard. It is specifically a short-term reversal-entry framework that combines directional context, expansion measurement, confirmation logic, risk mapping, and review in one workflow.
WHAT APPEARS ON THE CHART
Depending on settings, the chart may display:
- EMA line,
- BUY labels,
- SELL labels,
- signal-bar background highlights,
- entry line,
- TP box,
- SL box,
- TP hit labels,
- SL hit labels,
- summary table,
- daily PnL table.
Users who want a cleaner chart can disable some visual layers and keep only the ones most relevant to their workflow.
HOW TO USE THE SCRIPT
A practical workflow is:
1. Add the script to a standard candlestick chart.
2. Select the EMA length you want to use as directional context.
3. Set the minimum three-candle move threshold in pips.
4. Set the pip preset correctly for the instrument, or use manual pip size if needed.
5. Choose the stop-loss distance in pips.
6. Select the RR mode used for take-profit projection.
7. Wait for a valid long or short setup to appear.
8. Use the projected entry, stop, and target structure as a chart-analysis framework rather than as a blind instruction.
9. Review projected trade behavior in the summary table and daily table.
10. Compare your selected settings with the optimizer’s best internal combination, but do not treat the optimizer output as a guaranteed best future configuration.
This script is best understood as a structured decision-support and reversal-review tool, not as a self-sufficient trading system.
SETTINGS REFERENCE
Signal Settings
- EMA Length: sets the EMA used as the directional filter.
- Minimum 3-Candle Move (Pips): defines how large the directional three-candle move must be before a reversal candle can qualify.
Pip Settings
- Pip Preset: selects a predefined pip-size interpretation for common instrument types.
- Manual Pip Size: allows direct control when the selected symbol needs a custom pip conversion.
Risk Management
- Stop Loss (Pips): sets the fixed stop-loss distance in pip units.
- Take Profit RR: sets the projected target multiple relative to the stop-loss distance.
Visual Settings
- Show Buy/Sell Labels: shows or hides the signal labels.
- Highlight Signal Bars: adds background color to signal bars.
- Show Entry Line: shows or hides the projected entry line.
- Show TP/SL Hit Labels: controls whether projected outcomes are labeled.
- Show TP Hit Labels: controls TP hit labels specifically.
- Show SL Hit Labels: controls SL hit labels specifically.
Summary Table
- Show Summary Table: enables or disables the main review table.
- Table Position: sets the table location.
- Table Text Size: controls summary-table text size.
Daily PnL Table
- Show Daily PnL Table: enables or disables the daily review table.
- Daily Table Position: sets the daily table location.
- Daily Table Text Size: controls daily-table text size.
INTERNAL LOGIC NOTES
The current code also includes internal settings that are not exposed as user-facing optimization controls. These include:
- signal cooldown,
- shared analysis window,
- maximum stored closed-trade visuals,
- hidden optimizer activation,
- internal optimizer parameter combinations.
These internal elements exist to keep the public interface simpler while still allowing the script to maintain consistent review behavior in the background.
IMPORTANT PRACTICAL NOTE ON PIP SIZE
The script uses pip-based calculations for:
- the minimum three-candle move,
- stop-loss distance,
- take-profit distance,
- optimizer comparison logic.
Because of that, correct pip interpretation is extremely important.
If signals appear too frequent, too rare, too compressed, or visually inconsistent for the instrument being analyzed, the first setting to verify is Pip Preset or Manual Pip Size.
This matters especially for:
- gold symbols,
- 5-digit forex symbols,
- JPY forex pairs,
- indices and CFD-style instruments,
- custom broker symbols with unusual decimal formatting.
LIMITATIONS AND SHORTCOMINGS
This script has important limitations:
- It is a short-term reversal model, not a full market-structure engine.
- It only evaluates one specific reversal pattern based on a three-candle directional push and an opposite close-confirmed candle.
- It does not use support/resistance structure, volume profile, or discretionary context.
- It relies on pip conversion, so poor pip settings can distort signal behavior.
- The internal optimizer compares parameter combinations only inside the defined shared analysis window.
- The optimizer output is a comparative review tool, not a guarantee that the best historical combination will remain best in future market conditions.
- Projected results depend on the script’s own simplified outcome logic.
- If TP and SL are both touched on the same bar, SL is prioritized by design, which makes the logic more conservative but also affects outcome statistics.
- Historical projected trades and review metrics are chart-based review aids, not proof of tradable real-world execution.
- No reversal-entry model can remove all false signals or all regime-dependent behavior.
For those reasons, the script should be used as a structured analysis and review framework, not as a promise of future profitability.
WHO THIS SCRIPT MAY BE USEFUL FOR
This script may be useful for traders who:
- want a rules-based short-term reversal-entry model,
- want EMA-based directional context,
- want a minimum expansion threshold before a reversal is allowed,
- want fixed-risk trade projection on the chart,
- want review tables for projected outcomes,
- want background comparison of multiple EMA and move-threshold combinations.
It may be less suitable for traders who:
- want a broad trend-following system,
- want a discretionary support/resistance engine,
- want a multi-pattern candlestick library,
- want a fully automated strategy with no outside confirmation,
- want outcome metrics interpreted as live performance promises.
DISCLAIMER
This script is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
Market conditions change, historical behavior does not guarantee future results, and users should perform their own analysis, validation, and risk management before using the script in live decision-making. Indicator

Indicator

Lattice Trend Helix [JOAT]Lattice Trend Helix
Introduction
The Lattice Trend Helix is an open-source trend analysis indicator built in Pine Script v6. It combines a GMMA-inspired multi-EMA fan system (19 exponential moving averages across fast and slow groups) with a pivot-center SuperTrend, RSI momentum confirmation, and a comprehensive trend strength scoring system. The indicator detects EMA fan alignment, measures trend strength on a 0-100 scale, identifies fan expansion/contraction dynamics, and generates priority-ranked signals including full confluence locks, fan crosses, SuperTrend flips, EMA 200 reclaims, fan burst breakouts, SuperTrend bounces, and displacement impulses.
The Guppy Multiple Moving Average (GMMA) concept, originally developed by Daryl Guppy, uses two groups of EMAs to visualize the behavior of short-term traders (fast group) and long-term investors (slow group). When both groups are aligned and separated, a strong trend is in place. When they converge and cross, a trend change is developing. This indicator extends the GMMA concept by adding a pivot-based SuperTrend for dynamic support/resistance, RSI filtering for momentum confirmation, and a quantified scoring system that turns visual alignment into a measurable number.
Why This Indicator Exists
Single moving average crossover systems are prone to whipsaws. Even dual-MA systems produce frequent false signals in choppy markets. The GMMA approach solves this by requiring alignment across many EMAs simultaneously — a much higher bar than a simple crossover. This indicator takes that concept further:
19-EMA Fan System: 11 fast EMAs (periods 3 through 23) capture short-term trader sentiment. 8 slow EMAs (periods 25 through 60) capture longer-term investor positioning. Full alignment of all 11 fast EMAs in order is a strong signal that short-term traders agree on direction. Full alignment of all 8 slow EMAs confirms institutional agreement.
Pivot-Center SuperTrend: Unlike standard SuperTrend which uses HL2 as the center, this implementation uses a weighted average of detected pivot points. Each new pivot high or low updates the center using the formula: center = (center * 2 + pivot) / 3. This creates a more responsive center line that adapts to actual market structure rather than simple bar midpoints. ATR-based bands around this center define the trend direction.
Trend Strength Score (0-100): Quantifies trend strength from three components — fast EMA alignment (50 points), slow EMA alignment (30 points), and price position relative to EMA 200 (20 points). A score of 100 means all 19 EMAs are perfectly aligned and price is on the correct side of the 200 EMA.
Fan Spread Dynamics: The distance between the fastest EMA (3) and slowest fast EMA (23), normalized by ATR, measures how "open" the fan is. An expanding fan indicates strengthening trend momentum. A contracting fan warns of potential trend exhaustion or reversal.
RSI Momentum Filter: RSI must agree with the fan direction for the highest-confidence signals. This prevents false confluence signals during momentum divergences.
EMA 200 Macro Filter: Price must be above the 200 EMA for confirmed bullish signals and below for confirmed bearish signals, ensuring alignment with the macro trend.
How the EMA Fan Alignment Works
The fast fan consists of 11 EMAs at periods 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, and 23. For bullish alignment, every EMA must be above the next longer one:
// Full fast fan bull alignment requires ALL 10 pairs in order
bool fastBull = ef3 > ef5 and ef5 > ef7 and ef7 > ef9 and ef9 > ef11
and ef11 > ef13 and ef13 > ef15 and ef15 > ef17
and ef17 > ef19 and ef19 > ef21 and ef21 > ef23
This is an extremely high bar. In choppy markets, the fast EMAs will be tangled and neither fastBull nor fastBear will be true. Only in genuine trending conditions do all 11 EMAs sort into perfect order. The same logic applies to the 8 slow EMAs.
The indicator counts how many adjacent pairs are aligned (0-10 for fast, 0-7 for slow) to produce a granular alignment score even when full alignment is not achieved. This allows the trend strength score to reflect partial alignment — a market with 8/10 fast pairs aligned is stronger than one with 4/10, even though neither achieves full alignment.
Pivot-Center SuperTrend
The SuperTrend component uses a unique center calculation based on detected pivot points:
Pivot highs and lows are detected using ta.pivothigh() and ta.pivotlow() with a configurable period
Each new pivot updates the center line using an exponentially weighted formula that gives 2/3 weight to the existing center and 1/3 to the new pivot
Upper and lower bands are calculated as center +/- (ATR Factor * ATR)
Trend direction flips when price crosses the opposite band
The trailing stop ratchets in the trend direction — it can only move favorably, never against the trend
This pivot-based center produces a SuperTrend that is more responsive to actual market structure than the standard HL2-based version. It adapts to the rhythm of the market's swing points rather than just the midpoint of each bar.
Signal Priority System
The indicator generates 8 types of signals, ranked by priority with cooldown-based anti-overlap:
P1 — HELIX LOCK (highest): Full fan alignment (fast + slow) + RSI confirmation + price above/below EMA 200. This is the maximum confluence signal — every factor agrees. A highlight box is drawn around the signal candle.
P2 — LATTICE SYNC: Full fan alignment (fast + slow) without RSI/EMA200 confirmation. Strong but not maximum confluence.
P3 — TREND FLIP: SuperTrend direction change. The pivot-center SuperTrend has flipped from bearish to bullish or vice versa.
P4 — FAN CROSS: The fast fan median (EMA 13) crosses the slow fan median (EMA 40). This is the GMMA equivalent of a moving average crossover, but using the center of each fan group.
P5 — MACRO CROSS: Price crosses the EMA 200 — a major structural event that changes the macro trend context.
P6 — FAN BURST: The fan spread transitions from contracting to expanding while the trend score is above 50. This indicates a breakout from compression — similar to a Bollinger squeeze release but measured through EMA dynamics.
P7 — ST BOUNCE: Price touches the SuperTrend line and bounces in the trend direction. This is a pullback-to-support/resistance signal unique to this indicator. A separate 5-bar cooldown prevents repeated bounce signals during extended touches.
P8 — IMPULSE (lowest): Displacement candle detection — large body (>70% of range, >2x average body). These indicate aggressive institutional order flow.
Trend Strength Score Breakdown
The 0-100 score is computed from three weighted components:
Fast EMA Alignment (50 points): The number of aligned adjacent pairs (max 10) divided by 10, multiplied by 50. Full fast alignment = 50 points. Half alignment = 25 points.
Slow EMA Alignment (30 points): The number of aligned adjacent pairs (max 7) divided by 7, multiplied by 30. Full slow alignment = 30 points.
EMA 200 Filter (20 points): If price is above EMA 200 and the fast fan leans bullish, or below EMA 200 and the fast fan leans bearish, 20 points are added. This rewards macro-aligned trends.
The score is displayed in the HUD with both a number and a visual bar (||||......). Scores above 70 indicate strong, tradeable trends. Scores between 40-70 indicate developing or weakening trends. Below 40 indicates choppy or transitional conditions.
Visual Design
The indicator uses a "Cyberpunk" color theme — electric cyan, hot magenta, neon yellow, deep violet, and chrome accents:
Fast EMA Fan: All 11 lines in a single color that adapts to alignment — cyan for bullish, magenta for bearish, steel grey for neutral. Configurable opacity.
Slow EMA Fan: All 8 lines in deeper tones — teal for bullish, violet for bearish, steel grey for neutral.
EMA 200: Three-layer neon glow effect (outer glow, mid glow, core line) that shifts between cyan (above) and violet (below).
Holographic Ribbon: Fill between the fastest (EMA 3) and slowest (EMA 23) fast EMAs, creating a ribbon that expands with trend strength and contracts during consolidation.
SuperTrend: Four-layer neon glow step-line (88%, 72%, 50%, 10% transparency) in cyan (bullish) or magenta (bearish).
Regime Background: Subtle background tinting for confirmed bull (cyan) or confirmed bear (magenta) conditions.
Candle Coloring: Multi-tier coloring based on confirmation level — confirmed bull/bear, strong bull/bear, weak bull/bear, or neutral.
HUD Dashboard
The HUD displays 14 metrics:
Trend direction (Bullish/Bearish/Neutral)
Strength score with visual bar (||||......)
Fan state (Strong Bull/Bear, Weak Bull/Bear, Converging)
SuperTrend direction
EMA 200 position (Above/Below)
Alignment counts (Fast: X/10, Slow: X/7)
Fan Spread value with state (Expanding/Contracting/Stable)
RSI value with bull/bear/neutral classification
Confluence count (0-5): fast alignment + slow alignment + SuperTrend agreement + RSI agreement + EMA 200 agreement
SuperTrend distance from price
Volume ratio (current vs 20-bar average)
Confirmed signal status (CONFIRMED BULL/BEAR or ---)
Input Parameters
EMA Fan:
Show Fast/Slow EMAs: Toggle each fan group
Show EMA 200: Toggle macro filter line
Fast/Slow EMA Opacity: Control transparency of each fan group
SuperTrend:
Show SuperTrend: Toggle the pivot-center SuperTrend
Pivot Period: Lookback for pivot detection (default: 3)
ATR Factor: Band width multiplier (default: 2.5)
ATR Length: Period for ATR calculation (default: 14)
Visual:
Show Trend Ribbon: Toggle holographic ribbon fill
Show Fan Crosses: Toggle fan cross signals
Show Regime Background: Toggle background tinting
SuperTrend Neon Glow: Toggle 4-layer glow effect
Color Candles: Toggle multi-tier candle coloring
HUD Panel: Toggle dashboard
Momentum Filter:
Show RSI Confirmation: Toggle RSI requirement for confirmed signals
RSI Length: Period (default: 14)
RSI Bull/Bear Threshold: Directional thresholds (default: 55/45)
How to Use This Indicator
Step 1: Check Fan Alignment
Look at the fan state in the HUD. "Strong Bull" or "Strong Bear" means both fast and slow fans are fully aligned — the strongest trend condition. "Weak" means only the fast fan is aligned — a developing or weakening trend.
Step 2: Verify with SuperTrend
The SuperTrend should agree with the fan direction. Fan bullish + SuperTrend bullish = high conviction. Disagreement suggests a transitional market.
Step 3: Check the Strength Score
Scores above 70 are strong trends. Use the visual bar for quick assessment. The confluence count (0-5) tells you how many independent factors agree.
Step 4: Trade the Signals
HELIX LOCK is the highest-conviction entry — all factors agree. LATTICE SYNC and TREND FLIP are strong. FAN CROSS and MACRO CROSS are structural. ST BOUNCE provides pullback entries within established trends.
Step 5: Monitor Fan Spread
Expanding fan = strengthening trend. Contracting fan = weakening trend or approaching reversal. FAN BURST signals mark the transition from contraction to expansion.
Best Practices
The 19-EMA fan is most effective on timeframes of 5 minutes and above. Very low timeframes produce too much noise for meaningful alignment.
Full fan alignment is rare and powerful. Do not expect it on every trade — it represents the highest-conviction conditions.
The SuperTrend bounce signal works best in established trends. In choppy markets, bounces may fail.
Fan crosses (fast median vs slow median) are the GMMA equivalent of MA crossovers — they confirm trend changes but lag the actual turn.
The EMA 200 filter is a macro-level gate. Ignoring it means trading against the larger trend, which reduces probability.
Use the fan spread dynamics to time entries — entering when the fan is expanding gives you momentum. Entering when it is contracting means you are fighting exhaustion.
The confluence count (0-5) is a quick decision filter. 4-5 = high conviction. 2-3 = moderate. 0-1 = low conviction.
Limitations
EMAs are lagging indicators. Full fan alignment is confirmed after the trend has already started, not at the exact turn.
The 19-EMA system uses significant computational resources. On very long charts with many bars, loading may be slower.
Pivot-center SuperTrend depends on pivot detection, which has an inherent delay equal to the pivot period.
Fan alignment can persist in overextended trends. Full alignment does not mean the trend will continue indefinitely.
The RSI filter can occasionally prevent valid signals during strong momentum divergences.
The indicator is optimized for trending markets. In range-bound conditions, the fan will be tangled and few signals will fire — which is by design.
EMA periods are fixed (3-23 fast, 25-60 slow). Different instruments or timeframes might benefit from different period sets, but the GMMA standard periods are well-tested across markets.
Technical Implementation
Built with Pine Script v6 using:
19 EMA calculations at global scope (11 fast + 8 slow) for Pine v6 compliance
Pivot-based SuperTrend center with exponentially weighted pivot averaging
Granular alignment counting (0-10 fast, 0-7 slow) for trend strength scoring
Fan spread normalization by ATR for cross-instrument comparability
8-tier priority signal system with cooldown-based anti-overlap
Separate cooldown tracking for SuperTrend bounce signals
4-layer neon glow rendering for SuperTrend and EMA 200
Holographic ribbon fill between fan extremes
Multi-tier candle coloring based on confirmation level
barstate.isconfirmed gating on all signal generation
9 alert conditions covering alignment changes, fan crosses, SuperTrend flips, confirmed signals, and fan expansion
Originality Statement
This indicator is original in its synthesis of the GMMA fan concept with pivot-center SuperTrend and quantified trend scoring. While GMMA and SuperTrend are established concepts, this indicator is justified because:
The pivot-center SuperTrend uses a weighted average of actual market pivots rather than simple HL2, creating a more structurally responsive trend line
The trend strength score (0-100) quantifies fan alignment into a single actionable metric with three weighted components
Fan spread dynamics (expansion/contraction tracking normalized by ATR) provide momentum acceleration/deceleration information not available in standard GMMA implementations
The 8-tier priority signal system with separate cooldown tracking for SuperTrend bounces prevents visual clutter while capturing all significant events
RSI momentum filtering and EMA 200 macro gating create a multi-layer confirmation framework that reduces false signals
The confluence count (0-5) provides an instant assessment of how many independent factors agree
The Cyberpunk theme with 4-layer neon glow and holographic ribbon creates a distinctive visual identity where trend strength is immediately apparent from the fan's visual character
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Moving average systems identify trends after they have started — they do not predict trend changes in advance. Full fan alignment can occur in overextended trends that are about to reverse. SuperTrend bounces can fail. Past alignment patterns do not guarantee future trend behavior. Always use proper risk management and never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Indicator

Gold Ribbon V1.00Gold Ribbon V1.00
Pine Script V6 · PulseWire Indicator
A multi-MA ribbon indicator built exclusively for XAUUSD trading — trend detection, squeeze alerts, and dynamic TP/SL management in one system.
• 8 Moving Averages
• Fibonacci Sequence
• Squeeze Detection
• Auto TP / SL
• Best on 15M · 1H
---
01. What Is Gold Ribbon?
Gold Ribbon V1.00 is a trend-following ribbon indicator purpose-built for Gold (XAUUSD). It stacks eight Exponential Moving Averages in Fibonacci-sequence lengths — 5, 8, 13, 21, 34, 55, 89, and 144 — to form a visual "ribbon" that bends, compresses, and expands with the market's momentum.
When the ribbon is in Perfect Order (all 8 MAs stacked cleanly), the trend is high-confidence. When the ribbon compresses into a tight band, a breakout is loading. This single visual gives you trend direction, momentum strength, and market state — all at once.
• Trend Detection: Perfect Order logic identifies true bull and bear phases with all 8 MAs aligned.
• Squeeze Alert: Detects when the ribbon compresses — signaling a high-energy breakout is imminent.
• Auto TP / SL: Calculates dynamic Take Profit and Stop Loss levels from price-to-ribbon distance.
02. How to Add It to PulseWire
1. Open Pine Script Editor: In PulseWire, open the chart for XAUUSD. At the bottom, click Pine Editor. Paste the full Gold Ribbon V1.00 source code.
2. Save and Add to Chart: Click Save, then click Add to chart. The ribbon will appear overlaid on the candles immediately.
3. Set the Correct Timeframe: Switch to the 15-minute or 1-hour chart. The indicator is optimized for these timeframes. A warning will appear on-chart if you go above 1H intraday.
4. Open Settings (⚙️ Gear Icon): Click the indicator's gear icon on the chart to open the Settings panel. All customizable inputs are organized in labeled groups inside this panel.
03. Reading the Ribbon — Market States
The ribbon always shows one of four market states. A live label appears at the right edge of the chart showing the current state.
▲ BULLISH — Perfect Bull Order
All 8 MAs are stacked M1 > M2 > … > M8. Gold is in a clean uptrend. The ribbon fills green. Look for buy setups only. The stronger the separation between MAs, the stronger the trend.
▼ BEARISH — Perfect Bear Order
All 8 MAs are stacked M1 < M2 < … < M8. Gold is in a confirmed downtrend. The ribbon fills red. Look for sell setups only. Avoid buying into a bearish ribbon.
◆ SQUEEZE — Compression Detected
The ribbon has tightened below its average width. Gold is coiling energy before a breakout. Do not trade blindly — wait for the ribbon to expand and Perfect Order to form before entering. Orange diamonds appear along the ribbon mid-line.
~ CHOPPY — No Clear Trend
MAs are tangled and not in order. The ribbon fills gray. This is a no-trade zone. Signals during choppy conditions have low reliability. Step aside and wait.
04. The 8 Moving Averages Explained
The lengths follow the Fibonacci sequence — 5, 8, 13, 21, 34, 55, 89, 144 — a progression that naturally mirrors how Gold trends unfold across time cycles.
• MA 5: Fastest · Reacts to every tick
• MA 8: Short-term momentum
• MA 13: Early trend confirmation
• MA 21: Core trend driver
• MA 34: Medium-term structure
• MA 55: Institutional bias level
• MA 89: Macro trend filter
• MA 144: Slowest · Major support/resistance
Note: The MA 144 is also used as the Stop Loss anchor — price must hold above it (long) or below it (short) for the trade to remain valid.
05. Trading Signals
The indicator generates two types of signals — Standard and High Probability. Both require Perfect Order to be active.
• Standard Buy ▲
Small green triangle below the bar. Conditions: Perfect Bull Order + price above MA5 + MA144 is rising over 3 bars. One signal per trend — no repeats until trend resets.
• Standard Sell ▼
Small red triangle above the bar. Conditions: Perfect Bear Order + price below MA5 + MA144 is falling over 3 bars. One signal per trend.
• 🚀 High Prob BUY
Large green label with a rocket icon. Only fires when a Squeeze expansion happened recently before the bull trend formed — highest conviction setup.
• 🚀 High Prob SELL
Large red label with a rocket icon. Same logic — squeeze expansion followed by Perfect Bear Order. This is the premium signal to prioritize.
⚡ Signal Priority Rule: Always prioritize 🚀 High Probability signals over standard triangles. A squeeze expansion before a trend often precedes the largest Gold moves. Wait for these setups patiently.
06. How to Execute a Trade
Once a signal fires and the ribbon is in Perfect Order, the indicator automatically draws TP1, TP2, and SL lines based on the distance between the current close price and MA144.
LONG TRADE SETUP
• Entry: Current close price when 🚀 BUY fires
• TP1: Entry + (Entry − MA144) × 0.5
• TP2: Entry + (Entry − MA144) × 1.0
• Stop Loss: MA144 × 0.998 (just below MA144)
SHORT TRADE SETUP
• Entry: Current close price when 🚀 SELL fires
• TP1: Entry − (MA144 − Entry) × 0.5
• TP2: Entry − (MA144 − Entry) × 1.0
• Stop Loss: MA144 × 1.002 (just above MA144)
💡 TP/SL Management Tip: Take partial profit at TP1 (50% of position), then move your Stop Loss to breakeven. Let the remaining 50% run toward TP2. Exit fully if the ribbon loses Perfect Order before TP2 is reached.
07. Customizable Settings
All inputs are in the Settings panel (gear icon). Here's what you can change and what each setting does:
📊 RIBBON MAs — Moving Average Settings
• MA 1–8 Length: Default lengths are Fibonacci (5 to 144). You can adjust these, but the Fibonacci sequence is recommended for Gold.
• MA 1–8 Type: Choose between EMA, SMA, WMA, or HMA. Default is EMA.
• MA 1–8 Width: Line thickness. Increase to 2–3 for larger screens.
• Show MA 1–8: Toggle visibility of individual MAs to reduce visual clutter.
🎨 RIBBON FILL — Color Settings
• Use Dynamic Trend Colors: When ON, all MA lines turn green in a bull trend and red in a bear trend. Highly recommended.
• Bullish / Bearish / Neutral Fill: Customize the fill color for each market state.
🎯 SIGNALS — Signal Display Settings
• Show Signals: Master toggle for all buy/sell markers.
• Show TP/SL Lines: Toggle the automatic Take Profit and Stop Loss lines on the right side of the chart.
• TP/SL Label Size: Default is Tiny to keep the chart clean.
💥 SQUEEZE DETECTION
• Show Squeeze Markers: Toggle the orange diamond markers.
• Squeeze Sensitivity: Range 0.1 to 0.9. Default is 0.4. For volatile Gold sessions, 0.35–0.45 works best.
🏷️ TREND LABELS
• Show Labels: Toggle the live trend label indicating the current market state.
08. Trading the Squeeze — Gold's Secret Weapon
Gold (XAUUSD) is notorious for long periods of low-volatility consolidation followed by explosive breakouts. The Squeeze Detection in Gold Ribbon is designed specifically to catch these moments.
1. Ribbon compresses → Orange diamonds appear: The ribbon width drops below 40% of its 50-bar average. Gold is coiling. Stand aside. Do not chase price in this state.
2. Ribbon begins expanding → "Expanding" crossover fires: The ribbon width crosses back above the threshold. Watch which direction price moves and whether Perfect Order is forming.
3. 🚀 High Probability signal fires: If Perfect Order locks in right after an expansion, a High Probability label appears. Enter with full conviction.
4. Manage with TP1 → Breakeven → TP2: Use the auto-drawn TP/SL lines. Scale out at TP1, protect the rest, and target TP2 while the ribbon holds Perfect Order.
09. Setting Up Alerts
Gold Ribbon fires three built-in alerts you can activate in PulseWire. Right-click the indicator name on the chart → Add Alert on Gold Ribbon V1.00.
• 🟢 BUY Signal: Fires once per bar when a Buy condition triggers.
• 🔴 SELL Signal: Fires once per bar when a Sell condition triggers.
• ⚠️ SQUEEZE Alert: Fires when the ribbon enters compression for the first time.
📱 Mobile Alert Tip: Set alerts to Push Notification on your PulseWire account. This way Gold Ribbon notifies your phone instantly when a squeeze starts or a High Probability signal fires.
10. Best Practices for Gold Trading
✅ Do This: Use on 15M or 1H charts only. Only trade in the direction of Perfect Order. Prioritize 🚀 High Prob signals. Wait for squeeze expansion before entering. Always use the auto-generated SL level.
❌ Avoid This: Trading during CHOPPY state. Entering against the ribbon direction. Ignoring the SL line. Using on daily/weekly timeframes without recalibrating lengths. Fighting a strong ribbon trend.
⚠️ Timeframe Warning: If you use an intraday timeframe above 1H, the indicator will display a red warning banner at the top-left of the chart. The default MA lengths are calibrated for scalping and intraday sessions. For swing trading on higher timeframes, consider increasing MA lengths proportionally.
Indicator

Integrated Execution System [JOAT]Integrated Execution Strategy System
Introduction
The Integrated Execution Strategy System is a comprehensive open-source trading strategy that combines regime detection, directional bias analysis, momentum filtering, and structural confluence into a unified adaptive trading framework. This strategy is designed for traders who understand that successful trading requires adapting to market conditions and waiting for high-probability setups with multiple layers of confirmation.
Unlike simple strategies that rely on single indicators, this system integrates six distinct analytical layers: Market Regime Classification to avoid unfavorable conditions, Directional Bias Aggregation across multiple timeframes, Momentum Pressure analysis to gauge institutional participation, Structural Analysis for key levels, Volatility Engine for adaptive sizing, and Signal Qualification to ensure only the highest probability setups are taken. The strategy is built on the principle that edges in trading come from the confluence of multiple factors, not from any single signal.
[image [https://www.pulsewire.com/x/NTfmwzgw/
Why This Strategy Exists
This strategy addresses the critical challenge most traders face: adapting to changing market conditions. Most strategies work well in specific market regimes but fail when conditions change. This system solves that problem by:
Regime-Adaptive Logic: Automatically detects trending, ranging, and volatile market conditions and adjusts trading behavior accordingly
Multi-Layer Filtering: Requires confluence across trend, momentum, structure, and volume before entering trades
Institutional-Grade Risk Management: Dynamic position sizing, adaptive stops, and multi-target scaling based on market volatility
Multi-Timeframe Alignment: Confirms signals across higher timeframes to trade with the dominant market flow
Pressure and Flow Analysis: Measures buying/selling pressure to detect institutional participation
Structural Confluence: Identifies key swing levels and liquidity zones for optimal entry positioning
Each component addresses a specific aspect of trading: Regime detection tells us WHEN to trade, bias analysis tells us WHICH direction, momentum confirms the STRENGTH, structure provides the LEVEL, volatility determines the SIZE, and qualification ensures the QUALITY of the setup.
Core Components Explained
1. Market Regime Detection
The strategy classifies markets into four distinct regimes using ADX and ATR analysis:
// Regime classification
if vol_ratio >= i_vol_exp and adx < i_adx_trend
regime := 3 // Volatile
else if adx >= i_adx_trend
regime := 1 // Trending
else if vol_ratio <= i_vol_con
regime := 2 // Ranging
Regime types:
Trending (ADX > 25): Strong directional markets with momentum
Ranging (Low volatility, ADX < 25): Sideways markets suitable for range-bound strategies
Volatile (High volatility, ADX < 25): Chaotic markets where trading is reduced or avoided
Neutral: Transition periods between defined regimes
The strategy automatically reduces position sizing and tightens stops in volatile regimes while increasing size and allowing wider stops in trending regimes.
2. Directional Bias Aggregation
Bias is calculated using multiple indicators weighted by their reliability:
// Composite bias calculation
float bias_score = 0.0
if ma_bullish
bias_score += 30
if price_above_structure
bias_score += 20
if close > ma_trend
bias_score += 20
if plus_di > minus_di
bias_score += 30
Bias components:
Moving Average Relationships: Fast/slow MA alignment for trend direction
Price Position: Where price sits relative to key moving averages
ADX Directional Indicators: +DI vs -DI for momentum confirmation
Multi-Timeframe Alignment: Higher timeframe bias for trend confirmation
A bias score above the threshold (default 30) indicates directional conviction worth trading.
3. Momentum Pressure Analysis
Momentum is evaluated through multiple oscillators to ensure entry timing:
// Momentum scoring
int momentum_bull_score = 0
if rsi_bullish
momentum_bull_score += 1
if rsi_momentum_up
momentum_bull_score += 1
if macd_bullish
momentum_bull_score += 1
Momentum filters:
RSI Analysis: Momentum direction and overbought/oversold conditions
MACD Histogram: Trend acceleration and deceleration
Stochastic Oscillator: Entry timing and momentum strength
Volume Confirmation: Above-average volume for signal validity
Only when momentum aligns with directional bias do we consider entries.
4. Structural Market Analysis
Structure identifies key levels where institutions place orders:
// Structure analysis
bool above_swing_low = close > nz(last_swing_low, low)
bool below_swing_high = close < nz(last_swing_high, high)
bool sweep_high = not na(last_swing_high) and high > last_swing_high and close < last_swing_high
bool sweep_low = not na(last_swing_low) and low < last_swing_low and close > last_swing_low
Structural elements:
Swing Points: Key highs and lows that define market structure
Liquidity Sweeps: Price moves beyond swing levels that quickly reverse
Break of Structure: Confirmation of trend changes
Support/Resistance Zones: Areas of high probability reaction
Entries are favored when price aligns with structural levels and sweeps indicate institutional activity.
5. Volatility-Adaptive Risk Management
Risk management dynamically adjusts based on market conditions:
// Adaptive stop multiplier based on regime
float adaptive_stop_mult = i_atr_stop_mult
if i_adapt_stops
if volatile_regime
adaptive_stop_mult := i_atr_stop_mult * i_vol_stop_mult
else if ranging_regime
adaptive_stop_mult := i_atr_stop_mult * 0.85
else if trending_regime
adaptive_stop_mult := i_atr_stop_mult * 1.1
Risk features:
Adaptive Position Sizing: Larger sizes in high-conviction trends, smaller in volatile conditions
Dynamic Stop Losses: Wider in trending markets, tighter in ranging/volatile conditions
Multi-Target Scaling: Partial profits at predefined levels to reduce risk
Trailing Stops: Lock in profits when moves reach predefined thresholds
Volatility-Adjusted Targets: Larger profit targets in high-volatility environments
6. Signal Qualification System
The strategy uses a 14-point qualification system to ensure only high-quality setups:
// Total scores (max 14)
int bull_total = (
(bullish_bias ? 3 : 0) + momentum_bull_score + struct_bull_score + (trending_regime ? 2 : 0) +
(pressure_bull ? 1 : 0) + (sweep_low ? 1 : 0) + (squeeze_release ? 1 : 0) + (mtf_bias_long ? 1 : 0)
)
Qualification criteria:
Bias Strength (3 points): Strong directional conviction
Momentum (3 points): Multiple momentum indicators aligned
Structure (2 points): Price respecting key levels
Regime (2 points): Favorable market conditions
Pressure (1 point): Buying/selling pressure confirmation
Sweeps (1 point): Liquidity sweep patterns
Squeeze Release (1 point): Volatility breakout patterns
MTF Alignment (1 point): Higher timeframe confirmation
Only setups scoring 5+ (adjustable) are considered for trading.
Visual Elements
Directional Cloud: Dynamic cloud showing trend direction and strength
Signal Markers: Clear entry signals with quality grades (A-D)
Risk Levels: Visual stop loss and target levels
Structure Points: Marked swing highs and lows
Background Colors: Regime-based background shading
Dashboard: Real-time metrics including regime, bias, momentum, and signal quality
The dashboard displays:
1. Current market regime and strength
2. Directional bias score and alignment
3. Momentum state and pressure readings
4. Structural analysis and proximity to levels
5. Signal qualification score and grade
6. Active position sizing and risk metrics
7. Multi-timeframe alignment status
Input Parameters
Regime Detection:
ADX Period: Trend strength calculation period (default: 14)
Trend Threshold: Minimum ADX for trend regime (default: 25)
ATR Period: Volatility calculation period (default: 14)
Volatility Expansion/Contraction: Multipliers for regime detection (default: 1.4/0.6)
Bias Calculation:
Fast/Slow/Anchor MAs: Trend calculation periods (default: 21/55/200)
Bias Threshold: Minimum score for directional bias (default: 30)
Multi-Timeframe Settings: Higher timeframes for confirmation (default: 60m/240m/1D)
Risk Management:
Risk Per Trade %: Percentage of equity to risk (default: 1.0%)
ATR Stop Multiplier: Stop distance in ATR units (default: 2.0)
R:R Targets: Profit target multiples (default: 1.5x/2.5x)
Adaptive Sizing: Enable regime-based position sizing (default: true)
Signal Filters:
Minimum Qualification Score: Required confluence score (default: 5)
Signal Cooldown: Bars between signals (default: 1)
Volume Filter: Require above-average volume (default: true)
Bar Confirmation: Wait for bar close (default: true)
How to Use This Strategy
Step 1: Understand Market Regime
Check the dashboard for current market regime. Avoid trading in volatile regimes (red background) unless you have specific volatility-based strategies. Trending regimes (green) are optimal for directional trading, while ranging regimes (purple) suit mean-reversion approaches.
Step 2: Assess Directional Bias
Look for strong bias scores (60+) with multi-timeframe alignment. The bias should be clear across multiple timeframes before considering entries. Weak or conflicting bias suggests waiting for clarity.
Step 3: Confirm Momentum
Ensure momentum indicators support the directional bias. Look for RSI momentum in the direction of the trade, MACD histogram expanding, and stochastic crossovers aligned with the bias.
Step 4: Identify Structural Levels
Entries near structural levels (swing highs/lows) have higher probability. Look for liquidity sweeps that indicate institutional participation before entering in the opposite direction.
Step 5: Check Signal Qualification
Only take trades with qualification scores of 5 or higher. Premium signals (grade A, 75+ quality) offer the highest probability and can be sized more aggressively.
Step 6: Manage Risk Dynamically
Let the strategy's adaptive risk management adjust position sizes and stops based on market conditions. Don't override the system's risk calculations without strong reason.
Best Practices
Trade liquid instruments (major forex pairs, indices, large-cap stocks, major crypto) for reliable signals
Start with the default parameters and only adjust after understanding their impact
Pay attention to regime changes - they often signal strategy adjustments
Use the qualification score as your primary filter - higher scores mean higher probability
Be patient for A-grade setups rather than forcing mediocre trades
Monitor the multi-timeframe alignment - trades against higher timeframes have lower success rates
Let winners run to the second target when momentum is strong
Reduce size during volatile regimes or take a break entirely
Keep a trade journal to note which regime/bias combinations work best for each instrument
Consider economic news events that might trigger regime changes
Strategy Limitations
Like all strategies, performance varies across different market instruments and timeframes
Regime detection may lag during rapid market transitions
Multi-timeframe analysis requires sufficient historical data on all timeframes
The strategy is designed for swing trading and may not be optimal for scalping
Highly correlated instruments may produce similar signals across different pairs
Extreme market events (black swans) can overwhelm any risk management system
Backtested performance does not guarantee future results
The strategy requires discipline to follow all signals, including losing ones
Commissions and slippage can significantly impact performance on smaller timeframes
Success requires understanding the system's logic rather than blind execution
Technical Implementation
Built with Pine Script v6 featuring:
Modular architecture with separate calculation modules for each component
Advanced regime detection using ADX and ATR combinations
Multi-timeframe security requests with proper lookahead management
Dynamic risk management with adaptive position sizing
Comprehensive signal qualification scoring system
Real-time dashboard with 12 key metrics
Visual elements including directional cloud and risk levels
Export functions for integration with other indicators
Alert conditions for all major signal types
The code is fully open-source and can be modified to suit individual trading styles and preferences. All calculations use confirmed bars to prevent repainting.
Originality Statement
This strategy is original in its comprehensive integration of multiple analytical layers into a unified adaptive system. While individual components (ADX, moving averages, RSI, MACD, etc.) are established tools, this strategy is justified because:
It synthesizes six distinct analytical approaches into a cohesive decision framework
The regime-adaptive logic automatically adjusts strategy behavior based on market conditions
The qualification scoring system provides objective criteria for signal selection
Multi-timeframe bias aggregation ensures alignment with the dominant market trend
Structural analysis integration provides context for market microstructure
Volatility-adaptive risk management dynamically adjusts to market conditions
The comprehensive dashboard presents all critical metrics for informed decision-making
Each component contributes unique information: regime tells us when to trade, bias tells us direction, momentum provides timing, structure gives levels, volatility determines sizing, and qualification ensures quality
The strategy's value lies not in any single component but in how these elements work together to create a robust, adaptive trading system that can navigate different market environments while maintaining disciplined risk management.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Past performance does not guarantee future results. The backtested results shown are based on historical data and do not account for real-world factors such as slippage, liquidity issues, or psychological pressures that can affect trading performance.
The strategy's signals are mathematical calculations based on historical patterns and technical indicators. They do not predict future price movements with certainty. Market conditions can change rapidly, rendering previously successful patterns ineffective.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this system.
-Made with passion by officialjackofalltrades
Strategy
