Signal Projection ExplorerMany traders focus on building full strategies right away — combining entries, exits, stop-losses, take-profits, filters, and position sizing.
But there is a problem with that approach:
👉 It often hides the true quality of the underlying signal.
When multiple layers are added on top (risk management, opposite signals, overlays), it becomes very difficult to answer a simple but critical question:
“Is this signal actually good on its own?”
🎯 What this indicator does
This tool is designed to analyze raw signals in isolation.
Instead of jumping straight into a full strategy, it lets you explore:
👉 What tends to happen to the price after a signal occurs?
🔍 How it works
The script detects signals in historical data (Golder Cross in this script).
It collects all occurrences of those signals.
For each signal, it tracks price performance over the next X bars.
It then builds a distribution of outcomes and projects it forward from the current price.
📈 What you see on the chart
Instead of a single prediction, you get a range of historical outcomes:
🔴 Worst P&L → maximum adverse move after the signal
🟢 Best P&L → best-case outcome
🔵 25th percentile → lower bound of typical outcomes
🟠 75th percentile → upper bound of typical outcomes
⚪ Mean → average path
🟣 Median → typical (robust) path
All of these are projected forward from the current price, giving you an intuitive view of possible scenarios.
📋 Stats Table
The table summarizes key metrics at the selected projection horizon:
Number of signals used
Final P&L for each line (Worst / Best / Percentiles / Mean / Median)
Distribution metrics like Spread and IQR
This gives you a quick read on:
Expected return
Risk range
Outcome dispersion
🧠 Why this matters
This tool helps you:
Separate signal quality from strategy complexity
Understand risk vs reward before adding filters
Avoid overfitting strategies on weak signals
Build better systems from strong foundations
⚠️ Important note
This is not a prediction tool.
It shows historical tendencies based on past signals — not guaranteed future outcomes.
Always use it as:
a research tool
a context layer
not a standalone trading system
🚀 Final thought
Before optimizing entries, exits, and risk…
👉 Make sure your signal itself has an edge.
This indicator helps you see that clearly.
Indicator

Convergence Protocol [JOAT]
Convergence Protocol
Introduction
Convergence Protocol is an open-source strategy that combines four analytical modules — structural trend, volatility regime, delta pressure, and liquidity/structure break detection — into a multi-pathway entry and exit system. The strategy generates trade signals through five independent entry mechanisms, each requiring alignment between different analytical dimensions, and manages positions with ATR-based stops, dual take-profit levels, and an optional trailing stop that activates after the first target is reached.
The design rationale for combining these four modules is that each answers a different question about the market. Structure and trend analysis answers: what direction is the market likely to move? Volatility regime answers: does the market have the energy to sustain a directional move? Delta pressure answers: is volume supporting the proposed direction? Liquidity and structure break detection answers: has the market made a meaningful structural commitment that confirms directional intent? No single module alone provides a robust enough basis for a trade. Convergence across multiple modules provides a higher-quality signal set that reduces the frequency of marginal trades while maintaining enough opportunities to be practical.
Strategy Properties and Backtesting Settings
Default settings used for publication:
Initial Capital: Default PulseWire account size
Position Size: 5% of equity per trade
Commission: 0.04% per side (realistic for most crypto and equity platforms)
Slippage: 1 tick
Risk Per Trade: 5% of equity maximum (within sustainable limits)
Stop Loss: 1.5x ATR from entry
TP1: 1.2x risk (50% of position closed)
TP2: 2.5x risk (remaining position)
Trailing Stop: 1.0x ATR trailing offset, activates after TP1 hit
Backtesting results will vary significantly by instrument and timeframe. This strategy is intended to be evaluated across multiple instruments and market conditions before drawing conclusions. A single backtest run does not constitute evidence of future performance.
Core Modules
Module 1: Structural Trend Engine
The baseline uses a double-smoothed moving average (SMEMA). Swing highs and lows are tracked to classify market structure as bullish (HH+HL), bearish (LH+LL), or neutral. A 0-7 confluence score is assembled from: regime direction, structural alignment, volatility expansion, absence of squeeze, delta pressure, structure break confirmation, and liquidity sweep confirmation. Each module contributes a binary point to the score.
Module 2: Volatility Regime
Short-period ATR is compared to long-period ATR. A ratio above 1.05 with a rising oscillator confirms volatility expansion — the market has enough energy for directional moves. A squeeze condition (fast ATR well below slow ATR and its own moving average) signals that the market is coiling; entries are filtered or blocked depending on settings.
Module 3: Delta Pressure
Bar-by-bar delta (positive on bullish bars, negative on bearish bars) is smoothed into fast and slow EMAs. Their cross and relative position provide a directional bias from the volume perspective.
Module 4: Liquidity and Structure
A break of structure (BOS) is confirmed when price closes beyond the most recent pivot in any direction on a confirmed bar. Liquidity sweeps are detected when price wicks beyond a prior swing and closes back on the correct side. Both conditions contribute to the confluence score.
Entry Mechanisms
1. Confluence Score Entry
All four modules must be aligned and score at or above the minimum threshold (default: 2 of 7). This is the primary high-conviction entry.
2. Baseline Pullback Entry
In an established trend (regime confirmed), when price returns to within the step band of the baseline with positive delta confirmation, a pullback entry is generated. This produces more frequent entries by adding trend-continuation trades within an established directional move.
3. Squeeze Breakout Entry
When a detected squeeze condition resolves (squeeze ends) with trend and delta alignment, a breakout entry fires. This targets the expansion phase immediately following volatility compression.
4. Delta Crossover Entry
When the fast delta EMA crosses above the slow delta EMA in the direction of the regime, and the market is not in a squeeze, a momentum entry is generated.
5. Sweep Reversal Entry
When a liquidity sweep occurs with confirming delta pressure, a reversal entry is generated in the direction of the sweep reversal. This targets the classic sweep-and-go pattern.
Exit Logic
TP1: 50% of position closed at 1.2× risk. Locks in partial profit and reduces position size for the remainder of the trade
TP2: Remaining 50% targets 2.5× risk with a hard stop at the original stop level
Trailing Stop: After TP1 is hit, the strategy optionally converts to a trailing stop with an ATR-based offset, allowing the winning portion of the trade to capture extended moves
Regime Exit: If the market regime flips against the position (bullish regime while short, or bearish regime while long), the position is closed at market. This protects against holding trades through structural regime reversals
Limitations and Considerations
The strategy uses OHLCV-based calculations throughout. It does not have access to tick data, order book information, or real-time execution data that institutional traders use
Backtesting results are inherently optimistic due to perfect execution assumed at bar close prices. Real-world execution will differ
The five entry mechanisms produce different trade frequencies. Users should evaluate each mechanism independently in backtesting before enabling all simultaneously
The regime change exit can produce early exits in choppy markets where the regime briefly flips before resuming the original direction
The trailing stop activation after TP1 is a fixed ATR offset from the highest/lowest price reached. It does not adapt to subsequent volatility changes during the trade
The strategy is designed for trending markets. In persistent ranging environments, the confluence score-based entries will underperform because the regime module will frequently return a Ranging classification, suppressing primary entries
Commission and slippage settings in the strategy Properties should be adjusted to match the actual costs on the instrument and broker being used before drawing any performance conclusions
Originality Statement
This strategy is original in its specific multi-pathway entry architecture and the unified 0-7 confluence scoring system that synthesizes structural, volatility, delta, and liquidity analysis into a single conviction metric. Each of the five entry pathways serves a distinct market condition: confluence entries target high-alignment setups; pullback entries target trend continuation in established moves; squeeze breakout entries target volatility expansion transitions; delta crossover entries target momentum initiation; sweep reversal entries target institutional accumulation/distribution patterns. No single existing strategy approach covers all five scenarios. The combination is justified because these five market conditions occur at different points in the market cycle, and a strategy limited to one condition type will sit idle during the other four.
Disclaimer
This strategy is provided for educational and informational purposes only. Past backtest results do not guarantee future performance. No backtesting result should be interpreted as evidence that this strategy will be profitable in live trading. Markets change, and conditions that produced past results may not recur. The strategy does not account for taxes, broker requirements, or psychological factors in live trading. Always use proper risk management and consult with a qualified financial professional before making any investment decisions. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategy

SMC Toolkit - CHoCH, BoS, FVG, P/D [AvantCoin]SMC Toolkit - CHoCH, BoS, FVG, P/D
A focused market structure indicator covering the four foundational SMC concepts in a single, configurable tool.
What it shows
CHoCH (Change of Character): marks the first break that reverses the prevailing trend.
BoS (Break of Structure): marks continuation breaks in the direction of the current trend.
FVG (Fair Value Gaps): highlights 3-candle imbalance zones, with automatic tracking of mitigation, time expiry, and structural invalidation.
Premium / Discount: plots the equilibrium of the current swing range, with optional zone shading to identify where price sits relative to the range.
**Settings**
Independent visibility toggles for CHoCH, BoS, FVG, and Premium/Discount, show only what you need.
Swing lookback and break confirmation mode (close or wick) for structure detection.
FVG mitigation mode (first touch or full fill), max extension in bars, and option to hide inactive gaps.
Fully customizable colors, line styles, and opacity for every element.
Built-in alerts for bullish and bearish CHoCH and BoS events.
Design principles
Every rule the indicator uses is documented in the script header. Pivots do not repaint, swings are consumed once broken, and signals are drawn on the bar of confirmation, what you see live is what you see in backtest.
Designed for clarity on any timeframe and any market.
Indicator

Strategy

Adaptive Regime Momentum [JOAT]Adaptive Regime Momentum
Introduction
The majority of publicly available trend-following strategies rely on one of two entry mechanisms: a moving average crossover, or a price-versus-MA relationship. These are valid starting points, but they share a common weakness — they fire signals based on a single confirmatory condition that can be triggered by brief, low-conviction price moves. A single bar pushing above a moving average while volume is thin and the MA is barely sloping is not the same market condition as a sustained directional move with volume behind it and a clearly sloping MA. Yet a simple strategy would treat both identically.
Adaptive Regime Momentum is a trend-following strategy that requires three independent conditions to align before generating an entry signal. These three layers — MA slope confirmation over multiple consecutive bars, price position relative to the MA, and a volume-based demand filter — must all agree simultaneously. The result is a strategy that generates fewer signals but with higher internal consistency between entry conditions. It is designed for liquid markets on daily or higher timeframes where each component is reliably measurable.
This is an overlay strategy — all visuals are plotted directly on the price chart.
---
Strategy Properties
The following default settings are used for all backtests unless modified:
Initial capital: $10,000
Position sizing: 5% of equity per trade
Commission: 0.05% per side
Pyramiding: 0 (only one open position at a time; new signals are ignored while a position is active)
Stop loss: 2.5x ATR below the entry price (long), 2.5x ATR above the entry price (short), calculated from strategy.position_avg_price
Take profit: 4.0x ATR above the entry price (long), 4.0x ATR below the entry price (short), calculated from strategy.position_avg_price
Trail / slope exit: Position is closed early if price crosses to the wrong side of ComboMA ± 1.5x ATR, or if the MA slope reverses direction
The stop and take profit are anchored to strategy.position_avg_price — the actual average fill price of the position — rather than the signal bar's close. This ensures that in backtesting, stop and TP distances are measured from where the trade was actually opened, not from a theoretical signal level.
These are backtesting defaults only. They do not represent a recommendation for live trading position sizing or risk management.
---
Core Concepts
Signal 1 — ComboMA Slope Confirmation (Structural Momentum)
The ComboMA is a blend of two moving averages:
ALMA (Arnaud Legoux Moving Average) — a smooth MA with reduced lag, fitting to recent price without overreacting to single bars
ZLMA (Zero-Lag Moving Average) — a lag-compensated MA designed to reduce the delay between price movement and MA response
The two are blended into a single ComboMA value. The slope of this composite is then evaluated not just on the current bar, but across the last N consecutive bars (default: 3). A slope is only confirmed as UP if all of the last 3 bars showed a positive slope. A slope is only confirmed as DOWN if all 3 bars showed a negative slope. A single slope fluctuation — even if the most recent bar shows a positive slope — does not trigger confirmation unless all N bars agree.
This multi-bar slope confirmation is the primary mechanism that distinguishes this strategy from a simple MA-based entry. A one-bar slope flip that immediately reverses is filtered out. Only a sustained slope direction triggers the first condition.
Signal 2 — Price vs. ComboMA (Real-Time Confirmation)
The second condition requires that price is currently on the correct side of the ComboMA:
For a long: close > ComboMA
For a short: close < ComboMA
This condition is evaluated at the current bar, providing real-time confirmation that price is aligned with the structural slope direction. The MA slope could be upward from prior bars, but if price has already pulled back below the MA, the second condition vetoes the entry. Both the historical slope and the current price position must agree.
Signal 3 — Volume RSI (Demand Pressure Validation)
Volume RSI is RSI applied to raw volume over an 8-bar period, then divided by 50. A result above 1.0 (the default threshold) means the Volume RSI is above 50 — indicating that volume activity on recent bars has been relatively elevated compared to the preceding period.
For a long entry: Volume RSI / 50 must exceed the threshold
For a short entry: same condition applies
Volume RSI does not confirm direction — it confirms participation . A move accompanied by above-average volume has more demand/supply backing than a low-volume drift. When volume is below threshold, the third condition is not met and no entry is generated, even if slope and price position align.
RSI Filter
An additional RSI filter is applied to the close:
RSI(14) must be above 50 for long entries
RSI(14) must be below 50 for short entries
This acts as a momentum gating condition — confirming that short-term momentum is consistent with the trade direction before entry is permitted.
Non-Repainting Execution
All entry conditions are gated by barstate.isconfirmed . No signal is generated until the current bar has fully closed. This prevents intra-bar signal flickering and ensures that the backtest accurately represents what would have been traded on confirmed bar closes.
---
Exit Logic
The strategy uses a layered exit system combining fixed risk-defined targets with adaptive trend exits:
Fixed exits (via strategy.exit):
Stop loss at 2.5x ATR from entry price
Take profit at 4.0x ATR from entry price
Trail exits (via strategy.close):
Price closes beyond ComboMA ± 1.5x ATR on the wrong side
The ComboMA slope reverses (multi-bar confirmation fails in the opposite direction)
The trail exit allows winning positions to exit earlier if the trend deteriorates before reaching the fixed take profit, while the fixed TP provides a defined maximum target. The stop loss is the unconditional floor regardless of trail conditions.
---
ATR Shadow Visual
The chart displays two layers of ATR bands around the ComboMA:
Inner band: ComboMA ± 1x ATR
Outer band: ComboMA ± 2x ATR
These bands give a visual read of how extended price is from the MA relative to recent volatility, and where the trail exit threshold sits (1.5x ATR, between the two bands). They are visual aids only and do not affect strategy logic.
---
Performance Table
A table is displayed on the chart showing current strategy metrics:
Net P&L
Open P&L (current unrealized)
Win Rate
Average winning trade
Average losing trade
Maximum drawdown
Total trades
Current position direction
Current MA slope status
---
Features
Three-layer entry confirmation: multi-bar MA slope, price vs. MA, and Volume RSI
RSI momentum filter as an additional gating condition
ALMA + ZLMA blend for the ComboMA, reducing lag without sacrificing smoothness
Multi-bar slope confirmation preventing single-bar slope flickers from triggering entries
ATR-based stop and take profit anchored to actual fill price via strategy.position_avg_price
Trail exit on slope reversal or price-vs-MA breach
Non-repainting: all signals confirmed via barstate.isconfirmed
Pyramiding disabled — one position at a time
ATR shadow bands for visual context around the ComboMA
Live performance table with key metrics
---
Input Parameters
ALMA / ZLMA settings — length, offset, and sigma for each MA component
Slope Confirm Bars (default 3) — consecutive bars of slope agreement required for confirmation
Volume RSI Length (default 8) — RSI period applied to volume
Volume Threshold (default 1.0) — Volume RSI / 50 minimum for the demand filter
RSI Length (default 14) — RSI period for the momentum filter
ATR Length — period for ATR used in stop, TP, trail, and visual bands
Stop Multiplier (default 2.5) — ATR multiplier for the fixed stop loss
TP Multiplier (default 4.0) — ATR multiplier for the fixed take profit
Trail Multiplier (default 1.5) — ATR multiplier for the trail exit threshold
---
How to Use
Apply to daily or higher timeframes on liquid instruments. Volume RSI is most meaningful where volume data is consistent and representative of actual market participation.
Allow the chart to load sufficient historical bars before evaluating backtest results. The ComboMA slope confirmation requires multiple bars of agreement, and early bars in the dataset may not reflect the strategy's typical behavior. Aim for at least several hundred bars of data for meaningful backtest statistics.
Review the performance table while backtesting to understand average win size relative to average loss, drawdown, and total trade count. A strategy with very few trades may show favorable metrics by chance rather than edge — consider whether the trade count is sufficient to draw conclusions.
The default 5% equity position size produces moderate equity curve sensitivity. Smaller sizes will reduce drawdown and return proportionally; larger sizes will amplify both.
Commission is set to 0.05% per side (0.1% round trip) by default. Adjust this to match your actual trading costs. Higher commission rates — especially relevant for frequent-trading timeframes — will reduce net results.
Do not optimize parameters on the same data you use to evaluate performance. Optimization on historical data produces settings tuned to past noise, not future edge.
The trail exit on slope reversal means that strongly trending markets where the MA briefly flattens before resuming may see early exits. This is the tradeoff for using slope as an exit condition.
---
Limitations
Backtest results are calculated on historical data and do not guarantee future performance. Market conditions change, and a strategy that performed well in a particular regime may perform differently as conditions evolve.
The Volume RSI filter requires reliable volume data. This strategy is not recommended for synthetic instruments, CFDs where volume represents contracts rather than underlying market activity, or very short intraday timeframes where volume is fragmented and noisy. On such instruments, the third entry condition may be meaningless or misleading.
The multi-bar slope confirmation requirement means the strategy will miss fast, sharp trend initiations where the MA slope has not yet had N bars to confirm. This is a deliberate tradeoff — reducing false entries at the cost of some late entries on fast moves.
Pyramiding is disabled. The strategy will not add to winning positions. This limits upside during strongly trending markets where additional entries might be beneficial, but it also limits drawdown from compounding positions that subsequently reverse.
ATR-based stops and TPs are fixed at entry. They do not adjust after the trade is open (apart from the trail exit). If volatility expands significantly after entry, a 2.5x ATR stop that was appropriate at entry may become relatively tight.
The performance table reflects cumulative backtest results as of the current bar. Results will vary across different lookback windows and instruments.
Default capital of $10,000 with 5% equity sizing means each trade risks approximately $500 before the stop is hit (assuming stop is the loss floor). This is a backtesting convention — it is not a recommendation for live account sizing.
No strategy produces guaranteed results. The three-layer entry system improves internal signal consistency but cannot eliminate the inherent uncertainty of financial markets.
---
Originality Statement
Standard MA-based trend strategies treat a single bar's price-vs-MA relationship as sufficient for entry. ARM's primary differentiation is the multi-bar slope confirmation requirement : the ComboMA slope must be consistently positive (or negative) across N consecutive bars before the first condition is met. A one-bar slope deviation — common during consolidations and brief retracements — does not trigger entry. Only a sustained slope direction qualifies.
The ComboMA itself is a blend of ALMA and ZLMA, combining the smoothness and Gaussian weighting of ALMA with the lag-compensation of ZLMA. Neither is used in isolation because each has a specific weakness: ALMA can lag on sharp moves; ZLMA can be sensitive to noise. The blend leverages the strengths of both while partially offsetting their weaknesses.
The three-layer confirmation architecture — slope duration, price position, and demand validation — requires agreement across genuinely different measurement types: structural momentum over time, current price location, and volume activity. These are not three views of the same quantity. The stop and TP placement using strategy.position_avg_price rather than the signal bar close is a practical accuracy measure: in backtesting, it means risk distances are calculated from the price at which the trade was actually filled, not from where the signal was generated, which can differ from the fill price particularly on gap opens.
---
Disclaimer
This strategy is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security. Backtested results are hypothetical and do not reflect actual trading. Hypothetical performance results have inherent limitations and do not account for execution slippage, liquidity constraints, or the psychological challenges of live trading. All trading involves risk, including the possible loss of principal. Always conduct your own research and consult a qualified financial professional before making any trading or investment decisions.
-Made with passion by officialjackofalltrades
Strategy

Regime & Structure Engine [JOAT]Regime & Structure Engine
Introduction
Markets do not move randomly — they cycle through defined behavioral states: trending phases where momentum compounds in one direction, and ranging phases where price consolidates before the next impulse. Identifying which state the market is currently in, and detecting when structural breaks signal a transition, is fundamental to any disciplined trading approach. The Regime & Structure Engine is built around that single core principle: before anything else, know your regime.
This indicator unifies three distinct analytical layers into a single overlay system. The first layer is the Hull-EMA Hybrid (HEMA), a custom moving average that resolves the trade-off between smoothness and responsiveness by combining double-weighted EMA calculation with a square-root length final smoothing. The second layer is a three-state confirmed regime engine that uses the relative alignment of three HEMA periods to classify market condition as bull, bear, or neutral — with a mandatory two-bar confirmation to eliminate false transitions. The third layer is a market structure engine based on classical swing pivot logic, capable of identifying Break of Structure (BOS) and Change of Character (CHoCH) events that signal genuine momentum shifts.
All of this is augmented by a Z-score cumulative impulse detector that quantifies the statistical significance of directional momentum streaks, a trend cloud that visually represents regime state through gradient fills, proximity-based bar coloring that encodes distance from the HEMA mid-layer, a configurable alert system, and a compact six-row dashboard. Every signal in this indicator is anchored to confirmed bars only, eliminating any look-ahead repainting.
Core Concepts
1. Hull-EMA Hybrid (HEMA) Moving Average
The foundational calculation of this indicator is the HEMA — a three-step smoothing function that delivers both noise reduction and lag compensation. A standard EMA applies uniform smoothing that creates meaningful lag on higher periods. Hull Moving Averages address lag through weighted differencing but can produce jagged outputs. The HEMA bridges this by constructing the Hull-style weighted difference first, then applying a square-root-period EMA as the final smoother.
f_hema(src, len) =>
ta.ema(2 * ta.ema(src, len / 2) - ta.ema(src, len), math.round(math.sqrt(len)))
Three instances are calculated at lengths 20, 50, and 100, producing a fast, slow, and macro trend layer respectively. The fast layer reacts to short-term price action, the slow layer represents the primary trend, and the macro layer anchors the broader structural bias. When all three are aligned in sequence (fast above slow above macro, or inverse), the trend is considered directionally clean.
2. Three-State Confirmed Regime Engine
Regime classification is determined by the ordinal alignment of all three HEMA layers. A raw bull signal requires hema1 greater than hema2, which must in turn be greater than hema3. The inverse defines raw bear. Any other arrangement is classified as neutral. To prevent rapid regime flipping on borderline conditions, a two-bar confirmation requirement is enforced: the raw signal must hold for at least two consecutive bars before the confirmed regime variable updates.
rawBull = hema1 > hema2 and hema2 > hema3
rawBear = hema1 < hema2 and hema2 < hema3
var int confirmCount = 0
var int confirmedRegime = 0
if rawBull
confirmCount := confirmCount + 1
else if rawBear
confirmCount := confirmCount - 1
else
confirmCount := 0
confirmedRegime := confirmCount >= 2 ? 1 : confirmCount <= -2 ? -1 : 0
This confirmation mechanism is critical in volatile markets where HEMA layers can briefly reorder on a single candle only to revert immediately. The two-bar requirement sacrifices minimal reaction speed in exchange for a meaningful reduction in false regime transitions.
3. Z-Score Cumulative Impulse Detection
Regime direction tells you the structural bias. The Z-score impulse system tells you when that bias is being expressed with statistical force. Rather than measuring a single bar's momentum, this system accumulates consecutive directional closes into a running streak — a cumulative bull or bear pressure counter — then normalizes that streak against its own historical mean and standard deviation.
cumBull = close > close ? nz(cumBull ) + (close - close ) : 0
cumBear = close < close ? nz(cumBear ) + (close - close) : 0
zBull = (cumBull - ta.sma(cumBull, zLen)) / ta.stdev(cumBull, zLen)
zBear = (cumBear - ta.sma(cumBear, zLen)) / ta.stdev(cumBear, zLen)
impulseUp = ta.crossover(zBull, zThresh) and barstate.isconfirmed
impulseDn = ta.crossover(zBear, zThresh) and barstate.isconfirmed
An impulse fires when the Z-score exceeds the user-defined threshold (default: 2.0 sigma). This ensures that only statistically unusual momentum streaks generate signals, filtering out the ordinary ebb and flow of price during low-conviction moves.
4. BOS and CHoCH Market Structure
Market structure tracking is built on classical pivot high/low detection using Pine Script's built-in ta.pivothigh and ta.pivotlow functions. A Break of Structure (BOS) occurs when price closes or wicks beyond the most recent swing high (bullish BOS) or swing low (bearish BOS). A Change of Character (CHoCH) is a BOS that opposes the direction of the prior BOS — indicating a potential regime reversal rather than continuation.
swingHigh = ta.pivothigh(high, swingLen, swingLen)
swingLow = ta.pivotlow(low, swingLen, swingLen)
lastSwingHigh = ta.valuewhen(not na(swingHigh), swingHigh, 0)
lastSwingLow = ta.valuewhen(not na(swingLow), swingLow, 0)
bosUp = barstate.isconfirmed and ta.crossover(close, lastSwingHigh)
bosDn = barstate.isconfirmed and ta.crossunder(close, lastSwingLow)
chochUp = bosUp and lastBOSDir == -1
chochDn = bosDn and lastBOSDir == 1
CHoCH events are particularly significant because they represent the market's first structural evidence of a trend change — not merely a continuation of prior momentum. Distinguishing BOS from CHoCH allows traders to calibrate their response: a BOS in trend direction is a continuation entry opportunity, while a CHoCH warrants reassessment of existing positions.
5. Trend Cloud and Proximity Bar Coloring
The trend cloud fills the space between the HEMA fast and slow layers. The fill color matches the confirmed regime — teal for bull, red for bear, gray for neutral — creating an immediate visual encoding of market state across the chart. Bar coloring is driven by a normalized proximity calculation using the 14-period ATR as a reference distance.
normProx = math.abs(close - hema2) / (atr14 * 3)
barAlpha = math.min(math.round(normProx * 200), 200)
Bars that are far from the HEMA slow layer receive more saturated coloring, while bars trading near the HEMA mid-line are rendered at reduced opacity. This creates an intuitive gradient where extreme dislocations are visually prominent.
Features
HEMA Triple Layer: Three independent Hull-EMA Hybrid instances at periods 20, 50, and 100 provide fast, primary, and macro trend context simultaneously.
Confirmed Regime State: Two-bar confirmation gate prevents false regime transitions on temporary HEMA crossovers, reducing noise on volatile instruments.
BOS Detection: Swing-based Break of Structure signals on both bullish and bearish side, drawn at confirmed bars only with no look-ahead.
CHoCH Detection: Change of Character identification when BOS direction opposes the prior structural break, highlighting potential trend reversal zones.
Z-Score Impulse: Statistically normalized cumulative momentum streaks that fire signals only when directional pressure reaches a configurable sigma threshold.
Gradient Trend Cloud: Dynamic fill between HEMA layers color-coded by regime for instant visual orientation on any timeframe.
Proximity Bar Coloring: ATR-normalized distance from HEMA mid controls bar color alpha, making dislocations visually distinct.
Six-Row Dashboard: Compact table displaying regime, last BOS direction, bull Z-score, bear Z-score, and HEMA layer alignment.
No Repainting: All signals gated behind barstate.isconfirmed — no signals are printed on unfinished bars.
Full Alert Coverage: Seven alert conditions covering BOS, CHoCH, impulse, and regime flip events.
Input Parameters
HEMA Settings:
Fast Length: Period for the HEMA fast layer (default: 20)
Slow Length: Period for the HEMA slow layer (default: 50)
Macro Length: Period for the HEMA macro layer (default: 100)
Source: Price source for all HEMA calculations (default: close)
Regime Settings:
Confirmation Bars: Number of consecutive bars required to confirm a regime change (default: 2)
Structure Settings:
Swing Length: Pivot lookback for swing high/low detection (default: 10)
Show BOS Labels: Toggle BOS annotation labels on the chart (default: true)
Show CHoCH Labels: Toggle CHoCH annotation labels on the chart (default: true)
Z-Score Settings:
Z Lookback: Rolling window for Z-score mean and standard deviation (default: 50)
Z Threshold: Sigma level required to fire an impulse signal (default: 2.0)
Display Settings:
Show Trend Cloud: Toggle the gradient fill between HEMA layers (default: true)
Show Bar Colors: Toggle proximity-based bar coloring (default: true)
Show Dashboard: Toggle the six-row information table (default: true)
How to Use This Indicator
Step 1: Establish Regime Context
Before analyzing any signal, check the dashboard and the trend cloud to identify the confirmed regime. A bull regime (all three HEMA layers in ascending order with a teal cloud) means the structural bias favors long positions. A bear regime (descending alignment with a red cloud) favors shorts. A neutral regime suggests consolidation — reduce position sizing or stand aside. The regime confirmation requirement means the dashboard will update one to two bars after alignment begins, giving you a cleaner entry rather than reacting to the first crossover.
Step 2: Wait for Structure to Break
Within the context of the confirmed regime, watch for BOS events in the trend direction. A bullish BOS during a bull regime is a continuation structure signal — it means price has broken above a prior swing high, suggesting the up-trend is extending. A bearish BOS during a bull regime, especially if classified as a CHoCH, is your first warning that the structure may be shifting. Use the BOS labels on the chart to track the sequence of structural breaks over time.
Step 3: Confirm with Z-Score Impulse
A BOS or CHoCH becomes significantly more actionable when accompanied by a Z-score impulse signal in the same direction. When the cumulative bull streak normalized to 2+ sigma fires at the same time as or immediately following a bullish BOS, the move is backed by sustained directional momentum — not a single large candle. When regime, structure, and impulse all align, the signal quality is at its highest.
Step 4: Manage Position with HEMA Proximity
Once in a position, the proximity bar coloring helps manage exits. Bars that are far from HEMA mid (highly saturated) represent extended conditions — areas where mean reversion risk is elevated. Bars near HEMA mid are in equilibrium. Exits on strength (closing during a high-saturation bullish bar after a BOS continuation trade) allow for locking in gains at points of extension rather than waiting for a reversal to develop.
Indicator Limitations
The two-bar regime confirmation introduces a brief delay relative to the actual HEMA crossover. On fast-moving instruments, this can mean a slightly later entry but provides meaningful protection against false transitions.
BOS detection is based on prior swing highs and lows defined by the swing length parameter. On very low swing length settings, minor highs and lows will be used as structure levels, potentially generating frequent BOS events of less structural significance.
Z-score impulse requires a sufficient lookback to establish a stable mean and standard deviation for the cumulative streak. In the first Z-lookback bars of any chart, signals may be less statistically reliable as the normalization period is not fully seeded.
The HEMA and all derivative signals are calculated on the chart's native timeframe. This indicator does not internally pull higher timeframe data — users who want multi-timeframe regime context should reference signals from higher timeframe chart instances.
Like all trend-following tools, this indicator will produce whipsaw signals in choppy, range-bound markets where neither bulls nor bears sustain momentum long enough to trigger clean regime confirmation.
Proximity bar coloring uses ATR as a normalizer. During volatility regime shifts (e.g., sudden spike in ATR), the alpha thresholds may temporarily misrepresent proximity distance.
Originality Statement
The Regime & Structure Engine is not a repackaging of any single existing indicator. It is a purpose-built synthesis of methodologies that individually exist in various forms but have not been combined in this specific architecture.
The HEMA function (Hull-inspired double-weighted EMA followed by square-root-period smoothing) is a custom construction that differs from both standard HMA and standard EMA in its layering approach and final smoothing step.
The three-state confirmed regime engine with mandatory multi-bar confirmation is an original state machine design. Most indicators display regime as a simple crossover condition; this system enforces a holding period before state transition.
The Z-score cumulative impulse system measures the statistical significance of a directional streak rather than the magnitude of a single bar move. This normalization approach — accumulating consecutive closes and comparing against rolling sma/stdev — is not a standard oscillator pattern.
The combination of HEMA-based regime with classical BOS/CHoCH structural analysis on top of Z-score momentum creates a three-dimensional signal framework that no single publicly available indicator replicates.
The proximity bar coloring system using ATR-normalized distance to the HEMA mid layer as the alpha channel driver is an original visual encoding not found in standard bar coloring implementations.
Disclaimer
The Regime & Structure Engine is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. Past behavior of price relative to indicator signals does not guarantee future results. All trading involves risk, including the potential loss of principal. Users are solely responsible for their own trading decisions. Always conduct your own due diligence and consider consulting a licensed financial professional before making any investment decisions.
-Made with passion by officialjackofalltrades
Indicator

Strategy

Backtest Template [Backtest Terminal]Overview — What Is This Script?
Backtest Template (BTT) is an open-source strategy framework designed to let traders test their own indicator logic without building the backtest infrastructure from scratch. Instead of writing stop loss management, session filters, alert systems, and trailing stops yourself, BTT handles all of that automatically. You bring your signal idea — BTT handles the rest.
The template is designed for all markets: stocks, Forex, gold (XAUUSD), crypto spot, and crypto futures. It ships with a pre-built Moving Average Cross trigger and Moving Average Trend filter as working examples that you replace with your own logic.
What Makes It Original
Most backtest templates on PulseWire are fixed strategies that test one specific indicator. BTT introduces a User Zone architecture: a single clearly marked section near the top of the script where the user replaces one pre-built trigger and one pre-built filter with their own Pine Script code. The engine below reads four fixed variable names and runs automatically — the user never needs to touch strategy orders, stop management, session logic, or the alert system.
This design means a complete beginner can run their first backtest by changing fewer than ten lines of code, while an advanced user can plug in arrays, multi-timeframe calculations, or complex signal logic and the engine handles it identically.
What The Engine Handles Automatically
Once your signal is connected through the User Zone, the following run without any additional code:
Stop Loss and Take Profit — three unit modes: percentage of price, fixed points (Forex / CFD), or fixed dollar amount (crypto / stocks)
Stop Mode — Fixed (original level), Trailing (follows price), or Breakeven (moves to entry price)
Trailing Stop — configurable distance and activation offset, each with matching %, point, and dollar unit inputs consistent with your Stop/Target Mode selection
Breakeven Stop — configurable activation offset in the same unit system
Disable Take Profit — when using Trailing mode, an optional toggle removes the fixed TP so the trailing stop becomes the sole exit
Trade Direction — Long only, Short only, or Both
Backtest Date Range — start and end date inputs
Trading Day Filter — enable or disable any day of the week
Trade Session Hours — exchange server time filter (HHMM-HHMM format)
Trade Windows — four configurable local-time windows each independently set to Off, Blackout, or Trade Only mode with full timezone support
Entry Signal Markers — green and red triangles that only appear when all conditions pass, so chart visuals exactly match what the strategy trades
App Alerts — pre-formatted alert messages with ticker, direction, stop and target prices
Custom JSON Alerts — four separate input fields for webhook bot integration, one per order event
How To Use It — Quick Start
Open the script in Pine Editor
Find the User Zone near the top — it is clearly marked with a visual border and is the only section you need to edit
Replace the pre-built Moving Average Cross trigger block with your own indicator signal, assigning your long condition to userLong and your short condition to userShort — always add and confirmed to both
Replace the pre-built Moving Average Trend filter block with your own market condition, assigning to userFilterLong and userFilterShort
Add to chart and open Strategy Tester
User Zone Contract
The engine connects to your signal through exactly four variables. Do not rename them:
userLong → true on the bar you want to enter Long
userShort → true on the bar you want to enter Short
userFilterLong → true when Long entries are allowed
userFilterShort → true when Short entries are allowed
Always add and confirmed (barstate.isconfirmed) to userLong and userShort. This ensures the signal locks in only when the bar closes, preventing signals from changing value mid-bar.
Setting userFilterLong = true disables the Long filter entirely. Setting it to a condition like close > ta.ema(close, 200) means Long entries are only allowed when price is above that EMA. Long and Short filters are independent — you can filter one direction while leaving the other open.
Stop Loss and Take Profit — Three Unit Modes
The Stop/Target Mode setting controls how SL and TP distances are measured:
% (Percentage) — distance as a percentage of price. Suitable for stocks and crypto. Stop source can be the close price or the candle High/Low. Take profit is derived from stop distance × Risk:Reward ratio.
Point - Forex / CFD — distance in instrument ticks (syminfo.mintick). Suitable for XAUUSD, EURUSD, and other Forex/CFD instruments. Example: 100 points on EURUSD (mintick = 0.00001) = 1 pip.
Dollar - Crypto / Stock — fixed dollar distance from entry. Suitable for BTCUSD and US stocks.
All trailing and breakeven offset inputs follow the same three-unit system. Use the , , or input that matches your selected Stop/Target Mode. Using the wrong unit input will result in a mismatch between your intended stop distance and the actual calculation.
Stop Mode — Fixed, Trailing, Breakeven
Fixed — stop loss stays at the original level from entry until hit or TP is reached
Trailing — stop follows price at a configurable distance, locking in profit as price moves. The trailing activation offset controls how far price must move before trailing begins (shown as a yellow line on chart). Enable "Disable Take Profit" to let the trailing stop manage the entire exit without a fixed TP ceiling
Breakeven — stop moves to the exact entry price once price moves a configurable distance in your favour (shown as a white line on chart)
Trade Windows — Off, Blackout, Trade Only
Each of the four time windows (Tokyo, London, New York, Custom) has an independent mode selector:
Off — this window has no effect on entries (default for all four)
Blackout — block all new entries while the current time is inside this window. Useful for avoiding high-volatility opens or news events
Trade Only — only allow new entries while the current time is inside this window. Useful for targeting specific sessions or news event windows such as NFP or Fed announcements
All times are entered in your local timezone selected from the My Timezone dropdown. The engine converts to UTC internally.
Logic rules:
Multiple Blackout windows use AND NOT logic — entries are blocked if the current time is inside any Blackout window
Multiple Trade Only windows use OR logic — entries are allowed when the current time is inside any one Trade Only window
If no windows are set to Trade Only, there is no time restriction on entries (same as all Off)
Blackout and Trade Only can be combined: for example, set London to Trade Only and New York to Blackout to only trade the London session while avoiding NY volatility
Trading Day and Session
Trading Days — enable or disable any individual day of the week. Disabling a day prevents new entries — open positions are still managed on disabled days.
Trade Session — set allowed hours in exchange server time (HHMM-HHMM format). Default 0000-0000 means 24 hours with no restriction. This uses exchange server time, not your local time.
Alert System — App Alert and Custom JSON
How to activate alerts:
Set the alert mode to App Alert or Custom in the settings panel
Create a PulseWire alert on the chart (right-click → Add Alert)
In the alert message box, paste exactly: {{strategy.order.alert_message}}
This placeholder delivers the correct message for each order event automatically
App Alert mode sends a pre-formatted text message for each event:
ENTRY LONG : {price}
STOP LOSS : {stop level}
TARGET PRICE : {target level}
Exit alerts include a PNL percentage. No additional setup is required.
Custom mode — JSON webhook for bot integration:
Four separate input fields accept a single-line JSON string — one per order event:
Long Entry — fires when a Long position opens
Long Exit — fires when a Long position closes (TP, SL, or trailing stop)
Short Entry — fires when a Short position opens
Short Entry — fires when a Short position opens
Short Exit — fires when a Short position closes (TP, SL, or trailing stop)
Paste your JSON as a single line into each field. PulseWire's input.string stores the content as a single line regardless of how it was formatted, making it safe for all webhook receivers.
Settings Guide — Commission, Slippage, Margin
Default values are conservative starting points. Edit the strategy() declaration at the top of the script to match your broker and market. Detailed inline comments in the script explain every parameter.
Commission defaults (0.1% per side, 2 ticks slippage):
Stocks zero-commission broker → 0.0%
Stocks SET Thailand → 0.16%
Crypto spot (Binance) → 0.1%
Crypto futures (Binance taker) → 0.04%
XAUUSD $7 per standard lot → change commission_type to strategy.commission.cash_per_contract and commission_value to 0.07 ($7 ÷ 100 oz)
Position sizing (default 2% of equity):
For lot-based markets (Forex, XAUUSD) change default_qty_type to strategy.fixed and default_qty_value to the number of units. On XAUUSD: 1 unit = 1 oz, so 0.01 lot = value of 1, 0.10 lot = value of 10, 1.00 lot = value of 100.
Margin/leverage simulation:
Both margin_long and margin_short are 0 by default (no margin simulation). Formula: margin value = 100 / leverage ratio. Example: 1:500 leverage → margin_long = 0.2. These values cannot be set from the input panel — edit them directly in the strategy() call.
Repainting Warning
Before connecting any indicator to the User Zone, verify it does not repaint. A repainting indicator places signal arrows on past bars using data from future bars that did not exist at the time — backtest results will look excellent while live trading produces nothing like it.
How to check using Bar Replay:
Open the indicator on your chart and find a signal arrow in the past
Open Bar Replay and rewind to before that signal appeared
Step forward one bar at a time using Shift + →
Do not use the Play button (Shift + ↓) — bars move too fast to catch a disappearing arrow
If the arrow appears and stays permanently → safe to use. If the arrow appears then disappears or moves as you advance → repainting confirmed, do not use in a strategy.
How to check using Alert Log:
Enable the indicator's built-in alert, wait for it to fire on a live bar, then compare the alert log entry to the signal arrow on the chart. If they do not match in timing or direction → repainting.
Disclaimer
This script is published for educational purposes only. It is a framework and template — not a complete trading system and not financial advice. Backtest results shown in Strategy Tester reflect historical data only and do not guarantee future performance. Past performance is not indicative of future results.
All trading involves significant risk of loss. Do not trade with money you cannot afford to lose. The results produced by this template depend entirely on the signal logic the user provides — the author accepts no responsibility for any trading decisions made using this script or any modifications of it.
Before using any strategy in live trading, you should fully understand how it works, verify its logic independently, and test it thoroughly on a demo account. Always consult a qualified financial advisor before making investment decisions.
The pre-built Moving Average Cross trigger and Moving Average Trend filter included in the User Zone are provided as examples only — they are not recommendations to trade any specific method. Strategy

Vantage Protocol [JOAT]Vantage Protocol
Introduction
Vantage Protocol is an advanced open-source execution strategy that integrates regime classification, adaptive momentum filtering, volume confirmation, session timing, and ATR-based risk management into a unified NNFX-aligned trading engine. Rather than relying on a single entry signal, the strategy requires alignment across five independent subsystems — regime state, momentum direction, cumulative volume delta, volume presence, and session timing — before entering a trade. This multi-gate architecture is designed to filter out low-probability setups and only execute when multiple independent factors converge.
This strategy exists because most retail strategies fail for a predictable reason: they use one or two conditions for entry and ignore the broader market context. A moving average crossover in a choppy market produces losses. A momentum signal during a low-volume session lacks follow-through. An entry outside the active institutional window misses the liquidity needed for clean execution. Vantage Protocol addresses each of these failure modes with a dedicated subsystem, and only enters when all subsystems agree.
Important Note on Strategy Results
Backtesting results shown with this strategy are historical simulations and do not guarantee future performance. Markets change, and strategies that performed well historically may not perform well in the future. The default settings use realistic parameters: 2% of equity per trade, $100,000 initial capital, no pyramiding, and zero margin. Users should add commission and slippage appropriate for their broker and instrument in the strategy Properties dialog before evaluating results. The strategy is published with these defaults to provide a transparent starting point — users are expected to adjust parameters for their specific trading conditions.
Strategy Architecture
The strategy follows an NNFX (No Nonsense Forex) inspired architecture where each subsystem acts as an independent gate. A trade is only entered when all gates are open simultaneously.
Gate 1: Regime Engine
The regime engine determines whether the market is trending or ranging. It combines three independent measures:
H-Infinity Filter: An adaptive filter from control theory that tracks price under worst-case noise assumptions. The filter's slope determines directional bias — positive slope = bullish, negative slope = bearish
R-Squared Efficiency Gate: Measures how well price fits a linear regression. When R-squared exceeds an auto-calibrating threshold (rolling mean plus k standard deviations), the efficiency gate opens, indicating a trending market. A hysteresis band prevents flickering
Chop Score: Measures path efficiency — the ratio of net movement to total path length. High chop scores indicate choppy, non-directional markets where trend-following strategies fail
The regime is classified as trending (bullish or bearish) only when R-squared confirms efficiency AND chop score confirms directional movement. If either condition fails, the regime is classified as ranging and no entries are allowed.
bool regimeTrend = effOK and not isChoppy
int regimeBias = regimeTrend ? (hinfSlope >= 0 ? 1 : -1) : 0
Gate 2: Momentum Core
The momentum subsystem uses a Laguerre RSI processed through JMA adaptive smoothing. The Laguerre filter provides a smoother, less laggy momentum reading than standard RSI, and the JMA smoothing further reduces noise while preserving responsiveness to genuine momentum shifts.
Momentum must confirm the regime direction:
For long entries: JMA-smoothed Laguerre RSI must be above the bull threshold (default: 62)
For short entries: JMA-smoothed Laguerre RSI must be below the bear threshold (default: 38)
This prevents entries when momentum is neutral or contradicts the regime bias.
Gate 3: Volume Filter (CVD)
Cumulative Volume Delta tracks net buying versus selling pressure. The strategy requires the CVD slope (smoothed with an EMA) to confirm the trade direction:
For long entries: CVD slope must be positive (net buying pressure increasing)
For short entries: CVD slope must be negative (net selling pressure increasing)
Additionally, the current bar's volume must exceed a minimum ratio relative to the 50-bar average (default: 0.7x). This filters out entries during thin-liquidity periods where price moves lack conviction and slippage risk is elevated.
Gate 4: Session Filter
An optional session window filter restricts entries to a configurable time window (default: 0200-1200 New York time). This aligns trading with the London and New York sessions where institutional liquidity is deepest. Entries outside this window are blocked because low-liquidity sessions produce unreliable price action and wider spreads.
Gate 5: Cooldown
After any exit (whether by stop loss, take profit, or regime exit), a configurable cooldown period (default: 5 bars) must pass before a new entry is allowed. This prevents revenge trading and allows the market to establish a new setup after a position closes.
Entry and Exit Logic
Entry Conditions:
All five gates must be open simultaneously, and the strategy must be flat (no existing position):
bool longSetup = regimeBias == 1 and momBull and cvdBull and volOK and sessOK and cooldownOK
bool shortSetup = regimeBias == -1 and momBear and cvdBear and volOK and sessOK and cooldownOK
Stop Loss and Take Profit:
SL and TP levels are calculated using ZEMA-smoothed ATR multiplied by configurable factors:
Stop Loss: Entry price minus (ZEMA-ATR x SL Multiplier) for longs, plus for shorts (default SL multiplier: 1.8)
Take Profit: Entry price plus (ZEMA-ATR x TP Multiplier) for longs, minus for shorts (default TP multiplier: 2.8)
The default risk-reward ratio is approximately 1:1.56 (1.8 SL to 2.8 TP). ZEMA smoothing on the ATR removes noise from the volatility measure, producing more stable SL/TP levels than raw ATR.
Regime Exit:
If the regime flips to ranging or the opposite direction while a position is open, the strategy closes the position immediately with a "Regime Exit" comment. Additionally, if momentum deteriorates significantly (Laguerre RSI crossing back toward neutral), the position is closed. This prevents holding positions through regime changes where the original thesis is no longer valid.
Band Structure Visualization
The strategy plots a JMA baseline with regime-colored glow, and SL/TP bands around it:
SL bands (inner) shown in muted scarlet with fill zones
TP bands (outer) shown in muted jade with cross-style plotting
The baseline color shifts based on regime: green for bullish trend, red for bearish trend, purple for ranging
Bar coloring reflects the current position state: green when long, red when short, purple when ranging (no position allowed), and grey when flat in a trending regime.
Default Strategy Properties
These are the default values used in the strategy's Properties dialog:
Initial Capital: $100,000
Order Size: 2% of equity per trade
Pyramiding: 0 (no adding to positions)
Margin: Long 0%, Short 0% (cash account simulation)
Commission: Not set by default — users should configure this for their broker (typical values: 0.01-0.1% for crypto, $1-5 per contract for futures, 1-3 pips for forex)
Slippage: Not set by default — users should configure this for their instrument (typical values: 1-3 ticks for liquid instruments, more for illiquid ones)
Users are strongly encouraged to set realistic commission and slippage values before evaluating backtesting results. Results without commission and slippage will overstate performance.
Input Parameters
Regime Engine:
R-Squared Length (default: 30), R-Squared Threshold k (default: 0.8), Chop Length (default: 20), Chop Threshold (default: 0.55)
H-Infinity Order (default: 3), Noise (default: 0.5), Disturbance (default: 1.0)
Momentum Core:
Laguerre Alpha (default: 0.07), JMA Smooth Period (default: 8), Bull Threshold (default: 62), Bear Threshold (default: 38)
Volume Filter:
CVD Smoothing (default: 14), Min Volume Ratio (default: 0.7)
Band Structure:
JMA Period (default: 21), ATR Length (default: 14), SL Multiplier (default: 1.8), TP Multiplier (default: 2.8)
Session Filter:
Session Filter toggle (default: on), Active Window (default: 0200-1200), Timezone (default: America/New_York)
Risk Management:
Risk % (default: 1.5), Re-entry Cooldown (default: 5 bars)
How to Use This Strategy
Step 1: Configure for Your Instrument
Open the strategy Properties dialog and set commission and slippage values appropriate for your broker and instrument. Adjust the session window if you trade instruments with different liquidity patterns than the default London/NY window.
Step 2: Evaluate on Sufficient Data
Run the strategy on a dataset that produces at least 100 trades for statistical significance. Short datasets with few trades produce unreliable performance metrics. Use the strategy tester's detailed trade list to review individual trades.
Step 3: Monitor the Dashboard
The 9-row dashboard shows the state of every subsystem in real-time: regime classification, momentum reading, CVD direction, volume ratio, session status, current position, ATR value, and cooldown status. This transparency lets you understand exactly why the strategy is or is not entering trades.
Step 4: Understand the Regime Exit
The strategy will close positions when the regime changes, even if the SL/TP has not been hit. This is by design — holding a trend-following position through a regime change to ranging is a common source of losses. Regime exits may result in small wins or small losses, but they prevent the larger losses that come from ignoring changing conditions.
Step 5: Adjust Parameters Thoughtfully
If the strategy produces too few trades, consider lowering the momentum thresholds (bull from 62 to 58, bear from 38 to 42) or reducing the minimum volume ratio. If it produces too many losing trades, consider increasing the R-squared threshold k or the chop threshold. Each parameter change affects the trade-off between signal frequency and signal quality.
Strategy Limitations and Compromises
Trade Frequency: The five-gate architecture is deliberately selective. On many instruments and timeframes, the strategy may only produce a handful of trades per month. This is by design — fewer, higher-quality trades — but it means the strategy is not suitable for traders who need frequent activity
Regime Detection Lag: The regime engine uses lookback-based measures (R-squared, chop score) and persistence requirements. Regime changes are identified with a delay, which means the strategy may miss the first portion of a new trend or hold slightly into a regime change
CVD Approximation: The volume delta calculation (close > open = buying) is an approximation. True order flow requires Level 2 data not available in Pine Script. On instruments with unreliable volume data (forex with tick volume), the CVD gate may be less effective
Fixed SL/TP: Stop loss and take profit are set at entry and do not trail. In strong trends, the strategy may exit at the TP while the trend continues. A trailing stop modification could capture more of extended moves but would also increase the risk of giving back profits during pullbacks
Session Dependency: The default session filter is optimized for forex and futures with distinct London/NY sessions. Crypto and other 24/7 markets may benefit from disabling the session filter or adjusting the window
No Pyramiding: The strategy does not add to winning positions. This limits profit potential in strong trends but also limits risk exposure
Backtesting vs Live: Backtesting assumes fills at the close of the signal bar. In live trading, slippage, requotes, and execution delays may produce different results. Always paper trade before committing real capital
Originality Statement
This strategy is original in its multi-gate architecture that synthesizes five independent subsystems into a unified execution engine. While individual components (regime detection, Laguerre RSI, CVD, session filtering, ATR-based risk management) are established concepts, this strategy is justified because:
The five-gate entry architecture (regime + momentum + CVD + volume + session) provides a systematic approach to filtering low-probability setups that is not available in single-indicator strategies
The H-Infinity filter for regime detection applies control theory to market classification, providing a theoretically grounded alternative to simple moving average crossover regime detection
The triple-measure regime engine (R-squared + chop + H-Infinity slope) provides more robust regime classification than any single measure
The regime exit mechanism actively manages positions based on changing market conditions rather than relying solely on fixed SL/TP levels
The NNFX-inspired architecture with clearly separated subsystems (baseline, confirmation, volume, exit, session) provides a modular framework that traders can understand, evaluate, and modify
The cooldown mechanism prevents revenge trading after exits, addressing a common behavioral trading error
All subsystem states are displayed transparently in the dashboard, allowing traders to understand exactly why trades are or are not being taken
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 are historical simulations based on past data. Past performance does not guarantee future results. The strategy's historical performance was generated under specific market conditions that may not repeat. Markets are dynamic, and strategies that worked historically may fail in the future.
The default strategy properties do not include commission or slippage. Users must configure these values for their specific broker and instrument to obtain realistic performance estimates. Results without commission and slippage will overstate actual trading performance.
Always use proper risk management, including position sizing appropriate for your account and risk tolerance. Never risk more than you can afford to lose. Consider paper trading this strategy extensively before using real capital. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategy

Fade The Crowd Protocol >_A structured contrarian system that deliberately inverts conventional MACD + VWMA momentum signals — entering short when the crowd goes long, and long when the crowd goes short. Filtered by ADX, Choppiness Index, and a configurable cooldown timer, the strategy ensures fades execute only at statistically credible exhaustion points, not into directionless noise. Exits are managed through ATR%-normalized take profit and stop loss levels anchored to fill price, with a hard-cap Plug stop bounding maximum loss on every trade.
═══════════════════════════════════════
THE CONTRARIAN PREMISE
═══════════════════════════════════════
When a conventional momentum setup reaches full confirmation — MACD crossover, positive histogram, price at or above VWMA — the crowd is already positioned. Late-stage consensus entries carry elevated mean-reversion risk. The Fade The Crowd Protocol identifies that exact moment of crowd consensus and enters against it.
This is not arbitrary signal flipping. The inversion is applied to a well-defined, multi-condition setup. ADX and Choppiness filters ensure the fade occurs within a trending, structured market environment. A cooldown timer enforces separation between trades, preventing rapid re-entry after stop-outs.
═══════════════════════════════════════
THE INVERSION LOGIC
═══════════════════════════════════════
Conventional long setup → Fade The Crowd goes SHORT
Condition: MACD crossover + histogram above zero + price touches or exceeds VWMA
Crowd interpretation: Bullish momentum confirmed, late buyers entering
Fade interpretation: Crowd is fully long — exhaustion and reversion risk is elevated
Conventional short setup → Fade The Crowd goes LONG
Condition: MACD crossover + histogram below zero + price touches or falls to VWMA
Crowd interpretation: Bearish momentum confirmed, late sellers entering
Fade interpretation: Crowd is fully short — bounce and reversion risk is elevated
Both directions additionally require: CHOP below threshold, ADX above threshold, cooldown timer cleared, and no existing open position.
═══════════════════════════════════════
KEY FEATURES
═══════════════════════════════════════
Signal Inversion Engine
— MACD crossover (either direction) as the base crowd-consensus event
— Histogram sign identifies which direction the crowd is leaning
— VWMA touch confirms price has aligned with the dominant crowd position
— Entry is taken against all three simultaneously satisfied conditions
Cooldown Timer
— Tracks bar index at every trade exit via last_exit_bar variable
— All new entries blocked for a configurable number of bars post-exit
— Prevents rapid re-entry sequences following volatile stop-out events
— Configurable independently of all other filters
ADX + Choppiness Index Filters
— CHOP below threshold confirms the market exhibits directional structure
— ADX above threshold confirms sufficient trend force at signal bar
— Both filters must pass simultaneously with the inversion signal
— Prevents fading in low-conviction, oscillating environments where mean reversion is unreliable
Two-Step ATR% Exit Architecture
— ATR% captured and stored at trigger bar before entry executes
— TP and SL calculated from strategy.position_avg_price on first position bar
— Exit levels locked — no recalculation on subsequent bars
— TP HIT and SL HIT comments displayed on chart for post-hoc analysis
The Plug — Hard Stop Architecture
— Independent hard percentage stop applied to every trade
— For longs: fill_price × (1 − Plug%). For shorts: fill_price × (1 + Plug%)
— Compared against ATR SL using math.max() / math.min() — tighter stop always applied
— Ensures maximum loss is bounded regardless of ATR expansion at entry
═══════════════════════════════════════
HOW IT WORKS
═══════════════════════════════════════
Step 1 — Crowd Consensus Detection
The strategy evaluates three conditions that define a fully-formed conventional momentum signal: MACD has crossed its signal line (ta.cross), the MACD histogram confirms directional bias (above zero for bullish, below for bearish), and price has touched or breached the VWMA in the same direction (high >= VWMA for bullish, low <= VWMA for bearish). When all three align, the crowd is fully positioned.
Step 2 — Environment Filtering
Choppiness Index below threshold confirms the market is not ranging — a prerequisite for meaningful momentum exhaustion. ADX above threshold confirms trend force exists. Cooldown timer confirms sufficient bar-distance from the prior trade exit. All three environmental conditions must pass simultaneously with the crowd signal.
Step 3 — Contrarian Entry
The strategy enters in the opposite direction to the crowd consensus: short against the bullish setup, long against the bearish setup. ATR% at the trigger bar is captured into stored_atr_pct before the entry order executes.
Step 4 — Exit Level Calculation
On the first bar where position size is non-zero (position just opened), TP and SL prices are calculated using strategy.position_avg_price and the stored ATR%. The Plug stop is calculated independently. math.max() (longs) or math.min() (shorts) selects whichever stop is tighter. All levels are stored in fixed variables and passed to strategy.exit() — no dynamic recalculation occurs mid-trade.
═══════════════════════════════════════
WHY MACD + VWMA AS THE CROWD PROXY
═══════════════════════════════════════
MACD is one of the most widely used momentum indicators in retail trading. VWMA incorporates volume-weighted price — a common institutional reference level. Together, they define a setup that is broadly taught, widely traded, and reliably over-populated at the moment of full confirmation. The Fade The Crowd Protocol uses this familiarity as a structural edge: the more crowded the conventional signal, the more statistical force the fade carries when those positions unwind.
Strategy

Alpha Supertrend Vector >_A triple-validated trend-flip system that enters exclusively at the moment a Supertrend indicator changes direction — the earliest confirmation of a regime change — then requires two independent filters (ADX strength and Choppiness Index) to confirm that the flip is occurring within a genuine trending environment. Exits are managed through ATR%-normalized take profit and stop loss levels, with a secondary hard-cap Plug stop that enforces an absolute maximum loss boundary on every trade regardless of volatility conditions.
═══════════════════════════════════════
KEY FEATURES
═══════════════════════════════════════
Supertrend Flip Signal
— Enters on the exact bar where Supertrend direction changes polarity
— Long trigger: bearish-to-bullish flip (st_dir changes from 1 to -1)
— Short trigger: bullish-to-bearish flip (st_dir changes from -1 to 1)
— Configurable ATR multiplier and fast ATR length
— Supertrend line plotted on chart: green (bullish), red (bearish)
Choppiness Index Regime Filter
— CHOP Index must be below the configured threshold at signal bar
— Measures ATR range relative to total high-low range, log-normalized
— Blocks flip entries during sideways, range-bound market conditions
— Protects against the most common source of false Supertrend flip signals
ADX Directional Strength Filter
— ADX must exceed configurable minimum threshold at signal bar
— Full DMI calculation using DI+ and DI− via ta.dmi()
— Confirms sufficient trend force behind the directional flip
— Guards against low-energy drifts that trigger flips without follow-through
ATR% Normalized Exits
— TP and SL expressed as multiples of ATR% — volatility-proportional by design
— ATR% value locked at signal bar via entry_atr_pct variable
— Exit levels anchored to strategy.position_avg_price for live execution accuracy
— No mid-trade recalculation of the base ATR% — risk profile stays fixed
The Plug — Hard Stop Architecture
— Independent hard percentage stop applied to every trade
— For longs: avg_price × (1 − Plug%). For shorts: avg_price × (1 + Plug%)
— Compared to ATR SL using math.max() / math.min() — tighter stop always wins
— Prevents a single volatility spike from breaching a user-defined loss ceiling
═══════════════════════════════════════
HOW IT WORKS
═══════════════════════════════════════
Step 1 — Supertrend Flip Detection
ta.change(st_dir) evaluates to negative when Supertrend flips from bearish (1) to bullish (-1), and positive when it flips from bullish to bearish. These direction changes represent the earliest available structural confirmation of a trend reversal — before momentum indicators, before moving average crossovers.
Step 2 — Choppiness Gate
The Choppiness Index (CHOP) measures the ratio of summed 1-bar ATR to total high-low range over the lookback window, log-normalized to a 0–100 scale. Values below the threshold indicate the market is trending. Values above indicate choppiness. Flip signals that occur during high-CHOP environments — where Supertrend is most likely to whipsaw — are filtered entirely.
Step 3 — ADX Gate
ADX above the minimum confirms the trend has directional force. Even in trending markets, low ADX can indicate the trend is weak and unlikely to sustain a move through the TP level. Both CHOP and ADX must pass simultaneously with the Supertrend flip for entry to execute.
Step 4 — Entry
Entry is placed on the signal bar. The ATR% value at that exact moment is captured and stored for use in exit calculations throughout the life of the trade.
Step 5 — Exit Calculation
TP and SL are calculated dynamically off strategy.position_avg_price using the stored entry_atr_pct. The Plug stop is calculated independently as a fixed percentage from average price. Whichever stop is closer to entry price is applied via math.max() (longs) or math.min() (shorts). The strategy.exit() call runs on every bar while the position is open, ensuring levels remain accurate if average price shifts due to execution variance.
═══════════════════════════════════════
WHY SUPERTREND FLIPS — NOT SUSTAINED DIRECTION
═══════════════════════════════════════
Most Supertrend-based strategies enter whenever price is on the bullish or bearish side of the indicator. The Alpha Supertrend Vector enters only at the flip — the single bar where direction changes. This produces a lower-frequency, higher-conviction signal profile. The strategy is not trying to stay in a trend; it is trying to capture the initial thrust at the moment of regime change, before the move becomes consensus and crowded.
═══════════════════════════════════════
ATR% vs. ATR — THE DISTINCTION
═══════════════════════════════════════
Raw ATR is price-level dependent — a $5 ATR on a $50 stock is extreme; on a $500 stock, it is mild. By converting to ATR% (ATR / close × 100), exit distances become proportional to the instrument's current price level and volatility regime. A 1.0× ATR% TP means the same thing across different assets, different price levels, and different volatility environments — making the strategy's settings genuinely portable across instruments.
Strategy

1-Min Rapid ScalperA Heikin Ashi candle morphology sequencer engineered to detect three-bar momentum accelerations following a directional color-flip reversal. Filtered by ADX trend strength and equipped with a dual-mode exit system — a 1-bar impulse capture by default, or full ATR-based TP/SL management with a hard-cap Plug stop — the strategy is purpose-built for ultra-short timeframe execution where speed and structural precision matter more than sustained trend duration.
═══════════════════════════════════════
KEY FEATURES
═══════════════════════════════════════
Heikin Ashi Morphology Sequencer
— Three consecutive wickless candles required (open = low for longs, open = high for shorts)
— Each bar's body must strictly exceed the prior bar's body size
— A color-flip on the 4th lookback bar confirms genuine regime reversal
— Separate long and short sequencers with mirror-image logic
Precision Heikin Ashi Source
— True HA values pulled via ticker.heikinashi() and request.security()
— No approximation — morphology integrity preserved across all timeframes
— Overlaid cleanly on the standard candlestick chart
ADX Trend Strength Filter
— Full DMI calculation (DI+ and DI−) via ta.dmi()
— ADX must exceed configurable threshold at signal bar
— Eliminates entries during directionless, low-conviction market conditions
Dual Exit System
— 1-Bar Exit (default): close command issued on entry bar, executes at next bar's open
— ATR Mode: TP and SL locked at entry price using prior bar's ATR — no mid-trade recalculation
— The Plug: hard percentage stop caps maximum loss regardless of ATR width
═══════════════════════════════════════
HOW IT WORKS
═══════════════════════════════════════
Step 1 — Color-Flip Confirmation
The 4th bar back must be the opposite color to the signal candles. Bearish on bar 4 precedes long setups; bullish precedes shorts. This confirms the sequence is an emergence from the opposite regime — not continuation of exhausted momentum.
Step 2 — Three-Bar Acceleration Sequence
Bars 1, 2, and 3 (looking back from signal bar) must each be wickless on their entry side and larger in body than the preceding bar. For longs: open equals low on all three bars. For shorts: open equals high. The expanding body size requirement confirms compounding directional conviction, not just sustained direction.
Step 3 — ADX Gate
ADX must exceed the configured threshold at the moment of signal. This confirms the market is exhibiting sufficient trend energy to justify a momentum entry. Signals that pass candle morphology but occur during low-ADX environments are filtered.
Step 4 — Entry
Entry is placed at the open of the bar immediately following the signal. No repainting — all conditions are evaluated on confirmed bars.
Step 5 — Exit
Default (1-Bar): strategy.close() is issued on the entry bar. With process_orders_on_close = false, the engine triggers execution at the very next bar's open — harvesting the initial impulse and exiting before any adverse development.
ATR Mode: TP and SL are calculated once at the position-open bar using the prior bar's ATR value (avoiding look-ahead). Levels are locked into strategy.exit() immediately. The Plug applies math.max() (longs) or math.min() (shorts) to enforce whichever stop is tighter — ATR-derived or percentage-derived — so maximum loss is always bounded.
═══════════════════════════════════════
THE WICKLESS CONDITION EXPLAINED
═══════════════════════════════════════
A wickless bullish Heikin Ashi candle occurs when haOpen equals haLow — meaning buyers controlled every tick of that bar with zero retracement. Three consecutive wickless bars with each body larger than the last represents compounding momentum conviction. It is a structural fingerprint of institutional-grade directional pressure, not random noise. The color-flip prerequisite ensures this conviction is fresh — not the tail end of a prior trend.
═══════════════════════════════════════
THE PLUG — RISK ARCHITECTURE
═══════════════════════════════════════
ATR-based stops are volatile by nature — during wide-range sessions, a 2× ATR stop can represent a significant percentage drawdown. The Plug introduces a percentage-based ceiling on loss distance that operates independently of ATR. Whichever stop is closer to entry price is applied. This design ensures that even in extreme volatility conditions, a single trade can never breach a user-defined maximum loss threshold.
═══════════════════════════════════════
RECOMMENDED USE
═══════════════════════════════════════
— Primary timeframe: 1-minute (strategy is named and tuned for this)
— Works on any liquid instrument: forex, crypto, equity futures, indices
— 1-Bar Exit mode is best suited for instruments with tight spreads and fast fills
— ATR mode with The Plug is better suited for instruments with wider intrabar volatility
— Lower ADX thresholds will increase signal frequency; higher values increase selectivity
— Backtest across multiple sessions before deploying with real capital
Strategy

Alpha TRIX Strategy >_The Alpha TRIX Strategy is a precision trend-following system built on a deceptively simple but powerful principle: only trade when the market is genuinely trending, genuinely moving, and genuinely tilted in your direction. It achieves this by stacking three independent validation layers — a momentum signal (TRIX), a regime filter (Choppiness Index), and a directional strength filter (ADX) — before a single entry is placed.
Unlike raw TRIX crossover systems that fire indiscriminately, this strategy demands that all three conditions are simultaneously satisfied. The result is a lower-frequency, higher-conviction signal profile that avoids the whipsaw-heavy environments where pure momentum strategies bleed equity.
═══════════════════════════════════════
KEY FEATURES
═══════════════════════════════════════
Momentum Engine (TRIX)
— Triple-smoothed EMA eliminates high-frequency noise
— ROC of EMA³ isolates trend acceleration
— Zero-line crossover generates long and short triggers
— Configurable TRIX length for sensitivity tuning
Regime Filter — Choppiness Index
— CHOP < threshold confirms non-choppy, directional structure
— Blocks entries during range-bound, sideways markets
— Eliminates the most expensive entry environment for trend-following systems
Directional Filter — ADX
— ADX > minimum threshold confirms trend force is sufficient
— Calculated via full DMI (DI+ / DI−)
— Guards against weak-trend entries that stall post-entry
ATR% Exit Framework
— Take profit and stop loss scaled to realized volatility at entry
— Levels locked at execution candle — no mid-trade recalculation
— Independent TP and SL multipliers for asymmetric risk configuration
Trade Direction Control
— Long only, short only, or both — configurable at runtime
═══════════════════════════════════════
HOW IT WORKS
═══════════════════════════════════════
Step 1 — TRIX Signal
EMA is applied three times to close price, producing EMA³. Rate-of-change of EMA³ over 1 bar yields the TRIX value. A crossover above zero triggers a long; a crossunder triggers a short.
Step 2 — Choppiness Gate
The Choppiness Index measures the ratio of summed 1-bar ATR to the total high-low range over the lookback window, log-normalized. Values below the threshold indicate the market is exhibiting directional structure rather than random oscillation.
Step 3 — ADX Gate
ADX above the minimum confirms that whatever direction the market is moving, it is doing so with sufficient force. Both filters must pass simultaneously with the TRIX signal for entry to execute.
Step 4 — Entry and Exit
Entry is placed immediately. Take profit and stop loss are calculated as Close × (ATR / Close) × Multiplier — which resolves to ATR × Multiplier — and passed directly to strategy.exit() at the entry bar. This prevents dynamic recalculation from altering risk parameters mid-trade, closing the gap between backtested and live performance.
═══════════════════════════════════════
DESIGN RATIONALE
═══════════════════════════════════════
The TRIX advantage: triple-smoothing suppresses noise while the ROC step converts price level into momentum velocity. The zero-line crossing represents a genuine shift in trend acceleration — a higher-quality signal than single or double EMA crossovers.
Why CHOP + ADX? Each filter attacks a different failure mode. The Choppiness Index identifies range-bound structure where momentum signals are statistically unreliable. ADX addresses weak-trend environments where the market has a direction but insufficient force to sustain movement. Together they gate out the two most expensive entry environments for trend-following systems.
Locked exits: TP and SL are calculated once at the entry bar and immediately committed to the broker. This design closes a common source of backtest-to-live divergence in ATR-based systems — where dynamic recalculation on subsequent bars silently shifts risk levels mid-trade.
Strategy

Indicator

Crucible Convergence Engine [JOAT]Crucible Convergence Engine
Introduction
The Crucible Convergence Engine is an open-source multi-module convergence strategy that requires alignment across five independent analytical engines before entering a trade. It fuses a Regime Arbiter (market state classification), Directional Helix (trend direction), Pressure Reactor (volume-weighted momentum), Deviation Lattice (statistical band filter), and Fortress Grid (dynamic S/R levels) into a unified convergence scoring system. Entries only fire when all required modules agree — regime confirms a trending state, trend direction aligns, momentum confirms, price is not at a statistical extreme, and volume exceeds its gate threshold. Exits are managed through ATR-based stops and targets, an optional trailing shield, regime flip detection, lattice extreme reversal, and rail interaction exits.
This strategy exists because most trading systems rely on one or two confirmation layers. A moving average crossover with an RSI filter, for example, still enters trades in ranging markets, against macro trends, or at statistical extremes. CCE addresses this by requiring convergence across five fundamentally different analytical dimensions before committing capital. The trade-off is fewer trades — but each trade has multi-dimensional confirmation behind it.
Module Architecture
Module 1: Regime Arbiter
The Regime Arbiter classifies the market into four states using ATR percentile ranking, custom directional movement scoring, and EMA trend alignment:
Kinetic Ascent: ATR percentile above the kinetic threshold, positive directional bias, fast EMA above slow EMA
Kinetic Descent: Same volatility conditions but with negative directional bias
Turbulence: ATR percentile above the turbulence threshold — high volatility without clear direction
Equilibrium: Low volatility, no strong directional bias — ranging market
A two-bar confirmation filter prevents single-bar regime flicker. When the Regime Gate is active (default), the strategy only enters trades during Kinetic Ascent or Kinetic Descent — it sits out during Turbulence and Equilibrium, avoiding the choppy conditions that destroy most trend-following systems.
Module 2: Directional Helix
A fast and slow moving average (EMA or SMA, configurable) determine trend direction. The strategy requires the helix to agree with the regime — a long entry needs both the regime in Kinetic Ascent AND the fast MA above the slow MA.
Module 3: Pressure Reactor
Volume-weighted momentum is calculated using the same logarithmic volume impact function found in the Ferrum Pressure Gauge indicator:
float vwM = pChg * math.log(1 + vR * momVolSens)
float mF = ta.ema(vwM, momFast)
float mS = ta.ema(vwM, momSlow)
float mIdx = ta.ema(mF - mS, 5)
The Pressure Reactor must confirm the trade direction — bullish momentum for longs, bearish momentum for shorts. This ensures that volume-weighted price action supports the entry, not just trend direction.
Module 4: Deviation Lattice
A statistical band system (mean +/- standard deviation * multiplier) acts as an extreme filter. The strategy will NOT enter a long if price is already at or above the upper band (overbought), and will NOT enter a short if price is at or below the lower band (oversold). This prevents chasing extended moves that are statistically likely to revert.
Module 5: Volume Gate
A simple but effective filter requiring short-term volume to exceed a configurable multiple of average volume (default 1.1x). This ensures entries occur during periods of meaningful market participation, not during thin, unreliable conditions.
Convergence Scoring
Each module contributes a weighted score to the overall convergence percentage:
Regime Arbiter: 25 points (trending state confirmed)
Directional Helix: 25 points (trend direction aligned)
Pressure Reactor: 25 points (momentum confirmed)
Deviation Lattice: 15 points (not at statistical extreme)
Volume Gate: 10 points (sufficient market participation)
The convergence score is classified as FULL LOCK (90%+), STRONG (70%+), PARTIAL (50%+), or WEAK (below 50%). The dashboard displays this score in real-time so you can see how close the market is to triggering an entry even before it fires.
Entry conditions require ALL modules to align simultaneously. Entries are edge-triggered — they fire only on the transition from non-convergent to convergent, preventing re-entry on the same signal.
Risk Architecture
ATR Shield (Stop Loss): Initial stop placed at entry price minus ATR * Shield Multiple (default 2.0x ATR). This adapts stop distance to current volatility.
ATR Objective (Take Profit): Target placed at entry price plus ATR * Objective Multiple (default 3.0x ATR). The default 1:1.5 risk-reward ratio (2.0 stop vs 3.0 target) provides positive expectancy even with moderate win rates.
Trailing Shield: When enabled, an ATR-based trailing stop ratchets in the direction of the trade. For longs, the trail is set at close minus ATR * Trail Multiple, and it only moves up, never down. This locks in profits during extended moves.
Regime Flip Exit: If the Regime Arbiter flips to the opposite state (e.g., from Kinetic Ascent to Kinetic Descent while in a long), the position is closed immediately. This is a structural exit — the market environment that justified the entry no longer exists.
Lattice Extreme Exit: If price reaches the opposite statistical extreme (upper band for longs, lower band for shorts), the position is closed. This captures profits at statistically extended levels.
Rail Interaction Exit: If price enters the proximity zone of the opposing Fortress Grid rail (ceiling for longs, floor for shorts), the position is closed. This respects dynamic support/resistance levels.
Strategy Default Properties
These are the default settings used in the strategy's Properties dialog:
Initial Capital: PulseWire default
Order Size: 10% of equity per trade (percent_of_equity)
Pyramiding: 0 (no stacking — one position at a time)
Commission: Not set by default — users should configure realistic commission for their instrument
Slippage: Not set by default — users should add realistic slippage for their instrument
Margin: margin_long=0, margin_short=0 (v5-equivalent behavior)
Calc on Every Tick: false (confirmed bars only)
Process Orders on Close: true
Important: Users should set realistic commission AND slippage values in the strategy Properties before evaluating backtest results. The default results without commission/slippage will overstate performance. A commission of 0.04-0.1% per side and 1-3 ticks of slippage is reasonable for most liquid instruments.
Command Panel (Dashboard)
A 13-row monospace dashboard displays the complete strategy state:
SCORE: Convergence classification with percentage (FULL LOCK / STRONG / PARTIAL / WEAK)
REGIME: Current market state (Kinetic Ascent, Kinetic Descent, Turbulence, Equilibrium)
HELIX: Trend direction (Ascent / Descent)
PRESSURE: Momentum direction (Ascent / Descent)
LATTICE: Band filter state (Clear / Ceiling Hit / Floor Hit)
Z-SCORE: Current statistical deviation from mean
VOL GATE: Volume gate status with current ratio (Open / Closed)
POSITION: Current trade status (Long / Short / Flat)
AGE: Bars since entry
SHIELD: Current ATR-based stop distance
TRAIL: Current trailing stop price (if active)
DIR BIAS: Raw directional movement bias score
Input Parameters
Regime Arbiter:
Dispersion Epoch / Rank Horizon / Kinetic Threshold / Turbulence Threshold / Regime Gate Active
Directional Helix:
Lead Filament / Anchor Filament / Filament Type (EMA or SMA)
Pressure Reactor:
Ignition Cycle / Sustain Cycle / Flux Epoch / Flux Amplifier
Deviation Lattice:
Lattice Depth / Sigma Aperture / Lattice Extreme Exit toggle
Fortress Grid:
Grid Anchor / Grid Increment / Proximity Radius / Rail Interaction Exit toggle
Risk Architecture:
Shield Multiple (stop) / Objective Multiple (target) / Risk Epoch (ATR period) / Trailing Shield toggle / Trail Multiple
Volume Gate:
Require Volume Confirmation / Volume Gate Threshold
How to Use This Strategy
Start by setting realistic commission and slippage in the strategy Properties before evaluating any backtest results.
Adjust the Grid Increment in the Fortress Grid module to match your instrument (500-1000 for BTC, 50-100 for stocks, etc.).
Monitor the Convergence Score in the dashboard — it shows how close the market is to triggering an entry. STRONG readings (70%+) that haven't yet reached FULL LOCK often precede entries by a few bars.
The Regime Gate is the most impactful filter. Disabling it will produce more trades but in lower-quality market conditions. Keep it enabled unless you have a specific reason to trade ranging/volatile markets.
Experiment with the Shield and Objective multiples to find the risk-reward ratio that matches your trading style. Higher Objective multiples produce fewer but larger winners; lower multiples produce more frequent but smaller wins.
The Trailing Shield is most valuable in trending markets where moves extend beyond the initial target. In choppy markets, it may give back profits. Consider disabling it if the instrument tends to mean-revert quickly.
Limitations and Honest Assessment
Multi-module convergence produces fewer trades. On some instruments and timeframes, the strategy may go extended periods without a signal. This is by design — it prioritizes quality over quantity.
Backtest results are hypothetical and do not account for real-world execution challenges including partial fills, requotes, and market impact.
The strategy uses process_orders_on_close=true, which means orders execute at the close of the signal bar. In live trading, you would need to enter at the open of the next bar, which introduces slippage.
Past performance shown in backtests does not guarantee future results. Market conditions change, and strategies that worked historically may underperform in different regimes.
The default settings are not optimized for any specific instrument or timeframe. Users should test across multiple datasets and adjust parameters to their specific use case.
The Regime Arbiter and all other modules use lagging indicators. Entries will always occur after a trend has begun, not at the exact bottom or top.
No strategy works in all market conditions. CCE is designed for trending markets and will underperform during extended ranging or highly volatile periods.
Originality Statement
This strategy is original in its five-module convergence architecture. While individual components (ATR regime classification, MA crossovers, volume-weighted momentum, statistical bands, EMA-derived levels) are established concepts, CCE is justified because:
The five-module convergence scoring system requires alignment across fundamentally different analytical dimensions (volatility regime, trend, momentum, statistics, structure) before entering — a more rigorous entry filter than typical dual-confirmation systems.
The weighted convergence score provides a quantified readiness metric that communicates how close the market is to a valid entry, even when not all conditions are met.
Four distinct exit mechanisms (ATR stop/target, trailing shield, regime flip, lattice extreme, rail interaction) provide layered risk management that adapts to different exit scenarios.
The Regime Arbiter gate prevents trading during Turbulence and Equilibrium states, addressing the primary failure mode of trend-following strategies.
Edge-triggered entries with two-bar regime confirmation prevent re-entry on the same signal and eliminate single-bar flicker.
The comprehensive 13-row dashboard provides full transparency into every module's state, the convergence score, and the current risk parameters.
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. Backtest results are hypothetical, do not represent actual trading, and do not guarantee future performance. Past results in no way guarantee future results. Commission, slippage, and other real-world costs will reduce actual performance below what backtests show. Always use proper risk management, including position sizing appropriate for your account and risk tolerance. Never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategy

Indicator

Vortex Nexus Alpha [JOAT]Vortex Nexus Alpha Strategy
Introduction
The Vortex Nexus Alpha Strategy is an advanced open-source algorithmic trading system that combines multi-dimensional signal generation, adaptive regime detection, and institutional-grade risk management into a unified execution framework. This strategy represents a complete trading system built from the ground up using proprietary mathematical models, fractal analysis, momentum tracking, and market microstructure intelligence.
Unlike simple crossover strategies or single-indicator systems, Vortex Nexus Alpha synthesizes intelligence from five independent signal layers, each containing five distinct detection mechanisms, creating a 25-factor confluence scoring system that validates every trade entry. The strategy is designed for traders who understand that consistent profitability requires multi-dimensional analysis, adaptive positioning, and systematic risk management rather than relying on any single indicator or pattern.
Why This Strategy Exists
This strategy addresses the fundamental challenge of algorithmic trading: most systems over-optimize to historical data or rely on simplistic logic that fails in real market conditions. Vortex Nexus Alpha solves this through a knowledge-based architecture that doesn't depend on indicator mashups but instead builds intelligence from first principles:
Volatility Expansion Engine: Measures market volatility through ATR percentile ranking and adapts position sizing and stop distances dynamically
Price Efficiency Calculator: Quantifies how efficiently price moves using path length analysis, filtering choppy conditions
Chaos Measurement System: Identifies market regime (directional, equilibrium, chaotic) using logarithmic range analysis
Directional Conviction Tracker: Measures trend strength through ADX and directional movement indicators
Adaptive Ribbon System: Multi-layer EMA ribbon that expands/contracts based on volatility and provides dynamic support/resistance
Volume Pressure Analysis: Estimates buying/selling pressure through candle structure and wick analysis
Gauss Smoothing Engine: 4th-order Gaussian filter that eliminates noise while preserving genuine price movements
Fractal Efficiency Measurement: Logarithmic efficiency calculation that adapts Laguerre filtering for optimal lag reduction
Laguerre Momentum Transform: Adaptive momentum oscillator that responds faster during efficient moves
Temporal Flow Dynamics: Analyzes price flow direction, magnitude, and acceleration across multiple dimensions
Pivot Structure Analysis: Detects market structure breaks and shifts using swing high/low analysis
Order Block Detection: Identifies institutional positioning zones through volume-confirmed reversal patterns
Imbalance Zone Mapping: Marks price gaps and inefficiencies that often get filled
Each component contributes unique intelligence that validates or invalidates potential trade setups. The strategy requires minimum confluence scores before entering positions, ensuring that multiple independent systems agree on directional bias.
Core Strategy Architecture
1. Volatility Expansion Engine
The strategy begins with comprehensive volatility analysis:
volatility = ta.atr(volatilityPeriod)
volatilityPercent = (volatility / close) * 100
volatilityRank = ta.percentrank(volatilityPercent, 100)
Volatility percentile ranking provides context for current volatility relative to recent history. This measurement drives multiple strategy decisions:
- Position sizing: Higher volatility = smaller positions
- Stop distance: Higher volatility = wider stops
- Signal filtering: Extreme volatility (>80 percentile) triggers defensive mode
The strategy adapts to volatility rather than using fixed parameters, ensuring it remains relevant across different market regimes.
2. Price Efficiency and Chaos Measurement
The strategy calculates price efficiency to distinguish trending from ranging markets:
priceMovement = math.abs(close - close )
pathLength = math.sum(math.abs(close - close ), efficiencyPeriod)
efficiency = pathLength > 0 ? priceMovement / pathLength : 0
High efficiency (>0.6) indicates clean, directional movement suitable for trend-following. Low efficiency (<0.4) suggests choppy conditions where the strategy reduces activity or switches to mean-reversion logic.
Chaos level is measured using logarithmic range analysis:
rangeHigh = ta.highest(high, volatilityPeriod)
rangeLow = ta.lowest(low, volatilityPeriod)
atrSum = math.sum(ta.atr(1), volatilityPeriod)
chaosLevel = 100 * math.log10(atrSum / (rangeHigh - rangeLow)) / math.log10(volatilityPeriod)
High chaos (>60) triggers defensive positioning. Low chaos (<40) enables aggressive trend-following.
3. Directional Conviction System
The strategy implements complete ADX analysis with directional indicators:
= adx(14, 14)
ADX above 25 indicates emerging directional conviction. Above 40 indicates dominant conviction. The strategy uses conviction strength to:
- Filter entries: Minimum conviction threshold prevents trading in directionless markets
- Size positions: Higher conviction = larger positions (within risk limits)
- Set targets: Strong conviction enables wider profit targets
The difference between bullForce and bearForce determines directional bias and validates signal direction.
4. Adaptive Ribbon System
The strategy calculates 8 EMA layers with adaptive spacing:
stepSize = (slowPeriod - fastPeriod) / (ribbonLayers - 1)
ribbonLevel0 = ta.ema(close, fastPeriod)
ribbonLevel7 = ta.ema(close, slowPeriod)
Ribbon analysis provides:
- Trend direction: Fast > slow = bullish, fast < slow = bearish
- Trend strength: Wider ribbon = stronger trend
- Dynamic support/resistance: Ribbon layers act as price magnets
- Compression detection: Tight ribbon = energy buildup before breakout
The strategy only takes long trades when price is above the ribbon and short trades when below, ensuring alignment with trend structure.
5. Volume Pressure Analysis
The strategy estimates buying and selling pressure using candle structure:
buyPressure = close > open ? volume * ((close - open + upperWick * 0.5) / barSpan) :
close < open ? volume * ((upperWick + bodyMass * 0.3) / barSpan) : volume * 0.5
sellPressure = volume - buyPressure
pressureDelta = buyPressure - sellPressure
Pressure analysis validates signal direction:
- Long signals require positive pressure delta
- Short signals require negative pressure delta
- Extreme pressure (>70% of volume) suggests potential exhaustion
The strategy tracks cumulative pressure to identify accumulation and distribution phases.
6. Gauss Smoothing and Fractal Efficiency
The strategy applies 4th-order Gaussian filtering to eliminate noise:
gaussClose := math.pow(alpha, 4) * close +
4 * (1.0 - alpha) * nz(gaussClose ) -
6 * math.pow(1 - alpha, 2) * nz(gaussClose ) +
4 * math.pow(1 - alpha, 3) * nz(gaussClose ) -
math.pow(1 - alpha, 4) * nz(gaussClose )
Fractal efficiency is calculated using logarithmic path measurement:
fractalRatio = totalSpan > 0 ? math.log(rangeSum / totalSpan) / math.log(fractalSpan) : 0.0
fractalEfficiency = math.max(0, math.min(1, (fractalRatio + 1) / 2))
High fractal efficiency (>0.7) validates that momentum signals are backed by clean price action.
7. Laguerre Momentum Transform
The strategy uses adaptive Laguerre filtering for momentum measurement:
gamma = 0.7 * (1 - fractalEfficiency) + 0.1 * fractalEfficiency
L0 := (1 - gamma) * gaussClose + gamma * nz(L0 )
L1 := -gamma * L0 + nz(L0 ) + gamma * nz(L1 )
L2 := -gamma * L1 + nz(L1 ) + gamma * nz(L2 )
L3 := -gamma * L2 + nz(L2 ) + gamma * nz(L3 )
cu = (L0 > L1 ? L0 - L1 : 0) + (L1 > L2 ? L1 - L2 : 0) + (L2 > L3 ? L2 - L3 : 0)
cd = (L0 < L1 ? L1 - L0 : 0) + (L1 < L2 ? L2 - L1 : 0) + (L2 < L3 ? L3 - L2 : 0)
laguerreValue = cu + cd != 0 ? 100 * (cu / (cu + cd)) : 50
fractalMomentum = (laguerreValue - 50) * (1 + fractalEfficiency)
The adaptive gamma adjustment reduces lag during efficient moves and adds smoothing during choppy conditions. Fractal momentum above 20 validates bullish signals, below -20 validates bearish signals.
8. Temporal Flow Dynamics
The strategy analyzes price flow across multiple dimensions:
priceFlow = ta.ema(close, flowPeriod) - ta.ema(close, flowPeriod * 2)
flowDir = priceFlow > 0 ? 1 : -1
flowMagnitude = math.abs(priceFlow) / volatility
flowAccel = ta.change(priceFlow, 3)
Flow analysis provides:
- Flow direction: Confirms trend direction
- Flow magnitude: Measures flow strength relative to volatility
- Flow acceleration: Identifies momentum shifts
The strategy requires flow alignment with signal direction for entry validation.
9. Market Structure Analysis
The strategy tracks pivot highs and lows to identify structure breaks:
pivotTop = ta.pivothigh(high, pivotSpan, pivotSpan)
pivotBottom = ta.pivotlow(low, pivotSpan, pivotSpan)
Structure breaks occur when:
- Bullish: Price breaks above previous pivot high
- Bearish: Price breaks below previous pivot low
Structure shifts (change of character) occur when:
- Bullish: Downtrend breaks above previous pivot high
- Bearish: Uptrend breaks below previous pivot low
The strategy gives bonus confluence points to signals that align with structure breaks or shifts.
10. Order Block and Imbalance Detection
The strategy identifies institutional positioning zones:
orderBlockBull = close < open and close > open and volume > avgVol * 1.2
orderBlockBear = close > open and close < open and volume > avgVol * 1.2
gapUp = low > high and (low - high ) > volatility * 0.3
gapDown = high < low and (low - high) > volatility * 0.3
Order blocks mark zones where institutions placed large orders. The strategy uses these as:
- Entry zones: Look for entries near order blocks in trend direction
- Stop placement: Place stops beyond order blocks for protection
- Target zones: Opposite-direction order blocks become profit targets
Imbalance zones (gaps) often get filled, providing mean-reversion opportunities.
Multi-Dimensional Signal Generation
The strategy generates signals through five independent layers, each containing five detection mechanisms:
Layer 1: Rapid Scalp Signals (5 mechanisms)
- Laguerre oversold + flow bullish + price above fast ribbon
- Pressure index positive + flow reversal bullish
- Momentum bullish + volume surge + price above mid ribbon
- Strong bullish candle + ribbon bullish + pressure positive
- Fractal momentum positive + flow acceleration positive + ribbon aligned
Layer 2: Swing Position Signals (5 mechanisms)
- Ribbon bullish + price above slow ribbon + bullish regime
- Structure break bullish + momentum bullish
- Order block bullish + flow bullish + conviction strong
- Gap up + pressure extreme + ribbon aligned
- Range breakout up + cumulative pressure positive + flow strong
Layer 3: Momentum Continuation (5 mechanisms)
- Fractal momentum extreme + ribbon bullish + conviction strong
- Laguerre oversold + flow bullish + volume surge
- Momentum extreme + fractal momentum positive + ribbon expanding
- Extreme buy pressure + flow acceleration positive + bullish regime
- Bull force > bear force + conviction strong + ribbon aligned
Layer 4: Structure Confirmation (5 mechanisms)
- Structure shift bullish + volume surge
- Order block bullish + price above last pivot low + momentum bullish
- Gap up + flow bullish + ribbon bullish
- Structure break bullish + pressure extreme positive
- Volume absorption + pressure positive + price above mid ribbon
Layer 5: Confluence Boosters (5 mechanisms)
- Ribbon tight + ribbon expanding + ribbon bullish + volume surge
- Net flow positive + temporal force positive + bullish regime
- Fractal efficiency high + Laguerre oversold + flow magnitude strong
- Strong bullish candle + price above previous high + volume extreme
- Velocity positive + flow bullish + ribbon power strong
Each layer contributes 0 or 1 to the bull strength score. The strategy requires minimum confluence (default 2) before entering long positions. This multi-layer approach ensures that signals are validated across multiple independent dimensions.
Risk Management System
The strategy implements institutional-grade risk management:
Position Sizing:
- Risk percentage per trade (default 1% of equity)
- Dynamic adjustment based on volatility percentile
- Reduced sizing during high chaos or low efficiency
Stop Loss Placement:
stopLoss = close - (volatility * slMultiplier)
- ATR-based stops that adapt to current volatility
- Multiplier (default 1.5) provides breathing room
- Stops placed beyond order blocks when possible
Take Profit Targets:
takeProfit = close + (volatility * slMultiplier * tpMultiplier)
- Risk-reward ratio (default 2.5:1)
- Adjusted based on conviction strength
- Wider targets during strong conviction, tighter during weak
Trailing Stop System:
trailStop = close - (volatility * trailOffset)
- Optional trailing stop (default enabled)
- Offset (default 1.2x ATR) balances protection and breathing room
- Activates after position moves into profit
Visual Elements
Adaptive Ribbon: Multi-layer EMA ribbon with gradient coloring showing trend direction and strength
Entry Signals: Triangle shapes sized by signal strength (large for 5+ confluence, small for 2-3 confluence)
Structure Markers: Lines and labels marking structure breaks, shifts, and order blocks
Imbalance Boxes: Boxes marking price gaps and inefficiency zones
Regime Background: Subtle background coloring showing current market regime
Flow Background: Additional background layer showing flow direction
Comprehensive Dashboard: 18-row intelligence panel showing position status, signal strength, regime, ribbon state, pressure, momentum, structure, flow, conviction, Laguerre, volume, volatility, trade statistics, and win rate
The dashboard provides complete strategy intelligence with real-time metrics and performance tracking.
Strategy Parameters
Core Settings:
Ultra-Aggressive Mode: Maximum trade frequency (default enabled)
Min Signal Strength: Minimum confluence required (1-6, default 2)
Risk %: Risk per trade as percentage of equity (0.5-5.0%, default 1.0%)
TP Multiplier: Take profit as multiple of stop distance (1.0-10.0, default 2.5)
SL Multiplier: Stop loss as multiple of ATR (0.5-5.0, default 1.5)
Trailing Stop: Enable/disable trailing stop (default enabled)
Trail Offset: Trailing stop distance as multiple of ATR (0.5-3.0, default 1.2)
Advanced Parameters:
Volatility Period: ATR calculation length (5-50, default 14)
Efficiency Period: Price efficiency calculation period (5-100, default 20)
Flow Period: Temporal flow analysis period (10-50, default 20)
Ribbon Layers: Number of EMA layers (3-15, default 8)
Fast Period: Fastest EMA period (2-20, default 5)
Slow Period: Slowest EMA period (10-100, default 34)
Visualization:
Dashboard: Toggle metrics panel (default enabled)
Entry Signals: Toggle signal shapes (default enabled)
Regime Zones: Toggle background coloring (default enabled)
Adaptive Ribbon: Toggle ribbon display (default enabled)
How to Use This Strategy
Step 1: Configure Risk Parameters
Set risk percentage appropriate for your account size. 1% is conservative, 2% is moderate, 3%+ is aggressive. Never risk more than you can afford to lose on any single trade.
Step 2: Select Minimum Signal Strength
Default 2 provides balanced trade frequency and quality. Increase to 3-4 for higher quality but fewer trades. Decrease to 1 only in ultra-aggressive mode on highly liquid instruments.
Step 3: Adjust Risk-Reward Ratio
Default 2.5:1 provides good balance. Increase to 3-5:1 for swing trading. Decrease to 1.5-2:1 for scalping. Higher ratios require higher win rates to be profitable.
Step 4: Enable/Disable Trailing Stops
Trailing stops protect profits but can exit prematurely. Enable for trend-following, disable for mean-reversion. Adjust trail offset based on instrument volatility.
Step 5: Monitor Dashboard Metrics
Watch "POSITION" status, "BULL STR" and "BEAR STR" scores, "REGIME" classification, and "WIN RATE" percentage. These provide real-time strategy health assessment.
Step 6: Backtest Thoroughly
Test on at least 100 trades across different market conditions. Verify that win rate, profit factor, and drawdown meet your requirements. Adjust parameters if needed.
Step 7: Forward Test on Demo
Run strategy on demo account for at least 1 month before live trading. Verify that live performance matches backtest expectations. Monitor slippage and execution quality.
Step 8: Start Small on Live
Begin with minimum position sizes on live account. Gradually increase as confidence builds. Never risk more than 1-2% of account on any single trade initially.
Best Practices
Use on liquid instruments with tight spreads and reliable execution
Backtest with realistic commission (0.1%) and slippage (2 ticks minimum)
Test across multiple market conditions (trending, ranging, volatile, calm)
Verify minimum 100 trades in backtest for statistical significance
Monitor win rate - should be 45-60% for 2.5:1 risk-reward ratio
Check profit factor - should be >1.5 for robust strategy
Analyze maximum drawdown - should be <20% of account
Review trade distribution - avoid over-concentration in specific periods
Monitor signal strength distribution - most trades should be 3+ confluence
Check regime alignment - strategy should perform in directional regimes
Verify that losses are controlled - no single loss should exceed 2% of account
Ensure adequate trade frequency - at least 2-3 trades per week on daily timeframe
Combine with manual oversight - review signals before execution in early stages
Use appropriate timeframe - 15m-1H for day trading, 4H-1D for swing trading
Avoid trading during major news events unless specifically tested for that
Keep detailed trade journal to identify patterns in wins and losses
Strategy Limitations
Algorithmic strategies cannot predict black swan events or unprecedented market conditions
Backtested performance does not guarantee future results
Slippage and commission in live trading may differ from backtest assumptions
The strategy requires sufficient volatility - may underperform in extremely low volatility
Signal generation depends on multiple calculations - computational lag possible on slow systems
The strategy works best on trending instruments - may struggle in perpetual ranges
Confluence scoring requires all components to be relevant - some may be less meaningful on certain instruments
The strategy cannot account for fundamental catalysts or news events
Trailing stops can exit prematurely during volatile but ultimately profitable moves
The strategy requires adequate liquidity for execution at desired prices
Parameter optimization can lead to overfitting - use walk-forward analysis
The strategy shows what signals exist, not why - market context still matters
Technical Implementation
Built with Pine Script v6 using:
Complete volatility expansion engine with ATR percentile ranking
Price efficiency calculator using path length analysis
Chaos measurement using logarithmic range calculations
Full ADX implementation with directional indicators
8-layer adaptive EMA ribbon with volatility-based spacing
Volume pressure estimation using candle structure analysis
4th-order Gaussian filter for noise elimination
Fractal efficiency measurement using logarithmic path complexity
Adaptive Laguerre transform with 4 cascading filter levels
Temporal flow analysis with direction, magnitude, and acceleration
Pivot-based market structure tracking
Order block and imbalance zone detection
25-factor confluence scoring system across 5 signal layers
Dynamic position sizing based on volatility and regime
ATR-based stop loss and take profit calculations
Optional trailing stop system with volatility adjustment
Comprehensive dashboard with 18 metrics and performance tracking
Alert system for all entry and exit signals
The code is fully open-source with extensive comments explaining each component and signal generation logic.
Originality Statement
This strategy is original and represents a complete trading system built from proprietary knowledge rather than indicator mashups. The strategy is justified because:
It synthesizes 13 independent analytical systems into a unified execution framework
The 25-factor confluence scoring across 5 signal layers provides multi-dimensional validation
Each component is built from first principles using mathematical models and market microstructure concepts
The adaptive nature of the system (volatility, efficiency, regime) ensures relevance across market conditions
Risk management is integrated at the core rather than added as an afterthought
The strategy doesn't rely on any single indicator or pattern - it builds intelligence from multiple independent sources
Fractal efficiency and Laguerre adaptation provide unique momentum measurement not found in standard systems
Temporal flow analysis adds a dimension of price dynamics beyond simple trend following
Market structure tracking provides context that pure indicator-based systems lack
The comprehensive dashboard provides complete strategy intelligence and performance tracking
The system is designed for real trading with realistic risk management, not just backtest optimization
Each component contributes unique intelligence: volatility drives adaptation, efficiency filters conditions, chaos identifies regimes, conviction measures strength, ribbon provides structure, pressure shows order flow, Gauss filtering eliminates noise, fractal efficiency validates momentum, Laguerre provides adaptive momentum, flow tracks dynamics, structure provides context, order blocks mark zones, and confluence validates signals. The strategy's value lies in combining these complementary perspectives into a cohesive, adaptive trading system with institutional-grade 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.
Algorithmic trading strategies are tools for systematic execution, not guarantees of profit. Backtested performance does not guarantee future results. Past strategy performance does not predict future performance. Market conditions change, and strategies that worked historically may not work in the future.
The signals generated are mathematical calculations based on current market data, not predictions of future price movement. High confluence scores, regime alignment, and structure breaks do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
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 tool. Thoroughly backtest and forward test any strategy before live trading.
-Made with passion by officialjackofalltrades Strategy

Strategy

Automate on Hyperliquid - Strategy Webhook Template [HYPR-run]DESCRIPTION
You define the entry signal. The system manages everything after the fill. This is a production-grade trade system for automating strategies on Hyperliquid using PulseWire webhooks. Five-level priority chain trade system. Four ATR trailing architectures including volume-weighted ATR with Efficiency Ratio scaling and ratchet floor. Smart stops that exit when a trade is invalidated. Pyramid scaling into winners and a redundant failsafe stop.
Three signal systems are included ready to backtest and deploy (EMA crossover, Turtle breakout, SFP - Swing Failure Pattern) that you can toggle on/off independently; replace or extend them with your own logic in three places: the input toggle, the signal condition, and the priority chain entry call. There are clear landmarks in the code to make it as straightforward as possible.
This strategy is built for you to hit the ground running backtesting or automating with a systematic framework to execute around your entry logic or the example signals provided. All signals fire on confirmed bar closes only. Entries, exits, pyramids, and stops are evaluated at close, not during the bar, so intrabar wick spikes do not trigger the system. This is by design. No lookahead bias: all highest/lowest references use prior-bar offsets, LinReg is calculated with offset=1, and no security() calls are used. The script does not repaint or compound returns.
WHAT THE STRATEGY SYSTEMIZES
1. Five-Level Priority Action Chain
Entries fire first. Pyramids fire second and block exits on the same bar. Trailing exits ride winners. Smart stops catch failing trades early. Failsafe stop is the absolute floor. The if/else order is intentional and prevents conflicts so that every action occurs only when it should.
2. Four ATR Trailing Stop Modes
Select from a dropdown. All use separate long/short look backs and multipliers because drops are faster than rallies; the defaults reflect this asymmetry.
• A3.1: LinReg + plain ATR, no ratchet. Baseline for comparison.
• A4.0 (default): LinReg + volume-weighted ATR + Efficiency Ratio + ratchet. VWATR discounts low-volume bars. ER tightens in chop (0.8x), widens in trend (1.2x). Ratchet means the stop only moves in your favor.
• A4.1: Chandelier + VWATR + ratchet + first-bar multiplier for tighter initial protection.
• A4.2: LinReg + VWATR, no ratchet or ER. Stop moves freely with projection.
***The multipliers determine how much room the stop gives price before triggering. They have the greatest influence on overall system performance and must be tuned to the asset and timeframe being traded. Default values are a starting point, not final settings.
• L Multi: 4.0 (long stop distance). Wider because uptrends are slower and require more room.
• S Multi: 2.0 (short stop distance). Tighter because drops are faster and corrections are sharper.
• Long LB: 14 bars. ATR lookback for long stops.
• Short LB: 26 bars. ATR lookback for short stops; longer lookback smooths volatile short-side moves.
• LinReg LB: 10 bars. LinReg projection window (A3.1, A4.0, A4.2).
• First Bar Mult: 1.5x (A4.1 only). Tighter stop on the entry bar; expands to standard multiplier after.
3. Smart Stops
Two trigger paths, both requiring open P&L below threshold (default -3.5%): (1) price crosses under the trailing stop while losing, or (2) price breaks the entry bar’s structure while losing. Either path exits the trade before the failsafe would trigger. The P&L condition on both paths prevents exits on noise when the trade is still within normal range.
4. Pyramid Entries
Scales into winning trades on 5-bar extremes. Requires full bar confirmation and must be within 13 bars of the initial entry.
5. Basic Entry Quality Filters
Applied automatically to every entry:
• Wick nullification: bars with wicks > 38.2% of range block entries in that direction
• SFP nullification: active reversal patterns block opposing entries
• Full bar filter: candle body must be >= 66.6% of total range
• Bar confirmation: entries only fire on confirmed bars
THREE SIGNALS INCLUDED (replace or extend)
• XO/XU: EMA crossover with four configurable pairs (5/13, 9/26, 12/25, 26/128). Requires price above swing high (longs) or below swing low (shorts) plus volume spike (Dropdown Selection).
• Turtle: 13/26 bar breakout with Lost Trade System logic. First breakout after an opposing signal gets priority.
• SFP: Swing Failure Pattern. Longs fire on either 5/5 with full-body confirmation or 5/2 with bullish candle confirmation and strong volume spike (1.618x average). Shorts fire on 5/5 with full-body or 13/3 with bearish candle confirmation. Dual-path per direction allows the signal to catch both high-conviction structure failures and high-volume reversals. The function accepts any left/right look back combination, making it straightforward to adapt. (#/# refers to pivot look back left and right)
Each has its own toggle. Enable one, combine them, or swap in your own signals.
WEBHOOK AUTOMATION
Every fill event fires through PulseWire’s built-in webhook system when enabled: entries, exits, pyramids, smart stops, and failsafe closes. To execute those webhooks on Hyperliquid, an intermediary service (execution layer) that accepts PulseWire webhooks and routes orders to Hyperliquid's API is required.
Setup:
1. Create an alert on this strategy
2. Set trigger to "Order fills only"
3. Check Webhook URL, paste your endpoint
4. Message box: {"ticker":"{{ticker}}","position":"{{strategy.market_position}}"}
5. Set expiration to Open-ended
The snippet will most likely require customization depending on your execution layer. The {{ticker}} and {{strategy.market_position}} fields are PulseWire placeholders that auto-populate when a strategy signal fires.
We recommend referencing PulseWire’s Strategy Alerts documentation to fully understand placeholder use and function when setting up your snippet for your execution layer: www.pulsewire.com
BUILDING WITH YOUR OWN SIGNALS
The most straightforward path is adding your own entry logic. The ATR module, smart stops, and pyramids can also be edited to preferred logic while still leveraging the systemized structure for clean execution when automating on an exchange.
Option 1: Replace an existing signal. Find its section under the SIGNALS header (look for "EXAMPLE 1", "EXAMPLE 2", or "EXAMPLE 3"). Delete the example code and write your condition in its place. Find the matching entry in the STRATEGY CALLS priority chain and swap the condition variable. The toggle still works; rename its label in the input line. Everything downstream works automatically.
Option 2: Add a new signal. Three places to touch:
1. Copy a strategy toggle line from the STRATEGIES input group, change the variable name and label
2. Add your signal logic in the SIGNALS section as a boolean
3. Add an else-if block in the STRATEGY CALLS priority chain using your toggle as the gate
Two test switches (Tsw1, Tsw2) are reserved in Settings for custom signals.
READING THE CHART
Candles are colored by direction: black bodies up, gray bodies down (Quant Filter toggle).
The trailing stop draws as a colored line following your position: green below price when long, red/orange above price when short. A gradient fill shades the zone between price and the stop; it intensifies as price approaches the exit level.
Green dots on the long stop line and red dots on the short stop line are ratchet markers (A4.0 and A4.1 only). Each dot means the stop locked in a new level and will not pull back.
Entry labels appear at each fill: "xoL" (EMA long), "xuS" (EMA short), "tL" (Turtle long), "tS" (Turtle short), "sfpL"/"sfpS" (SFP entries), "pyrL"/"pyrS" (pyramid adds). Exit labels: "Cl"/"Cs" (trailing close long/short), "smrtstp" (smart stop), "fstp" (failsafe).
SFP candle wicks are color-coded by lookback: 5/5 bull wick = bright green, 5/2 bull wick = dark green, 5/5 bear wick = bright red, 13/3 bear wick = dark red. The shade tells you which configuration triggered — brighter means the more common 5/5 detection, darker means the secondary lookback fired.
Horizontal lines extending from entry price are the Late Entry Window: white solid line is entry price, green dashed line is entry + ATR window, red dashed line is entry - ATR window. Visual reference only; does not affect trade logic. Useful when away from the screen to quickly see if a missed entry is still within a safe ATR range.
Market structure labels (HH, LH, HL, LL) appear at swing pivots when the Structure toggle is enabled.
RISK MATH
Order size is fixed at $5,000 (50% of starting capital). That means it's always a flat $5k order, no compounding. With the failsafe at -5.25%, maximum loss per trade is $262.50, or 2.625% of the $10,000 starting balance.
*Because order size is fixed in dollars while equity grows, risk as a percentage of equity decreases over time: 2.625% at start, 2.1% at $12,500, 1.75% at $15,000. The smart stop triggers before the failsafe in most cases, reducing average realized loss further.
STRATEGY PROPERTIES (What's used in the chart published here)
Strategies (all off by default - toggle on to activate):
• XO/XU: on
• Turtle: on
• SFP: on
Settings:
• Mode: Historical (switch to Bot Mode for live automation - limits calculation depth for speed)
• EMA Pair: 9/26
Risk Management:
• Smart Stop: on | -3.5%
• Failsafe Stop: on | -5.25%
• Mech TP/Cls: on
ATR Trailing Exits:
• Mode: A4.0
• L Multi: 4.0 | S Multi: 2.0
• Lng LB: 14 | Shrt LB: 26
• LinReg: 10 | First Bar: 1.5 (A4.1 only)
Backtest Properties:
• Initial capital: $10,000
• Commission: 0.05%
• Slippage: 2 ticks
• Order size: $5,000 (cash, fixed)
• Fill limit assumption: 5 ticks
• Max risk per trade: $262.50 (2.625% of starting equity)
CREDITS
ATR: J. Welles Wilder (1978).
Efficiency Ratio: Perry Kaufman.
Turtle breakout concept: Richard Donchian. Strategy

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

Singularity Convergence Protocol [JOAT]Singularity Convergence Protocol
Introduction
The Singularity Convergence Protocol is an advanced open-source multi-system confluence strategy that combines eight distinct analytical methodologies into a unified trading system. This strategy integrates momentum analysis, Smart Money Concepts, velocity waves, liquidity tracking, trend detection, divergence analysis, volatility measurement, and institutional flow into a comprehensive decision-making engine that generates high-probability trading signals through systematic confluence scoring.
Unlike single-indicator strategies, the Singularity Convergence Protocol provides institutional-grade signal generation through multi-dimensional analysis, weighted confluence scoring, and adaptive risk management. The strategy is designed for traders who understand that the highest probability setups occur when multiple independent analytical systems align simultaneously, creating a "singularity" of confluence.
Why This Strategy Exists
This strategy addresses the critical challenge of signal reliability in algorithmic trading. By requiring confluence across multiple independent systems, it dramatically reduces false signals while identifying the highest probability setups. The strategy reveals:
System 1 - Momentum Analysis: Quantum Flux Oscillator methodology combining VFI, Laguerre RSI, Fisher Transform, TSI, MFI, OBV, and A/D
System 2 - Structure Detection: Smart Money Concepts including Order Blocks, Fair Value Gaps, Liquidity Levels, and Market Structure
System 3 - Velocity Waves: Multi-layer momentum spectrum with five EMA layers and ALMA enhancement
System 4 - Liquidity Tracking: Pivot-based liquidity detection with sweep confirmation
System 5 - Trend Analysis: Hull MA, SuperTrend, ADX, and moving average alignment
System 6 - Divergence Detection: Multi-oscillator divergence with RSI, MACD, TSI, and Stochastic
System 7 - Volatility Analysis: ATR, Bollinger Bands, Keltner Channels, Historical Volatility, and Squeeze detection
System 8 - Institutional Flow: CMF, MFI, OBV, VWAP, and A/D Line integration
Core Strategy Logic
1. Eight Independent Analytical Systems
Each system operates independently and generates binary signals (bullish/bearish):
Momentum System:
Calculates composite momentum from seven components
Generates bullish signal when momentum > 0 and rising
Generates bearish signal when momentum < 0 and falling
Score: +1 for bullish, -1 for bearish, 0 for neutral
Structure System:
Detects order blocks, FVGs, and market structure
Bullish when OB/FVG active + bullish structure + discount zone
Bearish when OB/FVG active + bearish structure + premium zone
Score: +1 for bullish, -1 for bearish, 0 for neutral
Velocity Wave System:
Analyzes five momentum layers with ALMA enhancement
Bullish when Basis 1 > Basis 2 and rising with spread > 5
Bearish when Basis 1 < Basis 2 and falling with spread < -5
Score: +1 for bullish, -1 for bearish, 0 for neutral
Liquidity System:
Tracks liquidity sweeps with volume confirmation
Bullish when SSL swept with volume surge
Bearish when BSL swept with volume surge
Score: +1 for bullish, -1 for bearish, 0 for neutral
Trend System:
Combines Hull MA, SuperTrend, ADX, and MA alignment
Bullish when Hull rising + SuperTrend bullish + ADX > 20 + MA alignment
Bearish when Hull falling + SuperTrend bearish + ADX > 20 + MA alignment
Score: +1 for bullish, -1 for bearish, 0 for neutral
Divergence System:
Detects divergences across RSI, MACD, TSI, and Stochastic
Bullish when regular bullish divergence with 2+ oscillator confluence
Bearish when regular bearish divergence with 2+ oscillator confluence
Score: +1 for bullish, -1 for bearish, 0 for neutral
Volatility System:
Measures volatility through ATR, BB Width, KC, HV, and Squeeze
Bullish when squeeze breakout upward with low volatility index
Bearish when squeeze breakout downward with low volatility index
Score: +1 for bullish, -1 for bearish, 0 for neutral
Institutional Flow System:
Tracks institutional positioning through CMF, MFI, OBV, VWAP, A/D
Bullish when flow index > 10 with CMF > 0 and MFI > 50
Bearish when flow index < -10 with CMF < 0 and MFI < 50
Score: +1 for bullish, -1 for bearish, 0 for neutral
2. Confluence Scoring System
The strategy employs two scoring methods:
Binary Signal Count:
Counts how many systems generate bullish signals (0-8)
Counts how many systems generate bearish signals (0-8)
Minimum signals required (default: 2) filters weak setups
Weighted Confluence Score:
Sums all system scores (range: -8 to +8)
Adds bonus points for extreme conditions:
- Extreme momentum regimes (+1)
- All velocity layers aligned (+1)
- 4/4 divergence confluence (+1)
- Volume surge with strong flow (+1)
Total score can exceed ±8 with bonuses
3. Entry Conditions
Two entry modes are available:
Standard Mode (Binary Count):
Long Entry: Bullish signals >= minimum AND bullish signals > bearish signals
Short Entry: Bearish signals >= minimum AND bearish signals > bullish signals
Simple and straightforward
Confluence Mode (Weighted Score):
Long Entry: Total bullish score >= minimum AND bullish score > bearish score
Short Entry: Total bearish score >= minimum AND bearish score > bullish score
Accounts for bonus conditions and extreme setups
4. Risk Management System
The strategy includes comprehensive risk management:
Position Sizing:
Risk per trade: Percentage of equity (default: 2%)
Position size calculated based on stop distance and risk percentage
Prevents over-leveraging on any single trade
Stop Loss Placement:
ATR-based stops: Stop distance = ATR × multiplier (default: 2.0)
Long stops: Entry price - (ATR × multiplier)
Short stops: Entry price + (ATR × multiplier)
Adapts to current volatility
Take Profit Targets:
Risk:Reward ratio (default: 2.0)
Target distance = Stop distance × R:R ratio
Long targets: Entry price + (Stop distance × R:R)
Short targets: Entry price - (Stop distance × R:R)
Trailing Stops:
Optional trailing stop (default: enabled)
Trail distance = ATR × trailing multiplier (default: 3.0)
Locks in profits as trade moves favorably
Adjusts to volatility changes
5. Visual Features
The strategy includes comprehensive visual elements:
Hull Moving Average: Primary trend line with dynamic coloring
SuperTrend Bands: Dynamic support/resistance levels
EMA Matrix: Three EMAs showing trend alignment
Order Block Boxes: Bullish and bearish OB zones
Fair Value Gap Boxes: FVG zones with dashed borders
Liquidity Lines: BSL and SSL levels with sweep tracking
Equilibrium Line: Premium/discount zone reference
Background Coloring: Regime indication (extreme bull/bear, squeeze, entry signals)
Information Dashboard: Real-time display of all metrics and scores
Dashboard Metrics
The comprehensive dashboard displays:
Bull/Bear Scores: Total confluence scores with signal counts
Volatility Index: Current volatility level and regime
Spread: Velocity wave spread indicating momentum strength
Flow Index: Institutional positioning measurement
Price Zone: Premium/discount position with percentage
Win Rate: Strategy performance with trade count
Position: Current position status (Long/Short/Flat)
Signal: Current signal status with confluence indication
Strategy Settings and Defaults
Backtest Configuration:
Initial Capital: $100,000
Position Size: 100% of equity (adjusted by risk management)
Commission: 0.1% per trade
Slippage: 2 ticks
Pyramiding: Disabled (one position at a time)
Risk Management Defaults:
Risk Per Trade: 2.0% of equity
Stop Loss: 2.0 × ATR
Take Profit: 2.0 × Risk (2:1 R:R)
Trailing Stop: Enabled, 3.0 × ATR
Strategy Defaults:
Minimum Signals: 2 (requires at least 2 systems to agree)
Use Confluence Scoring: Enabled (uses weighted scores)
Show Visual Features: Enabled (displays all chart elements)
How to Use This Strategy
Step 1: Configure Risk Parameters
Set risk per trade, stop loss ATR multiplier, and take profit R:R ratio based on your risk tolerance.
Step 2: Choose Entry Mode
Select standard mode (binary count) for simplicity or confluence mode (weighted scores) for advanced filtering.
Step 3: Set Minimum Signals
Higher minimum (3-4) = fewer but higher quality trades. Lower minimum (2) = more trades but lower quality.
Step 4: Enable Trailing Stops
Trailing stops lock in profits on winning trades. Adjust trailing ATR multiplier based on market volatility.
Step 5: Monitor Dashboard
Watch bull/bear scores in real-time. Scores >= 4 indicate strong confluence. Scores >= 6 indicate exceptional setups.
Step 6: Review Visual Confluence
Check that multiple visual elements align: trend, structure, liquidity, and flow should all confirm signal direction.
Step 7: Backtest Thoroughly
Test on multiple instruments and timeframes. Adjust parameters based on results. Aim for 100+ trades for statistical significance.
Best Practices
Use on liquid instruments (major forex, large-cap stocks, major crypto)
Test on multiple timeframes - higher timeframes generally more reliable
Increase minimum signals in choppy markets, decrease in trending markets
Monitor win rate - aim for 40%+ with 2:1 R:R for profitability
Adjust stop loss ATR multiplier based on instrument volatility
Use confluence mode for highest quality signals
Review dashboard before entering - ensure multiple systems align
Combine with higher timeframe analysis for additional confirmation
Be patient - wait for high confluence scores (4+) for best results
Respect the risk management - never override stop losses
Strategy Limitations
Requires sufficient historical data for all eight systems
May generate fewer signals than single-indicator strategies
Performance varies by instrument and timeframe
Backtesting results do not guarantee future performance
Slippage and commission can significantly impact results
Extreme market conditions may cause all systems to fail simultaneously
Requires regular monitoring and parameter adjustment
Not suitable for very low timeframes (< 5 minutes) due to noise
Input Parameters
Risk Management:
Risk Per Trade %: Percentage of equity to risk (default: 2.0%)
Stop Loss (ATR): ATR multiplier for stops (default: 2.0)
Take Profit (R:R): Risk:reward ratio (default: 2.0)
Use Trailing Stop: Enable trailing stops (default: enabled)
Trailing ATR: ATR multiplier for trailing (default: 3.0)
Strategy Settings:
Minimum Signals: Required system agreements (default: 2)
Use Confluence Scoring: Enable weighted scoring (default: enabled)
Show Visual Features: Display chart elements (default: enabled)
Originality Statement
This strategy is original in its comprehensive multi-system approach. While individual analytical methodologies are established concepts, this strategy is justified because:
It integrates eight distinct analytical systems into a unified decision-making engine
The confluence scoring system measures agreement across independent methodologies
Bonus scoring for extreme conditions identifies exceptional setups
Comprehensive risk management adapts to volatility and account size
Visual integration allows traders to verify confluence across multiple dimensions
The dashboard provides real-time transparency into all system states
Systematic approach removes emotional decision-making from trading
Strategy Performance Notes
When publishing this strategy, ensure you:
Use realistic account size (default: $100,000)
Include realistic commission (0.1%) and slippage (2 ticks)
Generate 100+ trades for statistical significance
Document all default settings in description
Explain risk management parameters clearly
Show results on multiple instruments/timeframes
Discuss limitations and market conditions where strategy works best
Never make unrealistic claims about future performance
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. Backtesting results are hypothetical and do not represent actual trading. Actual results may differ significantly from backtested results due to slippage, commission, market conditions, and execution differences.
The strategy combines multiple analytical systems, but no combination of indicators can predict future price movement with certainty. Market conditions change, and strategies that worked historically may not work in the future. Users must conduct their own analysis and risk assessment before using this strategy.
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 tool.
-Made with passion by officialjackofalltrades Strategy

AG Pro OBV Pressure Divergence [AGPro Series]AG Pro OBV Pressure Divergence
Overview
AG Pro OBV Pressure Divergence is a context-aware divergence quality map built around the relationship between price structure and On-Balance Volume pressure.
The script is designed to identify bullish and bearish divergence events, then rank those events by participation quality, structural context, and follow-through behavior. Instead of treating every divergence as equally important, it separates weaker pressure disagreements from more meaningful setups and organizes them into a cleaner decision framework.
This is not a generic divergence marker that prints every local mismatch between price and an underlying series. Its purpose is to classify divergence events through a layered process that includes pivot structure, price displacement, OBV behavior, trend context, confirmation timing, and visual emphasis.
The result is a tool that can be used to study when price and participation begin to disagree, while still preserving a practical chart view that remains readable during live market conditions.
What this script does
- Detects bullish divergence when price forms a lower low while OBV forms a higher low
- Detects bearish divergence when price forms a higher high while OBV forms a lower high
- Filters divergence candidates using pivot separation and ATR-based price swing requirements
- Scores events by quality instead of treating all signals the same
- Highlights the strongest events with more prominent chart objects
- Tracks confirmation and invalidation behavior after the initial event
- Displays a compact summary panel for state, pressure, context, and freshness
Unique Edge
Many divergence tools stop at basic detection. They show a disagreement between price and an oscillator or cumulative volume series and leave the rest to the user.
This script takes a different approach.
Its goal is not to maximize the number of divergence labels on the chart. Its goal is to classify divergence quality.
That difference matters. A simple divergence can appear in noisy conditions, in weak structural locations, or without any meaningful follow-through. In those cases, the event may still be technically valid, but not equally useful from an analytical point of view.
AG Pro OBV Pressure Divergence attempts to address that by combining several layers:
1. Structural divergence detection
2. ATR-normalized price displacement filtering
3. OBV pressure comparison between pivots
4. Local trend context using fast and slow EMA structure
5. Setup monitoring through confirmation and invalidation logic
6. Visual hierarchy that distinguishes lower-quality from higher-quality events
Because of this design, the script is better understood as a divergence classification framework rather than a simple divergence marker.
It is also distinct from breakout, reclaim, or trend continuation tools. It does not evaluate break-retest mechanics, VWAP reclaim logic, or general trend strength as its primary objective. Its focus is the quality of price-versus-participation disagreement.
Methodology
The script begins by identifying swing pivots through a configurable pivot length. These pivots form the structural anchor points used to compare price and OBV behavior.
For bullish divergence:
- price must form a lower low
- OBV must form a higher low
For bearish divergence:
- price must form a higher high
- OBV must form a lower high
After a raw divergence is found, the script applies additional requirements before the event is accepted:
Pivot Separation
A minimum bar gap is enforced between pivots so that tightly packed micro-swings do not dominate the output.
Minimum Price Swing
The distance between the two relevant pivots is measured relative to ATR. This prevents very small structural changes from being treated like full-quality events.
Pressure Evaluation
The OBV relationship between the two pivots is examined to determine whether participation is actually improving or weakening in a meaningful way.
Trend Context
Fast and slow EMA structure is used to frame whether the event is appearing against or within the prevailing price environment.
Contextual Location
The script also evaluates where the event is occurring in its local range structure. This helps separate mid-range noise from more interesting reversal or exhaustion locations.
Scoring
All of the above components contribute to a quality score. That score is then used to separate lower-priority events from stronger ones.
Confirmation
After the initial event, the script tracks a confirmation window. During that window, the setup may confirm, remain pending, expire, or become invalidated.
This layered structure is intentional. The script does not assume that a divergence label alone is enough.
Signal Structure
The script organizes events into a sequence instead of a single binary output.
Event Detected
A new bullish or bearish divergence is found and scored.
Pending State
The event remains active while the script monitors whether follow-through appears within the confirmation window.
Confirmed
If the confirmation condition is met within the allowed window, the event is marked as confirmed.
Invalidated
If price fails the setup before confirmation, the event is marked as invalidated.
Expired
If no confirmation occurs within the defined number of bars, the setup is no longer treated as active.
This state-based behavior is useful because it prevents the chart from presenting all divergence events as finalized conclusions the moment they appear.
Quality Model
The script uses a quality threshold and a premium threshold to distinguish event strength.
Lower-quality events can still be displayed when the user wants a fuller map of all structure, but the script can also be configured to focus only on stronger setups.
This creates three practical layers of interpretation:
Building
A divergence exists, but the score is lower and the event should be treated with more caution.
High
The event passes the main quality threshold and receives stronger visual treatment.
Premium
The event exceeds the premium threshold and receives the strongest category treatment in the script.
This does not mean that premium events are guarantees, and it does not imply that lower-quality events are unusable. It simply reflects that not every divergence deserves the same level of attention.
Panel Summary
The summary panel is intended to give quick context without forcing the user to inspect every label one by one.
The panel includes:
- Bias
A simple view of the current directional background based on the fast and slow EMA relationship.
- Pressure
A quick summary of whether OBV pressure is rising, falling, or mixed.
- Last Event
Shows the most recent detected divergence direction.
- Quality
Displays the score and current classification of the most recent event.
- State
Shows whether the most recent tracked setup is in watch, confirmed, invalidated, or idle state.
- Context
Provides a compact view of the local environment, such as trend-up, trend-down, or range-related placement.
- Freshness
Indicates how many bars have passed since the latest tracked event.
Visual Design
The chart output is intentionally organized with hierarchy.
Qualified events are easier to spot than weaker ones.
Confirmation labels are visually distinct from initial event labels.
Link lines help explain which two pivots created the divergence.
Optional background pulse and active setup zone provide temporary emphasis without permanently dominating the chart.
EMA context remains available but is visually secondary to the divergence structure.
Tooltips are included for key settings so that the logic behind the inputs remains understandable directly from the settings panel.
Signals and Alerts
The script includes alert conditions for the main state transitions:
- New Bullish Pressure Divergence
- New Bearish Pressure Divergence
- Premium Bullish Pressure Divergence
- Premium Bearish Pressure Divergence
- Bullish Pressure Divergence Confirmed
- Bearish Pressure Divergence Confirmed
- Pressure Divergence Invalidated
These alerts are designed to reflect internal script states rather than making claims about future price outcomes.
Key Inputs
Pivot Length
Controls how swings are defined. Higher values reduce noise but may delay detection.
OBV Smoothing
Smooths the OBV series before divergence analysis. Higher values create a cleaner but slower pressure curve.
Minimum Pivot Separation
Prevents overly compressed pivots from producing excessive clustering.
Minimum Price Swing (ATR)
Requires meaningful structural movement before a divergence is accepted.
Quality Threshold
Defines the minimum score required for a divergence to be treated as a qualified event.
Premium Threshold
Defines the score level required for premium classification.
Confirmation Window (Bars)
Controls how long a pending event is monitored before it expires.
Use Close-Based Confirmation
Switches confirmation logic between close-based behavior and intrabar high/low behavior.
Main Label Size
Scales event, confirmation, and invalidation labels.
Panel Text Size
Controls panel readability independently from chart labels.
Drawing Emphasis
Adjusts how visually prominent lines, EMA context, and active zone objects appear on the chart.
How to use it
This script is best approached as a context tool, not as a stand-alone decision engine.
A practical workflow may look like this:
1. Identify whether the panel context is aligned with a broad directional background or whether the market is behaving more like a range.
2. Observe whether a new divergence appears in a meaningful local location rather than in the middle of random price noise.
3. Compare the quality score and classification.
4. Watch whether the event confirms or invalidates within the chosen time window.
5. Combine the information with your own structure, risk, and execution framework.
The script is often more informative when used to reduce attention on weaker disagreements and concentrate on better-formed pressure divergences.
Who it may be useful for
This script may be useful for users who want:
- a more structured way to study price and OBV disagreement
- a cleaner divergence map with stronger visual hierarchy
- a chart that distinguishes raw detection from confirmed follow-through
- a volume-pressure oriented lens that is different from standard oscillator-only divergence tools
It may be less suitable for users who want a high-frequency signal stream, a one-click entry engine, or a tool that treats every local divergence as equally relevant.
Limitations and Transparency
This script has important limitations.
First, divergence is an analytical concept, not a guaranteed turning-point mechanism. A divergence can appear and still fail, extend, or resolve slowly.
Second, the scoring model is a ranking method, not a prediction formula. A higher score does not mean certainty. It only means that the event better satisfies the script's internal conditions.
Third, pivot-based logic requires structure to form. This means the script necessarily depends on completed swing information and will not behave like a forward-only projection model.
Fourth, confirmation and invalidation logic are simplifications intended to organize event follow-through. They do not replace full trade management, execution rules, or independent risk control.
Fifth, any indicator that uses volume-derived inputs depends on the characteristics of the underlying market data. Users should be aware that data quality and market structure can differ across symbols and venues.
This script is therefore best used as a contextual classification tool rather than a complete standalone methodology.
What this script is not
- It is not a guarantee of reversals.
- It is not a promise engine.
- It is not a fully automated trading system.
- It is not a substitute for independent structure analysis or risk management.
- It is not designed to predict every local top or bottom.
- It is not intended to imply that premium signals are always superior in every market condition.
Its purpose is narrower and more practical:
to organize OBV-based divergence events into a more useful analytical framework.
Risk Disclosure
This script is for chart analysis and research purposes only.
It does not provide financial advice, investment advice, portfolio advice, or a guarantee of future market behavior. Market conditions can change quickly, and any signal or classification generated by the script can fail or become invalid.
Users should make independent decisions and apply their own risk controls before acting on any chart output.
In summary
AG Pro OBV Pressure Divergence is a public, chart-based tool for analyzing divergence quality through the interaction of price structure and OBV pressure.
Its main contribution is not that it detects divergence, but that it attempts to rank divergence events by structural relevance, pressure context, and follow-through state.
For users who want a cleaner way to study whether price and participation are beginning to disagree, this script aims to provide a more selective and better-organized framework than a raw all-events divergence marker.
Indicator

AG Pro ATR Compression Map [AGPro Series]AG Pro ATR Compression Map
Overview / What it does
AG Pro ATR Compression Map is a chart-first compression analysis tool designed to evaluate how organized a low-volatility phase is and how structurally developed that contraction has become.
Instead of treating every quiet market phase as equally meaningful, the script separates loose and unstable contraction from cleaner, more contained compression conditions. The goal is not to label every narrow range as important, but to provide a structured visual framework for monitoring whether a tightening phase is becoming more coherent and potentially worth closer attention.
The script is built for users who want to read compression quality directly on the chart without relying on overly complex dashboard-style presentation. It highlights active compression zones, assigns a normalized compression score, classifies the current state of contraction, and summarizes the condition through a compact on-chart panel.
This is intended as a context and monitoring tool. It does not attempt to forecast direction, guarantee expansion, or replace execution planning and risk management.
Unique Edge
The main idea behind this script is that low volatility alone is not enough.
Many consolidations look similar at first glance, but their internal structure can be very different. Some are noisy, unstable, and disorderly. Others become progressively tighter, cleaner, and more contained. AG Pro ATR Compression Map is designed to make that distinction clearer.
Its edge is not based on directional prediction. Instead, it evaluates compression quality through a blended framework that combines volatility contraction, local range tightening, internal noise behavior, and containment structure. This allows the script to differentiate between random quiet price action and more organized compression phases.
This also keeps the script distinct from tools that focus on breakout confirmation, retest quality, trend classification, or level-based pressure analysis. Here, the focus is narrower and more specific: measuring the quality of compression itself.
Methodology
The script combines four internal components into a unified compression score:
1) ATR contraction
Measures whether current ATR is compressed relative to its own baseline.
2) Range tightness
Measures whether the recent price range has narrowed compared with a broader reference window.
3) Noise evaluation
Evaluates whether the contraction phase is relatively clean or increasingly disordered. This includes internal bar behavior such as wick activity, directional flipping, and local overlap behavior.
4) Structural containment
Measures whether price is remaining contained within a tighter local area instead of drifting loosely inside a broad consolidation.
These components are normalized and combined into a 0-100 compression score.
The script then classifies the result into four stages:
• Loose
• Building
• Tight
• Mature
This stage logic is designed to help distinguish early contraction from more developed compression conditions. Higher states reflect more structured tightening, but not certainty of resolution.
What the script highlights
• Compression zone
A shaded chart area is displayed when compression conditions are active.
• Compression score
A compact label shows the current normalized compression score.
• State label
The current compression stage is shown directly on the chart.
• Mini panel
A small panel summarizes ATR state, range state, noise condition, containment quality, overall compression score, active state, and current compression window length.
Signals & Alerts
This script includes deterministic alert conditions for:
• Compression Active
Triggered when compression conditions become active according to the script's scoring logic.
• Compression Mature
Triggered when the current state reaches Mature.
• Compression State Change
Triggered when the internal compression state changes.
These alerts are designed to reflect state transitions inside the script's existing framework. They should be interpreted as analytical status changes, not as trade instructions.
Key Inputs
Main controls include:
• ATR Length
• Baseline Length
• Range Window
• Noise Window
• Containment Window
• Compression Threshold
• Mature Threshold
The script also includes display controls for zone visibility, labels, panel position, theme mode, text sizing, and label offset. Advanced options allow stricter filtering and additional sensitivity controls for wick behavior and close-overlap behavior.
How to read it
In practice, the script is most useful when users want to answer questions such as:
• Is this contraction still loose, or is it becoming more organized?
• Is the range tightening in a meaningful way, or is price simply drifting?
• Is the structure relatively clean, or is internal noise increasing?
• Has the compression developed enough to justify closer monitoring?
A higher compression score means the script is detecting tighter and more structured contraction conditions. A lower score suggests that the current quiet phase is still broad, unstable, or underdeveloped.
Best use cases
This script can be useful when monitoring:
• developing consolidations
• low-volatility phases inside broader trends
• pre-expansion observation zones
• structured pauses after directional movement
• markets where users want to distinguish clean compression from random inactivity
It is especially suited for traders who prefer chart-first context tools rather than signal-heavy overlays.
Limitations & Transparency
Compression can remain inactive for long periods, fail to resolve cleanly, or resolve without meaningful follow-through.
A high compression reading does not imply directional certainty, timing certainty, or inevitable expansion. Likewise, a low reading does not mean price cannot move sharply. The script measures structure quality inside contraction conditions. It does not measure certainty.
The output should be used as contextual information alongside price action, market structure, execution rules, and risk management.
What it does not do
This script does not:
• predict breakout direction
• guarantee expansion
• project targets
• replace trade planning
• function as a standalone entry engine
Risk Disclosure
For educational and analytical use only. Indicator
