Forza Relativa - Professional Table v2█ OVERVIEW
Questo indicatore calcola e mostra la Forza Relativa (Relative Strength) di un asset rispetto a un benchmark di riferimento e al suo settore di appartenenza (se applicabile). Tutti i calcoli sono basati su giorni solari reali ("Calendar Days"), garantendo un confronto preciso e uniforme delle performance su diversi archi temporali: 1g, 7g, 30g, 60g, 90g e 180g.
A differenza delle tabelle standard, questa versione è stata interamente ottimizzata per il Tema Scuro (Dark Theme) di TradingView, garantendo una leggibilità nitida e professionale in ogni condizione di mercato.
█ CARATTERISTICHE PRINCIPALI
• Adattabilità Asset & Crypto: Lo script rileva automaticamente la classe di asset sul grafico. Se l'asset è una Criptovaluta, imposta come benchmark predefinito Bitcoin (BTC) o Ethereum (ETH) a scelta dell'utente. Se l'asset è un'Azione o ETF, utilizza lo S&P500 (SPY) come benchmark e attiva la colonna dedicata al "Settore".
• Selezione del Settore: Per il mercato azionario, è possibile selezionare manualmente l'ETF settoriale di riferimento (es. XLK per il Tech, XLF per i Finanziari, ecc.) per monitorare se l'asset sta sovraperformando o sottoperformando il proprio settore di appartenenza.
• Calcolo a Giorni Solari (Calendar Days): Le variazioni percentuali non si basano sul semplice conteggio delle candele del grafico corrente (che variano a seconda del timeframe), ma calcolano l'effettiva variazione temporale indietro nel tempo, rendendo l'indicatore ideale sia su grafici Daily che Intraday.
█ OTTIMIZZAZIONE GRAFICA & NITIDEZZA (DARK THEME)
Per risolvere il classico problema di scarsa leggibilità delle tabelle TradingView su sfondi scuri, sono state introdotte le seguenti migliorie:
1. Contrasto Dinamico: Il testo delle celle utilizza una palette di colori e trasparenze che si adatta allo sfondo per risaltare chiaramente senza affaticare la vista.
2. Palette Colori Soft: Sostituiti i verdi e rossi standard (troppo accesi e fastidiosi su sfondo scuro) con un elegante Verde Smeraldo Soft per i rendimenti positivi e un Rosso Corallo Soft per quelli negativi.
3. Griglia Protetta: La tabella presenta bordi grigio-scuri solidi per separare nettamente i dati e le colonne, rendendo l'interfaccia pulita e moderna.
█ PARAMETRI PERSONALIZZABILI (INPUTS)
• Crypto Benchmark: Consente di scegliere tra BTCUSDT ed ETHUSDT quando si analizzano le criptovalute.
• Dimensione Testo Tabella: Modifica la dimensione della tabella per adattarla a schermi di diverse risoluzioni (Tiny, Small, Normal, Large, Huge).
• Posizione Tabella: Permette di posizionare la griglia in qualsiasi angolo del grafico (es. in basso a destra, in alto a sinistra, ecc.) per non coprire i prezzi.
• Settore Manuale: Consente di selezionare l'ETF settoriale SPDR di riferimento per l'asset azionario sotto analisi.
█ NOTE SUL TIMEFRAME
Dato che l'indicatore analizza performance storiche fino a 180 giorni solari fa, si consiglia di utilizzare timeframe come il Giornaliero (1D) o l'Orario (1H/4H). Su timeframe estremamente ridotti (es. 1 o 5 minuti), TradingView potrebbe non avere abbastanza candele storiche caricate per calcolare i periodi più lunghi, mostrando la dicitura "n/a" (non disponibile).
Relative Strength vs Benchmark & Sector (Dark Theme)
█ OVERVIEW
This indicator measures and displays the Relative Strength (RS) of an asset by comparing its performance against a selected benchmark and, when applicable, its sector benchmark.
All calculations are based on actual Calendar Days rather than a simple bar count, ensuring consistent and accurate performance comparisons across the following periods:
1D, 7D, 30D, 60D, 90D, and 180D
The table has been specifically designed and optimized for the TradingView Dark Theme, providing maximum readability, strong contrast, and a professional appearance under all market conditions.
█ KEY FEATURES
• Automatic Asset Detection
The script automatically identifies the type of asset displayed on the chart:
Cryptocurrencies: uses either Bitcoin (BTC) or Ethereum (ETH) as the benchmark, selectable by the user.
Stocks and ETFs: uses SPY (S&P 500 ETF) as the benchmark and automatically enables the Sector comparison column.
• Sector Comparison
For equities, users can manually select the appropriate SPDR sector ETF (XLK, XLF, XLE, XLV, etc.) to determine whether the stock is:
Outperforming its sector
Underperforming its sector
Moving in line with its sector
• Calendar-Day Performance Calculation
Performance measurements are independent of the chart timeframe.
Instead of relying on the number of bars displayed, percentage changes are calculated using actual calendar days, ensuring consistent results across both Daily and Intraday charts.
█ DARK THEME VISUAL OPTIMIZATION
To improve readability on dark backgrounds, several visual enhancements have been implemented:
1. Dynamic Contrast
Text colors and transparency levels have been carefully tuned to provide excellent visibility while minimizing eye strain.
2. Soft Color Palette
Standard colors have been replaced with more balanced tones:
Soft Emerald Green for positive values
Soft Coral Red for negative values
This creates a cleaner appearance and improves readability during extended analysis sessions.
3. High-Definition Grid
The table uses solid dark-gray borders to clearly separate cells, columns, and headers, resulting in a modern and professional layout.
█ CUSTOMIZABLE INPUTS
• Crypto Benchmark
Select the benchmark used for cryptocurrency analysis:
BTCUSDT
ETHUSDT
• Table Text Size
Adjust the table size to fit different screen resolutions:
Tiny
Small
Normal
Large
Huge
• Table Position
Place the table anywhere on the chart:
Top Left
Top Right
Bottom Left
Bottom Right
• Manual Sector Selection
Choose the SPDR sector ETF used as the sector benchmark for relative performance analysis.
█ DATA INTERPRETATION
Positive values indicate that the asset is outperforming its benchmark or sector.
Negative values indicate underperformance, signaling weaker relative strength compared to the benchmark or sector being analyzed.
█ TIMEFRAME NOTES
Since the indicator analyzes historical performance up to 180 calendar days, the following timeframes are recommended:
1D
4H
1H
On very low timeframes (such as 1-minute or 5-minute charts), TradingView may not have enough historical bars loaded to calculate the longest lookback periods. In these cases, some cells may display "n/a" (data not available).
Ideal for quickly identifying assets that are demonstrating superior relative strength versus both the broader market and their respective sector, regardless of the chart timeframe being used.
Indikator

Indikator

Divergence Indicator RSI, MACD,, Hidden Reversal Signals LunqFXDivergence Indicator is a multi-engine divergence scanner for TradingView that reads RSI, MACD and OBV at every confirmed swing and only draws a divergence when the engines agree — so instead of the usual flood of weak one-oscillator signals, you get a few graded, high-conviction ones. Every divergence is rated by strength: ★★★ all three engines confirm (rare, strongest), ★★ two confirm, single-engine noise is filtered out by default. It detects regular divergences (price makes a new extreme, oscillators refuse — potential reversal) and hidden divergences (trend continuation), on any market — forex, crypto, stocks, indices, gold — and any timeframe. Built in Pine Script v6, fully non-repainting. Keywords: divergence indicator, RSI divergence, MACD divergence, OBV divergence, hidden divergence, regular divergence, reversal, momentum, exhaustion, multi oscillator scanner.
◆ WHY MULTI-ENGINE
Any single oscillator diverges constantly — that's why classic divergence tools feel random. Requiring independent confirmation from momentum (RSI), trend-momentum (MACD) and volume flow (OBV) removes most false positives: when all three refuse to follow price, the move is genuinely running out of fuel.
◆ WHAT IT DRAWS
Divergence lines on price — solid neon violet for bullish, neon amber for bearish; dashed for hidden divergences.
Star-graded labels — ★★ / ★★★ with tooltips explaining exactly what diverged.
Exhaustion candles — a unique display layer: candles glow at full neon while price and engines agree, and fade as engines stop confirming — you see a divergence brewing before it prints.
Status strip dashboard — a horizontal HUD along the bottom: last signal + strength, a live engine board (P / RSI / MACD / OBV direction arrows), a FUEL meter, and bull/bear counters.
◆ HOW IT WORKS
Swings are detected with confirmed pivots (N closed bars each side).
At each new confirmed pivot the scanner compares price and each engine against the previous pivot: price lower low + engine higher low = regular bull; price higher low + engine lower low = hidden bull (mirrored for highs).
The number of agreeing engines (1–3) becomes the star rating; signals below your minimum are skipped.
The live engine board and fuel meter track slope agreement in real time — display-only context that never alters signals.
◆ HOW TO USE IT
Treat ★★★ regular divergences as your primary reversal alerts — look for entries with your own structure/levels.
Use hidden divergences to join the trend on pullbacks.
Watch the FUEL meter: when it drains and candles fade, tighten stops on trend trades.
Raise Min strength to 3 for only the rarest, cleanest signals; lower pivot bars for faster (but noisier) detection.
◆ SETTINGS
Pivot left/right bars, max gap between swings, minimum strength, hidden divergences on/off, engine toggles (RSI/MACD/OBV), RSI length, exhaustion candles, label size, dashboard position/size.
◆ ALERTS
Bullish divergence · Bearish divergence (fire when a confirmed signal prints).
◆ LIMITATIONS
Signals confirm with a pivot delay (right bars) — that is the honest cost of zero repaint; lower it for speed, raise it for reliability.
On symbols without volume data the OBV engine adds no information — disable it there.
Divergence marks exhaustion, not timing — always combine with structure and risk management.
◆ ORIGINALITY & NON-REPAINTING
Original work: the three-engine agreement grading, the exhaustion-candle layer, the live engine board and the fuel meter are my own implementation — no third-party code. All divergences are built from confirmed pivots only; a drawn line or label never moves or disappears.
Educational analysis tool, not financial advice. © LunqFX. Indikator

RSI Core Levels Heatmap [BigBeluga]🔵 OVERVIEW
The RSI Core Levels Heatmap turns the standard Relative Strength Index (RSI) indicator into powerful support and resistance lines drawn directly on your main price chart. Instead of forcing you to constantly look down at a separate oscillator window, this script automatically finds hidden momentum levels and projects them right where you trade, helping you spot key reversal floors and ceilings instantly.
🔵 FEATURES
The system uses a smart layout tracking engine to map momentum without cluttering your screen:
1 — Momentum-Mapped Support & Resistance Lines
Signal Line Crossover Alerts: The indicator tracks momentum changes using a smooth Signal Line Length . When the raw RSI line crosses above or below this signal line, it triggers a setup.
Smart Price Capture: The moment a crossover happens, the engine looks back at the last 10 candles. If it is a bullish bounce, it finds the low price; if it is a bearish drop, it grabs the high price.
Direct Chart Overlay: It takes those key prices and draws clean support or resistance lines right on your main chart with clear labels.
2 — No-Clutter Overlap Protection Logic
Collision Checker: To stop your chart from looking like a messy spiderweb, the indicator checks if a new line is being drawn too close to an old one.
Duplicate Blocking: If a new level lands directly on top of an existing active zone, the script blocks it automatically to keep your trading area perfectly clean.
// Strict Collision Box Overlap Detection Matrix
is_overlapping_existing_block(high_val, low_val) =>
overlap = false
if array.size(activeBlocks) > 0
for i = 0 to array.size(activeBlocks) - 1
BlockLevel item = array.get(activeBlocks, i)
if (high_val <= item.topPrice and high_val >= item.botPrice) or (low_val >= item.botPrice and low_val <= item.topPrice) or (high_val >= item.topPrice and low_val <= item.botPrice)
overlap := true
break
overlap
3 — Active Line Lifecycle & FIFO System
Automatic Extension: All active, unbroken support and resistance lines automatically stretch forward on every new candle so they stay fresh.
Broken Line Changes: When price actions breaks through a line, the script instantly changes its style to a thin, grey dashed line and stops tracking it. This shows you exactly where historical levels failed.
Levels Heat Color: Each support and resistance level color intense is based on the rsi value at the moment level was created.
FIFO (First-In, First-Out) Lag Protection: To keep your TradingView running fast without any lag, you can set a Max Active Levels & Labels limit. When you reach this cap, the oldest lines drop off the chart first (First-In, First-Out) to make room for new ones.
// Object Array State Lifecycle Management Snippet
if array.size(activeBlocks) > 0
for i = array.size(activeBlocks) - 1 to 0
BlockLevel item = array.get(activeBlocks, i)
bool broken = item.isBull ? (close < item.botPrice) : (close > item.topPrice)
if broken
label.delete(item.lvlLabel)
line.set_style(item.lvlLine, line.style_dashed)
line.set_color(item.lvlLine, color.gray)
line.set_width(item.lvlLine, 1)
array.remove(activeBlocks, i)
else
line.set_x2(item.lvlLine, bar_index)
label.set_x(item.lvlLabel, bar_index)
4 — Gradient Heatmap Ribbon & Proximity Dashboard
Color-Changing Ribbon blocks: The bottom sub-pane features a smooth gradient ribbon that tracks market extremes. It lights up bright green during deep oversold conditions, bright red when overbought, and turns yellow during tight consolidations ( Show Midline Squeeze Zone ).
Distance Telemetry HUD Table: A clean on-screen table calculates exactly how close the current price is to your nearest active support or resistance level in points and exact percentages.
🔵 HOW TO USE
Using this simple multi-layer blueprint helps you manage setups step-by-step:
Trading Reversals and Bounces: Watch the chart when price falls down toward a green support line. If the Dashboard Table shows the distance getting very close to 0% and the bottom ribbon is flashing deep green (oversold), look for a long bounce trade off the level.
Managing Risk and Trailing Stops: If you enter long at a support line, use that level as your risk floor. If price flushes below it, the indicator will instantly turn the line grey and dashed, letting you know the setup is invalid and it is time to cut the trade.
Spotting Squeeze Breakouts: When the bottom ribbon stays yellow, it means the market is squeezing sideways. Watch your distance dashboard closely; when price breaks out of the squeeze and flies toward your outer lines, you can ride the explosive momentum expansion.
🔵 NOTES
Why this implementation is unique:
It saves screen space by turning abstract momentum data from an oscillator below into highly accurate, tradeable price targets up on your main chart.
The overlap blocker prevents multiple lines from bunching together, keeping your chart clean and easy to read.
The automated FIFO memory cleaning system makes sure the script stays fast and lightweight, no matter how many bars are loaded on your chart.
Indikator

Triple Momentum Extremes# Triple Momentum Extremes
**Triple Momentum Extremes** is a multi-timeframe momentum exhaustion indicator designed to identify statistically rare momentum extremes rather than traditional momentum trends.
Instead of using momentum as a trend-following tool, this indicator looks for situations where **all three momentum periods (10, 30, and 60)** simultaneously reach extreme levels within their own historical distribution. These conditions often indicate that the market may be approaching an exhaustion point.
## Features
* Displays **Momentum 10, 30, and 60** in a single pane.
* Uses **Percent Rank** to normalize momentum values across different market conditions.
* Adjustable **Extreme Threshold (%)** to control signal sensitivity.
* Individual signal selection:
* Long signals only
* Short signals only
* Long & Short signals
* Compact labels (M10, M30, M60) for quick identification.
* Built-in alert conditions for both Long and Short signals.
## How It Works
Each momentum line is converted into a **Percent Rank** over a configurable historical lookback period.
A **Long signal** is generated when:
* MOM10 is within the lowest X% of its historical range.
* MOM30 is within the lowest X% of its historical range.
* MOM60 is within the lowest X% of its historical range.
A **Short signal** is generated when:
* MOM10 is within the highest X% of its historical range.
* MOM30 is within the highest X% of its historical range.
* MOM60 is within the highest X% of its historical range.
The threshold (default 10%) can be adjusted to make signals more selective or more frequent.
## Interpretation
This indicator is primarily designed as a **mean-reversion tool**.
When momentum reaches simultaneous extremes across multiple time horizons, the probability of an exhausted move increases. Such conditions can highlight potential reversal zones or areas where traders should prepare for a change in market behavior.
In many markets—especially equities and cryptocurrencies—extreme negative momentum has historically produced stronger reversal opportunities than extreme positive momentum. Strong bullish momentum can often persist for extended periods, while deeply negative momentum more frequently precedes relief rallies.
For this reason, many traders may prefer using **Long signals only**, while treating Short signals as secondary confirmation rather than standalone entries.
## Best Use
The indicator works best when combined with:
* Support and resistance levels
* Market structure
* Volume analysis
* Candlestick confirmation
* Trend filters
It is intended to identify **high-probability exhaustion zones**, not automatic buy or sell signals.
As with any technical indicator, it should be used as part of a broader trading strategy and proper risk management.
Indikator

Adaptive Momentum Oscillator (MTF Signal Framework)📖 Overview
The Adaptive Momentum Oscillator is a multi-layer analytical tool designed to evaluate market momentum through a combination of smoothed price deviation, signal averaging, and regime-based visualization.
Instead of relying on a single momentum calculation, the indicator builds a structured view of market behavior by separating:
underlying momentum pressure
signal smoothing
and trend regime states
This allows traders to interpret market conditions with reduced noise and clearer directional context.
⭐ Key Features
🔹 Multi-Layer Momentum Structure
The oscillator combines raw momentum movement with smoothed signal lines to separate short-term fluctuations from broader directional bias.
🔹 Signal Confirmation Logic
Buy and sell conditions are derived from structured momentum shifts rather than single threshold crossings, helping reduce premature signals in choppy conditions.
🔹 Trend Regime Visualization
The indicator highlights different market phases:
bullish expansion zones
bearish expansion zones
neutral or transition phases
This helps contextualize momentum behavior instead of treating all movement equally.
🔹 Histogram Momentum Tracking
The histogram represents the acceleration and deceleration of momentum, allowing traders to observe weakening or strengthening trends.
🔹 Dynamic Signal Behavior
Signals adapt to market conditions instead of using fixed static rules, improving responsiveness during volatility changes.
📊 How to Interpret
🟢 Buy Signal
Indicates that momentum has shifted upward and confirmation conditions are aligned with bullish pressure.
🔴 Sell Signal
Indicates that momentum has shifted downward and bearish pressure dominates recent structure.
📉 Histogram
Increasing bars = strengthening momentum
Decreasing bars = weakening momentum
Color shifts = regime transitions
🎯 Best Applications
Swing trading
Momentum confirmation
Trend filtering
Reversal detection
Market structure analysis
⚠️ Limitations
This indicator should not be used as a standalone trading system.
Momentum signals may lag during rapid reversals, and additional confirmation from price action or risk management is recommended.
💡 Originality
Unlike traditional oscillators such as MACD or RSI, this script is designed as a multi-layer momentum framework, where:
raw momentum
smoothed signal behavior
and regime classification
are combined into a unified structure.
The goal is not to generate isolated signals, but to provide a continuous model of market momentum behavior across different phases. Indikator

Indikator

Participation-Adjusted Momentum [TradeDots]Participation-Adjusted Momentum
Summary
This indicator computes a momentum oscillator that has been adjusted by participation quality . Raw momentum (standardized rate-of-change) is multiplied by a quality blend derived from volume percentile, close-location alignment within the bar, and range-per-volume efficiency. The intent is to differentiate strong momentum supported by participation from moves that look impressive on price alone but occur on thin volume or wide ranges with little net travel. The histogram is colored by one of five interpretable states (Strong Bull, Strong Bear, Thin, Quiet Accumulation, Noisy) so users see at a glance whether to trust a momentum reading.
What is original here
Momentum oscillators (rate-of-change, MACD, RSI) and volume oscillators (volume percentile, MFI) are widely available. This script's contribution is the deliberate combination into a single adjusted reading, plus the five-state classification that maps raw-momentum / participation combinations to labelled regimes. The "Quiet Accumulation" state (low momentum but rising volume percentile) and the "Thin" state (strong momentum but low participation) are specifically called out because they are the most actionable readings — both indicate that the price reading and the order-flow reading disagree, and that disagreement deserves a label.
How it works
Each bar, the following quantities are computed.
Raw momentum. Rate-of-change of close over a configurable length, then z-scored (subtract the mean, divide by the standard deviation) over the normalization lookback. The result is approximately bounded but can exceed plus or minus 3 in extreme moves.
EMA slope. A 50-period EMA's change over a configurable lookback, min-max normalized to 0-100. Used as a secondary directional bias (computed and exposed as a hidden plot, but not directly added to the displayed oscillator).
Volume percentile. Volume rank over the normalization lookback (typically 100 bars).
Close-location value. Where the close sits within the bar's high-low range, expressed as a percentage. For an upward-direction reading, a close near the bar's high indicates buyers won the bar; for a downward-direction reading, a close near the bar's low indicates sellers won.
Participation. Volume percentile (divided by 100) multiplied by direction-aligned close-location value (also normalized to 0-1). Result is in ; higher means "good participation".
Range per volume. Bar range divided by volume. High range per volume means a wide candle moved on thin flow — typical of news spikes, illiquid prints, or false moves. The percentile rank of range-per-volume is inverted (low range-per-volume gives a high "efficiency score") and used as a quality factor.
Quality blend. A weighted combination: 0.4 * participation + 0.4 * range_efficiency + 0.2. The +0.2 floor ensures that even with zero participation and zero efficiency, the adjusted momentum retains 20% of the raw signal so the oscillator does not flatline completely.
Adjusted momentum = raw momentum × quality blend.
State classification (mutually exclusive):
Strong Bull : raw momentum at or above +threshold and participation at or above 0.55
Strong Bear : raw momentum at or below −threshold and participation at or above 0.55
Thin : absolute raw momentum at or above threshold and participation below 0.35 — momentum without volume, a warning state
Quiet Accumulation : absolute raw momentum below the quiet threshold and volume percentile above the quiet-volume floor — flat price but rising participation
Noisy / Low Quality : the catch-all when none of the above apply
The histogram bar color reflects the current state.
Repainting and data integrity
All factors are computed on confirmed bar values; alerts are gated by barstate.isconfirmed. No request.security() calls are made — the script operates entirely on the chart timeframe.
How to read the chart
The primary plot is the adjusted-momentum histogram, colored by state.
A thin overlay line shows the same value with continuous color for easy zero-line reading.
Reference lines at zero and at ±1 standard deviation provide context for how extreme the current reading is.
Hidden plots expose raw momentum, participation, volume percentile, and direction so they are available in the Data Window.
The dashboard panel shows the current state in the header, then numeric readings for raw momentum (in z-units), adjusted momentum, volume percentile, participation, range efficiency, and the quality blend.
Inputs
Inputs are grouped into three sections.
Core Settings : ROC length, percentile / z-score lookback, EMA slope length, slope lookback bars, strong-momentum z-threshold, quiet-accumulation maximum z, quiet-accumulation minimum volume percentile.
Visual Settings : zero-line toggle, ±1σ band toggle, dashboard toggle, panel position and size, panel background color.
Any Alert() function call conditions : per-alert toggles.
Alerts
Four alert conditions are provided, each firing on the first bar the state is entered:
Strong Bull Momentum
Strong Bear Momentum
Quiet Accumulation Detected
Momentum Without Volume (the "Thin" warning state)
Each is declared via alertcondition() and is fired programmatically through alert() when the corresponding input toggle is enabled, with alert.freq_once_per_bar_close. Alert messages include {{ticker}} and {{interval}} placeholders.
How to use this script
This is a confirmation indicator. It does not generate entries on its own.
When considering an entry on price strength alone, check this indicator. A Strong Bull or Strong Bear state confirms that volume and close location support the move.
The "Thin" state is a warning. A breakout that prints during a Thin reading should be treated more cautiously than the same breakout during Strong Bull.
The Quiet Accumulation state can identify periods of base-building before a move and is useful as a "watchlist" signal.
Use alongside a setup-specific indicator for entry timing.
Limitations and honest caveats
Volume quality varies dramatically between markets. On crypto exchanges, wash-trading and bot-driven order flow can produce misleading volume percentile readings. Apply with awareness.
Z-score normalization requires the lookback to contain a representative variety of states. On instruments with strong regime changes, early-bar z-scores may be unreliable until the lookback fills.
The close-location alignment factor reads single-bar close behavior. On gappy markets or after market closes, the alignment may not reflect intraday order flow.
The script does not signal direction independently; it adjusts and labels momentum that is already present.
The +0.2 floor in the quality blend is a design choice to avoid flat-lining the oscillator. Users who want a strict "zero adjustment when participation is zero" reading can set the participation weights higher and adjust the floor by modifying the source code.
Disclaimer
This script is published for informational and educational purposes. It is not investment advice and is not a recommendation to buy or sell any instrument. Adjusted momentum is a descriptive measure, not a prediction of future price. Users are solely responsible for their own trading decisions and risk management.
Indikator

Heisenberg Uncertainty Bands [JOAT]HEISENBERG UNCERTAINTY BANDS
A novel band-and-state engine inspired by the Heisenberg uncertainty principle: the recognition that for a market, just as for a quantum particle, you cannot simultaneously be certain about both position (where price is) and momentum (how fast it is moving). Heisenberg Uncertainty Bands measures both uncertainties, tracks their empirical floor, classifies the current market into one of three quantum-inspired states — pure position |x⟩, pure momentum |p⟩, or mixed |ψ⟩ — and projects bands around price accordingly.
The principle, translated
In quantum mechanics, Δx · Δp ≥ ℏ/2 — the product of the position uncertainty and the momentum uncertainty cannot fall below a constant called Planck's reduced. For markets the analogue is:
Δx — the rolling standard deviation of price over a configurable window. The uncertainty in where price is sitting.
Δp — the rolling standard deviation of returns (log or arithmetic, configurable) over a separate window. The uncertainty in how fast price is moving.
ℏ̂ (hbar-hat) — the EMA-smoothed long-run product Δx · Δp. The script's empirical estimate of the market-specific lower bound.
Just like in physics, when the market is certain about position (price has been stable), it becomes uncertain about momentum (next direction is unknown) — and vice versa. The script measures both, computes the product, compares it to the empirical floor, and uses the ratio Δx/Δp as the state classifier.
Three quantum states
Pure Position State |x⟩ — Δx/Δp below the position threshold (default 0.40). Price is constrained to a tight band; the next directional move is uncertain. Yellow palette.
Pure Momentum State |p⟩ — Δp/Δx below the momentum threshold (default 0.40). Direction is committed; the range is widening. Magenta palette.
Mixed State |ψ⟩ — neither pure state condition holds. Violet palette.
The state badge on the right of the chart shows the bra-ket glyph (Unicode |x⟩ / |p⟩ / |ψ⟩ by default; can fall back to plain POS / MOM / MIX if your font lacks the brackets). A state cooldown (default 3 bars) debounces flicker.
Band projection
Two band families are projected around the live mid price:
Position bands — mid ± k × Δx. Solid by default. The classic "how wide is price ranging right now" envelope.
Momentum bands — mid ± k × (Δp scaled to the price axis). Dashed by default (configurable: Dashed / Dotted / Solid). Projected so their visual range matches the position bands.
When the two families are far apart in width, the state is decisive (|x⟩ if position is much tighter, |p⟩ if momentum is much tighter). When they are similar, the state is mixed.
Optional uncertainty-score candle tint
A toggleable layer recolours each candle based on how far the current Δx · Δp product deviates from the empirical floor ℏ̂. When the product is at the floor, the market is at its quantum-mechanical minimum — the most decisive setup; further from the floor means the market is "spending uncertainty" on both axes simultaneously.
Visual system
Position bands (solid, gradient fill optional).
Momentum bands (dashed / dotted / solid).
Mid line (style configurable).
State badge (right-side floating, configurable offset and size).
Background tint by state (configurable transparency, institutional default).
Optional candle re-tint by uncertainty score.
A locked Plasma palette (yellow position / magenta momentum / violet mixed on a deep-void ground) gives the chart a distinctive physics-inspired identity.
Dashboard
Monospaced table, positionable to any of nine corners, optional compact-no-header mode. Surfaces:
Current Δx and Δp values.
Δx · Δp product and its ratio to the ℏ̂ floor.
Δx / Δp ratio (drives the state).
Current state (|x⟩ / |p⟩ / |ψ⟩) with bar age.
Last state change with bars-ago.
Return mode (Log / Arithmetic) in use.
Alerts
Three alert conditions:
Pure Position State entry
Pure Momentum State entry
Mixed State return
How to read it
Two reads, in order of conviction:
Pure Momentum State |p⟩ entry is the script's directional commitment signal. Momentum has decisively exceeded position uncertainty — the move is real. Trend-following tools and breakout entries become high-conviction.
Pure Position State |x⟩ is the coil. Range has clamped down, direction is undecided. Reversion tools become high-conviction inside the band; the next state transition (back to |ψ⟩ or jumping to |p⟩) often produces a decisive breakout.
When Δx · Δp is close to ℏ̂ (the empirical floor) the market is at its most efficient — there is no slack in either axis to spare. These bars often coincide with the cleanest reversals and breakouts; the candle-tint layer is there specifically to highlight them.
Suggested settings
Defaults (position window 20, momentum window 20, hbar smoothing 100, k = 2.0, state threshold 0.40) are tuned for 15m–4H on liquid markets. For lower timeframes drop both windows to 10–14. For HTF (4H+) raise both to 30–50. Log returns are the theoretically-correct mode and the recommended default; switch to Arithmetic only if your instrument has trivially small price scale.
Originality
The implementation — the Δx / Δp dual-uncertainty pipeline, the EMA-smoothed empirical ℏ̂ floor, the three-state quantum-inspired classifier with bra-ket labelling, the dual-band projection with auto-scale, the uncertainty-score candle tint, the cooldown-debounced state machine, and the plasma palette — is JOAT-original. No third-party code reused. The Heisenberg principle is fundamental physics; the financial-market analogue and its implementation here are original work.
Limitations
The Heisenberg analogy is structural, not literal — markets do not obey the quantum-mechanical commutator relation; the script uses the concept of an inviolable joint-uncertainty floor as a market-regime classifier. The empirical floor ℏ̂ is estimated by EMA over a long window (default 100 bars) — on instruments with very short history the floor is approximate. State classification can flicker across the threshold; the cooldown is there to suppress this and is tunable.
—
-made with passion by jackofalltrades
Indikator

MACD Momentum Entry Engine [trade_w_samet]🎯 MACD Momentum Entry Engine
MACD Momentum Entry Engine is a structured momentum-analysis and visual trade-model indicator designed to help traders study confirmed MACD events, momentum quality, directional persistence, market regime, trend alignment, candle confirmation, and multi-target risk references directly from one coordinated workflow.
The script is built around one central idea:
A MACD event should not automatically become an entry signal.
Instead of treating every MACD crossover as equally meaningful, the engine first identifies the type of momentum event, then evaluates its strength, expansion, slope, acceleration, market environment, candle quality, directional persistence, and optional trend alignment before a permanent LONG or SHORT setup is accepted.
The indicator includes:
• Configurable MACD fast, slow, and signal lengths
• EMA, SMA, RMA, and WMA calculation options
• Early Trigger and Momentum Confirmed entry timing
• Reversal, Continuation, Zero-Line Reclaim, and Momentum Expansion setups
• A transparent 0–100 Momentum Quality Score
• Alignment, histogram strength, expansion, slope, and acceleration scoring
• Loose, Balanced, Strict, and Off quality modes
• A separate 0–100 Anti-Chop Market Regime Score
• ADX, price efficiency, EMA separation, and volatility-expansion analysis
• A separate 0–100 Entry Qualification Score
• Candle body, close location, MACD separation, persistence, impulse, and trigger-context analysis
• A final composite setup score
• A+, A, B, and C internal setup grades
• Optional chart EMA, confirmed higher-timeframe EMA, and combined trend bias
• Confirmed higher-timeframe calculations
• Zero-line directional filtering
• ATR-normalized absolute histogram-strength filtering
• Internal signal cooldown and same-bar re-entry protection
• One-active-trade-at-a-time visual management
• ATR-based and XAUUSD fixed-pip risk models
• Three visual take-profit levels
• Stop First and Targets First same-bar assumptions
• Equal-third internal trade-model accounting
• Active Entry, TP1, TP2, TP3, and SL lines
• Active reward and risk boxes on the main chart
• TP3-only historical trade-model preservation
• Separate SL, Closed TP1, Closed TP2, and TP3 result labels
• Adjustable LONG, SHORT, and result-label sizes
• MACD histogram, line, signal line, momentum background, and anti-chop background
• Neon LONG and SHORT dots directly on the MACD line
• A compact main-chart dashboard
• XAUUSD symbol verification and mismatch warning
• Static TradingView alert conditions
• Detailed dynamic alert() messages
• Data Window diagnostics
• Confirmed-close permanent signals
The purpose of this script is to provide a structured way to study when a MACD event is supported by broader momentum and market context.
It is not financial advice.
It is not an automated trading system.
It does not guarantee profitable trades.
It does not execute broker orders.
It does not replace personal analysis, position sizing, or risk management.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, MACD Momentum Entry Engine does the following:
• Calculates a configurable MACD using the selected average types.
• Separates the visual histogram scale from the calculation scale.
• Detects confirmed MACD crossovers and zero-line events.
• Identifies Reversal, Continuation, Zero-Line Reclaim, and Expansion setup types.
• Optionally accepts the event immediately through Early Trigger mode.
• Optionally arms the setup and waits for renewed momentum through Momentum Confirmed mode.
• Measures momentum alignment, histogram strength, histogram expansion, MACD slope, and acceleration.
• Produces separate bullish and bearish 0–100 Momentum Quality Scores.
• Measures market regime using ADX, directional efficiency, EMA separation, and volatility expansion.
• Produces a separate 0–100 Market Regime Score.
• Evaluates candle direction, body quality, close location, MACD separation, persistence, and price impulse.
• Produces separate bullish and bearish Entry Qualification Scores.
• Combines momentum, regime, and entry quality into a final composite score.
• Assigns an internal A+, A, B, or C grade.
• Applies optional chart EMA and confirmed higher-timeframe EMA bias.
• Applies zero-line, absolute-strength, cooldown, and trade-slot controls.
• Confirms permanent LONG and SHORT signals only after candle close.
• Opens one visual trade model from the confirmed signal-bar close.
• Calculates Entry, Stop Loss, TP1, TP2, and TP3.
• Tracks targets and stop events from the next candle onward.
• Applies the selected same-bar processing assumption.
• Preserves completed TP3 models when historical display is enabled.
• Removes trade drawings after SL, Closed TP1, or Closed TP2 outcomes.
• Converts the original entry label into the final result for non-TP3 outcomes.
• Adds a separate electric-purple FULL TARGET label for TP3 outcomes.
• Displays Momentum, Trend, Regime, Trade, Last Result, and Protection states in the bottom-right dashboard.
• Provides static and dynamic alert options.
• Exposes diagnostic values through TradingView’s Data Window.
The indicator does not use machine-learning prediction.
Its scores are not probabilities.
Its labels do not promise future direction.
The script is a rule-based educational momentum framework that explains how a raw MACD event becomes an accepted or rejected setup.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
The core idea behind MACD Momentum Entry Engine is that a crossover alone contains limited context.
A basic crossover only confirms that one MACD line has moved through another.
It does not automatically explain:
• whether the histogram is expanding
• whether momentum is accelerating
• whether the move is occurring in a directional or choppy market
• whether the signal candle supports the direction
• whether MACD separation is meaningful relative to recent behavior
• whether momentum has persisted
• whether price is aligned with an optional trend filter
• whether a recent signal already occurred
• whether a visual trade model is already active
The engine therefore uses a staged sequence:
MACD event
→ setup classification
→ momentum-quality scoring
→ optional trend-bias validation
→ anti-chop regime scoring
→ entry qualification
→ additional signal filters
→ confirmed signal
→ visual trade model
→ TP / SL lifecycle
→ result handling
For bullish conditions, the script studies upward MACD transitions, positive histogram alignment, renewed expansion, positive slope, positive acceleration, bullish candle behavior, and directional persistence.
For bearish conditions, the same process is mirrored.
The purpose is not to find the largest possible number of signals.
The purpose is to make the acceptance process visible, configurable, and understandable.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE BUY/SELL INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
MACD Momentum Entry Engine is not designed to be used as a blind buy/sell system.
A raw MACD event must move through multiple stages:
A crossover or momentum event appears
→ the event is classified
→ the momentum-quality layer is evaluated
→ the trend-bias layer is evaluated
→ the anti-chop layer is evaluated
→ the candle and entry-quality layer is evaluated
→ zero-line and absolute-strength filters are checked
→ cooldown and active-trade restrictions are checked
→ the setup must remain valid at candle close
→ a permanent LONG or SHORT setup is printed
→ Entry, SL, TP1, TP2, and TP3 are projected
→ the trade model is monitored from the following candle
→ the model closes at TP3 or Stop
→ the final chart result is preserved or cleaned
Each module serves a different purpose.
The MACD core defines the momentum relationship.
The setup engine identifies what kind of event occurred.
The momentum-quality engine measures the internal strength of that event.
The anti-chop engine measures whether the broader environment is directional enough for the selected mode.
The entry-qualification engine evaluates the signal candle and immediate price response.
The trend-bias engine optionally restricts direction.
The trade engine standardizes the visual risk framework.
The dashboard explains the current engine state.
This makes the script a coordinated momentum-analysis workflow rather than a basic crossover marker.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The script operates through connected calculation stages.
First, it calculates every supported moving-average type on every candle.
The selected average type is then used for the fast MACD average, slow MACD average, and signal average.
The MACD line is the difference between the selected fast and slow averages.
The histogram is the difference between the MACD line and the signal line.
fastAverage = f_selectMa(macdMaType, fastEma, fastSma, fastRma, fastWma)
slowAverage = f_selectMa(macdMaType, slowEma, slowSma, slowRma, slowWma)
macdLine = fastAverage - slowAverage
signalLine = f_selectMa(signalMaType, signalEma, signalSma, signalRma, signalWma)
histogram = macdLine - signalLine
The histogram visual multiplier changes only the displayed column length.
It does not change:
• the MACD line
• the signal line
• the histogram used by calculations
• quality scores
• setup detection
• trade results
After the MACD core is calculated, the engine measures:
• absolute histogram strength
• one-bar histogram expansion
• MACD slope
• momentum acceleration
• adaptive baselines for each measurement
The setup engine then checks the enabled event types.
The quality, trend, regime, qualification, and additional-filter stages determine whether the setup is eligible.
A final permanent signal is accepted only after the candle closes and every enabled condition remains valid.
━━━━━━━━━━━━━━━━━━━━━━
🟢 BULLISH MACD MOMENTUM LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A bullish setup begins with one of four enabled event types.
Bullish Reversal
A bullish MACD crossover occurs while the MACD line remains below zero.
This represents a momentum turn from the negative side of the zero line.
Bullish Continuation
A bullish MACD crossover occurs while the MACD line is at or above zero.
This represents renewed bullish alignment on the positive side.
Bullish Zero-Line Reclaim
The MACD line crosses above zero while:
• MACD is above the signal line
• the histogram is positive
• the bar is confirmed
Bullish Momentum Expansion
The histogram resumes positive expansion after a short contraction while:
• MACD remains above the signal line
• MACD slope is positive
• no new crossover is being used on the same bar
• no new zero-line cross is being used on the same bar
The event must then pass the active momentum-quality requirement.
When enabled, it must also pass:
• chart EMA bias
• confirmed higher-timeframe EMA bias
• EMA slope confirmation
• ATR distance from the trend EMA
• anti-chop regime requirement
• entry qualification
• bullish candle direction
• minimum MACD separation
• momentum persistence
• zero-line direction
• absolute histogram strength
• cooldown
• active-trade availability
The final signal uses confirmed-bar logic.
bullishSignal =
barstate.isconfirmed and
bullishEntryCandidate and
bullishZeroLinePass and
absoluteStrengthPass and
bullishQualityPass and
bullishTrendPass and
antiChopPass and
bullishQualificationPass and
bullishCandlePass and
separationPass and
bullishPersistencePass and
cooldownPass and
tradeSlotAvailable
When every active rule passes, the script can display:
• a neon green dot on the MACD line
• a LONG label on the main chart
• setup type, grade, and score information
• a visual Entry, SL, TP1, TP2, and TP3 model
This confirms that the configured bullish momentum conditions were valid at candle close.
It does not mean price must continue upward.
━━━━━━━━━━━━━━━━━━━━━━
🔴 BEARISH MACD MOMENTUM LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A bearish setup mirrors the bullish process.
Bearish Reversal
A bearish MACD crossover occurs while the MACD line remains above zero.
This represents a momentum turn from the positive side of the zero line.
Bearish Continuation
A bearish MACD crossover occurs while the MACD line is at or below zero.
This represents renewed bearish alignment on the negative side.
Bearish Zero-Line Reclaim
The MACD line crosses below zero while:
• MACD is below the signal line
• the histogram is negative
• the bar is confirmed
Bearish Momentum Expansion
The histogram resumes negative expansion after a short contraction while:
• MACD remains below the signal line
• MACD slope is negative
• no new bearish crossover is being used on the same bar
• no new bearish zero-line cross is being used on the same bar
The setup must then pass the same quality, trend, regime, candle, separation, persistence, strength, cooldown, and trade-slot controls.
A permanent SHORT signal appears only when all active conditions remain valid at candle close.
The script can then display:
• a neon red dot on the MACD line
• a SHORT label on the main chart
• setup type, grade, and score information
• Entry, SL, TP1, TP2, and TP3 references
This confirms that the configured bearish momentum conditions were valid at candle close.
It does not guarantee continued downside movement.
━━━━━━━━━━━━━━━━━━━━━━
💎 MACD MOMENTUM QUALITY FILTER SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes a separate bullish and bearish Momentum Quality Score.
The quality layer evaluates five components.
Alignment — maximum 20 points
Bullish alignment requires:
• MACD above the signal line
• positive histogram
Bearish alignment requires:
• MACD below the signal line
• negative histogram
Histogram Strength — maximum 25 points
The absolute histogram value is compared with an adaptive EMA baseline.
This measures whether current separation is meaningful relative to recent MACD behavior.
Histogram Expansion — maximum 20 points
The engine measures the one-bar change in absolute histogram strength.
Points are awarded only when the histogram is expanding in the setup direction.
MACD Slope — maximum 20 points
Bullish setups require positive slope for this component.
Bearish setups require negative slope.
The slope magnitude is compared with its own adaptive baseline.
Momentum Acceleration — maximum 15 points
Acceleration measures the change in MACD slope.
Positive acceleration supports bullish scoring.
Negative acceleration supports bearish scoring.
bullishQualityScore = f_clamp(
bullishAlignmentScore +
bullishHistogramStrengthScore +
bullishExpansionScore +
bullishSlopeScore +
bullishAccelerationScore,
0.0,
100.0
The available quality modes are:
Off
Removes the minimum Momentum Quality Score restriction.
Loose
Requires a minimum score of 45.
Balanced
Requires a minimum score of 60.
Strict
Requires a minimum score of 75 and is the default.
The score is not a win rate.
It is not a probability.
It measures how closely the current MACD event matches the engine’s momentum-strength framework.
━━━━━━━━━━━━━━━━━━━━━━
📏 VOLATILITY / ATR NORMALIZATION FILTER
━━━━━━━━━━━━━━━━━━━━━━
The indicator uses ATR normalization to compare certain values across changing volatility conditions.
The Absolute Strength Filter calculates:
Absolute Histogram Strength = |Histogram| / ATR × 100.
This value is used as an additional minimum-strength condition.
The default settings are:
• Normalization ATR Length: 14
• Minimum Absolute Strength: 1.0
• Use Absolute Strength Filter: enabled
ATR normalization helps reduce dependence on the raw numerical scale of a market.
For example, a raw MACD histogram value cannot be compared directly across instruments with very different prices and volatility.
Normalization places the histogram in relation to the instrument’s recent ATR.
The same ATR framework is also used by:
• optional price-to-EMA trend buffers
• EMA-separation regime measurement
• price-impulse scoring
• ATR-based trade management
ATR normalization does not make one configuration universal.
Symbols, sessions, exchanges, and data feeds can still behave differently.
━━━━━━━━━━━━━━━━━━━━━━
🕯️ DISPLACEMENT QUALITY FILTER
━━━━━━━━━━━━━━━━━━━━━━
The entry-qualification engine evaluates whether the signal candle shows enough directional response.
The Candle component contributes up to 25 points.
It is divided into:
Directional Body — maximum 12.5 points
For bullish setups, the engine measures the positive candle body relative to the full candle range.
For bearish setups, it measures the negative body.
Close Location — maximum 12.5 points
Bullish setups receive more points when the close is nearer the candle high.
Bearish setups receive more points when the close is nearer the candle low.
Price Impulse contributes up to 15 additional points.
The engine compares the one-bar directional price movement with ATR.
A bullish price impulse measures positive close-to-close displacement.
A bearish price impulse measures negative close-to-close displacement.
This layer does not predict the next candle.
It measures whether the completed signal candle supports the direction of the MACD event.
━━━━━━━━━━━━━━━━━━━━━━
📊 REACTION STRENGTH FILTER
━━━━━━━━━━━━━━━━━━━━━━
The engine includes a separate Entry Qualification Score.
Its components are:
Candle Quality — maximum 25 points
Combines directional body and close location.
MACD Separation — maximum 25 points
Measures current histogram separation relative to its adaptive baseline.
Momentum Persistence — maximum 20 points
Measures how long directional MACD and histogram alignment has remained active.
Price Impulse — maximum 15 points
Measures directional close-to-close movement relative to ATR.
Trigger Context — maximum 15 points
Confirms that an eligible setup event is currently active.
The total is limited to 0–100.
Available modes are:
Off
Removes the minimum Entry Qualification Score restriction.
Loose
Requires a minimum score of 45.
Balanced
Requires a minimum score of 60.
Strict
Requires a minimum score of 75 and is the default.
The final signal also uses internal candle-direction, separation, and persistence requirements.
These internal parameters remain active in the background to keep the public settings menu cleaner.
The Entry Qualification Score is not a verified accuracy figure.
It describes the quality of the completed entry context according to the script’s rules.
━━━━━━━━━━━━━━━━━━━━━━
🧼 CONFIRMED SIGNAL FILTER
━━━━━━━━━━━━━━━━━━━━━━
Permanent LONG and SHORT signals wait for candle close.
The engine uses confirmed-bar checks on:
• MACD crossovers
• zero-line crossings
• expansion triggers
• momentum confirmation
• final LONG and SHORT conditions
The higher-timeframe trend layer also uses previous completed higher-timeframe values.
htfConfirmedClose = request.security(
syminfo.tickerid,
higherTimeframe,
close ,
gaps = barmerge.gaps_off,
lookahead = barmerge.lookahead_on
)
htfConfirmedEma = request.security(
syminfo.tickerid,
higherTimeframe,
ta.ema(close, trendLength) ,
gaps = barmerge.gaps_off,
lookahead = barmerge.lookahead_on
)
This approach prevents an unfinished higher-timeframe candle from becoming the permanent trend reference.
Entry Timing provides two workflows.
Early Trigger
Uses the confirmed setup event directly.
Momentum Confirmed
Arms the setup and waits for a later confirmed candle with:
• continued MACD alignment
• directional histogram
• renewed histogram expansion
• directional MACD slope
The confirmation opportunity is temporary.
If renewed momentum does not appear inside the internal window, the armed setup expires.
The script does not plot final signals into earlier candles.
Historical results can still change when:
• settings change
• symbol data changes
• timeframe changes
• the data provider revises history
• the available chart-history range changes
━━━━━━━━━━━━━━━━━━━━━━
🎯 ENTRY MODEL
━━━━━━━━━━━━━━━━━━━━━━
When a final LONG or SHORT setup passes every enabled condition, the trade engine can create a visual trade model.
The Entry reference is the close of the confirmed signal candle.
For a LONG model:
• Stop is below Entry
• TP1 is above Entry
• TP2 is above TP1
• TP3 is above TP2
For a SHORT model:
• Stop is above Entry
• TP1 is below Entry
• TP2 is below TP1
• TP3 is below TP2
tradeEntryPrice := close
tradeStopPrice := tradeEntryPrice - selectedStopDistance
tradeTp1Price := tradeEntryPrice + selectedTp1Distance
tradeTp2Price := tradeEntryPrice + selectedTp2Distance
tradeTp3Price := tradeEntryPrice + selectedTp3Distance
The model begins checking TP and SL from the following candle.
This prevents the signal candle’s earlier high or low from being treated as though it occurred after the close-based entry.
The engine stores:
• direction
• entry bar
• entry price
• stop price
• TP1 price
• TP2 price
• TP3 price
• initial risk
• target R values
• TP1 and TP2 progress
• setup type
• setup grade
• risk model
• original signal label
The displayed model is an educational chart reference.
It is not a broker order.
━━━━━━━━━━━━━━━━━━━━━━
🛑 ATR STOP-LOSS MODEL
━━━━━━━━━━━━━━━━━━━━━━
The indicator includes two risk models.
ATR Based
Stop distance is calculated as:
ATR × ATR Stop Multiplier.
The default settings are:
• ATR Length: 14
• ATR Stop Multiplier: 1.50
• TP1: 0.50R
• TP2: 1.00R
• TP3: 1.50R
The minimum distance is protected by the symbol’s minimum tick.
XAUUSD Fixed Pips
Stop and target distances use:
Selected Pips × XAUUSD Pip Size.
The default settings are:
• Pip Size: 0.01
• Stop Loss: 1000 pips
• TP1: 500 pips
• TP2: 1000 pips
• TP3: 1500 pips
Under the common 0.01 convention, those values correspond to:
• Stop distance: 10.00 price units
• TP1 distance: 5.00 price units
• TP2 distance: 10.00 price units
• TP3 distance: 15.00 price units
Broker conventions can differ.
Users should verify their symbol specification before relying on fixed-pip distances.
The XAUUSD protection system checks the symbol.
The dashboard shows:
• ✅ XAUUSD VERIFIED when XAUUSD Fixed Pips is used on a recognized XAUUSD symbol
• ⚠️ CHECK SYMBOL when the mode is used on another symbol
• 🛡️ ATR MODE when ATR Based is selected
The warning does not block calculations.
It tells the user to verify pip size and target distances.
━━━━━━━━━━━━━━━━━━━━━━
🎯 TAKE-PROFIT RR MODEL
━━━━━━━━━━━━━━━━━━━━━━
The visual model contains three take-profit levels.
ATR Based mode calculates targets from the initial stop distance:
TP1 Distance = Initial Risk × TP1 RR.
TP2 Distance = Initial Risk × TP2 RR.
TP3 Distance = Initial Risk × TP3 RR.
XAUUSD Fixed Pips mode uses independent fixed target distances.
The script enforces the following order:
TP1 < TP2 < TP3.
If a selected value would violate that order, the next target is moved at least one minimum tick beyond the prior target.
The trade model internally treats the position as three equal portions.
Each target represents one-third of the model.
If Stop is reached after TP1 or TP2, the script calculates an internal net-R result from:
• the portions already modeled as closed at reached targets
• the remaining portion or portions modeled at Stop
This internal calculation supports Data Window counters.
It is not broker-verified performance.
It does not account for:
• spread
• commission
• slippage
• latency
• partial-fill differences
• financing
• order rejection
• execution venue behavior
━━━━━━━━━━━━━━━━━━━━━━
📦 ACTIVE TP / SL BOX SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
When a confirmed trade model opens, the script can draw on the main chart:
• Entry line
• TP1 line
• TP2 line
• TP3 line
• Stop Loss line
• TP1 reward box
• TP2 reward box
• TP3 reward box
• SL risk box
• LONG or SHORT label
The Entry line is white.
The TP lines are green and initially dashed.
The SL line is red and solid.
The SL box uses a solid border.
When a target is reached:
• the corresponding box becomes more visible
• the corresponding target line becomes solid
• the target line becomes thicker
• the dynamic target alert can fire
When TP3 is reached:
• the complete model closes
• the original LONG or SHORT label remains
• a separate electric-purple TP3 FULL TARGET label appears
• the trade model can remain historically visible
When the model closes at Stop before TP3:
• all active boxes are deleted
• all active trade lines are deleted
• the original LONG or SHORT label is converted into the final result
• the final result becomes SL, CLOSED TP1, or CLOSED TP2
Only TP3 outcomes can retain completed historical boxes and lines.
This is a chart-cleanliness decision.
It does not imply that other outcomes did not occur.
━━━━━━━━━━━━━━━━━━━━━━
🚦 ONE ACTIVE TRADE AT A TIME
━━━━━━━━━━━━━━━━━━━━━━
The script uses one-active-trade-at-a-time visual management.
When the trade engine is enabled:
• a new trade model cannot open while another model is active
• a new trade cannot open on the same candle that closed the previous model
• the internal setup engine continues calculating
• permanent signals are restricted by trade-slot availability
This prevents overlapping Entry, TP, and SL structures.
It also keeps the trade lifecycle easier to interpret.
When the trade engine is disabled, qualified signals can still be evaluated without opening a visual trade model.
The one-active-model rule is a visual and analytical design choice.
It does not restrict the user’s personal trading activity.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ SAME-CANDLE TP / SL HANDLING
━━━━━━━━━━━━━━━━━━━━━━
Trade monitoring begins after the entry candle.
If a later historical candle touches both Stop and one or more targets, standard OHLC data does not reveal the exact intrabar sequence.
The indicator therefore provides two assumptions.
Stop First
If Stop and a target are both touched on the same candle, Stop is processed first.
This is the default and more conservative assumption.
Targets First
Reached targets are processed before Stop.
If TP3 is reached, the model closes at TP3.
Otherwise, remaining portions can close at Stop.
Neither mode reconstructs tick-level execution.
The indicator does not know:
• whether the high occurred before the low
• the bid/ask path
• actual fill sequence
• spread at the time
• slippage
• queue priority
• partial fills
The selected same-bar rule is a modeling assumption required by the limits of OHLC candles.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ MACD MOMENTUM LABELS
━━━━━━━━━━━━━━━━━━━━━━
The indicator uses separate entry and result labels.
Entry labels display:
🚀 LONG
or:
🔴 SHORT
Entry Label Content provides:
Direction Only
Displays only LONG or SHORT.
Grade
Displays direction and setup grade.
Score + Grade
Displays direction, grade, and rounded composite score.
The default is Score + Grade.
LONG and SHORT label sizes can be adjusted independently.
Both default to Small.
The label tooltip contains:
• setup direction
• setup type
• setup grade
• composite score
• Momentum Quality Score
• Entry Qualification Score
• Market Regime Score
• trend-bias state
Result labels include:
🛑 SL
⚠️ CLOSED TP1
✅ CLOSED TP2
🏆 TP3 HIT
✅ FULL TARGET
SL, Closed TP1, and Closed TP2 transform the original entry label.
TP3 creates a separate result label and preserves the original entry label.
All chart-label text uses bold and italic formatting.
━━━━━━━━━━━━━━━━━━━━━━
📍 MACD DISPLAY MODES
━━━━━━━━━━━━━━━━━━━━━━
The indicator operates in a separate MACD pane while selected trade visuals, entry labels, and the dashboard are forced onto the main price chart.
The MACD pane can display:
MACD Line
A white line representing the difference between the selected fast and slow averages.
Signal Line
A red line representing the selected signal smoothing.
Histogram
Color changes communicate momentum condition:
• stronger green for bullish expansion
• softer green for bullish contraction
• stronger red for bearish expansion
• softer red for bearish contraction
Histogram Visual Length
The default multiplier is 1.60.
This changes visual column length only.
It does not affect calculations.
Neon Signal Dots
Qualified LONG setups produce a neon green glow and center dot on the MACD line.
Qualified SHORT setups produce a neon red glow and center dot.
Momentum Background
The pane background changes according to strong or weak bullish and bearish momentum states.
Anti-Chop Background
A neutral gray background can identify conditions blocked by the Anti-Chop Engine.
Each major visual element can be shown or hidden independently.
━━━━━━━━━━━━━━━━━━━━━━
🧹 SETUP INVALIDATION
━━━━━━━━━━━━━━━━━━━━━━
Not every raw MACD event remains eligible.
A setup can be rejected or expire because:
• its momentum score is below the selected threshold
• trend bias does not permit the direction
• the market regime is below the active Anti-Chop threshold
• the Entry Qualification Score is insufficient
• candle direction does not support the setup
• MACD separation is insufficient
• directional persistence is insufficient
• the zero-line filter blocks the direction
• normalized histogram strength is too low
• the signal cooldown is active
• another visual trade is active
• a trade closed on the current candle
• Momentum Confirmed mode does not receive renewed expansion in time
• an opposite raw setup replaces the armed direction
The internal cooldown is eight bars.
Momentum Confirmed mode uses a temporary internal confirmation window.
These background controls are intentionally not exposed as advanced public inputs.
They remain part of the engine’s consistency rules.
A rejected event is not displayed as a permanent entry signal.
━━━━━━━━━━━━━━━━━━━━━━
📟 DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━
The indicator includes a compact dashboard in the bottom-right corner of the main price chart.
The dashboard displays:
Momentum
Possible states include:
• STRONG LONG
• LONG
• STRONG SHORT
• SHORT
• NEUTRAL
Trend
Possible states include:
• BULLISH
• BEARISH
• NEUTRAL
• OFF
Regime
Possible states include:
• TRENDING
• DEVELOPING
• CHOP
• OFF
Trade
Possible states include:
• WAITING
• LONG ACTIVE
• LONG TP1 REACHED
• LONG TP2 REACHED
• SHORT ACTIVE
• SHORT TP1 REACHED
• SHORT TP2 REACHED
Last
Displays the most recent closed model result:
• SL
• CLOSED TP1
• CLOSED TP2
• TP3
Protection
Displays:
• ATR MODE
• XAUUSD VERIFIED
• CHECK SYMBOL
The dashboard is not TradingView Strategy Tester.
It does not display audited brokerage results.
Its states are based on the indicator’s own rule-based calculations.
━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
MACD Momentum Entry Engine includes static TradingView alert conditions for:
• MACD Momentum LONG
• MACD Momentum SHORT
• TP1
• TP2
• TP3
• Stop Loss
• XAUUSD Mode Warning
The XAUUSD warning condition is limited to a qualified entry bar when Fixed Pips mode is active on a non-XAUUSD symbol.
The script also includes detailed dynamic alert() messages.
Dynamic Entry messages can include:
• direction
• symbol
• timeframe
• setup type
• setup grade
• composite score
• risk model
• Entry
• Stop Loss
• TP1
• TP2
• TP3
• XAUUSD mismatch warning when relevant
Dynamic target messages can include:
• target name
• direction
• symbol
• timeframe
• reached target price
• Entry
• Stop Loss
• TP1
• TP2
• TP3
Dynamic stop messages can include:
• final result
• direction
• symbol
• timeframe
• Entry
• exit price
• Stop Loss
• whether TP1 or TP2 was reached first
Alerts are monitoring tools.
They do not place or manage broker orders.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
For static conditions:
1. Add MACD Momentum Entry Engine to the chart.
2. Open TradingView’s Create Alert window.
3. Select the indicator as the condition.
4. Choose LONG, SHORT, TP1, TP2, TP3, SL, or XAUUSD Mode Warning.
5. Select a frequency appropriate for confirmed-candle monitoring.
6. Test the alert before relying on it.
For detailed dynamic messages:
1. Enable Detailed Dynamic Alerts in the indicator settings.
2. Open TradingView’s Create Alert window.
3. Select MACD Momentum Entry Engine .
4. Select Any alert() function call.
5. Configure the delivery method.
6. Test the complete message format.
Alert delivery can depend on:
• TradingView servers
• the selected symbol
• the selected timeframe
• market-data availability
• realtime feed status
• user alert configuration
• webhook or external-service availability
Creating an alert does not guarantee broker execution.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add MACD Momentum Entry Engine to a standard candlestick chart.
2. Begin with the default MACD values of 12, 26, and 9.
3. Keep Entry Timing on Early Trigger while learning the setup types.
4. Keep Momentum Quality on Strict for the default selective profile.
5. Keep Anti-Chop on Strict.
6. Keep Entry Qualification on Strict.
7. Observe whether the event is Reversal, Continuation, Zero Reclaim, or Expansion.
8. Review the MACD histogram, line relationship, and neon signal dot.
9. Review the main-chart LONG or SHORT label.
10. Open the label tooltip to inspect the scores and setup type.
11. Review Momentum, Trend, Regime, Trade, Last Result, and Protection in the dashboard.
12. Verify the selected risk model.
13. When using XAUUSD Fixed Pips, confirm XAUUSD VERIFIED.
14. Treat Entry, SL, TP1, TP2, and TP3 as planning references.
15. Use alerts for monitoring rather than blind execution.
16. Compare every setup with personal structure, session, volatility, and risk rules.
17. Test the exact symbol, timeframe, session, and data feed personally used.
The indicator is designed for structured review.
It should not be treated as an automatic decision-maker.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
⚙️ MACD Core
Calculation Source
Selects the price source used by the MACD calculation.
Fast Length
Controls the fast average.
Default: 12.
Slow Length
Controls the slow average.
Default: 26.
Signal Length
Controls signal-line smoothing.
Default: 9.
MACD Average Type
Selects EMA, SMA, RMA, or WMA for the fast and slow averages.
Signal Average Type
Selects EMA, SMA, RMA, or WMA for the signal line.
━━━━━━━━━━━━━━━━━━━━━━
🎯 Entry Engine
Entry Timing
Early Trigger accepts the confirmed setup event directly.
Momentum Confirmed waits for renewed directional histogram expansion and MACD continuation after the setup is armed.
━━━━━━━━━━━━━━━━━━━━━━
🧠 Momentum Quality Engine
Quality Filter
Selects Off, Loose, Balanced, or Strict.
Strict is the default.
The score combines:
• alignment
• histogram strength
• histogram expansion
• MACD slope
• momentum acceleration
━━━━━━━━━━━━━━━━━━━━━━
📈 Trend Bias Engine
Trend Bias Mode
Selects:
• Off
• Chart EMA
• Higher Timeframe EMA
• Combined EMA
Off is the default.
Trend EMA Length
Controls the chart and higher-timeframe EMA.
Default: 200.
Chart EMA Slope Lookback
Controls the chart-bar lookback used to evaluate EMA direction.
Require EMA Slope Confirmation
Requires a rising EMA for LONG and falling EMA for SHORT.
Higher Timeframe
Selects the confirmed higher-timeframe context.
Default: 60 minutes.
Price-to-EMA ATR Buffer
Requires an optional minimum ATR-normalized distance between price and the trend EMA.
Zero disables the distance requirement.
━━━━━━━━━━━━━━━━━━━━━━
🧱 Anti-Chop Engine
Anti-Chop Filter
Selects Off, Loose, Balanced, or Strict.
Strict is the default.
The regime score combines:
• ADX — 35 points
• price efficiency — 30 points
• EMA separation — 20 points
• volatility expansion — 15 points
━━━━━━━━━━━━━━━━━━━━━━
✅ Entry Qualification Engine
Enable Reversal Setups
Allows MACD crossovers on the opposite side of zero.
Enable Continuation Setups
Allows MACD crossovers on the directional side of zero.
Enable Zero-Line Reclaims
Allows confirmed MACD zero-line crossings with aligned histogram and signal-line conditions.
Enable Momentum Expansions
Allows renewed histogram expansion after contraction while MACD alignment remains valid.
Entry Qualification Filter
Selects Off, Loose, Balanced, or Strict.
Strict is the default.
The score combines:
• candle quality
• MACD separation
• persistence
• price impulse
• trigger context
━━━━━━━━━━━━━━━━━━━━━━
💼 Trade Management Engine
Enable Trade Engine
Enables the one-active-trade-at-a-time visual model.
Risk Model
Selects ATR Based or XAUUSD Fixed Pips.
XAUUSD Fixed Pips is the default.
ATR Length
Controls ATR for the adaptive model.
ATR Stop Multiplier
Controls stop distance in ATR mode.
ATR TP1 Risk/Reward
Controls TP1 distance in ATR mode.
ATR TP2 Risk/Reward
Controls TP2 distance in ATR mode.
ATR TP3 Risk/Reward
Controls TP3 distance in ATR mode.
XAUUSD Pip Size
Controls the price-unit value of one selected pip.
XAUUSD Stop-Loss Pips
Controls fixed Stop distance.
XAUUSD TP1 Pips
Controls fixed TP1 distance.
XAUUSD TP2 Pips
Controls fixed TP2 distance.
XAUUSD TP3 Pips
Controls fixed TP3 distance.
Same-Bar Resolution
Selects Stop First or Targets First.
Show Active TP / SL Zones
Shows Entry, targets, Stop, boxes, and lines on the main chart.
Keep Historical TP3 Zones
Preserves completed TP3 models.
Historical TP3 Trade Limit
Limits completed TP3 models retained on the chart.
Trade Result Labels
Enables SL, Closed TP1, Closed TP2, and TP3 result labels.
SL Label Size
Controls SL result size.
Closed TP1 Label Size
Controls Closed TP1 result size.
Closed TP2 Label Size
Controls Closed TP2 result size.
TP3 Label Size
Controls the separate FULL TARGET label size.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ Signal Filters
Zero-Line Filter
Off allows both sides of zero.
Trend Direction requires LONG above zero and SHORT below zero.
Trend Direction is the default.
Use Absolute Strength Filter
Enables ATR-normalized minimum histogram strength.
Normalization ATR Length
Controls normalization.
Minimum Absolute Strength
Controls the required normalized histogram value.
━━━━━━━━━━━━━━━━━━━━━━
🎨 Visual Settings
Show MACD Line
Shows or hides the MACD line.
Show Signal Line
Shows or hides the signal line.
Show Histogram
Shows or hides histogram columns.
Histogram Visual Length
Changes histogram display scale without changing calculations.
Show MACD Neon Signal Dots
Shows qualified LONG and SHORT dots on the MACD line.
Show Momentum Background
Shows directional momentum background states.
Highlight Blocked Chop Conditions
Shows a neutral background when Anti-Chop blocks entries.
Show LONG / SHORT Labels
Shows or hides main-chart entry labels.
Entry Label Content
Selects Direction Only, Grade, or Score + Grade.
LONG Label Size
Controls LONG label size.
SHORT Label Size
Controls SHORT label size.
━━━━━━━━━━━━━━━━━━━━━━
📟 Mini Dashboard
Show Mini Dashboard
Shows or hides the compact bottom-right main-chart dashboard.
━━━━━━━━━━━━━━━━━━━━━━
🔔 Dynamic Alerts
Enable Detailed Dynamic Alerts
Enables runtime alert() messages.
For these messages, create the TradingView alert using:
Any alert() function call.
Input values are hidden from the status line.
MACD plot values are also prevented from creating status-line or price-scale labels, while diagnostic values remain available in the Data Window.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
MACD, moving averages, ATR, ADX, and trend filters are familiar technical-analysis concepts.
These concepts are not unique by themselves.
The originality of MACD Momentum Entry Engine lies in the coordinated process applied to a MACD event:
Configurable MACD event
→ setup-type classification
→ adaptive momentum-strength baselines
→ five-component Momentum Quality Score
→ optional confirmed trend-bias layer
→ four-component Anti-Chop Regime Score
→ five-component Entry Qualification Score
→ final composite score and grade
→ zero-line and normalized-strength validation
→ confirmed-close signal
→ one-active multi-target trade lifecycle
→ TP3-only historical preservation
→ non-TP3 visual cleanup
→ dynamic alerts
→ main-chart diagnostic dashboard
→ XAUUSD mode verification
Distinctive implementation features include:
• four separate setup families
• different logic for Reversal and Continuation crossovers
• zero-line reclaim detection
• renewed expansion detection without requiring a fresh crossover
• adaptive baselines for strength, expansion, slope, and acceleration
• separate bullish and bearish scoring
• a Momentum Quality Score independent from Entry Qualification
• an Anti-Chop Score independent from momentum quality
• confirmed previous higher-timeframe EMA values
• a 70/30 final composite structure
• A+, A, B, and C grades
• visual-only histogram scaling
• equal-third multi-target internal accounting
• same-candle processing assumptions
• XAUUSD symbol verification
• separate result behavior for TP3 and non-TP3 outcomes
• detailed Data Window diagnostics
The script is not a simple combination of unrelated indicators.
Every module supports the same objective: determining whether a confirmed MACD event has enough momentum, market, and entry context to become a permanent visual setup.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
Signal frequency depends on:
• fast, slow, and signal lengths
• selected average types
• Entry Timing
• enabled setup families
• Momentum Quality mode
• Trend Bias mode
• EMA length
• higher timeframe
• EMA slope requirement
• price-to-EMA buffer
• Anti-Chop mode
• Entry Qualification mode
• zero-line filter
• absolute-strength threshold
• symbol
• timeframe
• session
• volatility
• available history
• data provider
• active-trade state
Strict modes reduce accepted signals.
They do not guarantee better results.
Trend Bias Off allows the momentum engine to evaluate both directions without EMA permission.
Higher Timeframe EMA and Combined EMA should use a timeframe meaningfully above the chart timeframe.
XAUUSD Fixed Pips is designed around a selectable pip convention.
The default 0.01 value may not match every broker or synthetic symbol.
Momentum Confirmed produces later and potentially fewer signals than Early Trigger.
Histogram Visual Length does not alter logic.
Changing settings recalculates historical signals and trade models.
A setup that looks different after changing the chart range may be affected by available historical data and adaptive baselines.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
It does not guarantee profitable trades.
It does not predict future price movement.
It does not execute orders.
It does not place broker stops or targets.
It does not include spread.
It does not include commission.
It does not include slippage.
It does not include latency.
It does not model partial fills.
It does not model financing or swap.
It uses bar-based OHLC data.
Historical candles do not reveal exact intrabar order.
Stop First and Targets First are assumptions.
The setup score is not a win probability.
A+ is not a guaranteed outcome.
The Anti-Chop Score cannot identify every ranging condition.
Trend filters can delay or block valid reversals.
Trend Bias Off can allow countertrend signals.
ATR normalization does not make settings universal.
Fixed-pip conventions can differ between brokers.
XAUUSD symbol detection cannot verify a broker’s contract specification.
The dashboard is not TradingView Strategy Tester.
Data Window counters are not audited account performance.
The internal R model assumes three equal portions.
The internal model does not represent real position sizing.
One-active-trade logic is a visual-management rule.
Alert delivery depends on TradingView and user configuration.
Changing settings changes historical calculations.
Changing symbol, exchange, session, timeframe, or feed can change signals.
Adaptive baselines depend on available chart history.
Confirmed higher-timeframe values reduce unfinished-HTF changes but introduce delay.
Permanent signals wait for candle close and therefore do not capture the earliest intrabar moment.
For these reasons, the indicator should be used as an educational decision-support tool, not as a standalone automated strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
• already understand basic MACD behavior
• want more context than a raw crossover
• study momentum expansion and contraction
• distinguish reversal, continuation, zero-line, and expansion events
• want transparent setup scoring
• want an anti-chop layer
• want optional chart and higher-timeframe trend context
• prefer confirmed-close signals
• want Entry, SL, and three target references
• use XAUUSD and want configurable fixed-pip distances
• want symbol-mismatch warnings
• want a compact dashboard
• want detailed alerts
• want diagnostic Data Window values
• prefer one active visual model at a time
It may be less suitable for users who:
• want guaranteed signals
• want a fully automated trading bot
• want every MACD crossover displayed
• expect a score to equal probability
• expect one setting to work on every market
• require exact tick-level execution
• want Strategy Tester results from an indicator
• want the indicator to replace personal judgment
• expect alerts to execute broker orders automatically
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For the default selective profile:
• use standard candlesticks
• begin with MACD 12 / 26 / 9
• keep Entry Timing on Early Trigger
• keep Momentum Quality on Strict
• keep Anti-Chop on Strict
• keep Entry Qualification on Strict
• keep the Zero-Line Filter on Trend Direction
• keep Absolute Strength enabled
• keep all four setup families enabled while learning
• use the dashboard to identify blocked regime conditions
• verify the selected risk model before reviewing trade levels
• use Stop First for conservative historical same-bar handling
• confirm XAUUSD VERIFIED when using Fixed Pips
• use alerts for monitoring rather than blind execution
For additional frequency:
• change Momentum Quality from Strict to Balanced
• change Anti-Chop from Strict to Balanced
• change Entry Qualification from Strict to Balanced
• disable the Zero-Line Filter
• disable Absolute Strength
• keep Trend Bias Off
• use Early Trigger
For additional directional restriction:
• use Chart EMA, Higher Timeframe EMA, or Combined EMA
• enable EMA slope confirmation
• add a Price-to-EMA ATR Buffer
• use a higher timeframe above the chart timeframe
• use Momentum Confirmed instead of Early Trigger
Always:
• wait for the setup candle to close
• review the setup type
• review the score components
• verify market structure independently
• review session and volatility
• verify the stop distance
• use personal position sizing
• test the exact symbol and timeframe
• understand the same-bar assumption
• treat all projected levels as analytical references
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
MACD Momentum Entry Engine is published as an educational momentum-analysis and visual trade-model tool.
The purpose of this description is to explain:
• how the configurable MACD core is calculated
• how average types affect the MACD and signal lines
• how setup events are classified
• how Reversal setups work
• how Continuation setups work
• how Zero-Line Reclaim setups work
• how Momentum Expansion setups work
• how Early Trigger and Momentum Confirmed differ
• how the Momentum Quality Score is constructed
• how adaptive momentum baselines work
• how the Anti-Chop Score is constructed
• how the Entry Qualification Score is constructed
• how final composite scores and grades are assigned
• how chart and confirmed higher-timeframe trend filters work
• how zero-line and absolute-strength filters work
• when permanent signals appear
• how the one-active-trade model works
• how Entry and Stop are calculated
• how TP1, TP2, and TP3 are calculated
• how same-candle ambiguity is handled
• how historical TP3 visuals are retained
• how non-TP3 visuals are cleaned
• how result labels behave
• what the dashboard displays
• how XAUUSD protection works
• what static and dynamic alerts contain
• what diagnostic values are available
• what the timing limitations are
• what the model does not simulate
• why familiar MACD concepts are organized into an original workflow
The script is designed to support structured analysis.
It does not promise profitable results.
It does not remove market risk.
It does not execute trades.
It should not be used as a blind LONG/SHORT system.
MAIN CHART SCREENSHOT PLAN
Use one clean standard candlestick chart.
Show the indicator with its default settings.
The screenshot should contain:
• complete symbol and timeframe information
• the indicator name
• visible standard price candles
• one clear LONG or SHORT label
• one active or completed Entry / TP / SL model
• the white Entry line
• green TP1, TP2, and TP3 levels
• the red SL area and solid SL line
• the MACD pane
• the white MACD line
• the red signal line
• the green/red histogram
• one neon MACD signal dot
• the bottom-right main-chart dashboard
• the Protection state
Do not include:
• other indicators
• manual drawings
• unrelated labels
• social-media links
• pricing information
• promotional claims
• account-profit screenshots
• win-rate claims
• non-standard candles
• hidden symbol or timeframe information
• excessive zoom
• decorative graphics unrelated to the script
The screenshot should demonstrate normal default behavior and make the relationship between the MACD event, main-chart signal, trade model, and dashboard easy to understand.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
MACD Momentum Entry Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, trading, legal, or tax advice.
No indicator can guarantee future results.
Markets are uncertain.
Momentum changes.
Volatility changes.
Liquidity changes.
Historical chart behavior does not ensure future performance.
Every user is responsible for their own:
• analysis
• validation
• risk management
• position sizing
• alert configuration
• trading decisions
• broker execution
• legal obligations
• tax obligations
The MACD line, signal line, histogram, momentum states, setup types, quality scores, regime scores, entry scores, composite scores, grades, trend states, LONG and SHORT labels, Entry references, Stop Loss levels, take-profit levels, boxes, result labels, Data Window values, dashboard states, internal counters, and alerts are visual analysis tools only.
The displayed Entry is not a guaranteed fill.
The displayed Stop Loss is not a broker order.
The displayed TP1, TP2, and TP3 levels are not guaranteed objectives.
The Momentum Quality Score is not a win probability.
The Entry Qualification Score is not a probability.
The Market Regime Score is not a guarantee that a market is trending.
The A+, A, B, and C grades are not promises of performance.
The internal trade model does not include spread, commissions, slippage, latency, order-book conditions, contract specifications, or partial fills.
Use this script as a structured MACD momentum-review and decision-support framework, not as a promise of profitability or a substitute for independent judgment. Indikator

DAX Universe Relative Strength [JS]DAX Universe Relative Strength
This indicator compares the current stock with an equal-weighted German stock market benchmark consisting of DAX, MDAX, SDAX and TecDAX.
Instead of comparing a stock only with one single index, the script creates a broader DAX Universe benchmark by calculating the average performance of the four major German equity indices over a selected lookback period.
The goal is to identify whether a stock is showing relative strength or relative weakness versus the broader German stock universe.
How it works:
1. The script measures the performance of the current stock over the selected comparison period.
2. It measures the performance of DAX, MDAX, SDAX and TecDAX over the same period.
3. It calculates the equal-weighted average performance of these four indices.
4. It compares the stock’s performance with this benchmark.
5. The result is plotted as a relative strength line.
Interpretation:
- RS above 0:
The stock is outperforming the DAX Universe benchmark.
- RS below 0:
The stock is underperforming the DAX Universe benchmark.
- RS above its moving average:
Relative strength is improving.
- RS below its moving average:
Relative strength is weakening.
- Strong RS signal:
The stock is above the benchmark, above its RS moving average, and the RS moving average is rising.
This indicator is designed as a filter, not as a standalone buy or sell signal.
For pullback and swing trading, I use it to identify stocks that are stronger than the broader German market. A strong RS reading does not mean that a stock should be bought immediately. It only means that the stock deserves attention and may be worth adding to a watchlist.
A complete trade setup should also include:
- constructive trend structure
- price above important moving averages
- controlled pullback
- declining selling pressure
- clear pivot or trigger
- defined stop-loss
- attractive risk/reward ratio
The indicator includes:
- relative strength line
- moving average of the RS line
- zero line
- histogram
- background highlighting
- interpretation label
- alert conditions for RS changes
Suggested use cases:
- screening German stocks
- comparing DAX, MDAX, SDAX and TecDAX stocks
- identifying potential market leaders
- filtering pullback candidates
- avoiding stocks with persistent relative weakness
Important:
This script is for educational and analytical purposes only. It does not provide investment advice, buy signals or sell signals. Always combine relative strength analysis with your own chart analysis, risk management and trading plan. Indikator

Momentum Leader Scanner - AshishMomentum Leader Scanner — a systematic tool for catching high-conviction momentum stocks after their initial breakout (EP candle), while they consolidate quietly in the EMA9/21 cloud before the next leg up. Combines relative strength vs. benchmark, proximity to 52-week highs, and a low-volume pullback filter to surface coiled setups — then locks a precise breakout trigger price the moment a setup is confirmed, so you can place your entry order in advance instead of reacting after the move has already started.
How it works
The script anchors its analysis to the most recent qualifying EP candle (a single-day move of 8%+ by default) and measures the stock's outperformance against a benchmark (default: NIFTYMIDSML400) since that candle — not over an arbitrary fixed window. This avoids one EP candle alone inflating a "strength" reading; the outperformance has to be sustained after the move, not just caused by it.
A setup requires four conditions together:
Outperformance vs benchmark since the EP candle exceeds a minimum threshold (default 10%)
Proximity to 52-week high (default within 20%) — confirming the stock hasn't lost its leadership
A qualifying EP candle within the detection window
A healthy pullback — price sitting inside the EMA9/EMA21 cloud (with a small tolerance for wick excursions) while the EMA9 > EMA21 > EMA50 stack stays intact, on below-average volume
When all four align, the script locks a breakout trigger price — the highest high since the EP candle — letting you pre-place a GTT order rather than waiting for a confirmed close above resistance, which is often a day or more late.
What it's good for
Catching stocks in the "coil after the jump" phase: violent move, quiet digestion, then continuation. It explicitly tracks how many separate EP candles have fired (visible as a diagnostic) so you can judge whether a stock had one clean catalyst or has been repeatedly volatile.
What it isn't built for
Slow, low-volatility grinders that never have a sharp EP candle (a different system altogether), and stocks that move too fast and too cleanly to ever pull back into the cloud on a daily timeframe.
Status
Actively used and refined against live market data — published as-is for traders who understand swing/momentum trading and want to incorporate systematic outperformance and pullback logic into their own process. Not financial advice; verify every signal against your own risk management before acting on it. Indikator

RSI Slope Divergence HelperRSI Slope Divergence Helper compares the rolling slope of price with the rolling slope of RSI.
This is not a classic pivot-divergence detector. It does not wait for confirmed swing pivots. Instead, it compares rolling price behavior and rolling RSI behavior directly by converting both slopes into normalized, unitless values and displaying them in the same pane.
The purpose of this script is to help users observe when price slope and RSI slope are moving together, moving against each other, or moving with low slope. It is a context and visualization tool only. It does not provide trade-action instructions and it is not a trading system.
What it shows
- Normalized price slope.
- Normalized RSI slope.
- A spread histogram between the two normalized slopes.
- Neutral slope-relationship states.
- A compact dashboard.
- Optional factual markers.
- A neutral Divergence Footprint layer.
How the calculation works
The script first calculates RSI using the selected RSI source and RSI length.
For price, it estimates a rolling linear-regression slope by comparing the current linear-regression value with the prior linear-regression value. The price slope is expressed as a percentage of the prior fitted price value so it can be compared across different symbols and price levels.
For RSI, the script estimates a rolling linear-regression slope from RSI itself. Since RSI is already bounded from 0 to 100, its slope is measured in RSI points.
The two slope series have different units, so they are normalized separately:
- price slope is divided by its own rolling standard deviation
- RSI slope is divided by its own rolling standard deviation
This converts both slopes into comparable unitless values.
The displayed spread is:
normalized price slope - normalized RSI slope
A positive spread means the normalized price slope is above the normalized RSI slope. A negative spread means the normalized price slope is below the normalized RSI slope.
No request.security() is used. The script uses current chart bars only and does not use lookahead or future data.
Why it is different from classic RSI divergence scripts
Many RSI divergence scripts compare confirmed price pivots with confirmed RSI pivots. This script takes a different approach.
It focuses on rolling slope behavior:
- price slope
- RSI slope
- normalized slope spread
- duration of the current disagreement episode
- peak spread during the current episode
- spread motion
- phase gap
Because it is slope-based, it is intended as a visual helper for observing disagreement between price movement and RSI movement. It is not a reversal detector and it does not forecast future price behavior.
Divergence Footprint
The Divergence Footprint is a neutral context layer that describes the current slope-disagreement episode.
It can show:
- whether slope disagreement is active
- how many bars the current disagreement episode has persisted
- the peak absolute spread reached during the current episode
- whether the absolute spread is expanding, cooling, or holding
- the phase gap between normalized price slope and normalized RSI slope
The phase gap is calculated by applying an angle transform to each normalized slope and then comparing the two angles. It is descriptive only. It is not a probability, score, forecast, or confirmation tool.
Optional phase-gap and duration plots are off by default to keep the pane clean.
State model
The dashboard uses neutral state names:
- Warming up
- Aligned upward
- Aligned downward
- Upper disagreement
- Lower disagreement
- Flat / low slope
- Mixed slopes
Upper disagreement means price slope is positive while RSI slope is negative.
Lower disagreement means price slope is negative while RSI slope is positive.
These states describe the current relationship between the two slopes. They do not imply reversal or continuation.
Markers and alerts
Markers are optional and off by default.
The marker display mode can be set to:
- Off
- Disagreement only
- All events
When enabled, markers are small and factual:
- P+ R- means price slope is positive while RSI slope is negative.
- P- R+ means price slope is negative while RSI slope is positive.
- Align marks slope agreement returning after a prior slope-disagreement episode, when enabled.
Alerts use the same neutral event logic:
- Upper slope disagreement
- Lower slope disagreement
- Slope agreement restored
- Spread crossed above threshold
- Spread crossed below threshold
Alerts are confirmed on bar close by default. Intrabar mode is available, but realtime values can update until the bar closes.
Dashboard
The default dashboard is compact and auto-sized. It is designed to stay readable without covering the indicator pane.
Compact layout shows:
- State
- Price slope
- RSI slope
- Spread
- Footprint
- Event mode
Standard and Detailed layouts add more context, including RSI value, spread motion, phase gap, disagreement bars, episode peak spread, active warm-up bars, and bar status.
Visual customization
Users can adjust:
- table layout
- table position
- table text size
- header text size
- table colors
- row backgrounds
- state-row highlighting
- plot colors
- histogram transparency
- marker colors
- background tint
- fixed table sizing, when desired
By default, fixed table cell sizing is off, so the dashboard auto-sizes to its content. Markers and background tint are also off by default to keep the pane clean.
Visual settings do not affect the calculations.
Live behavior and robustness
The script includes:
- automatic warm-up floor
- guarded denominators
- minimum normalized slope threshold
- optional spread-threshold filter for events
- optional minimum persistence for disagreement events
- optional event cooldown
- confirmed-bar event handling by default
- realtime / confirmed bar status disclosure in the table
If there is not enough history, or if the normalization denominator is not usable, the script avoids producing misleading slope states and displays safe fallback text such as n/a or Warming up.
Limitations
This script is not financial advice and not a trading system.
Slope disagreement can persist.
Slope disagreement can disappear without a major price move.
Slope disagreement does not predict reversal or continuation.
RSI is a bounded oscillator and can remain extended while price continues moving.
Default settings are starting points, not optimized settings.
Normalization length, slope length, smoothing length, and thresholds affect sensitivity.
Japanese notes
価格の傾きとRSIの傾きを正規化して比較し、両者の乖離をスプレッドとDivergence Footprintで表示する補助ツールです。通常のピボット型RSIダイバージェンス検出ではありません。売買判断や将来の値動きを示すものではなく、状況把握のための可視化ツールです。既定ではCompact表示、マーカーと背景色はオフ、確定足イベント処理がオンです。 Indikator

MTF Stoch RSI Snapshot 9 Timeframe OverviewThis indicator provides a compact multi-timeframe view of the Stochastic RSI across 9 different timeframes:
1m, 5m, 15m, 30m, 45m, 1h, 2h, 6h, 1D
Instead of switching between charts, the script displays all selected timeframes side by side in a clean column layout. Each column represents one timeframe and shows the current position of the two Stoch RSI lines, making it easier to quickly understand momentum conditions across multiple market structures.
Main Features
Multi-timeframe Stoch RSI visualization
9 fixed timeframe columns
K and D lines shown inside each column
Gradient background based on oscillator level
Quick visual identification of overbought and oversold areas
20 / 50 / 80 reference levels
Optional numeric K and D values
Compact layout designed for fast market reading
How to Read It
Each column represents a timeframe.
The vertical position of the lines shows where the Stoch RSI currently is:
Near the bottom: oversold / weak momentum area
Around the middle: neutral zone
Near the top: overbought / strong momentum area
The background gradient helps identify the oscillator zone immediately, while the two plotted lines allow you to see the current relationship between K and D.
This is useful when you want to compare short-term and higher-timeframe momentum at a glance.
Typical Use Cases
Scalping confirmation
Multi-timeframe momentum alignment
Spotting overbought / oversold conditions across timeframes
Filtering entries based on higher-timeframe context
Quickly checking whether short-term movement agrees with broader market structure
Notes
This indicator does not generate buy or sell signals by itself.
It is intended as a visual decision-support tool and should be used together with price action, trend analysis, support and resistance, and proper risk management.
Disclaimer
This script is for educational and informational purposes only.
It is not financial advice. Always test any trading approach carefully before using it in live markets. Indikator

Retest RangeRetest Range: Advanced Market Structure & Setup Engine
Overview
The Retest Range indicator is a sophisticated price action tool designed to identify powerful 3-candle reversal structures, automatically map out their internal mathematics, and project highly accurate support, resistance, and target zones. It combines raw momentum filtering with an internal Market Structure (BOS/CHoCH) engine to provide a complete, minimalist dashboard for serious traders.
How It Works: The 3-Candle Setup
The core engine hunts for a specific cluster of momentum:
Bullish Setup: A single bearish (red) candle followed immediately by 3 consecutive bullish (green) candles that engulf the high of the initial red candle.
Bearish Setup: A single bullish (green) candle followed immediately by 3 consecutive bearish (red) candles that engulf the low of the initial green candle.
Once a valid setup is identified, the indicator draws a transparent box around these 3 candles to visualize the "Range".
Mathematical Levels (0.75, 0.50, 0.25)
Inside every active Box, the script automatically projects three critical Fibonacci-like quartiles:
0.75, 0.50 (The Mid/Entry Level), and 0.25.
These lines extend forward to act as immediate dynamic support and resistance. The closest, untouched active box will continuously extend its lines along with the live price until a new box forms.
Box Targets & The "Inverse" Mechanics (Hocus Pocus)
Every valid setup projects a 1:1 Box Target based on its own range size.
A Bullish box projects a target box above it.
A Bearish box projects a target box below it.
The Inverse Trap: If the price fails to hit its intended target and instead reverses to close beyond the 0.50 mid-level of the active box, an "Inverse" is triggered.
When an Inverse occurs:
The original setup lines flip their colors (a failed Bullish box turns red).
The initial Box Target transforms into a hard "Resistance" (or Support) block.
A brand new Box Target is immediately projected in the opposite direction.
This allows traders to catch failed setups and instantly ride the momentum of the reversal trap!
Built-In Market Structure Engine (BOS / CHoCH)
Running silently in the background is a pure fractal-based Market Structure engine. It maps out confirmed Pivot Highs and Pivot Lows, labeling Break of Structure (BOS) and Change of Character (CHoCH) levels. It requires a hard candle body close to confirm breaks, filtering out fake wick sweeps.
The Stats Dashboard
A clean, minimalist ICT-style panel adapts to your chart's theme (Dark/Light mode). It provides live intelligence:
Daily Bias: Compared to the daily open.
MS State: The latest trend direction from the BOS/CHoCH engine.
Live Momentum & Volume: Real-time percentage strength of the current 3-candle move compared to the historical average of all previous boxes (highlighting STRONG vs. WEAK moves).
RSI & DMI (DI+ / DI-): Essential trend strength metrics at a glance.
Key Features:
Fully customizable Body Multiplier to filter out weak/doji setups.
Automatic preservation of validated Support/Resistance (Inverse) target boxes.
Clean, non-overlapping labels and lines.
Minimalist aesthetics designed for Quant and Price Action traders. Indikator

Indikator

Multi-Oscillator Divergence ConfluenceMulti-Oscillator Divergence Confluence (MODC)
MODC is a three-layer divergence analysis indicator built to make oscillator divergence easier to read without turning the chart into a wall of labels.
The script evaluates RSI, MACD, Stochastic, CCI, MFI, and OBV at the same confirmed price pivots. This shared-pivot approach keeps oscillator votes aligned to the same market structure point instead of mixing unrelated oscillator pivots.
The goal is not to create a standalone buy/sell system. MODC is designed as a visual confirmation and context tool for traders who already use market structure, trend context, and risk management.
What makes MODC different
MODC is built as a three-layer system:
1. Always-on market context
The pane stays useful on every bar, even when no divergence signal is active.
It includes:
- A Confluence Pressure Wave from 0 to 100.
- A regime ribbon identifying Trending, Ranging, Volatile, or Quiet conditions using ADX and ATR percentile.
- An oscillator stack histogram showing whether more enabled oscillators are leaning bullish or bearish.
- Subtle pressure background zones when divergence pressure builds.
This layer helps show the “story” before a confirmed signal appears.
2. Informational Setup layer
In Exploratory mode, subtle setup dots appear when divergence pressure builds near a recent swing extreme.
A Setup is not a confirmed divergence signal. It is only a watch-list event.
Setup dots require:
- Pressure wave crossover.
- At least two oscillators leaning in the same direction.
- Price near a recent swing high or swing low using ATR-based proximity.
Setup alerts are disabled by default because Setups are pre-confirmation events and may never become confirmed pivot divergences.
3. Confirmed Valid and Elite signals
Confirmed signals are based on price pivots. A pivot only confirms after the selected Pivot Right Bars have closed.
Valid signals require:
- A confirmed price pivot.
- Minimum oscillator confluence.
- A base score threshold.
- Hidden divergences aligned with EMA context.
Elite signals require Valid conditions plus a stricter quality gate:
- EMA context.
- ADX trend-strength rules.
- Regime-adaptive score threshold.
- Optional volume gate.
- Optional historical forward-return proxy gate.
Signal labels are compact:
- RB = Regular Bullish
- HB = Hidden Bullish
- RS = Regular Bearish
- HS = Hidden Bearish
The number beside the label is the signal score. Visual intensity scales with score:
- 50-65 = muted
- 66-79 = clear
- 80+ = premium / Elite
How the scoring works
Scoring is intentionally conservative and always based on confluence out of six oscillators. Disabling oscillators does not inflate the score.
The score considers:
- Oscillator confluence count.
- Correct reversal or continuation context.
- Whether enabled oscillators are in exhaustion zones.
- Volume participation.
- Pivot spacing quality.
- Market regime alignment.
- A penalty when fewer than four oscillators are enabled.
Regular divergence and hidden divergence are treated differently:
- Regular Bullish = potential reversal from weakness.
- Regular Bearish = potential reversal from strength.
- Hidden Bullish = potential trend continuation above the EMA.
- Hidden Bearish = potential trend continuation below the EMA.
Display modes
Signal Density:
- Conservative: Elite only.
- Balanced: Valid + Elite. This is the default.
- Exploratory: Setup + Valid + Elite.
Visual Intensity:
- Minimal: pressure wave and confirmed badges only.
- Standard: pressure wave, regime ribbon, stack histogram, confirmed lines and badges.
- Cinematic: Standard mode plus Elite aura, candle tint, stronger atmosphere, and compact HUD stats.
Suggested usage
Start with:
- Signal Density: Balanced
- Visual Intensity: Standard
Use Layer 1 to understand market context. Treat Setup dots as early watch-list information only. Use Valid and Elite signals as confirmation points, not automatic entries.
For alerts, use the confirmed Valid or Elite alert conditions and set alerts to Once Per Bar Close.
Repaint and delay disclosure
Confirmed Valid and Elite outputs are evaluated on closed bars.
Because this script uses confirmed pivots, a divergence signal is only known after Pivot Right Bars have closed. The marker is drawn back on the pivot bar for visual alignment only. The signal was not actionable on the original pivot bar.
The Setup layer is different: Setups are informational pressure events, not confirmed divergence signals. They may never become confirmed signals.
Forward-return proxy disclosure
MODC includes optional forward-return proxy statistics for visible chart history. These are in-sample summaries only.
They are not a backtest. They do not include commissions, slippage, position sizing, stops, targets, or risk management. They should not be interpreted as expected future performance.
Limitations
Divergence can fail, especially during strong trends or news-driven moves. Oscillators are related momentum tools, so confluence does not guarantee independence. This indicator should be used with broader market structure, trend analysis, and a defined risk plan.
This script is for analysis and education only. It is not financial advice and is not a standalone trading system. Indikator

Trend Navigator - Bulls Eye - Options Trade# GN-CE-PE State Engine
## Overview
GN-CE-PE State Engine is a market participation and synchronization tool designed to help traders assess directional conviction across multiple related instruments.
The indicator monitors the relationship between:
* Gift Nifty
* At-The-Money Call Options
* At-The-Money Put Options
and transforms their combined behavior into a set of actionable market states.
Rather than analyzing a single chart in isolation, the engine focuses on whether bullish or bearish participation is developing in a coordinated manner across the underlying market and its options.
---
## Market States
### Bull Trend
Indicates broad bullish participation and directional alignment across the monitored instruments.
---
### Bear Trend
Indicates broad bearish participation and directional alignment across the monitored instruments.
---
### Reset
Represents a pause, pullback, or temporary loss of momentum within an existing directional move.
This state can help traders identify periods where the market is rebalancing before a potential continuation.
---
### CE Ready
Highlights conditions where bullish participation is strengthening and directional alignment is improving.
---
### PE Ready
Highlights conditions where bearish participation is strengthening and directional alignment is improving.
---
## Dashboard
The built-in dashboard provides a real-time summary of:
* Market bias
* Participation strength
* Momentum state
* Directional alignment
* Confidence score
* Current market condition
This allows traders to quickly assess market structure without switching between multiple charts.
---
## Confidence Score
The confidence score reflects the degree of alignment between the monitored instruments.
Higher scores suggest stronger participation and greater directional agreement, while lower scores often indicate mixed conditions or transitional phases.
The score is intended as a contextual aid and should not be used as a standalone trading signal.
---
## Alerts
The indicator includes alert conditions for:
* CE Ready
* PE Ready
allowing traders to monitor potential opportunities without continuously watching the chart.
---
## Recommended Usage
GN-CE-PE State Engine is designed to complement the **Trend Navigator - BullsEye** indicator.
Suggested workflow:
### Step 1
Use **Trend Navigator - BullsEye** to determine the prevailing market structure and directional bias.
### Step 2
Use **GN-CE-PE State Engine** to evaluate whether participation across the underlying market and options is supporting that directional view.
### Step 3
Focus on opportunities where both indicators are aligned.
This combination helps traders distinguish between isolated price movements and moves that are supported by broader market participation.
---
## Notes
* Designed primarily for intraday market analysis.
* Option symbols should be updated to match the active trading series.
* Intended as an analytical and decision-support tool.
* Not financial advice.
## Disclaimer
This indicator is intended for educational and analytical purposes only. It is designed to assist traders in evaluating market participation, directional alignment, and market structure across the monitored instruments.
The indicator does not predict future price movements and should not be considered a recommendation to buy, sell, or hold any financial instrument. All trading decisions should be made using independent analysis, proper risk management, and personal judgment.
Past market behavior does not guarantee future results. Users are solely responsible for their trading decisions and any resulting gains or losses. Indikator

Buy/Sell Pressure# **Buy/Sell Pressure**
Buy/Sell Pressure is designed to provide insight into **who is actually controlling the market beneath the surface**. Rather than focusing exclusively on whether price is moving higher or lower, the indicator attempts to determine whether those price movements are being supported by genuine buying interest or genuine selling pressure.
Markets do not always move because one side is aggressively taking control. Sometimes prices drift higher simply because sellers temporarily step aside. Other times, prices fall because buyers become reluctant rather than because sellers are overwhelming the market. Looking at price alone can make these distinctions difficult to recognize.
Buy/Sell Pressure was developed to address that problem.
The indicator combines several different aspects of market behavior into a single, easy-to-read oscillator. By evaluating how price behaves within each bar, how volume participates in those movements, and whether underlying money flow supports the move, it attempts to provide a clearer picture of the balance of power between buyers and sellers.
The goal is not to predict the future. Instead, the goal is to answer a simpler but often more useful question:
> **Who appears to be winning the battle right now: buyers or sellers?**
---
# **What the Indicator Is Measuring**
Buy/Sell Pressure evaluates multiple dimensions of market behavior simultaneously.
It examines where price closes within the range of each bar. A market that consistently closes near the upper portion of its range often reflects persistent buying interest. Conversely, a market that repeatedly closes near the lower portion of its range may indicate sustained selling pressure.
The indicator also evaluates the relationship between opening and closing prices. Large bullish bodies suggest buyers were able to maintain control throughout the period, while large bearish bodies suggest sellers dominated the session. Smaller candle bodies generally indicate indecision or equilibrium between the two sides.
Wick behavior is another important component. Long lower shadows often suggest that sellers attempted to push prices lower but buyers stepped in aggressively enough to reject those lower levels. Long upper shadows may indicate that buyers attempted to push prices higher but encountered significant selling resistance. These subtle forms of rejection can reveal underlying pressure that may not be obvious from price alone.
Volume is then incorporated into the calculation. Price movement occurring during periods of elevated participation tends to carry greater significance than identical price movement occurring during quiet conditions. By weighting certain behaviors according to volume, the indicator attempts to emphasize moves that are supported by broader market involvement.
The indicator also considers money flow and cumulative volume behavior. This helps determine whether capital has generally been flowing into the market or out of it over recent periods. These additional layers of analysis help distinguish meaningful shifts in pressure from ordinary short-term fluctuations.
The result is a composite measure designed to identify whether **buying pressure is strengthening, selling pressure is strengthening, or neither side currently has a meaningful advantage.**
---
# **Understanding the Histogram**
The primary visual component of the indicator is the histogram.
The histogram oscillates around a central zero line. The further the histogram extends away from that centerline, the stronger the underlying pressure is considered to be.
The direction and color of the histogram provide insight into the current balance between buyers and sellers.
---
## **Green Histogram Bars**
Green histogram bars indicate that underlying buying pressure is present.
When the histogram begins printing green bars, it suggests that buyers are exerting increasing influence over market behavior. Price action is becoming increasingly supported by demand rather than simply drifting higher due to a lack of sellers.
As green bars expand in size, the strength of buying pressure is increasing. This often occurs during healthy uptrends, breakout phases, or periods of sustained accumulation.
---
## **Red Histogram Bars**
Red histogram bars indicate that underlying selling pressure is dominant.
These readings suggest that sellers are becoming increasingly aggressive and that downward price movement is being supported by genuine supply entering the market.
As red bars grow larger, selling pressure is intensifying. These conditions frequently accompany strong downtrends, breakdowns, or periods of distribution.
---
## **Gray Histogram Bars**
Gray histogram bars represent neutral conditions.
During these periods, neither buyers nor sellers possess a sufficiently strong advantage to justify a directional reading.
Neutral conditions often occur during:
* Consolidation phases.
* Sideways markets.
* Transitional periods between trends.
* Areas of temporary equilibrium.
Gray bars can serve as a reminder that not every market environment is favorable for directional decision-making.
---
## **Extreme Pressure Conditions**
The indicator also identifies periods when buying or selling pressure becomes unusually strong relative to recent history.
These conditions are represented by brighter shades of green or red.
Extreme readings indicate that conviction is significantly elevated. Buyers or sellers are demonstrating an unusual degree of control compared to what has been considered normal over the selected historical period.
It is important to understand that extreme readings should not automatically be interpreted as reversal signals.
Strong markets can remain strong for extended periods. Likewise, weak markets can continue to weaken. Extreme readings are best viewed as evidence of exceptional pressure rather than immediate exhaustion.
---
# **The Signal Line**
The orange signal line provides a smoother representation of the underlying pressure reading.
Because it is less reactive than the histogram itself, it can help traders focus on broader shifts in pressure rather than becoming distracted by every short-term fluctuation.
A rising signal line generally reflects improving conditions for buyers.
A falling signal line generally reflects strengthening conditions for sellers.
Many users find the signal line useful when assessing whether pressure is accelerating, stabilizing, or beginning to deteriorate.
---
# **Pressure Dots**
The indicator includes optional pressure dots designed to highlight important transitions in market control.
Users can choose between two different methods for generating these signals.
---
## **Zero Cross Mode**
In Zero Cross mode, a green dot appears when pressure crosses above the zero line, while a red dot appears when pressure crosses below zero.
These signals occur relatively early because they identify the point at which the balance of pressure shifts from negative to positive or vice versa.
The advantage of this approach is speed.
The disadvantage is that early signals can occasionally occur during temporary fluctuations that fail to develop into meaningful trends.
---
## **First Colored Bar Mode**
In First Colored Bar mode, dots appear only when pressure moves decisively beyond the neutral zone and the first meaningful buying or selling histogram bar is printed.
Green dots identify the first significant buying bar.
Red dots identify the first significant selling bar.
Because these signals require stronger confirmation, they tend to occur later than zero-cross signals.
However, they are often cleaner and easier to interpret.
This mode is the default setting because it focuses on identifying **meaningful pressure shifts rather than merely technical transitions around the zero line.**
---
# **Understanding the Inputs**
---
## **Confirmed Bars Only (Non-Repainting)**
When enabled, all calculations are based exclusively on completed bars.
This prevents signals from changing after a bar closes and ensures that historical signals accurately reflect what would have been visible in real time.
The tradeoff is that signals appear one bar later.
This setting is enabled by default because reliability is often more valuable than immediacy.
---
## **Show Confirmed Mode Label**
This optional label provides a visual reminder that non-repainting mode is active.
It has no impact on calculations and exists purely for convenience.
The label is disabled by default to preserve a cleaner appearance.
---
## **Pressure Lookback**
This setting controls how persistent underlying pressure must be before the indicator fully reflects it.
Lower values produce a more responsive oscillator that reacts quickly to changing conditions.
Higher values produce a smoother oscillator that emphasizes sustained pressure rather than short-term fluctuations.
The default value of **50** attempts to strike a balance between responsiveness and stability.
---
## **Score Smoothing**
Score Smoothing determines how aggressively the raw pressure calculations are filtered before reaching the final oscillator.
Increasing this value reduces noise but delays transitions.
Decreasing it improves responsiveness but increases sensitivity.
The default value of **5** provides moderate smoothing without excessively sacrificing timeliness.
---
## **Volume Baseline**
Volume Baseline establishes the historical reference used to determine whether current participation levels are unusually high or unusually low.
Higher settings create a more stable volume benchmark.
Lower settings allow the indicator to adapt more quickly to changing market environments.
---
## **Normalization Lookback**
Normalization Lookback determines how much historical information is used when establishing what constitutes "normal" pressure conditions.
Shorter values adapt rapidly but may cause thresholds to shift more frequently.
Longer values create a more stable frame of reference.
The default value of **100** was chosen to emphasize consistency and reduce sensitivity to temporary anomalies.
---
## **Signal Line Length**
This setting controls the responsiveness of the signal line.
Shorter lengths allow the signal line to track pressure more closely.
Longer lengths smooth the signal line and emphasize broader trends.
---
## **Money Flow Length**
Money Flow Length determines how much historical information is used when evaluating whether capital has generally been entering or exiting the market.
Smaller values respond quickly to recent changes.
Larger values emphasize longer-term participation trends.
---
## **OBV Pressure Length**
This setting controls how much cumulative volume history contributes to the assessment of broader buying and selling participation.
Lower values prioritize recent developments.
Higher values place greater emphasis on sustained pressure trends.
---
## **Neutral Zone**
The Neutral Zone defines the boundary separating insignificant pressure from meaningful pressure.
Histogram readings that remain inside this area are considered inconclusive and are displayed using neutral colors.
Reducing the size of the neutral zone increases sensitivity.
Expanding it requires stronger evidence before directional readings are generated.
The default setting of **35** attempts to filter out routine market noise while remaining responsive to meaningful shifts.
---
## **Extreme Level**
The Extreme Level determines when pressure becomes exceptionally strong relative to recent market conditions.
Readings beyond this threshold are highlighted using brighter colors.
These conditions often reflect unusually strong conviction but should not automatically be interpreted as reversal opportunities.
The default value of **75** identifies situations where pressure has become significantly elevated.
---
# **Practical Applications**
Buy/Sell Pressure can be used in a variety of ways.
Many traders use it as a confirmation tool during breakouts. When price breaks through an important level while buying pressure simultaneously strengthens, the move may possess greater credibility.
Others use it to evaluate pullbacks. Temporary declines occurring during periods of weak selling pressure may suggest healthy retracements within larger uptrends. Similarly, weak buying pressure during countertrend rallies may indicate that bearish conditions remain intact.
The indicator can also help identify potential exhaustion. If price continues advancing while buying pressure steadily deteriorates, the underlying trend may be losing support. Likewise, continued price declines accompanied by weakening selling pressure may suggest that bearish momentum is beginning to fade.
Finally, Buy/Sell Pressure can serve as a valuable trade filter. Traders who already possess an established strategy may use the indicator to align themselves with the prevailing side of the market.
---
# **Final Thoughts**
Buy/Sell Pressure was designed to help traders look beyond price itself and focus on the forces driving that price movement.
Rather than asking whether the market moved higher or lower, it asks whether buyers or sellers genuinely supported that move.
By combining price behavior, volume participation, money flow characteristics, and cumulative pressure analysis into a single adaptive framework, the indicator seeks to provide a clearer understanding of market conviction.
Its purpose is not to predict exactly what the market will do next.
Its purpose is to help answer a more immediate and practical question:
> **If a battle is taking place between buyers and sellers, which side currently appears to have the advantage?** Indikator

Market Momentum Energy [ZurvanEG]⯁ Market Momentum Energy
◇ Overview
Market Momentum Energy is a directional energy oscillator designed to evaluate whether current market movement has enough strength, participation, and directional conviction to matter. Instead of measuring price change alone, it converts movement into a normalized energy reading that reflects direction, intensity, volatility context, participation, and movement quality.
It helps separate clean directional pressure from noise, low-volume drift, volatility expansion, compression, or late-stage exhaustion. Its purpose is to show whether movement has meaningful energy behind it, whether that energy is expanding or fading, and whether conditions are closer to ignition, weak movement, saturation, or possible reversal pressure.
◈ Core Framework
At its core, the indicator uses a motion-energy model that measures directional movement through price displacement or regression-based slope, then normalizes it against recent volatility for better comparison across regimes, instruments, and timeframes.
The motion reading is shaped through a power curve, while an optional effort layer can modulate it using volume or true range. After that, self-normalization keeps energy, thresholds, dead zones, saturation levels, and signal logic more stable across changing volatility conditions.
The framework also includes quality filtering, final energy smoothing, signal logic, energy bands, divergence detection, optional energy MA, adaptive visuals, candle coloring, signal-volume markers, alerts, and a compact info table.
◇ Signals
The signal system highlights energy ignition events. Signals are generated when energy crosses a defined threshold, with controls for quality, saturation, HMA-based short-term direction confirmation, re-arm behavior, and optional alternation.
◇ Signal Volume Markers
The indicator can draw transparent volume-based circles directly on signal candles. Circle size is based on cumulative volume over a user-defined lookback period, making it easier to identify signals that appear after unusually high participation. This feature is most meaningful on markets with reliable volume data.
◇ Energy Bands
The energy bands provide statistical context for the current energy reading. They help identify stretched momentum, possible exhaustion zones, or unusually strong directional expansion. To keep the chart clean, bands can appear only when energy gets close to them and remain visible for a few bars after activation.
◇ Dead Zone & Saturation
The dead zone marks areas where energy is too weak to be treated as meaningful. The saturation level marks areas where energy is already strong or potentially overextended. Together, they organize the oscillator into practical states: weak, active, strong, and overextended.
◇ Divergence
The divergence module detects confirmed regular divergence between price and energy. It can help identify cases where price makes new highs or lows while energy fails to confirm. Pivot confirmation and filtering conditions are included to reduce weak or irrelevant divergence marks.
◇ Visual System
The visual layer makes energy state easy to read at a glance. Energy is shown as a directional histogram with optional line view, optional energy MA, adaptive intensity, contraction fading, dead-zone shading, energy bands, candle coloring, and signal-volume circles on the price chart.
The coloring system helps distinguish expanding energy, contracting energy, positive and negative movement, weak zones, saturated conditions, and high-participation signal areas.
◇ Alerts
Configurable alerts are included for bullish signals, bearish signals, bullish divergence, and bearish divergence. They support monitoring and workflow automation, but should still be evaluated with broader market context and risk management.
◇ Info Table
The compact info table summarizes current energy, quality, and market state. It acts as a quick reference panel for identifying dead zone, active direction, or strong energy conditions without inspecting every plot manually.
◇ Use Case
Market Momentum Energy is intended for traders who want a clearer way to evaluate directional movement strength. It can help identify momentum ignition, monitor whether energy is expanding or fading, avoid low-energy noise, detect overextended conditions, and add context to possible reversal or continuation setups.
It may be useful for trend-following traders, momentum traders, discretionary price-action traders, and system builders who want a structured energy layer for filtering market conditions.
It helps answer questions such as:
⬦ Is the market moving with enough energy?
⬦ Is the move clean or choppy?
⬦ Is momentum expanding or fading?
⬦ Is energy holding above or below its moving average?
⬦ Did the signal appear after unusually high cumulative volume?
⬦ Is the signal early enough, or already near saturation?
⬦ Is price making a new extreme while energy fails to confirm?
⬦ Is the market in a low-energy dead zone?
◈ Conclusion
Market Momentum Energy is built for traders who want more than a basic momentum oscillator. By combining normalized motion, participation effort, quality filtering, energy bands, divergence detection, final smoothing, signal-volume visualization, adaptive visuals, alerts, and structured signal logic, it provides a broader view of directional market energy.
Rather than simply showing whether price is rising or falling, the indicator focuses on whether movement has enough strength, participation, and directional conviction to matter.
In short, Market Momentum Energy is a practical tool for evaluating the strength, quality, and state of market movement before acting on a trade idea.
Indikator

Candle Pressure Flip Engine [trade_w_samet]🎯 Candle Pressure Flip Engine
Candle Pressure Flip Engine is a professional candle-pressure reversal and trade-visualization indicator designed to help traders study potential pressure-shift conditions directly on the price chart.
This script combines:
🔥 candle pressure analysis
⚡ exhaustion move detection
🕯️ rejection wick logic
📍 close-location pressure
📊 volume burst confirmation
🧭 RSI momentum flip confirmation
🧠 Auto Best optimizer logic
🎯 target / risk projection boxes
🏷️ BULLISH / BEARISH flip labels
🏁 WIN / LOSS result stamps
🩸 Crimson Spine + Echo + Fill visual system
🚨 professional alert messages
🎨 multiple visual themes
📦 historical target/risk visual tracking
The goal of Candle Pressure Flip Engine is not to predict the future or provide guaranteed buy/sell instructions.
Its purpose is to help users visually study:
⚡ exhaustion after aggressive moves
🕯️ candle rejection behavior
📍 where price closes inside the candle range
📊 whether volume expanded during the reaction
🧭 whether RSI momentum started turning
🎯 projected target and risk areas
🏁 visual target/risk outcomes
🩸 price-following pressure visuals
🚨 alert-based chart monitoring
Candle Pressure Flip Engine should be treated as a structured chart-analysis and educational decision-support tool.
It is not financial advice.
It is not an automated trading system.
It does not guarantee profitable results.
It does not place broker orders.
It does not remove the need for personal analysis, risk management, or trade validation.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, Candle Pressure Flip Engine does the following:
🔥 Measures the size of the prior price move using ATR-based exhaustion logic.
🕯️ Checks whether the signal candle shows meaningful rejection wick pressure.
📍 Evaluates where the candle closes inside its own range.
📊 Optionally confirms the move with volume expansion.
🧭 Optionally confirms momentum change using RSI behavior.
🧠 Runs a background optimizer to compare internal setup combinations.
🎯 Draws a single target zone and risk zone after confirmed signals.
📦 Keeps historical target/risk boxes on the chart.
🏁 Tracks whether target or risk was reached first.
🏷️ Prints clean BULLISH FLIP ▲ and BEARISH FLIP ▼ labels.
🩸 Displays a premium Crimson Spine + Echo + Fill visual trail around price.
🚨 Provides professional human-readable and JSON-style dynamic alerts.
This makes the script more than a simple signal-label indicator.
It is designed as a complete candle-pressure review environment that combines candle behavior, exhaustion context, rejection, momentum, volume, visual planning, and alerts.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
The core idea behind Candle Pressure Flip Engine is that a potential reversal should not be judged from a single isolated condition.
A candle can look strong, but without context it may not mean much.
For that reason, this script combines several layers:
🔥 exhaustion move context
🕯️ rejection wick behavior
📍 close-position pressure
📊 volume burst confirmation
🧭 RSI momentum turn
🧠 optimizer-based internal comparison
🎯 target/risk visualization
🩸 visual price-following pressure trail
The script does not attempt to catch every reversal.
It attempts to highlight moments where the internal candle-pressure model detects a possible shift after price has already moved aggressively in one direction.
The purpose is not to create more signals.
The purpose is to make potential pressure-flip conditions easier to identify, review, and compare on the chart.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE BUY/SELL INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine is not intended to behave like a basic “buy here / sell here” script.
It is built as a structured workflow:
Exhaustion Move
→ Candle Rejection
→ Close Pressure
→ Volume Burst
→ Momentum Flip
→ Score Requirement
→ Optional Auto Best Selection
→ BULLISH / BEARISH Flip Label
→ Target / Risk Projection
→ Result Tracking
→ Crimson Spine Visual Context
→ Alerts
Each part has a specific role.
🔥 The exhaustion engine checks whether price has moved enough before a flip is considered.
🕯️ The wick engine checks whether the candle rejected a level strongly enough.
📍 The close-pressure engine checks where the candle closed inside its range.
📊 The volume module checks whether the signal candle has volume expansion.
🧭 The momentum module checks whether RSI is turning in the expected direction.
🧠 The optimizer compares internal parameter combinations in the background.
🎯 The target/risk module draws visual planning zones.
🩸 The Crimson Spine module adds a premium price-following visual layer.
🚨 The alert module helps monitor signals and results without constantly watching the chart.
This makes the script a complete visual review framework, not a one-condition signal tool.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
🔥 EXHAUSTION MOVE ENGINE
The script first checks whether price has made a meaningful move over a selected lookback period.
This is done using:
• Exhaustion Lookback
• Minimum Exhaustion Move ATR
• Minimum Directional Bars
• ATR-based move measurement
A bullish flip can only appear after bearish exhaustion conditions are detected.
A bearish flip can only appear after bullish exhaustion conditions are detected.
This means the script is designed to look for possible pressure flips after directional movement, not random candles in the middle of neutral price action.
For bullish setups, the script looks for prior downside pressure.
For bearish setups, the script looks for prior upside pressure.
This creates the first layer of context.
━━━━━━━━━━━━━━━━━━━━━━
🕯️ REJECTION WICK ENGINE
━━━━━━━━━━━━━━━━━━━━━━
After exhaustion is detected, the script checks the signal candle itself.
For a bullish flip, the script evaluates the lower wick.
For a bearish flip, the script evaluates the upper wick.
The purpose is to identify whether price rejected one side of the candle range.
The main setting is:
Minimum Rejection Wick %
A larger rejection wick requirement makes the script more selective.
A smaller rejection wick requirement allows more potential signals.
The wick condition does not guarantee that price will reverse.
It only means that the candle showed rejection behavior according to the script’s internal model.
━━━━━━━━━━━━━━━━━━━━━━
📍 CLOSE-PRESSURE ENGINE
━━━━━━━━━━━━━━━━━━━━━━
The script also evaluates where the candle closes inside its own range.
This is important because a rejection wick alone is not always enough.
For bullish flips, the script prefers candles that close closer to the upper part of the candle range.
For bearish flips, the script prefers candles that close closer to the lower part of the candle range.
This is controlled by:
Close Pressure Threshold %
Example:
If the threshold is 65%, a bullish candle must close relatively high in its candle range.
For bearish flips, the inverse logic is used.
This helps the script avoid weak candles that reject but fail to close with enough pressure.
━━━━━━━━━━━━━━━━━━━━━━
📏 BODY PRESSURE ENGINE
━━━━━━━━━━━━━━━━━━━━━━
The script also checks the body size of the signal candle.
This is controlled by:
Minimum Reversal Body %
The candle body is measured as a percentage of the full candle range.
This helps avoid extremely weak candles where the wick may be large but the body does not show enough directional pressure.
A higher value makes the script more selective.
A lower value allows more signals.
This does not mean a larger candle body is always better.
It simply gives the model a minimum candle-strength requirement.
━━━━━━━━━━━━━━━━━━━━━━
📊 VOLUME BURST CONFIRMATION
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine includes an optional Volume Burst filter.
When enabled, the script compares current volume to its moving average.
The main settings are:
📊 Use Volume Burst
📊 Volume MA Length
📊 Minimum Volume Multiplier
Example:
A Minimum Volume Multiplier of 1.10 means the current volume must be at least 10% above its average.
The purpose is to check whether the pressure-flip candle appeared with above-average participation.
This can be useful on markets where volume data is meaningful.
Important note:
Some symbols, brokers, CFDs, forex feeds, or synthetic markets may have limited or less reliable volume data.
Users can disable this filter if volume is not useful for their selected market.
━━━━━━━━━━━━━━━━━━━━━━
🧭 RSI MOMENTUM FLIP CONFIRMATION
━━━━━━━━━━━━━━━━━━━━━━
The script includes an optional RSI Momentum Flip module.
This does not use RSI as a classic overbought/oversold signal.
Instead, the script checks whether RSI is turning in the expected direction.
Main settings:
🧭 Use Momentum Flip
🧭 RSI Length
🧭 RSI Turn Lookback
🧭 Bullish RSI Max After Flip
🧭 Bearish RSI Min After Flip
For bullish flips, RSI should start turning upward without already being too extended.
For bearish flips, RSI should start turning downward without already being too extended.
This is designed to help filter signals where candle pressure appears but momentum has not started shifting yet.
RSI confirmation is only one part of the model.
It does not guarantee future price movement.
━━━━━━━━━━━━━━━━━━━━━━
🧠 AUTO BEST OPTIMIZER
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine includes a background optimizer.
The optimizer compares controlled internal combinations of:
• Exhaustion move requirement
• Rejection wick requirement
• Signal score requirement
• Risk/reward target
The optimizer can be set to:
Light 27
Full 81
Light mode tests fewer combinations.
Full mode tests a deeper combination set.
The script can automatically use the best internal combination after enough closed virtual outcomes are collected.
This is controlled by:
🧠 Use Background Optimizer
🧠 Auto Use Best Optimizer Combo
🧠 Optimizer Grid Depth
🧠 Best Combination Ranking
🧠 Minimum Trades For Best Combo
Important note:
The optimizer is an internal visual-analysis feature.
It is not the same as TradingView Strategy Tester.
It does not include broker execution, spread, slippage, commissions, order delay, partial fills, or real trade management.
It should be treated as a chart-based adaptive review tool, not as a guarantee of improved future performance.
━━━━━━━━━━━━━━━━━━━━━━
🎯 TARGET / RISK VISUAL SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
When a valid candle pressure flip appears, the script can draw a projected trade plan.
The chart can show:
🎯 Target Zone
⚠️ Risk Zone
📍 Entry Zone
📈 Target line
🛑 Risk line
🏁 WIN / LOSS result stamp
The system uses a single target model.
There are no TP1 / TP2 / TP3 levels in this script.
The default target is based on the selected Risk Reward value.
Default:
Target Risk Reward = 2.0R
The risk distance can be calculated using:
Signal Wick
ATR
Hybrid
The current default risk mode is ATR.
The ATR multiplier used in the model is fixed internally at 4.0.
This creates a consistent risk projection structure.
Important note:
The target and risk boxes are visual projections only.
They are not broker orders.
They do not execute trades.
They do not guarantee that the displayed target or risk will be reached in a profitable way.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ RISK MODE EXPLANATION
━━━━━━━━━━━━━━━━━━━━━━
The script includes three risk modes:
Signal Wick
ATR
Hybrid
Signal Wick mode uses the candle wick area as the risk reference.
ATR mode uses ATR-based distance.
Hybrid mode uses a wider protective logic between wick-based and ATR-based risk.
The purpose of these modes is to give users flexibility in how projected risk zones are visually drawn.
Risk settings affect the chart projection.
They should not be treated as trade recommendations.
Users should always apply their own risk management and validation.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ SAME-CANDLE TARGET/RISK HANDLING
━━━━━━━━━━━━━━━━━━━━━━
If both target and risk are touched on the same candle, the true intrabar sequence cannot be known from standard OHLC chart data.
The script includes a setting for this situation:
If Target and Risk Hit Same Bar
Available options:
SL First
TP First
The default is SL First.
This is a conservative assumption.
It helps avoid overly optimistic historical visual results when the true intrabar order is unknown.
Users should understand that this is still an assumption based on available bar data.
━━━━━━━━━━━━━━━━━━━━━━
🏁 RESULT TRACKING
━━━━━━━━━━━━━━━━━━━━━━
The script can track whether a projected setup reaches target or risk first.
Possible result labels:
WIN | TARGET HIT
LOSS | RISK HIT
A WIN label means the projected target zone was reached first according to the script’s bar-based logic.
A LOSS label means the projected risk zone was reached first according to the script’s bar-based logic.
These labels are visual summaries only.
They do not represent broker execution.
They do not include slippage, spread, commissions, order delay, partial fills, liquidity issues, or real entry conditions.
━━━━━━━━━━━━━━━━━━━━━━
🗂️ HISTORICAL TARGET / RISK BOXES
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine can keep previous target and risk boxes on the chart.
This helps users visually review past projected setups.
The script includes a maximum historical trade-plan limit.
This is important because TradingView has object limits.
Historical visuals may include:
🎯 previous target boxes
⚠️ previous risk boxes
📍 previous entry lines
🏁 previous result labels
🏷️ previous target/risk price tags
Users can reduce the historical object limit if the chart becomes crowded or performance slows down.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ SIGNAL LABELS
━━━━━━━━━━━━━━━━━━━━━━
The script displays professional signal labels:
BULLISH FLIP ▲
BEARISH FLIP ▼
A BULLISH FLIP label appears when the script detects a possible bullish candle-pressure shift.
A BEARISH FLIP label appears when the script detects a possible bearish candle-pressure shift.
The arrow icon is included to make direction easier to identify visually.
These labels do not mean the future outcome is guaranteed.
They only mean the script’s internal conditions aligned at that candle.
━━━━━━━━━━━━━━━━━━━━━━
🩸 CRIMSON SPINE + ECHO + FILL
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine includes a premium visual system called:
Crimson Spine + Echo + Fill
This is not a signal by itself.
It is a visual price-following layer designed to create a clean pressure-aura effect around price.
The system includes:
🩸 one central Crimson Spine
🩸 multiple upper echo layers
🩸 multiple lower echo layers
🩸 soft crimson fill clouds
🩸 optional pulse effect
🩸 adaptive spread based on internal pressure intensity
The purpose of the Crimson Spine system is to enhance chart readability and create a premium visual structure around price.
It can help users visually track price flow, pressure compression, and expansion.
Important note:
The Crimson Spine visual is not a standalone entry signal.
It should not be used by itself as a buy/sell system.
It is a supporting visual layer.
━━━━━━━━━━━━━━━━━━━━━━
🎨 VISUAL THEME SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes multiple visual themes:
Midnight Pro
Ice Minimal
Black Gold
Red Carbon
The theme system affects:
🎨 BULLISH / BEARISH label colors
🎨 Target zone colors
🎨 Risk zone colors
🎨 Result stamp colors
🎨 Entry / target / risk tags
🎨 Candle highlight color
🎨 Glow effects
The script uses a modern chart-first visual style.
It does not include a classic dashboard.
It does not include a large statistics panel.
The goal is to keep the chart clean while still providing strong visual feedback.
━━━━━━━━━━━━━━━━━━━━━━
🚨 PROFESSIONAL ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine includes two alert layers:
1. Standard alertcondition() events
2. Dynamic alert() messages
Standard alert conditions are included for compatibility with TradingView’s normal alert interface.
Dynamic alerts can include more detailed information such as:
🚨 symbol
🚨 timeframe
🚨 direction
🚨 score
🚨 entry
🚨 risk
🚨 target
🚨 RR
🚨 Auto Best state
🚨 result
🚨 Net R
The alert system can be configured using:
🚨 Enable Dynamic Alerts
🚨 Alert Bullish Flips
🚨 Alert Bearish Flips
🚨 Alert Trade Results
🚨 Alert Payload Format
🚨 Include Entry / Risk / Target
🚨 Include Auto Best State
🚨 Alert Tag
Available payload formats:
Human
JSON
Human format is easier to read.
JSON format is more suitable for webhook workflows.
Important note:
Alerts are monitoring tools only.
They are not trade execution instructions.
They do not place orders.
Users must confirm all alerts with their own analysis and risk management.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
A practical alert workflow:
1. Add Candle Pressure Flip Engine to your chart.
2. Open TradingView’s alert window.
3. Select the indicator as the alert condition.
4. Choose the desired alert type.
5. For dynamic alert() messages, use “Any alert() function call” if needed.
6. Select alert frequency according to your preference.
7. Use alerts for monitoring only.
8. Confirm each alert manually before making any trading decision.
Alerts may behave differently depending on chart timeframe, symbol, session, and real-time bar updates.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add Candle Pressure Flip Engine to your chart.
2. Start with the default settings.
3. Review whether the chart is trending, ranging, or highly volatile.
4. Wait for a BULLISH FLIP ▲ or BEARISH FLIP ▼ label.
5. Review the candle that created the signal.
6. Check whether the move before the signal was extended.
7. Check whether the rejection wick is meaningful.
8. Check whether the candle closed with pressure.
9. Review the target and risk boxes.
10. Review the Crimson Spine visual context.
11. Use alerts if you want automatic monitoring.
12. Validate the signal with your own market structure, liquidity, trend, session, and risk-management rules.
This indicator is best used as a structured visual review tool.
It should not be used as a blind execution system.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
⚙️ General
Signal Mode
Controls how selective the signal engine is.
Available modes:
Aggressive
Balanced
Conservative
Aggressive allows more signals.
Balanced is the default middle-ground profile.
Conservative requires stricter conditions.
Only One Active Trade
When enabled, the script waits until the active projection reaches target or risk before allowing a new signal.
Signal Cooldown Bars
Controls how many bars must pass between confirmed signals.
Show BULLISH / BEARISH Labels
Shows or hides the main signal labels.
Max Signal Labels
Limits how many signal labels remain visible on the chart.
━━━━━━━━━━━━━━━━━━━━━━
🔥 Candle Pressure Flip Engine
Exhaustion Lookback
Defines how many bars are used to evaluate the prior aggressive move.
Minimum Exhaustion Move ATR
Defines how large the prior move must be, measured in ATR.
Minimum Directional Bars
Requires a minimum number of bars inside the lookback to support the exhaustion direction.
Minimum Reversal Body %
Controls the minimum candle body size of the signal candle.
Minimum Rejection Wick %
Controls the minimum rejection wick percentage.
Close Pressure Threshold %
Controls where the candle must close inside its range.
Minimum Signal Score
Defines the minimum internal score required for a signal.
━━━━━━━━━━━━━━━━━━━━━━
📊 Volume Burst
Use Volume Burst
Enables or disables volume confirmation.
Volume MA Length
Defines the moving average length used for volume comparison.
Minimum Volume Multiplier
Defines how much larger current volume must be compared to average volume.
━━━━━━━━━━━━━━━━━━━━━━
🧭 Momentum Flip
Use Momentum Flip
Enables or disables RSI momentum confirmation.
RSI Length
Defines the RSI calculation length.
RSI Turn Lookback
Defines how many bars back RSI is compared.
Bullish RSI Max After Flip
Prevents bullish signals from appearing when RSI is already too extended upward.
Bearish RSI Min After Flip
Prevents bearish signals from appearing when RSI is already too extended downward.
━━━━━━━━━━━━━━━━━━━━━━
🎯 Target / Risk Result Engine
Show Target / Risk Boxes
Shows projected target and risk zones.
Show Entry / Risk / Target Lines
Shows entry, risk, and target lines.
Show Only Last Trade Plan
Removes older visual trade plans and keeps only the newest one.
Keep Historical Target / Risk Boxes
Keeps previous target/risk projections on the chart.
Max Historical Trade Plans
Controls the maximum number of historical visual plans.
Track Win / Loss Result
Enables visual result tracking.
Default Target Risk Reward
Defines the default projected RR value.
Risk Mode
Controls whether risk is based on signal wick, ATR, or hybrid logic.
ATR Length
Defines the ATR length used for risk calculations.
Risk Buffer Ticks
Adds a small tick buffer to wick-based risk calculations.
Trade Box Extend Bars
Controls how far target/risk boxes extend to the right.
If Target and Risk Hit Same Bar
Controls the same-candle assumption.
Max Result Stamps
Limits the number of WIN / LOSS result labels.
━━━━━━━━━━━━━━━━━━━━━━
🧠 Background Optimizer
Use Background Optimizer
Enables the internal optimizer engine.
Auto Use Best Optimizer Combo
Allows the script to automatically apply the best internal combination after enough closed virtual outcomes are collected.
Optimizer Grid Depth
Controls whether the optimizer uses Light 27 or Full 81 testing depth.
Best Combination Ranking
Controls whether combinations are ranked by wins first or win rate first.
Minimum Trades For Best Combo
Defines how many closed virtual trades are required before a combination can become eligible.
━━━━━━━━━━━━━━━━━━━━━━
🎨 Visual Pro Design
Visual Theme
Controls the main chart color theme.
Visual Intensity
Controls glow and line emphasis.
Label Size
Controls signal/result label size.
Target / Risk Box Transparency
Controls how transparent projected boxes appear.
Show Signal Glow
Shows or hides the signal candle glow.
Show WIN / LOSS Stamps
Shows or hides result labels.
Show Compact Price Tags
Shows or hides ENTRY ZONE, TARGET ZONE, and RISK ZONE tags.
Candle Highlight Mode
Controls candle coloring on signal/result bars.
Max Signal Glow Objects
Limits signal glow objects for chart performance.
━━━━━━━━━━━━━━━━━━━━━━
🚨 Professional Alerts
Enable Dynamic Alerts
Turns dynamic alert() messages on or off.
Alert Bullish Flips
Enables alerts for bullish flip signals.
Alert Bearish Flips
Enables alerts for bearish flip signals.
Alert Trade Results
Enables alerts for target/risk results.
Alert Payload Format
Choose Human or JSON.
Include Entry / Risk / Target
Adds projected price levels into alerts.
Include Auto Best State
Adds Auto Best status into signal alerts.
Alert Tag
Custom text tag included in alert messages.
━━━━━━━━━━━━━━━━━━━━━━
🩸 Crimson Spine + Echo
Show Crimson Spine System
Shows or hides the Crimson Spine visual layer.
Spine Source
Defines the source price used by the spine.
Spine EMA Length
Controls the central spine smoothing.
Echo Spacing ATR
Controls how far echo layers are spaced from the central spine.
Adaptive Echo Spread
Expands or compresses the echo cloud based on internal pressure intensity.
Spine Line Width
Controls line thickness.
Core Line Transparency
Controls the transparency of the central spine.
Echo Transparency Step
Controls how quickly outer echo layers become transparent.
Crimson Fill Transparency
Controls the fill cloud transparency.
Spine Pulse Effect
Adds a subtle pulsing visual effect.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine uses familiar concepts such as:
🔥 candle body analysis
🕯️ wick rejection
📍 close-location pressure
📊 volume comparison
🧭 RSI momentum
📏 ATR-based risk projection
🎯 target/risk boxes
🚨 alerts
These concepts are not unique by themselves.
The originality of the script lies in how they are organized into one workflow:
Exhaustion Move
→ Rejection Wick
→ Close Pressure
→ Volume Burst
→ Momentum Flip
→ Internal Score
→ Auto Best Optimizer
→ BULLISH / BEARISH Flip Label
→ Target / Risk Projection
→ Result Tracking
→ Crimson Spine Visual Layer
→ Professional Alerts
This structure is designed to give users a clearer way to review potential candle-pressure reversal conditions.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
The script’s behavior depends heavily on settings.
Signal frequency and visual output may change based on:
🎛️ signal mode
🔥 exhaustion lookback
📏 ATR settings
🕯️ wick requirement
📍 close-pressure threshold
📊 volume settings
🧭 RSI settings
🧠 optimizer settings
🎯 target/risk settings
⏱️ timeframe
📊 symbol volatility
🌐 market session
📚 available historical bars
A configuration that looks clean on one symbol may behave differently on another.
A setting that appears useful on one timeframe may not be useful on another.
Users should test the script on the exact markets and timeframes they personally study.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
❌ It does not guarantee profitable trades.
❌ It does not predict future price movement.
❌ It does not replace risk management.
❌ It does not execute trades.
❌ It does not place broker orders.
❌ It does not include broker slippage.
❌ It does not include commissions.
❌ It does not include spreads.
❌ It does not include order delay.
❌ It does not include partial fills.
❌ It uses bar-based chart data.
❌ Same-candle target/risk order cannot be known from standard OHLC data.
❌ Internal optimizer results are not official Strategy Tester results.
❌ Target/risk boxes are visual projections only.
❌ Result labels are visual outcomes only.
❌ Crimson Spine visuals are not standalone signals.
❌ Alerts are monitoring tools only.
❌ Historical behavior does not ensure future behavior.
For these reasons, Candle Pressure Flip Engine should be used as an educational decision-support and chart-analysis tool, not as a standalone trading strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
✅ study candle-pressure behavior
✅ study reversal conditions after extended moves
✅ want structured candle rejection confirmation
✅ want volume and momentum context
✅ want clean target/risk visual planning
✅ want historical visual projection review
✅ want premium chart visuals without a large dashboard
✅ want alert-based monitoring
✅ want a structured educational analysis tool
✅ prefer chart-first visual design
It may be less suitable for users who:
❌ want guaranteed buy/sell signals
❌ want a fully automated trading bot
❌ do not use technical analysis
❌ do not want chart visuals
❌ expect one setting to work on every market
❌ expect alerts to execute trades
❌ expect visual projections to match broker execution
❌ want an indicator that replaces personal decision-making
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For cleaner review:
✅ Start with the default settings.
✅ Use Balanced mode first.
✅ Review signals together with market structure.
✅ Check whether the signal appears after a meaningful move.
✅ Review rejection wick quality.
✅ Review candle close position.
✅ Use target/risk boxes as visual planning tools only.
✅ Do not treat every signal as a trade.
✅ Review the Crimson Spine as a supporting visual layer, not as a standalone signal.
✅ Use alerts for monitoring, not automatic execution.
✅ Test the indicator on the symbols and timeframes you actually study.
✅ Combine the tool with independent analysis and risk management.
✅ Keep expectations realistic.
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine is published as an educational and visual market-analysis tool.
The purpose of this description is to explain:
✅ what the script does
✅ how the main logic works
✅ how signals are created
✅ how candle pressure is evaluated
✅ how target/risk boxes are drawn
✅ how result labels work
✅ what the Crimson Spine visual means
✅ what the alert system does
✅ what the limitations are
✅ how the indicator should and should not be used
The script is designed to support structured analysis.
It does not promise profitable results.
It does not remove market risk.
It does not execute trades.
It should not be used as a blind buy/sell system.
It is best used as a visual framework for reviewing candle-pressure reversal conditions, target/risk projection behavior, and alert-based monitoring.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
Candle Pressure Flip Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
No indicator can guarantee future results.
Markets are uncertain, conditions change, and historical behavior does not ensure future performance.
Every user is responsible for their own analysis, validation, risk management, position sizing, and trading decisions.
The target/risk boxes, BULLISH / BEARISH labels, WIN / LOSS result stamps, Crimson Spine visuals, optimizer behavior, and alerts are visual analysis tools only.
Use this script as a structured decision-support and visual review framework, not as a promise of profitability.
Indikator

Explainable Quant Scorecard [TradeDots]Explainable Quant Scorecard
Summary
This indicator computes a composite 0 to 100 evidence score by combining seven independent normalized sub-scores: Trend, Momentum, Volatility Regime, Participation, Relative Strength, Exhaustion Risk, and Multi-Timeframe Alignment. The composite is regime-dependent: when ADX indicates a trending regime, the trend and momentum weights are boosted; when ADX indicates a range regime, the exhaustion-risk weight is boosted instead. All factor weights are exposed as inputs so the model is fully auditable and tunable. A flagship dashboard panel displays every sub-score, the composite, the active regime, and a one-line interpretation.
The intent is to give traders a transparent multi-factor reading on every bar rather than another single-indicator signal. The composite is an evidence score, not a probability or prediction.
What is original here
Composite indicators that mash several oscillators together exist in the public library. This script's contributions are:
Honest factor separation. Each sub-score measures a different dimension (trend, momentum, volatility, participation, relative strength, exhaustion, multi-timeframe). Many composites silently combine correlated readings (such as two momentum oscillators) and present the result as if it were multi-factor confirmation. This script's seven factors are deliberately chosen to be diverse.
Regime-dependent weighting. The composite is not a fixed weighted average. When the market is trending, trend and momentum factors carry more weight; when ranging, exhaustion-risk carries more. This addresses the well-known problem that trend-following inputs and mean-reversion inputs should not be weighted equally in all conditions.
Sub-score divergence detection. The script tracks the maximum deviation of any sub-score from the composite. A large deviation triggers a "sub-score divergence" alert, warning the trader that the factors disagree even when the composite looks clean.
Full transparency. All weights, all thresholds, and the regime trigger levels are user inputs. No black-box.
How it works
Each bar, seven sub-scores are computed.
1. Trend score. EMA slope over a configurable lookback, normalized to 0 to 100 via min-max over a percentile window.
2. Momentum score. Rate-of-change of close over a configurable length, min-max normalized.
3. Volatility regime score. Bollinger Bandwidth percentile mapped to a discrete numeric: compressed BBW (below the lower threshold) maps to 30, expanding BBW (above the upper threshold) maps to 70, normal BBW maps to 50. A label ("Compressed", "Normal", "Expanding") is generated alongside the numeric.
4. Participation score. Volume percentile multiplied by a close-location alignment factor. For a bullish-direction reading, a close near the bar's high earns full alignment; for a bearish-direction reading, a close near the bar's low. The result is a 0 to 100 score that rewards volume and direction-consistent closes.
5. Relative strength score. The asset's return over a configurable horizon, minus the benchmark's return over the same horizon, divided by the asset's own volatility. The result is percentile-ranked over a longer lookback (default 252 bars) to produce a 0 to 100 reading. The benchmark symbol is a user input.
6. Exhaustion risk score. Distance from the trend EMA in ATR units, mapped inversely to 0 to 100 (high exhaustion gives a low exhaustion-score, which is consistent with the convention that high scores are "good" for the composite). The dashboard inverts the label so users see "Exhaustion: High" rather than "Exhaustion: 20".
7. Multi-timeframe alignment score. The trend direction (EMA-fast vs EMA-slow) is fetched at three user-configurable higher timeframes. Each HTF's agreement with the chart-timeframe direction contributes 100, 50, or 0 to the alignment score. The final factor is the average across three timeframes.
The composite is the weighted average. When regime_weighting is enabled and ADX indicates a trending regime (above the user threshold), the trend and momentum weights are multiplied by 1.5 and the exhaustion-risk weight by 0.5. When ADX indicates a range regime (below the lower threshold), the trend and momentum weights are multiplied by 0.5 and the exhaustion-risk weight by 1.5. In a "Mixed" regime, weights are unchanged.
A four-line interpretation is assigned by composite range:
75 or higher : "Constructive, multi-factor agreement"
60 to 74 : "Mixed but constructive"
40 to 59 : "Mixed — wait for alignment"
below 40 : "Bearish or unclear"
Repainting and data integrity
All sub-scores are computed on confirmed bar values. Alerts are gated by barstate.isconfirmed. The benchmark and the three multi-timeframe trend references are fetched with request.security() using prior-bar sources together with barmerge.lookahead_on — the standard non-repainting idiom that returns the last confirmed value from the requested context. These calls do not access future data.
How to read the chart
The composite is plotted as a line in the indicator pane, color-shifted on a red-to-green gradient based on the score.
Horizontal reference lines at 25, 50, and 75 demarcate bearish, midpoint, and bullish zones.
Sub-score plots are available but off by default to keep the pane clean. They can be enabled via input toggle.
The dashboard panel shows the direction in the header, then a row for each of the seven sub-scores (numeric or labelled), then a divider, then the composite score, then the interpretation line and the active regime.
Inputs
Inputs are grouped into seven sections.
Core Settings : trend EMA lengths and norm lookback, momentum ROC length, generic norm lookback, BB length and multiplier, ATR length, ADX length.
Relative Strength : benchmark symbol, RS return horizon, RS volatility length, RS percentile lookback.
Multi-Timeframe : three HTF inputs (default 60-minute, 240-minute, daily).
Factor Weights : a 0 to N weight for each of the seven sub-scores.
Regime Modulation : regime-weighting enable toggle, trend ADX threshold, range ADX threshold.
Visual Settings : dashboard toggle, panel position, panel size, panel background color, composite-plot toggle, sub-score-plot toggle.
Any Alert() function call conditions : per-alert toggles.
Alerts
Four alert conditions are provided:
Score ≥ 75 Bullish (composite at or above 75 with trend direction up)
Score ≥ 75 Bearish (composite at or above 75 with trend direction down)
Score Regime Flipped (composite crossed the 50 midpoint in either direction)
Sub-Score Divergence (any sub-score moves more than 30 points from the composite — a warning that factors disagree)
Each is declared via alertcondition() and fired programmatically through alert() when the corresponding input toggle is enabled, with alert.freq_once_per_bar_close. Alert messages include {{ticker}}, {{interval}}, and {{close}} placeholders.
How to use this script
Read this indicator as your master "is the evidence stack constructive" check, not as an entry trigger.
A composite of 75 or higher with trend direction up is the suite's highest-conviction long setup; the inverse for shorts.
Read the regime cell. In a trending regime, weight your decision toward the trend and momentum sub-scores. In a range regime, weight toward exhaustion risk and relative strength.
If the dashboard shows a high composite but the "Sub-Score Divergence" alert is firing, the agreement is shallow — investigate which factor disagrees before sizing up.
Pair with a setup-specific indicator (sweep, breakout, zone) for entry timing. This script does not give entries.
Limitations and honest caveats
The composite is a weighted heuristic combination of normalized factors, not a calibrated probability. A composite of 80 does not imply an 80% probability of any outcome.
Regime detection uses ADX, which is lagging. The regime label will not reflect a fresh regime change on the first bar.
The Relative Strength benchmark is a single symbol chosen by the user. Choosing an inappropriate benchmark (for example, comparing a small-cap stock to a crypto-currency benchmark) will produce noisy RS readings.
The three MTF references add request.security() calls. On instruments without history at those timeframes, the MTF score may be incomplete on early bars.
Composite values pin to one tail when factor weights are mis-configured. The default weights are reasonable starting values; users are expected to tune for their instrument and timeframe.
The script makes no claim about which direction price will move; it scores the evidence stack currently visible.
Disclaimer
This script is published for informational and educational purposes. It is not investment advice and is not a recommendation to buy or sell any instrument. Composite evidence scores are descriptive, not predictive. Users are solely responsible for their own trading decisions and risk management.
Indikator

Artemis Squeeze Momentum🟦 Artemis Squeeze Momentum collapses an entire momentum-and-volatility workflow into a single oscillator pane. Eight analytical layers — Squeeze Momentum core, Directional Flux, three-tier compression detection with a release tracker, dual confluence gauges, dual anchor Regular + Hidden divergence with a Smart AI Filter, a composite Trend Strength Score (0–100), a four-timeframe MTF Confluence panel with alignment / divergence detection, and a theme-adaptive PRO dashboard — operate as one integrated system, all driven by a single theme dropdown across 12 cohesive palettes.
Most squeeze indicators ship as a strip of black-and-red dots with a lone momentum histogram, then require a separate ADX, a separate divergence tool and a separate confluence gauge to complete the read. Artemis Squeeze Momentum closes that gap: every compression tier, every directional cross, every divergence, every higher-timeframe bias reads from the same pane in the same colour language — no inline colour pickers, no palette drift, no pane-hopping. The result is a complete momentum workbench where compressions, breakouts, regime flips, divergences and multi-TF bias are all readable at a glance.
🟦 HOW THE CORE ENGINE WORKS
**Squeeze Momentum Engine**
Each bar, the engine builds three anchors over the Momentum Length window:
1. **Channel midpoint** — `(highest(high, len) + lowest(low, len)) / 2`
2. **Smoothed midline** — `SMA(HL2, len)`
3. **Channel ATR** — channel range plus the gap-to-prior-close component (matches Pine v5 `tr(true)` on the synthetic channel bar)
The raw momentum is then computed as:
mom_raw = (close − avg(channelMid, smaMid)) / channelATR × 100
This produces a channel-aware, ATR-normalized residual scaled to roughly the ±100 range. The result is then passed through `ta.linreg(mom_raw, len, 0)` to produce the visible momentum line — a linear-regression smoothing that gives the curve its characteristic forward-leaning shape. An SMA of length Signal Length builds the trigger line. Crossovers between momentum and signal mark momentum regime changes — the same convention used by classical MACD.
**Directional Flux**
A custom ADX-style oscillator running in parallel. Each bar, the engine measures positive high-changes vs. negative low-changes, each RMA-smoothed and ATR-normalized:
up = RMA(max(change(high), 0), len) / ATR(len)
dn = RMA(max(−change(low), 0), len) / ATR(len)
ratio = (up − dn) / (up + dn)
flux = RMA(ratio, len / 2) × 100
The result is a directional bias oscillator bounded to ±100. An overflow branch (values past ±25 — where the directional pressure becomes structurally significant) renders as a separate, brighter fill so traders read both raw direction and acceleration in one glance.
**Heiken Ashi Bias (Optional)**
When `Use Heiken Ashi Bias` is enabled, the Flux engine reads from a Heiken Ashi bar stream instead of raw OHLC. HA bars smooth body / wick noise and emphasise trend continuation — useful on lower timeframes where raw OHLC is noisy.
🟦 SQUEEZE DETECTION
A three-tier Bollinger-vs-ATR compression detector running on the same Length as the Momentum Core (so compression and momentum stay perfectly aligned):
| Tier | Condition | Visual |
|---|---|---|
| Tight | stdev < ATR × 0.5 | Deepest, most saturated theme tone |
| Mid | stdev < ATR × 0.75 | Middle-intensity theme tone |
| Loose | stdev < ATR × 1.0 | Lightest tier — broadest detection |
Tiers nest — tight implies mid implies loose. The bottom-of-pane squeeze column lights up whenever any tier is active and the colour escalates as compression tightens, using a theme-native ramp drawn from each palette's own colour family (so the column reads as part of the theme rather than an imported generic warning).
The standard deviation is computed via a single-pass Welford algorithm — numerically stable on long histories where naive sum-of-squares accumulators drift.
**♦ Squeeze Release Marker**
The signature feature of the engine. The bar after the loosest active tier (stdev < ATR × 1.0) finally drops off, a tiny ♦ diamond paints at the midline in the theme's vivid release accent — one step brighter and more saturated than the tight tier so the climax moment reads as the most luminous point in the squeeze cycle.
This is the canonical "spring uncoiled" moment: compression has fully ended, volatility expansion begins, breakout direction is about to reveal itself. Historically the highest-conviction breakout setup the squeeze model produces. Hovering on the marker surfaces:
- Current bar state (compression ended this bar)
- Meaning (volatility expansion incoming)
- Next steps (watch the next 1–5 bars, confirm with Momentum slope, cross-check Flux, prioritise MTF-aligned setups)
🟦 CONFLUENCE GAUGES
Two horizontal strips render at the top (Bull side, +70 to +75) and bottom (Bear side, −70 to −75) of the pane. Each strip lights up when momentum and flux agree on direction, with brightness reflecting the confluence tier:
| State | Condition | Opacity |
|---|---|---|
| Strong Bull | mom > 0 AND flux > 0 | Full |
| Weak Bull | mom > 0 OR flux > 0 | Half |
| Strong Bear | mom < 0 AND flux < 0 | Full |
| Weak Bear | mom < 0 OR flux < 0 | Half |
| Neutral | Neither side dominates | Transparent |
The display mode (Both / Bull / Bear / None) lets traders mute one half if they only trade one direction.
**Confluence Buy / Sell Triangles**
A separate signal layer rides outside the gauges. The detector fires only when momentum crosses its signal line WHILE in the opposite zone past the Signal Threshold AND with flux in the opposite direction (classic mean-reversion logic):
- **Buy ▲** (below bear gauge at −90) — `xMomUp AND momVal < −threshold AND fluxVal < 0`
- **Sell ▼** (above bull gauge at +85) — `xMomDn AND momVal > +threshold AND fluxVal > 0`
Each triangle pairs with an invisible label carrying a tooltip that lists current mom, signal, flux, the active threshold, and a one-line interpretation of the trigger. The Signal Threshold (default 40) is independent of the Divergence Sensitivity setting — the two engines need different thresholds (divergence wants permissive at 25 for pivot detection, confluence wants strict at 40 for deep mean-reversion triggers).
🟦 DIVERGENCE DETECTION
A cross-confirmed, dual-anchor detector that fires on signal-line crossovers (NOT on Pine pivots). Regular divergences signal exhaustion reversals, Hidden divergences signal trend continuation.
**Four divergence types:**
| Type | Price | Momentum | Signal |
|---|---|---|---|
| Regular Bull (D▲) | Lower Low | Higher Low | Potential reversal up |
| Regular Bear (D▼) | Higher High | Lower High | Potential reversal down |
| Hidden Bull (H▲) | Higher Low | Lower Low | Uptrend continuation |
| Hidden Bear (H▼) | Lower High | Higher High | Downtrend continuation |
Regular divergence uses solid lines; Hidden uses dashed lines — visually quieter to match the continuation signal's lower conviction tier. Labels (D▲ / D▼ / H▲ / H▼) each carry a tooltip-rich hover with price + momentum + meaning context.
**Dual-Anchor Logic**
The key engineering choice. Regular and Hidden divergences each maintain their own separate anchor pair:
- **Regular anchors** — stored only at extreme-zone crosses (|mom| > Sensitivity). Catches classical exhaustion reversals at deep extremes.
- **Hidden anchors** — stored at ANY signal-line cross, regardless of zone. Shallow pullbacks inside an established trend rarely push momentum past ±Sensitivity, so the Hidden detector must accept every cross to capture the classical "price HL + mom LL" / "price LH + mom HH" continuation pattern.
A detected divergence consumes its anchor (resets to na) so the next setup starts fresh.
**Smart Divergence Filter (AI)**
Optional pre-filter that rejects low-quality divergences before they render. Three independent gates:
1. **Min Momentum Swing** — minimum |momentum| difference between the two pivot momentum values (default: 10 units). Drops noise-level differences.
2. **Min Price Swing (%)** — minimum price swing between pivots as a percentage of the recent `Momentum Length × 4` high-low range (default: 0.3%). Drops divergences where price barely moved relative to recent volatility.
3. **Require Flux Confirmation** — Flux must agree with the divergence direction at the moment of detection (Bull div needs Flux > 0, Bear div needs Flux < 0). Filters out divergences that fire counter to the broader directional bias.
When the master toggle is OFF (default), all detected divergences render. When ON, only divergences that clear all three gates survive. The filter applies identically to chart rendering and alert conditions — no mismatch between visual and alert signals.
🟦 COMPOSITE TS SCORE (0–100)
A weighted blend of every analytical layer into a single RSI-style 0–100 reading. 50 is neutral, > 50 leans bull, < 50 leans bear.
| Component | Weight | Mapping |
|---|---|---|
| Momentum | 30% | mom value mapped from −100..+100 → 0..100 |
| Flux | 30% | flux value mapped the same way |
| Mom × Signal | 15% | 70 if mom > sig, else 30 (slope direction confirmation) |
| Confluence | 25% | 90 strong-bull / 65 weak-bull / 50 neutral / 35 weak-bear / 10 strong-bear |
The score is rounded to the nearest integer and labelled into five tiers in the dashboard: STRONG BULL (≥75) / BULL (≥60) / NEUTRAL (40–59) / BEAR (≥25) / STRONG BEAR (<25), each prefixed with a directional glyph (▲ ▼ ■). The tier label gives traders an executive summary at a glance — one row in the dashboard tells you what every other row collectively says.
🟦 MULTI-TIMEFRAME CONFLUENCE
A separate PRO panel that runs the full Momentum + Flux + Confluence stack on four higher timeframes simultaneously via `request.security()` and surfaces the overall alignment state. All MTF calls use `lookahead = barmerge.lookahead_off` — fully repaint-safe on every closed bar.
**Six Presets**
Pre-tuned four-timeframe packs matched to common trader profiles:
| Preset | TF 1 | TF 2 | TF 3 | TF 4 | Use case |
|---|---|---|---|---|---|
| Scalp | 1m | 5m | 15m | 1h | Fast scalper |
| Intraday | 5m | 15m | 1h | 4h | Day trader |
| Swing | 15m | 1h | 4h | 1D | Default — swing trader |
| Position | 1h | 4h | 1D | 1W | Position trader |
| Crypto | 5m | 15m | 1h | 4h | 24/7 markets |
| Forex | 15m | 1h | 4h | 1D | Session-based markets |
**Alignment Detection**
Each TF returns a bias tag (▲ STRONG / ▲ WEAK / ▼ STRONG / ▼ WEAK / ◈ NEUTRAL) and a direction code (+1 / 0 / −1). The header rolls up the four codes into one of three states:
- **▲▲▲▲ ALIGNED** — all four TFs bullish (highest-conviction long setup)
- **▼▼▼▼ ALIGNED** — all four TFs bearish (highest-conviction short setup)
- **◈ MIXED** — TFs disagree (no clean direction)
**Divergence Detection**
When the current chart's bias contradicts ≥ 3 of the 4 HTF biases (e.g., chart bullish but 3+ HTFs bearish), an MTF Divergence flag fires — a contrarian / counter-trend warning. Treat as a "current move may be a bull / bear trap" signal.
**Panel Style**
Direction is conveyed purely by the ▲ / ▼ glyphs in each row's tag — never by cell colour. Every cell uses a uniform `thBull` text colour matching the main Dashboard, so the two panels feel like one product across all twelve themes, light and dark alike.
🟦 BAR COLORING
Five mutually exclusive modes apply an oscillator-driven colour to every price bar on the chart:
| Mode | Behavior |
|---|---|
| None | Leave bars untouched (default) |
| Momentum | Bull when mom > 0, bear when mom < 0 |
| Flux | Bull when flux > 0, bear when flux < 0 |
| Squeeze | Theme-native ramp when compressed, neutral otherwise |
| Confluence | Strong / Weak / Neutral tiers via mom + flux agreement |
| Slope | Bull when mom > signal, bear when mom < signal |
Colours are pulled from the active theme — no per-mode color picker needed.
🟦 DASHBOARD
A compact 2-column, 8-row data panel renders on the last bar when enabled. Every value derives from variables already computed upstream, so the dashboard adds zero overhead until the final bar.
| Row | Left | Right |
|---|---|---|
| Header | Artemis Squeeze | ▲ STRONG BULL / ▲ WEAK BULL / ■ NEUTRAL / ▼ WEAK BEAR / ▼ STRONG BEAR |
| TS Score | TS Score | 0–100 composite + tier label (STRONG BULL / BULL / NEUTRAL / BEAR / STRONG BEAR) |
| Momentum | Momentum | Current value + trend arrow (▲ ▼ ■) |
| Flux | Flux | Current value + trend arrow (▲ ▼ ■) |
| Squeeze | Squeeze | TIGHT / MID / LOOSE / — |
| Confluence | Confluence | STRONG BULL / WEAK BULL / NONE / WEAK BEAR / STRONG BEAR |
| Div | Div | Most recent divergence within last 50 bars (▲ REG / ▼ REG / ▲ HID / ▼ HID / —) |
| Slope | Slope | ▲ UP / ▼ DOWN / ■ FLAT |
**Theme-Adaptive Chrome**
The dashboard auto-inverts its layout based on the active theme:
- **Dark themes** (Tropic, Amber, Pastel, Cyber, Helios, Electric, Candy, Bloomberg, Solar, Royal): header and footer use a faint `thBull` tint, middle rows stay solid dark, text uses full-saturation `thBull`. Border uses `thBull` at 20% transparency for strong theme presence.
- **Light themes** (Midnight, Graphite): backgrounds flip to white, text stays `thBull` (which is itself dark on these themes), border uses `thBull` at 40% transparency.
This guarantees text legibility against every palette without per-theme manual tuning. The MTF Confluence panel uses identical chrome rules so the two panels feel like one product.
**Position & Size**
Six anchor slots (Top / Middle / Bottom × Left / Right) and four text sizes (Tiny / Small / Normal / Large). The Dashboard defaults to Bottom Right and the MTF panel to Top Right — vertically opposite so the two never overlap.
🟦 COLOR THEMES
Twelve cohesive palettes, each resolving to four axis colours plus a four-step squeeze ramp:
| Theme | Character | Bull | Bear |
|---|---|---|---|
| Tropic | Cyan steel + deep orange | #00bcd4 | #ff6d00 |
| Amber | Warm amber + ember red | #ff9800 | #e53935 |
| Pastel | Sky blue + soft lavender | #4fc3f7 | #9575cd |
| Cyber | Neon lime + hot crimson | #00e676 | #ff1744 |
| Helios | Bright gold + scarlet | #ffd600 | #ef5350 |
| Electric | Electric aqua + magenta | #00e5ff | #e040fb |
| Candy | Neon green + hot pink | #69F0AE | #FF4081 |
| Bloomberg | Terminal orange + cyan | #ff8c00 | #00b0ff |
| Solar | Solarized olive + crimson | #859900 | #dc322f |
| Royal | Imperial gold + deep purple | #ffd700 | #6a0dad |
| Midnight | Deep navy + dark crimson | #0d47a1 | #b71c1c |
| Graphite | Near-black + silver grey | #1a1a1a | #757575 |
Beyond the four axis colours (bull / bear / neutral / signal), each theme also defines its own four-step squeeze ramp (tight / mid / loose / release) drawn from its own colour family — so the squeeze column and the ♦ release marker harmonise with the active theme rather than imposing a generic warning hue. Nothing below the theme resolver block references a raw hex literal, so a single dropdown selection drives every plot, fill, gauge, divergence line, dashboard cell, MTF panel and bar colour.
🟦 ALERT SYSTEM
Twenty-two alert conditions, all using `alert.freq_once_per_bar_close`. Each alert is gated by its own toggle in the Alerts group — hiding a feature on the chart silences its alerts automatically.
| Alert | Condition |
|---|---|
| Confluence Buy | Mom crossed UP through signal while below −Threshold AND Flux bearish |
| Confluence Sell | Mom crossed DOWN through signal while above +Threshold AND Flux bullish |
| Momentum Cross Up | Mom crossed above zero |
| Momentum Cross Down | Mom crossed below zero |
| Flux Cross Up | Flux crossed above zero |
| Flux Cross Down | Flux crossed below zero |
| Bullish Swing | Mom × signal upward cross (any zone) |
| Bearish Swing | Mom × signal downward cross (any zone) |
| Strong Bull Confluence | Mom AND flux both turned bullish |
| Strong Bear Confluence | Mom AND flux both turned bearish |
| Weak Bull Confluence | Mom OR flux turned bullish |
| Weak Bear Confluence | Mom OR flux turned bearish |
| Tight Squeeze | stdev < ATR × 0.5 |
| Mid Squeeze | stdev < ATR × 0.75 |
| Loose Squeeze | stdev < ATR × 1.0 |
| Regular Divergence | D▲ or D▼ detected (respects Smart Filter) |
| Hidden Divergence | H▲ or H▼ detected (respects Smart Filter) |
| Squeeze Release ♦ | stdev re-expanded above ATR × 1.0 |
| MTF Aligned | All four MTF timeframes agree on direction |
| MTF Divergence | Current chart bias contradicts ≥ 3 of 4 HTF biases |
Each alert fires through `alert()` so the message body carries live context — direction, current values, the trigger condition, and a one-line interpretation. Divergence alerts respect the Smart Filter — if the filter is ON and a divergence is rejected visually, the alert will also not fire.
🟦 SETTINGS REFERENCE
**Visual**
- Theme — 12 cohesive palettes. Default: Tropic
**Bar Coloring**
- Bar Color Mode — None / Momentum / Flux / Squeeze / Confluence / Slope. Default: None
**Momentum Core**
- Length — Lookback for both the Momentum engine and the Squeeze window. Range 7–50. Default: 20
- Signal Length — SMA smoothing for the signal line. Range 2–7. Default: 3
- Show Momentum — Toggle. Default: ON
**Directional Flux**
- Length — Lookback for the Flux engine. Range 7–50. Default: 30
- Use Heiken Ashi Bias — Toggle. Default: OFF
- Show Flux — Toggle. Default: ON
**Squeeze Engine**
- Show Squeeze — Toggle. Default: ON
- Show Squeeze Release — Toggle for the ♦ marker. Default: ON
**Confluence Gauges**
- Display Mode — Both / Bull / Bear / None. Default: Both
- Signal Threshold — |momentum| floor for Buy ▲ / Sell ▼ arrows. Range 10–80. Default: 40
**Divergence**
- Sensitivity — |momentum| floor for Regular div detection. Range 10–50. Default: 25
- Regular Divergence — Toggle. Default: ON
- Hidden Divergence — Toggle. Default: ON
- Show Divergence Lines — Toggle. Default: ON
- Show Divergence Labels — Toggle. Default: ON
- Label Size — Tiny / Small / Normal / Large. Default: Tiny
- Smart Divergence Filter (AI) — Master toggle. Default: OFF
- Min Momentum Swing — Default: 10.0
- Min Price Swing (%) — Default: 0.3%
- Require Flux Confirmation — Default: ON
**Multi-Timeframe**
- Show MTF Panel — Toggle. Default: ON
- Timeframe Preset — Scalp / Intraday / Swing / Position / Crypto / Forex. Default: Swing
- Panel Position — 6 anchor slots. Default: Top Right
- Panel Text Size — Tiny / Small / Normal / Large. Default: Small
**Dashboard**
- Show Dashboard — Toggle. Default: ON
- Panel Position — 6 anchor slots. Default: Bottom Right
- Panel Text Size — Tiny / Small / Normal / Large. Default: Small
**Alerts**
- 20 toggles covering all 22 alert conditions (Regular and Hidden divergence each drive two alerts — bull + bear — from one toggle).
- Defaults ON: Confluence Buy/Sell, Mom Cross Up/Dn, Flux Cross Up/Dn, Strong Bull/Bear Confluence, Tight Squeeze, Regular Divergence, Squeeze Release, MTF Aligned.
- Defaults OFF: Swings, Weak Confluences, Mid/Loose Squeeze, Hidden Divergence, MTF Divergence.
🟦 COMPATIBILITY
Works on all asset classes and all timeframes in TradingView Pine Script v6.
- Crypto: Spot, futures, perpetual contracts
- Forex: All pairs
- Equities: Stocks, ETFs, indices
- Commodities: Metals, energy, agriculture
- Timeframes: 1m through Monthly
The channel-aware ATR normalization in the Momentum engine, the ATR-normalized Flux ratio, and the stdev / ATR squeeze tests make every layer volatility-agnostic. The same default settings work on a 1m BTC chart and a weekly index chart without retuning. The MTF presets cover the common scalp / intraday / swing / position profiles plus dedicated Crypto and Forex packs.
🟦 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own analysis and apply proper risk management. Indikator
