OPEN-SOURCE SCRIPT
Telah dikemas kini

Opus46

896
Opus46 is a mean-reversion band-touch signal engine built on structural price events rather than indicator crossovers. It generates long-only buy and sell signals when price interacts with adaptive penetration-learning bands, filtered through a multi-layer conviction and gating system. Designed for crypto perpetual futures and volatile equities across 1H–4H timeframes.

THE CORE IDEA

Most signal systems trigger on indicator crossovers — moving average crosses, oscillator thresholds, or momentum flips. These events have roughly 10% follow-through. Opus46 instead triggers on structural price events: band touches, percentile extremes, and sigma confluences. These produce dramatically higher follow-through because they represent genuine exhaustion at statistically significant price levels, not noise.

HOW IT WORKS

Opus46 builds two primary structures on the chart. First, a 2-line SMMA ribbon (fast 8, slow 32 on HL2) determines the regime — gold for bullish (price outperforming), blue for bearish (price underperforming). The binary regime has no neutral zone or tangled state, giving clean regime transitions and uninterrupted age accumulation for phase boost and maturity gating. Second, penetration-learning bands extend beyond a Donchian channel using an ATR multiplier that adapts over time by learning from historical wick penetration depths. When price touches the lower band in a bearish regime, a buy signal fires. When price touches the upper band in a bullish regime, a sell signal fires. No crossovers involved.

SIGNAL GATES

Raw band touches pass through multiple gates before becoming actionable signals. The regime maturity gate blocks premature signals in fresh regime flips — the regime must have persisted for at least 8 bars or the spread must have reached 1.5 ATR depth. The pain gate (inspired by Pulse's pressure engine) requires recent capitulation (pressZ below -1.5 sigma within the last 4 bars) before buy signals can fire, ensuring the system waits for genuine seller exhaustion rather than buying into the middle of a move. ATR separation enforces minimum distance between consecutive entries (0.5x ATR for buys, 2.0x for sells). Buy and sell cooldowns enforce minimum bar spacing between consecutive signals. An optional lower-low filter (default OFF) requires each buy to be at a new structural low since the last entry.

Z-SCORE OVERRIDE

When the ATR-normalized spread reaches extreme statistical levels (below -3.0 sigma for buys, above 3.75 sigma for sells), the system fires regardless of band position, regime state, maturity, or pain gate conditions. These asymmetric thresholds reflect a bullish structural bias — it takes a more extreme reading to force a sell than a buy. Z-override signals still respect the lower-low filter, ATR separation, and buy cooldown to prevent wasteful clustering during sustained dislocations. Regime and maturity gates are bypassed because extreme statistical events warrant immediate action regardless of trend state.

CONVICTION SIZING

Opus46 stacks five reward-only conviction multipliers on the buy side. All use a minimum of 1.0x, meaning they boost high-conviction entries without penalizing average ones. DMFI (Double-Pass Money Flow Index, calculated as 2xMFI minus RSI of MFI) scales buys from 1.0x to 2.0x based on flow exhaustion — deeply negative DMFI means sellers are capitulating, warranting larger position sizing. Percentile conviction scales from 1.0x to 1.5x based on how statistically extreme the spread is within a 124-bar window. Phase buy boost increases position size as bearish regimes mature, buying more aggressively late in dips when reversal is more probable. Divergence boost applies 1.5x when bullish pivot divergence (spread or RSI) fired within the last 5 bars. Wick rejection boost applies 1.2x when the buy bar shows strong lower wick rejection (close in upper 40% of bar range).
Position sizing follows geometric scaling (1.5x per tier, 5 steps, up to 24 buys per cycle) with optional cascade decay for risk management.

SELL ENGINE

Sells use percentage-of-remaining sizing (default 20%, max 50%), which structurally prevents over-selling. Phase sell boost increases the sell percentage as bullish regimes mature — conservative early to let positions appreciate, aggressive late to capture gains before reversal. Sell-side DMFI and percentile conviction multipliers exist but default to OFF because they over-sell on trending equities where euphoric conditions persist for weeks.

DIVERGENCE DETECTION

Pivot-based divergence (5 left bars, 3 right bars) detects both spread divergence and RSI divergence independently. Bullish divergences (price making lower lows while the indicator makes higher lows) plot as circles (spread) or diamonds (RSI) below bars. Bearish divergences plot above bars. Either type can trigger the divergence boost window for sizing.

VISUAL FEATURES

The chart displays the 2-line SMMA ribbon with regime-colored fill (gold or blue), sage-green penetration-learning bands, conviction-colored buy triangles (cyan tiers darkening with depth), and magenta sell triangles. An optional volume spike background shades the chart when volume exceeds a configurable multiple of its 20-bar SMA — color, multiplier, and transparency are all adjustable (default purple at 75% transparency, 2x threshold). A full performance table tracks realized PnL, profit factor, win rate, expectancy, average drawdown, ROI, and cycle accounting with next buy/sell target levels. The regime label in the table header updates dynamically between GOLD and BLUE to reflect the current regime state.

DEFAULTS

Buy Base $100, Max Buys 24, Geo Factor 1.5x, Donchian 14, Pain Gate ON, DMFI Buy ON (1.0-2.0x), Percentile Buy ON (1.0-1.5x), Z-Override ON (-3.0 sigma buy / 3.75 sigma sell), Regime Maturity ON (8 bars / 1.5 ATR), LL Filter OFF, Sell Base 20%, Sell Max 50%, Buy ATR Sep 0.5x, Sell ATR Sep 2.0x, Sell Cooldown 6 bars, Buy Cooldown 1 bar, Volume Spike BG ON (2x, purple, 75% transparency). DMFI Sell OFF, Percentile Sell OFF, Tail-Risk Breaker OFF.
Nota Keluaran
fixed small color logic bug in the info table
Nota Keluaran
cosmetic
Nota Keluaran
cosmetic
Nota Keluaran
cosmetic

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.