OPEN-SOURCE SCRIPT
Telah dikemas kini Opus46 H v1

Opus46 H is the companion oscillator for Opus46. It visualizes the internal state of the signal engine — spread dynamics, money flow wave, regime phase, pressure conditions, and divergence events — so you can see exactly why signals fire and what conditions are building before they do.
SPREAD HISTOGRAM
The primary plot is the ATR-normalized spread between the fast SMMA (8) and slow SMMA (32), displayed as a regime-colored histogram. Gold bars indicate bullish regime, blue bars indicate bearish regime. Bar transparency distinguishes expansion from contraction — solid bars mean the spread is expanding (strengthening move), faded bars mean it is contracting (weakening move).
MONEY FLOW WAVE
A filled wave plot overlays the histogram showing smoothed Money Flow Index centered at zero. The wave scales adaptively to match the histogram's range using the 100-bar peak spread, keeping the two visually proportional regardless of asset or timeframe. Green fill (50% opacity) indicates bullish money flow (MFI above 50), red fill indicates bearish flow (MFI below 50). This gives an immediate read on whether institutional flow confirms or contradicts the price regime — green wave during a blue (bearish) histogram signals building buy conviction.
DMFI AREA
The DMFI (Double-Pass Money Flow Index) is displayed as a filled area scaled to fit the spread range. Green-tinted area indicates negative DMFI (seller exhaustion / buy conviction), red-tinted area indicates positive DMFI (buyer euphoria / sell conviction), and grey indicates neutral flow. This lets you see the conviction multiplier state at a glance — deeply green DMFI means the overlay is scaling buys toward 2.0x.
REGIME BACKGROUND
A subtle background tint shows the current regime state — blue for bearish (buy zone), gold for bullish (sell zone). With the 2-line ribbon, regime transitions are clean and binary with no grey neutral periods.
RSI BACKGROUND
Green background shading appears when RSI(14) drops below 30, indicating oversold conditions. Red background shading appears when RSI(14) rises above 70, indicating overbought conditions. These layers combine with the regime background to show multi-factor confluence — a blue regime with green RSI shading represents a high-conviction buy zone.
DIVERGENCE MARKERS
Pivot-based divergence detection (5 left bars, 3 right bars) plots at the bottom and top of the pane. Bullish spread divergence appears as lime circles, bullish RSI divergence as teal diamonds. Bearish spread divergence appears as orange circles, bearish RSI divergence as magenta diamonds. These match the overlay's divergence boost window — when these markers appear, the overlay is priming a 1.5x buy or sell size multiplier.
Z-OVERRIDE MARKERS
Diamond markers appear when the spread z-score crosses into extreme territory (default below -3.5 sigma for buy zone, above 3.5 sigma for sell zone). These highlight bars where the overlay would fire z-override signals that bypass regime and maturity gates.
PAIN GATE MARKERS
When the pain gate is enabled, cyan up-triangles appear at the bottom of the pane when recent capitulation is first detected (pressZ dropping below the capitulation threshold within the lookback window). Magenta down-triangles appear at the top when recent euphoria is detected. These show exactly when the pain gate opens for buy or sell signals on the overlay.
STATUS TABLE
An optional status table (default OFF) displays the current state of all signal components in one view. The SETUP row shows the current verdict — Z-BUY, Z-SELL, BUY ZONE, SELL ZONE, or WAIT (chop). Additional rows show spread z-score, regime state with age, maturity gate status with ATR depth, pain gate status with pressure z, DMFI value with current multiplier, gate direction, phase buy and sell boost values, raw spread, and active divergence type.
USAGE
Place Opus46 H in a pane below the Opus46 overlay. The companion shares the same SMMA ribbon, regime detection, and DMFI parameters — keep the settings synchronized between the two indicators. The oscillator pane gives you forward visibility into what the overlay is computing internally, letting you anticipate signals before they fire and understand signal quality after they fire.
SPREAD HISTOGRAM
The primary plot is the ATR-normalized spread between the fast SMMA (8) and slow SMMA (32), displayed as a regime-colored histogram. Gold bars indicate bullish regime, blue bars indicate bearish regime. Bar transparency distinguishes expansion from contraction — solid bars mean the spread is expanding (strengthening move), faded bars mean it is contracting (weakening move).
MONEY FLOW WAVE
A filled wave plot overlays the histogram showing smoothed Money Flow Index centered at zero. The wave scales adaptively to match the histogram's range using the 100-bar peak spread, keeping the two visually proportional regardless of asset or timeframe. Green fill (50% opacity) indicates bullish money flow (MFI above 50), red fill indicates bearish flow (MFI below 50). This gives an immediate read on whether institutional flow confirms or contradicts the price regime — green wave during a blue (bearish) histogram signals building buy conviction.
DMFI AREA
The DMFI (Double-Pass Money Flow Index) is displayed as a filled area scaled to fit the spread range. Green-tinted area indicates negative DMFI (seller exhaustion / buy conviction), red-tinted area indicates positive DMFI (buyer euphoria / sell conviction), and grey indicates neutral flow. This lets you see the conviction multiplier state at a glance — deeply green DMFI means the overlay is scaling buys toward 2.0x.
REGIME BACKGROUND
A subtle background tint shows the current regime state — blue for bearish (buy zone), gold for bullish (sell zone). With the 2-line ribbon, regime transitions are clean and binary with no grey neutral periods.
RSI BACKGROUND
Green background shading appears when RSI(14) drops below 30, indicating oversold conditions. Red background shading appears when RSI(14) rises above 70, indicating overbought conditions. These layers combine with the regime background to show multi-factor confluence — a blue regime with green RSI shading represents a high-conviction buy zone.
DIVERGENCE MARKERS
Pivot-based divergence detection (5 left bars, 3 right bars) plots at the bottom and top of the pane. Bullish spread divergence appears as lime circles, bullish RSI divergence as teal diamonds. Bearish spread divergence appears as orange circles, bearish RSI divergence as magenta diamonds. These match the overlay's divergence boost window — when these markers appear, the overlay is priming a 1.5x buy or sell size multiplier.
Z-OVERRIDE MARKERS
Diamond markers appear when the spread z-score crosses into extreme territory (default below -3.5 sigma for buy zone, above 3.5 sigma for sell zone). These highlight bars where the overlay would fire z-override signals that bypass regime and maturity gates.
PAIN GATE MARKERS
When the pain gate is enabled, cyan up-triangles appear at the bottom of the pane when recent capitulation is first detected (pressZ dropping below the capitulation threshold within the lookback window). Magenta down-triangles appear at the top when recent euphoria is detected. These show exactly when the pain gate opens for buy or sell signals on the overlay.
STATUS TABLE
An optional status table (default OFF) displays the current state of all signal components in one view. The SETUP row shows the current verdict — Z-BUY, Z-SELL, BUY ZONE, SELL ZONE, or WAIT (chop). Additional rows show spread z-score, regime state with age, maturity gate status with ATR depth, pain gate status with pressure z, DMFI value with current multiplier, gate direction, phase buy and sell boost values, raw spread, and active divergence type.
USAGE
Place Opus46 H in a pane below the Opus46 overlay. The companion shares the same SMMA ribbon, regime detection, and DMFI parameters — keep the settings synchronized between the two indicators. The oscillator pane gives you forward visibility into what the overlay is computing internally, letting you anticipate signals before they fire and understand signal quality after they fire.
Nota Keluaran
sync adjustment to match Opus 46 overlayNota Keluaran
cosmeticNota Keluaran
CosmeticNota Keluaran
Opus46 H v2.0 — Full Engine RebuildOpus46 H started as a display pane. It showed the spread, the money flow, and the pressure behind the Opus46 engine. Version 2.0 makes it the engine itself.
The complete Opus46 signal engine now runs inside this pane. Every gate, every filter, every position rule. The pane prints its own buy and sell triangles, and they match the Opus46 overlay bar for bar. Same code, same settings, same results. You can now read entries and exits straight from the pane, with or without the overlay on the chart.
WHAT'S NEW
- Buy and sell markers, riding the spread line itself. Green triangles for buys, shaded light to deep as the position builds. Magenta triangles for sells. Signal timing mirrors the main overlay exactly.
- Vetoed-signal layer, off by default. Turn it on to see raw setups the engine's gates blocked — capacity, cooldown, structure, throttle. You can watch the engine say no, and see why.
- Basis Guard support. Opus46's newest sell logic is fully mirrored. When price sits below the position's average entry, sells shrink to a small sliver instead of booking the loss. The status table shows the Guard's live state: OFF, ARMED, or SLIVER.
- Book row in the status table. Live lots, quantity, and cycle state from the engine's internal position tracking.
- Key table. A small legend so every marker, wave, and color explains itself.
- Volume-spike background, matching the overlay.
- A hidden Signal output in the data window, for anyone pairing this pane with other tools.
WHAT STAYED
Everything you already use. The regime-colored spread histogram with contraction fade. The money-flow wave. The optional DMFI conviction area. Regime and RSI backgrounds. Z-score zone diamonds. Capitulation and euphoria markers. Divergence dots for both spread and RSI. All six alerts.
ONE FIX WORTH KNOWING
The old pane showed the Pain Gate as off by default, while the engine actually runs it on. The pane now tells the truth about every default.
CHECKING THE PAIR
Load Opus46 and Opus46 H on the same chart. The triangles should line up on every bar. Both should show BUILD 616.9 in the data window — that number tracks the engine version this pane mirrors. If the numbers differ, one side is out of date.
The Opus46 overlay this pane mirrors is available on my profile.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
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.