OPEN-SOURCE SCRIPT

Convergence Protocol [JOAT]

909

Convergence Protocol [JOAT]

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.

snapshot

Strategy Properties and Backtesting Settings

Default settings used for publication:
  • Initial Capital: Default TradingView 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

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.