Lumina Adaptive Momentum Oscillator [Pineify]Lumina Adaptive Momentum Oscillator
This oscillator measures price momentum through a double-smoothed triangular moving average, then overlays a Kaufman-style Adaptive Moving Average as a signal line that accelerates in trending conditions and slows in ranging ones. The result is a histogram that stays cleaner than a simple ROC or MACD while still catching real directional shifts — buy and sell signals fire only when momentum crosses the adaptive signal while on the "wrong" side of zero, filtering out crosses that occur mid-trend.
Key Features
Triangular MA momentum — double SMA smoothing cuts through noise that a single-period momentum calculation amplifies
Kaufman Adaptive Moving Average signal line — efficiency-ratio scaling means the signal line tracks fast when price has clear direction and lags conservatively during chop
Polarity-colored histogram — bars flip between bull and bear colors on the zero line, making directional bias readable at a glance
Counter-trend signal filter — buy signals require momentum to be below zero; sell signals require it above, so the oscillator only flags reversals, not trend continuation pulses
Configurable alerts for buy and sell conditions (uncomment the alertcondition lines to enable)
How It Works
Triangular momentum : A triangular moving average is the SMA of an SMA — ta.sma(ta.sma(close, length), length) . This double pass heavily weights the middle of the lookback window, producing a line that barely reacts to individual candle spikes. Momentum is then the change in this average over length bars, equivalent to asking: "how much has the ultra-smooth baseline shifted over the period?"
Adaptive signal line (AMA) : The signal applies a Kaufman Adaptive Moving Average to the momentum values. Each bar, an Efficiency Ratio is computed as the absolute cumulative price change divided by the sum of bar-by-bar absolute changes over the window. A high ER (price moving steadily in one direction) produces a fast smoothing constant; a low ER (lots of back-and-forth) produces a slow one. The smoothing constant is squared before application — squaring compresses near-zero values toward zero and pushes higher values closer to one, amplifying the contrast between ranging and trending states.
Signals : A buy condition fires when the momentum histogram crosses above the signal line from below zero. A sell condition fires when momentum crosses below the signal line from above zero. Both plotshape and alertcondition calls are included but commented out by default, so the chart stays clean unless signals are explicitly enabled.
How the Components Work Together
The triangular MA reduces the raw momentum noise that trips up standard crossover strategies. A plain ta.change(close, length) signal line would fire constantly in sideways markets because individual candle closes swing around. By first anchoring momentum to a doubly-smoothed baseline, the histogram only moves when an actual directional shift is underway in price.
The AMA signal line then adapts to how directional that momentum itself is. When momentum is trending (e.g., steadily falling through a corrective move), the AMA tracks it closely, keeping the histogram-to-signal gap narrow and the crossover conditions quiet. When momentum flips abruptly — the scenario a reversal trader wants — the ER spikes, the smoothing constant rises, and the signal line catches up quickly enough to generate a timely cross.
The zero-side filter adds the final constraint: only counter-trend crosses matter. A bullish cross above zero would typically mean momentum is already positive and the trend is continuing, not reversing — those are excluded. This makes the signals less frequent but more aligned with actual turning points.
Trading Ideas and Insights
Use on the daily or 4H chart during confirmed trending markets. Wait for pullbacks that drive momentum negative, then watch for a histogram-crosses-signal event below zero as an early re-entry cue. Confirmation from price action (e.g., a higher low or a break of the short-term descending channel) reduces false positives.
On intraday charts, the double smoothing introduces noticeable lag — roughly 2× the period in bars. For a 14-bar setting this means signals may appear 3-5 candles after the actual reversal candle. Consider reducing length to 7-9 on lower timeframes to recover responsiveness.
The signal line (currently commented out) can be uncommented as an additional visual layer. When the histogram bars are shrinking toward zero while the signal line is still diverging, it often indicates momentum exhaustion before the actual cross occurs, giving a heads-up for limit orders.
Unique Aspects
Most MACD-style oscillators apply EMA smoothing to raw price; this one applies double-SMA smoothing before differencing, which produces a different noise profile — more immune to single-bar wicks but slower to react to sharp moves
Applying the Kaufman AMA to momentum values (rather than price) is less common. The efficiency ratio reflects momentum's own trendiness, not price's, so the adaptive behavior is tuned to the oscillator's dynamic rather than borrowed from a price-following MA
The zero-side signal filter is built in rather than left to the trader to configure — the indicator makes an explicit methodological choice that these signals represent reversals only
How to Use
Add the indicator to any chart. The default length of 14 suits daily and 4H charts; adjust lower for faster timeframes.
Watch the histogram color: sustained green bars above zero indicate positive momentum; sustained red bars below zero indicate negative momentum.
For signals: uncomment the two plotshape lines in the source to display BUY/SELL labels, or uncomment the alertcondition lines and create alerts via TradingView's alert panel.
A BUY label appears when the histogram crosses above the signal line while below zero — a potential momentum reversal from bearish territory.
A SELL label appears when the histogram crosses below the signal line while above zero — a potential momentum reversal from bullish territory.
Combine with a higher-timeframe trend filter (e.g., price above/below a 200 EMA) to take only signals aligned with the prevailing trend.
Customization
Data Length (default: 14) — Controls the period for both the triangular MA and the adaptive signal line. Higher values produce smoother output with more lag; lower values react faster but generate more noise. Typical range: 7–21.
Bullish Color (default: green) — Color of histogram bars when momentum is positive.
Bearish Color (default: red) — Color of histogram bars when momentum is negative.
Conclusion
The Lumina Adaptive Momentum Oscillator combines triangular-MA momentum with a Kaufman-adaptive signal line to surface genuine reversal pressure rather than routine oscillations. The built-in zero-side signal filter keeps the indicator focused on counter-trend setups, making it most useful as a timing tool within a larger trend-following framework. Past patterns do not guarantee future results — use alongside price structure and volume confirmation.
指标

NTR: NASDAQ M1 - Trend RunnerNASDAQ M1 - MACD Trend Runner is a systematic trend continuation strategy specifically designed and optimized for the NASDAQ index on the 1-minute timeframe.
The strategy was developed around a simple observation:
Strong directional movements in NASDAQ often emerge after temporary pullbacks toward key moving averages while underlying momentum remains intact.
Instead of attempting to predict reversals or market turning points, the objective of this framework is to identify favorable re-entry opportunities within an existing bullish environment and allow winning positions to develop through dynamic trade management.
CORE CONCEPT
The strategy combines momentum, trend structure, market positioning, and risk control into a single execution model.
A valid setup requires:
• MACD bullish crossover.
• Momentum developing from lower MACD values.
• Price trading within a defined proximity to the 200-period moving average.
• Positive higher-order trend structure measured through the slope of the 50-period moving average.
• Time-of-day filtering to focus on periods of meaningful market participation.
This combination seeks to isolate moments where price temporarily retraces into trend support before resuming directional movement.
TRADE MANAGEMENT
Risk management is based on market structure rather than fixed stop distances.
Initial stop placement is determined using recent technical lows, creating a structure-based risk framework that adapts to changing market conditions.
Once a position develops sufficient unrealized profit, the strategy transitions into a trailing stop model designed to protect gains while allowing extended trend participation.
The goal is not to maximize win rate.
The goal is to capture asymmetric reward opportunities where a limited number of successful trades can outweigh multiple small losses.
KEY FEATURES
• MACD Momentum Confirmation
• SMA200 Trend Location Filter
• SMA50 Slope Validation
• Technical Structure-Based Stop Loss
• Dynamic Trailing Stop Management
• Session-Based Time Filter
• Daily Trade Limitation Logic
• Daily Profit Protection Logic
• Visual Diagnostic System
• Re-entry Detection Framework
DESIGN PHILOSOPHY
This strategy is intentionally specialized.
It was developed, tested, and refined specifically for NASDAQ price behavior on the 1-minute timeframe.
While certain concepts may be transferable to other instruments, the framework was not designed as a universal trading system.
The primary objective is to exploit recurring short-term trend continuation behavior observed within NASDAQ intraday market structure.
DISCLAIMER
This strategy is provided for educational and research purposes only.
Past performance does not guarantee future results. All trading involves risk, and users should perform their own analysis and validation before applying any strategy in live market conditions.
Created by @Peter_n_n 策略

PI Radius Energy (PRE)# PI Radius Energy (PRE)
PI Radius Energy (PRE) is a momentum and volatility fusion engine designed to transform traditional ATR data into a dynamic circular energy model.
Instead of treating ATR as a simple volatility measurement, PRE interprets ATR as a radius and converts it into an energy field using the mathematical relationship of a circle:
π × r²
This approach allows market volatility to be expressed as an expanding or contracting energy field rather than a linear value. The resulting energy is then combined with OBV momentum flow, creating a unique representation of market participation, pressure, and directional strength.
The core objective of PRE is not to chase trends after they have already developed, but to identify the moments when energy begins to build beneath the surface. By combining circular volatility expansion, volume flow acceleration, squeeze detection, and momentum confirmation, PRE attempts to highlight areas where market energy is transitioning from compression to expansion.
### Main Components
• PI Radius Engine (πr² volatility model)
• OBV Momentum Flow Integration
• Dynamic Energy Normalization
• Squeeze Compression Detection
• Energy Trend EMA Filter
• ATR Rank & Volume Rank Validation
• Momentum Z-Score Filtering
• 3D Aura Visualization
• Early Bottom Detection Pills
• Bullish Confirmation Signals
### How to Read PRE
**Green Aura**
* Energy is above its average.
* Market pressure is expanding.
* Bullish conditions are strengthening.
**Red Aura**
* Energy is below its average.
* Market pressure is weakening.
* Bearish conditions are dominant.
**Green Pills**
* Early signs of energy expansion.
* Potential transition from compression to movement.
* Designed to appear before major momentum phases whenever possible.
**Yellow Confirmation Pills**
* Additional confirmation that energy has crossed into a stronger bullish state.
**Purple Energy Trend Line**
* Long-term energy trend.
* Helps distinguish temporary spikes from sustained energy expansion.
### Philosophy Behind PRE
Most indicators measure price.
Some indicators measure volume.
PRE attempts to measure something different:
**Market Energy.**
By transforming volatility into a circular energy field and combining it with volume-driven momentum, PRE seeks to provide a different perspective on trend development, accumulation, expansion phases, and emerging directional pressure.
PRE is not intended to predict the future. Instead, it is designed to visualize how market energy evolves, contracts, and expands over time, helping traders identify potential opportunities before they become obvious to the broader market.
指标

Modern Adaptive MACD [GBB]The MACD is half a century old. Gerald Appel published it in 1979 for daily charts of US equities, and the 12/26/9 default has been copied from one trading textbook to the next ever since. Nobody asks anymore why those three numbers should be the right ones for Bitcoin five-minute charts in 2026.
This is a rebuild. Four modernizations, each independently toggleable, all measured before being added. With every layer at default, the output is the textbook MACD. Switch them on one at a time to see what each one does on your own chart.
Layer 1: Adaptive periods
Instead of hard-coding 12 and 26, the indicator measures the market's dominant cycle in real time with an Ehlers homodyne discriminator and tunes the periods to it. In slow trends the periods widen and the indicator stops chopping you up with false crosses. When volatility picks up, periods tighten and it stays responsive.
Layer 2: Signal speedup
Classic MACD has two layers of lag. One in the EMAs that build the MACD line, another in the signal line on top of that. Most of the lag people complain about lives in the second smoother.
The first version of this layer used a zero-lag EMA. It didn't work. The zero-lag transform overshoots, and on strong moves the signal ends up ahead of the MACD, inverting the histogram color exactly when you most need the cross to be honest.
What shipped is the boring fix: a multiplier on the signal length. 1.0 keeps the classic 9-bar signal. Lower values speed it up. I measured the trade across 24 months of Bitcoin perpetual data. At a multiplier of 0.5, the indicator confirms a swing roughly 4 bars earlier and catches about 25% more swings than the classic. The cost is that the false-signal rate, whipsaw crosses with no real swing attached, roughly doubles, from 6% to 12.5% of all crosses. Whether that trade is worth it depends on what you do with the indicator. Pick the multiplier accordingly.
Layer 3: Normalization
A raw MACD reading of 15 means nothing on its own. On gold at $4500 it's small. On a penny stock it's enormous. Two normalization modes are available. "Percent of price" expresses the MACD as a percent of current price, which makes the reading comparable across instruments. "Z-Score" expresses it as standard deviations from its own recent average. Both are off by default. Turn one on if you trade more than one market, or if you want thresholds that don't need re-tuning every time you switch symbols.
Layer 4: Divergences
Regular and hidden divergences are detected automatically on confirmed pivots. Confirmed means they do not repaint. The line shows up a few bars after the pivot it marks, which is the honest cost of non-repainting confirmation. If anyone shows you a divergence indicator that draws lines in real time at the exact low, check what happens to those lines after the next few candles close.
Small triangles mark every MACD/Signal cross at the crossing point. Teal for bullish, red for bearish. Useful on busy charts where the cross moment is otherwise ambiguous.
What this is, and what it isn't
I tested every configuration of this indicator as a standalone trading system on 24 months of Bitcoin one-hour data. Always in market, long on bullish cross, flip on bearish. Every configuration lost money. Profit factor below 1 across the board. Negative Sharpe. Nothing statistically significant, before or after multiple-comparison correction.
This is what happens to any oscillator cross strategy run without a filter. The classic MACD shows the same result on the same test.
This is not a system. It's a timing tool. It tells you when momentum is shifting, earlier and more cleanly than the classic. Your job is to combine that with whatever else you trade on: higher-timeframe trend, market structure, key levels, your own setup logic. Without that filter, the cross alone is noise.
Settings
Source: close by default.
Classic periods: 12/26/9. Used when Adaptive is off.
Layer 1 (Adaptive): on by default. Min and max cycle bounds and the fast/signal ratios are exposed if you want to tune them.
Layer 2 (Signal speedup): multiplier 0.3 to 1.0. Default 1.0. Try 0.5 first.
Layer 3 (Normalize): None / Percent of price / Z-Score. Off by default. Z-Score has its own lookback length.
Layer 4 (Divergences): on by default, regular divergences only. Hidden divergences are off by default to keep the chart clean. Pivot left/right bars control how strict the swing detection is.
Display: cross markers on by default.
Alerts are wired for every cross (MACD/signal and zero-line) and every divergence type (regular and hidden, bullish and bearish).
Free. No paywall, no subscription, no gated features. If you find a configuration that works well on a specific instrument or timeframe, drop a comment.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
GoodBadBitcoin
Also on:
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 指标

CVD X-Ray
CVD X-Ray
See the Participation Behind the Move
Most indicators tell you what price is doing.
CVD X-Ray is designed to reveal who is participating behind the move.
Price can rally on weak participation.
Price can decline despite aggressive buying.
Price can appear strong while participation quietly deteriorates beneath the surface.
CVD X-Ray was built to expose these hidden shifts in market participation by combining cumulative volume delta pressure, momentum acceleration, participation normalization, and multi-timeframe alignment into a single visual framework.
Rather than focusing solely on market structure, CVD X-Ray focuses on participation pressure—the intensity and direction of buying and selling activity driving the current move.
What Makes CVD X-Ray Different?
Traditional volume indicators often struggle with context.
A large reading may appear important on one chart while being completely normal on another.
CVD X-Ray solves this by normalizing participation pressure and classifying it into intuitive strength categories:
Weak
Building
Moderate
Strong
Extreme
This allows traders to quickly distinguish between routine activity and meaningful participation events.
Pressure vs Trend
One of the most common mistakes traders make is confusing participation with trend.
A market can be trending lower while buyers suddenly begin participating aggressively.
Likewise, a market can be trending higher while participation quietly weakens beneath the surface.
CVD X-Ray intentionally measures participation pressure rather than market structure trend.
This distinction can help identify potential continuation opportunities, weakening moves, failed breakouts, and early signs of accumulation or distribution.
Strength and Rarity
Each reading is evaluated based on both participation strength and historical context.
The optional percentile ranking (PCT) provides additional insight into how unusual the current participation reading is relative to recent market behavior.
For example:
P80 = Stronger than 80% of recent readings
P95 = Stronger than 95% of recent readings
This helps traders quickly recognize when participation is becoming statistically significant.
Designed for Clarity
CVD X-Ray was built around a simple goal:
Reduce information overload while increasing informational value.
The interface uses a consistent strength scale, visual participation hierarchy, and clean multi-timeframe dashboard to deliver actionable context without cluttering the chart.
Whether you're analyzing breakouts, pullbacks, reversals, or trend continuation setups, CVD X-Ray provides a structured view of the participation driving price.
Because understanding what price is doing is useful.
Understanding who is participating behind the move is often more valuable.
Disclaimer
CVD X-Ray is an analytical tool designed to assist in evaluating market participation and participation pressure. It does not predict future price movements and should not be used as a standalone basis for trading decisions.
All trading involves risk, including the potential loss of capital. Past performance, historical participation readings, and indicator signals are not guarantees of future results.
This script is provided for educational and informational purposes only and does not constitute financial, investment, or trading advice. Users are solely responsible for their own risk management and trading decisions. 指标

Tidal Divergence [JOAT]Tidal Divergence
Tidal Divergence is a composite divergence detector that lives in a sub-pane and projects high-conviction divergence visuals onto the price chart. The composite blends three volume-based oscillators — Money Flow Index, percentile-ranked Cumulative Volume Delta, and z-scored OBV rate-of-change — into a single normalized stream. Both regular and hidden divergences are detected. Persistent zones are drawn at divergence pivots, and zone mitigation is tracked with body / wick / rejection modes.
What makes it different
Single-oscillator divergence indicators give a single perspective. Tidal Divergence's composite triangulates three independent volume-derived oscillators so a divergence in the composite is supported by three volume readings instead of one.
Hidden divergences (continuation pattern: price higher low plus oscillator lower low for bull) are detected separately from regular divergences (reversal pattern), with distinct line styles on the price chart.
Each detected divergence creates a persistent demand or supply zone with optional FVG-confluence gating, dynamic alpha-by-age (zones fade as they age), and explicit mitigation logic (body / wick / two-close rejection variants).
A composite percentile envelope (5th to 95th percentile of the last 200 bars) is drawn behind the oscillator so absolute readings are easy to interpret in context.
How it works
MFI(14), daily-reset CVD then ta.percentrank(cvd, 100), OBV ROC z-score over a 20-bar mean / stdev. Three legs, each normalized to roughly the same scale.
Composite equals 0.40 times the normalized MFI plus 0.35 times the normalized CVD percentile plus 0.25 times the clamped OBV ROC z. Hull-smoothed and scaled to centi-percent.
Pivots are detected on the composite stream. A regular bull divergence requires a price lower low paired with a composite higher low within a 5-to-60-bar window. Hidden bull requires a price higher low plus composite lower low. Bear variants invert the conditions.
At each divergence pivot, two horizontal lines are drawn (edge equals lowest wick / highest wick. base equals lowest body / highest body), with a linefill between them, on the price chart via force_overlay=true.
Zone mitigation: body mode (close beyond edge) or wick mode (high/low beyond edge), optionally with two-close rejection requirement.
Optional FVG confluence requires a recent 3-bar Fair Value Gap before firing the divergence-final alert.
Reading the chart
In-pane : composite line tinted by direction with a smoothed signal line, gradient ribbon between them, breath-modulated zero midline, plus and minus 70 overbought / oversold thresholds, and the percentile envelope as an atmospheric backdrop.
In-pane divergence markers : regular divergences as solid connector plots, hidden divergences as broken (dashed-equivalent) connectors.
Cross-pane : price-to-price divergence connector lines on the price chart (regular solid, hidden dashed). Each line has a small REG BULL DIV 4520.50 or HID BEAR DIV label at the current pivot.
Cross-pane zone fills with age-graded transparency.
Zone edge price labels follow the right edge of each active zone.
Mitigation flash labels print at the bar where a zone is broken.
A cross-pane composite tint paints a soft mint / red background when the composite is clearly above or below plus or minus 30.
Signals
Regular bullish / bearish divergence
Hidden bullish / bearish divergence (continuation)
Bull / bear zone touch
Bull / bear zone mitigated
Bull / bear stack (three or more active zones plus a fresh regular divergence)
Bull / bear streak (composite above / below zero for N consecutive bars)
All gated on barstate.isconfirmed or barstate.ishistory. No future references. No lookahead_on.
Inputs
MFI : MFI length.
Divergence : pivot lookback left / right, detect hidden divergences toggle.
Zones : zone extreme length, max zone age, mitigation mode, allow-rejection toggle.
FVG Confluence : require FVG, FVG lookback bars.
Visual : bullish / bearish colors.
Cross-pane Visuals : divergence lines, divergence labels, zone edge labels, composite tint.
Dashboard : position, size.
How traders use this
Reversal entries : a regular bull divergence with the composite leaving an oversold extreme is a high-quality long setup, especially when accompanied by an FVG below the divergence price.
Continuation entries : a hidden bull divergence during a clearly trending bull regime is a structurally supported add-on entry on a pullback.
Zone trades : after a divergence prints, treat its zone as an active demand or supply level. Reactions to the zone (touch with rejection candles) are tradable. Mitigation invalidates the level.
Composite filter : only trade with the composite in agreement (composite above 0 for longs). The cross-pane tint helps you stay aligned without checking the pane.
Limitations
Divergence detection inherently lags the actual extreme by the right-pivot window.
Composite values are smoothed and need warm-up bars before they stabilize.
Cumulative Volume Delta is a tick-volume proxy, not true level-2 order flow.
A divergence is a probability, not a guarantee. Many divergences fail before completing their implied reversal.
Compatibility
Pine Script v6 open-source indicator (pane plus cross-pane). Any symbol with volume data. Cross-pane elements use force_overlay=true. No request.security calls.
Defaults
14-bar MFI, 14-left / 5-right pivot, body mitigation, FVG confluence off by default, mint / red palette, top-right medium dashboard. Enable FVG confluence to filter for higher-quality setups.
指标

MACD Pressure Zones | Alpha S+MACD Pressure Zones
MACD Pressure Zones is a normalized MACD histogram oscillator designed to show momentum pressure on a 0 to 100 scale.
Instead of displaying the raw MACD histogram around a zero line, this script normalizes the histogram over a selected lookback period and maps it into a bounded oscillator range. This allows users to compare MACD histogram pressure across different market conditions with fixed reference zones such as 90, 85, 50, 15, and 10.
The script does not provide entry or exit recommendations. Its purpose is to help users study momentum pressure, extended momentum areas, neutral pressure, and cooling or heating behavior inside a simplified MACD-based zone structure.
────────────────────
Core Concept
────────────────────
The standard MACD histogram shows the distance between the MACD line and the signal line.
When the histogram expands, momentum pressure is increasing.
When the histogram contracts, momentum pressure is weakening.
This script takes that MACD histogram value and normalizes it into a 0 to 100 range.
The normalized structure uses five main reference levels:
• 90: Extreme upper momentum pressure
• 85: Upper pressure zone
• 50: Neutral pressure level
• 15: Lower pressure zone
• 10: Extreme lower momentum pressure
The red line is a smoothed version of the normalized MACD histogram. It helps users read the broader momentum pressure curve rather than reacting to every individual histogram bar.
────────────────────
What This Script Shows
────────────────────
The script can display:
• normalized MACD histogram columns
• smoothed MACD pressure line
• 90 and 85 upper pressure levels
• 50 neutral pressure level
• 15 and 10 lower pressure levels
• upper and lower zone background highlights
• histogram expansion or contraction state
• current pressure zone
• momentum heating or cooling state
• positive or negative pressure bias
• number of bars spent inside upper or lower pressure zones
• optional status panel
These elements are designed to help users identify whether MACD histogram pressure is extended, recovering, cooling, expanding, or returning toward neutral.
────────────────────
How It Works
────────────────────
1. The script calculates the MACD line using the selected fast and slow EMA lengths.
2. The signal line is calculated from the MACD line.
3. The MACD histogram is calculated as MACD minus signal.
4. The histogram is normalized over the selected lookback period.
5. The normalized value is mapped into a 0 to 100 oscillator range.
6. A smoothed red pressure line is calculated from the normalized oscillator.
7. The script compares the pressure line with the 90, 85, 50, 15, and 10 reference levels.
8. Zone background highlights appear when the pressure line enters upper or lower pressure areas.
9. Histogram columns become visually stronger or weaker depending on expansion or contraction.
10. The status panel summarizes current pressure, zone, momentum state, bias, zone duration, and histogram condition.
This structure converts MACD histogram behavior into a cleaner zone-based momentum pressure map.
────────────────────
Inputs And Customization
────────────────────
Users can adjust:
• MACD fast length
• MACD slow length
• MACD signal length
• source price
• normalization lookback
• red line smoothing length
• 0 to 100 clamping
• extreme upper pressure level
• upper pressure level
• neutral pressure level
• lower pressure level
• extreme lower pressure level
• zone background visibility
• histogram visibility
• red line visibility
• status panel visibility
• panel position
• panel text size
• histogram colors
• red line color
• reference level color
• panel background color
The default levels are designed around a 90 / 85 / 50 / 15 / 10 pressure-zone framework.
────────────────────
Visual Elements
────────────────────
The script includes:
• normalized histogram columns
• smoothed red pressure line
• horizontal reference levels
• upper pressure background
• lower pressure background
• status panel
The histogram columns show the normalized MACD histogram value.
The red line smooths the normalized histogram and makes the pressure cycle easier to read.
The 50 level acts as the neutral pressure reference.
The 85 and 90 levels mark upper momentum pressure zones.
The 15 and 10 levels mark lower momentum pressure zones.
The panel summarizes the current state without adding directional trade labels to the chart.
────────────────────
Reference States
────────────────────
Extreme Upper Pressure:
The smoothed pressure line is at or above the upper extreme level.
Upper Pressure:
The smoothed pressure line is inside the upper pressure zone.
Positive Pressure:
The pressure line is above the neutral level but below the upper pressure zone.
Neutral Pressure:
The pressure line is near the neutral reference level.
Negative Pressure:
The pressure line is below the neutral level but above the lower pressure zone.
Lower Pressure:
The smoothed pressure line is inside the lower pressure zone.
Extreme Lower Pressure:
The smoothed pressure line is at or below the lower extreme level.
Heating:
The smoothed pressure line is rising.
Cooling:
The smoothed pressure line is falling.
Expanding:
The normalized histogram is increasing compared with the prior bar.
Contracting:
The normalized histogram is decreasing compared with the prior bar.
These states are informational and should not be interpreted as trading instructions.
────────────────────
How To Use
────────────────────
Use this script as a MACD histogram pressure and momentum-zone viewer.
General interpretation examples:
• When the red line is above 85, MACD histogram pressure is in an upper extended area.
• When the red line is above 90, the upper pressure condition is more extreme.
• When the red line moves down from the upper pressure zone, momentum pressure may be cooling.
• When the red line is near 50, MACD histogram pressure is closer to neutral.
• When the red line is below 15, MACD histogram pressure is in a lower extended area.
• When the red line is below 10, the lower pressure condition is more extreme.
• When the red line rises from the lower pressure zone, momentum pressure may be heating.
• Zone Bars can help users see how long the pressure line has remained in an upper or lower pressure zone.
• Histogram expansion can show strengthening pressure, while contraction can show fading pressure.
This script is best reviewed together with price action, trend structure, volatility, support and resistance, and higher-timeframe context.
────────────────────
Confirmation And Repainting Notes
────────────────────
The script calculates MACD, the histogram, normalization range, and the smoothed pressure line from available chart data.
On realtime candles, values can change before the candle closes because the MACD histogram and normalization values can update intrabar.
For more conservative analysis, users should review the oscillator after candle confirmation.
The script does not use future price data to predict market direction.
────────────────────
Limitations
────────────────────
This script does not predict future price movement.
It does not provide entry or exit recommendations.
A high pressure reading does not guarantee a reversal.
A low pressure reading does not guarantee a rebound.
MACD histogram behavior can remain extended during strong trends.
Normalization depends on the selected lookback period, so readings may change when the lookback setting changes.
Different symbols and timeframes may require different settings.
This script should not be used as a standalone trading system.
────────────────────
Disclaimer
────────────────────
This publication is for educational and informational chart analysis only.
It does not constitute financial advice, investment advice, or a recommendation to trade any financial instrument.
All trading and investment decisions are the responsibility of the user.
━━━━━━━━━━━━━━━━━━━━
MACD Pressure Zones
MACD Pressure Zones는 MACD 히스토그램을 0~100 범위로 정규화하여 모멘텀 압력 구간을 보여주는 오실레이터형 지표입니다.
일반 MACD 히스토그램을 0선 중심으로 표시하는 대신, 이 스크립트는 선택한 lookback 구간 안에서 히스토그램 값을 정규화하고 이를 고정된 오실레이터 범위로 변환합니다. 이를 통해 90, 85, 50, 15, 10과 같은 기준 구간을 사용해 다양한 시장 상황의 MACD 히스토그램 압력을 비교할 수 있습니다.
이 지표는 진입 또는 청산 추천을 제공하지 않습니다. 목적은 모멘텀 압력, 확장된 모멘텀 구간, 중립 압력, cooling 또는 heating 상태를 단순한 MACD 기반 구간 구조 안에서 분석하는 것입니다.
────────────────────
핵심 개념
────────────────────
일반 MACD 히스토그램은 MACD 라인과 시그널 라인 사이의 거리를 보여줍니다.
히스토그램이 확장되면 모멘텀 압력이 증가하는 상태로 볼 수 있습니다.
히스토그램이 수축되면 모멘텀 압력이 약해지는 상태로 볼 수 있습니다.
이 스크립트는 MACD 히스토그램 값을 0~100 범위로 정규화합니다.
정규화된 구조는 다섯 개의 주요 기준선을 사용합니다.
• 90: 극단적 상단 모멘텀 압력
• 85: 상단 압력 구간
• 50: 중립 압력 기준선
• 15: 하단 압력 구간
• 10: 극단적 하단 모멘텀 압력
빨간선은 정규화된 MACD 히스토그램을 평활화한 값입니다. 개별 히스토그램 막대보다 넓은 모멘텀 압력 곡선을 읽는 데 도움을 줍니다.
────────────────────
이 스크립트가 보여주는 것
────────────────────
이 스크립트는 다음 요소를 표시할 수 있습니다.
• 정규화된 MACD 히스토그램 막대
• 평활화된 MACD 압력선
• 90 및 85 상단 압력 기준선
• 50 중립 압력 기준선
• 15 및 10 하단 압력 기준선
• 상단 및 하단 구간 배경 강조
• 히스토그램 확장 또는 수축 상태
• 현재 압력 구간
• 모멘텀 heating 또는 cooling 상태
• positive 또는 negative 압력 방향
• 상단 또는 하단 압력 구간 체류 봉 수
• 선택 가능한 상태 패널
이 요소들은 MACD 히스토그램 압력이 확장, 회복, 둔화, 확장 지속, 또는 중립 회귀 중 어디에 가까운지 확인하는 데 도움을 줍니다.
────────────────────
작동 방식
────────────────────
1. 선택한 fast EMA와 slow EMA 길이를 사용해 MACD 라인을 계산합니다.
2. MACD 라인에서 시그널 라인을 계산합니다.
3. MACD에서 시그널을 뺀 값으로 MACD 히스토그램을 계산합니다.
4. 선택한 lookback 구간에서 히스토그램을 정규화합니다.
5. 정규화된 값을 0~100 오실레이터 범위로 변환합니다.
6. 정규화 오실레이터에서 평활화된 빨간 압력선을 계산합니다.
7. 압력선을 90, 85, 50, 15, 10 기준선과 비교합니다.
8. 압력선이 상단 또는 하단 압력 구간에 진입하면 배경이 강조됩니다.
9. 히스토그램 막대는 확장 또는 수축 여부에 따라 다르게 표시됩니다.
10. 상태 패널은 현재 압력, 구간, 모멘텀 상태, 방향성, 구간 체류 시간, 히스토그램 상태를 요약합니다.
이 구조는 MACD 히스토그램 행동을 더 깔끔한 구간 기반 모멘텀 압력 맵으로 변환합니다.
────────────────────
입력값 및 설정
────────────────────
사용자는 다음 항목을 조정할 수 있습니다.
• MACD fast length
• MACD slow length
• MACD signal length
• source price
• normalization lookback
• red line smoothing length
• 0 to 100 clamping
• extreme upper pressure level
• upper pressure level
• neutral pressure level
• lower pressure level
• extreme lower pressure level
• zone background visibility
• histogram visibility
• red line visibility
• status panel visibility
• panel position
• panel text size
• histogram colors
• red line color
• reference level color
• panel background color
기본 기준선은 90 / 85 / 50 / 15 / 10 압력 구간 구조를 중심으로 설계되어 있습니다.
────────────────────
시각 요소
────────────────────
이 스크립트는 다음 시각 요소를 포함합니다.
• 정규화 히스토그램 막대
• 평활화된 빨간 압력선
• 수평 기준선
• 상단 압력 배경
• 하단 압력 배경
• 상태 패널
히스토그램 막대는 정규화된 MACD 히스토그램 값을 보여줍니다.
빨간선은 정규화된 히스토그램을 평활화하여 압력 사이클을 더 쉽게 읽게 해줍니다.
50선은 중립 압력 기준선 역할을 합니다.
85와 90은 상단 모멘텀 압력 구간을 표시합니다.
15와 10은 하단 모멘텀 압력 구간을 표시합니다.
패널은 차트에 방향성 매매 라벨을 추가하지 않고도 현재 상태를 요약합니다.
────────────────────
참고 상태
────────────────────
Extreme Upper Pressure:
평활화된 압력선이 상단 극단 기준선 이상에 있는 상태입니다.
Upper Pressure:
평활화된 압력선이 상단 압력 구간에 있는 상태입니다.
Positive Pressure:
압력선이 중립 기준선 위에 있지만 상단 압력 구간 아래에 있는 상태입니다.
Neutral Pressure:
압력선이 중립 기준선 부근에 있는 상태입니다.
Negative Pressure:
압력선이 중립 기준선 아래에 있지만 하단 압력 구간 위에 있는 상태입니다.
Lower Pressure:
평활화된 압력선이 하단 압력 구간에 있는 상태입니다.
Extreme Lower Pressure:
평활화된 압력선이 하단 극단 기준선 이하에 있는 상태입니다.
Heating:
평활화된 압력선이 상승 중인 상태입니다.
Cooling:
평활화된 압력선이 하락 중인 상태입니다.
Expanding:
정규화된 히스토그램이 직전 봉보다 증가하는 상태입니다.
Contracting:
정규화된 히스토그램이 직전 봉보다 감소하는 상태입니다.
이 상태들은 정보 제공용이며, 매매 지시로 해석해서는 안 됩니다.
────────────────────
사용 방법
────────────────────
이 스크립트는 MACD 히스토그램 압력 및 모멘텀 구간 확인 도구로 사용하는 것이 적절합니다.
일반적인 해석 예시는 다음과 같습니다.
• 빨간선이 85 위에 있으면 MACD 히스토그램 압력이 상단 확장 구간에 있는 상태로 볼 수 있습니다.
• 빨간선이 90 위에 있으면 더 극단적인 상단 압력 상태로 볼 수 있습니다.
• 빨간선이 상단 압력 구간에서 하락하면 모멘텀 압력이 cooling 되는 과정일 수 있습니다.
• 빨간선이 50 부근에 있으면 MACD 히스토그램 압력이 중립에 가까운 상태입니다.
• 빨간선이 15 아래에 있으면 MACD 히스토그램 압력이 하단 확장 구간에 있는 상태로 볼 수 있습니다.
• 빨간선이 10 아래에 있으면 더 극단적인 하단 압력 상태로 볼 수 있습니다.
• 빨간선이 하단 압력 구간에서 상승하면 모멘텀 압력이 heating 되는 과정일 수 있습니다.
• Zone Bars는 압력선이 상단 또는 하단 압력 구간에 얼마나 오래 머물렀는지 확인하는 데 사용할 수 있습니다.
• Histogram expansion은 압력 강화, contraction은 압력 둔화를 보여줄 수 있습니다.
이 스크립트는 가격 행동, 추세 구조, 변동성, 지지와 저항, 상위 시간대 컨텍스트와 함께 검토하는 것이 좋습니다.
────────────────────
확인봉 및 리페인트 안내
────────────────────
이 스크립트는 사용 가능한 차트 데이터를 기준으로 MACD, 히스토그램, 정규화 범위, 평활화된 압력선을 계산합니다.
실시간 캔들에서는 MACD 히스토그램과 정규화 값이 봉 마감 전까지 변경될 수 있으므로 값이 변할 수 있습니다.
보다 보수적인 분석을 원한다면 봉 마감 이후 오실레이터를 검토하는 것이 적절합니다.
이 스크립트는 미래 가격 데이터를 사용해 시장 방향을 예측하지 않습니다.
────────────────────
한계
────────────────────
이 스크립트는 미래 가격 움직임을 예측하지 않습니다.
진입 또는 청산 추천을 제공하지 않습니다.
높은 압력 수치가 반전을 보장하지 않습니다.
낮은 압력 수치가 반등을 보장하지 않습니다.
강한 추세에서는 MACD 히스토그램 압력이 오랜 시간 확장 구간에 머무를 수 있습니다.
정규화 값은 선택한 lookback period에 따라 달라질 수 있습니다.
종목과 시간대에 따라 적절한 설정값이 달라질 수 있습니다.
이 스크립트를 단독 매매 시스템으로 사용해서는 안 됩니다.
────────────────────
중요 고지
────────────────────
본 게시물은 교육 및 정보 제공 목적의 차트 분석 자료입니다.
투자 자문, 특정 금융상품 거래 권유, 또는 수익 보장을 의미하지 않습니다.
모든 투자 판단과 그 결과에 대한 책임은 이용자 본인에게 있습니다.
指标

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.
指标

CDC Action Zone+TrueMarket Mean (BTC Focus) By Beckte## Overview
This indicator is a macro-focused trend following and cyclical value tracking tool, specifically designed for Bitcoin (BTC) long-term investors. It combines the momentum logic of the well-known **CDC Action Zone** with a mathematical simulation of the On-Chain **Realized Price** model.
The main purpose of this script is to identify high-probability, macro-generational accumulation zones while filtering out early or false bottom signals during aggressive downtrends.
---
## Key Components
### 1. CDC Action Zone (Trend & Momentum)
Based on the classic EMA 12 and EMA 26 crossover logic, this component colors the candlesticks to reflect the market's current momentum:
- 🟢 **Bright Green:** Strong Bullish Momentum (Hold / Trend is up)
- 🔵 **Blue:** Early Bullish Sign / Potential Reversal (Watch closely or start accumulation)
- 🔴 **Bright Red:** Strong Bearish Momentum (Stay in cash / Wait)
- 🟠 **Orange:** Early Bearish Sign / Technical Rebound in Bear Market
### 2. Realized Price Proxy (The Cyclical Floor)
In on-chain analysis, the **Realized Price** represents the average cost basis of all aggregate Bitcoin supply moving on-network, without omitting lost or dormant coins.
Since native on-chain data requires external API subscriptions on TradingView, this script utilizes a specialized long-term statistical proxy (**730-day SMA with custom logarithmic offsets**) to simulate this ultimate cyclical floor. Historically, major bear market bottoms (2015, 2018, 2022) have strictly formed near or slightly below this baseline.
---
## How it Works & Entry Strategy (The Anti-Doi Mechanism)
To avoid catching falling knives during a capitulation event, this script enforces a strict double-confirmation rule:
1. **Value Zone Check:** The current market price must correct down to within **10% of the Realized Price Proxy** (the light blue line). This ensures you are buying Bitcoin at an extreme discount relative to historical network value.
2. **Momentum Trigger:** Once inside the Value Zone, the script waits for the **CDC Action Zone to flip from Red/Orange to Blue or Green**.
When both conditions are met, a **"REALIZED BUY"** label will plot beneath the candlestick, signaling a safe, low-risk entry spot with a highly compressed downside.
---
## Disclaimer & Credits
- **Credits:** The trend-following logic is inspired by the legendary "CDC Action Zone" concept popularized by Piriya Sambandaraksa. The valuation floor is based on the Realized Price on-chain metric conceptualized by the crypto-asset research community.
- **Disclaimer:** This indicator is designed for high-timeframe spot accumulation (recommended: 1D or 4H charts). It is not a financial advisory tool or a guarantee of future profits. Past performance does not indicate future results. Always practice proper risk management. 指标

MACD Dive [TTM Squeeze | Dual Lock %R]Disclaimer : This indicator is not financial advice and is strictly for educational and informational purposes only. The metrics and signals provided herein (including momentum crosses, trend saturation state icons, and squeeze markers) are calculated based on historical market data and do not guarantee future performance. Trading stocks and commodities involves significant risk of loss. The user assumes full responsibility for all trading decisions and should always perform their own due diligence before executing trades.
MACD Dive is a multi-state momentum and volatility context engine. By layering momentum oscillation (MACD/PPO/MACD-V) with market stalemates (volatility squeeze) and trend exhaustion (Dual %R saturation), this suite transforms a standard MACD into a multi-dimensional 'No-Go' gatekeeper. This synergy is what gives the engine its edge: it actively blocks the trader from whipsawing in sideways chop or buying into a dying trend, highlighting high-probability market turns where momentum, volatility, and trend capacity perfectly align.
Standard oscillators have a scaling problem. This script lets you choose your engine:
MACD (Classic): Measures momentum in absolute dollars. Great for visual reactivity, but a "2.0" reading means something different on a $5 stock versus a $500 stock.
PPO (Percentage): Measures momentum in percentages. Standardizes the reading across all assets, making it ideal for fixed-rule algorithmic trading.
MACD-V (Volatility Normalized): This divides the MACD by the Average True Range (ATR). It measures momentum in "Units of Volatility," mathematically adapting to market chaos so that signals remain consistent across both different assets and shifting volatility regimes (quiet markets vs chaotic markets).
This suite includes a fully optimized divergence detection engine:
Regular Divergence (Solid Lines): Identifies Trend Reversals. Price pushes to a new extreme, but momentum fails to follow, signaling exhaustion.
Hidden Divergence (Dashed Lines): Identifies Trend Continuations (Slingshots). Price pulls back, but momentum fully resets, signaling a high-probability entry in the direction of the dominant trend.
Located in your chosen corner, the HUD provides an instant visual readout with hover tooltips for active Engine Mode, %R Fatigue state, Oscillator crossover validation, and Squeeze environment. Vertical background highlights in green or red represent filter-passed momentum crossovers, like the MACD bullish cross. Use the extensive inline tooltips in the indicator's settings panel for a comprehensive breakdown of every tunable parameter.
Adaptive Time-Frames & RSI Gatekeeper
Think of this as an automated gear shifter. When looking at lower timeframes (below a user-defined boundary, e.g. 1 hour), the engine automatically scales down to tight, agile lookback periods. When viewing high timeframes, it dials up to filter out noise.
Buying a bullish MACD cross when the RSI is already at 85 increases risk of buying the top when the tank is empty. The optional RSI Safety Filter acts as a strict ceiling/floor blocker. If momentum crosses upward but the asset is mathematically overbought, the indicator suppresses the background highlight. It prevents signals on MACD crosses that have no fuel left.
VOLATILITY ENGINE: BB-KC Squeeze Radar
Building on John Carter’s TTM Squeeze by mapping the contraction of Bollinger Bands inside Keltner Channels to identify market stalemates. The implementation here color codes between a Loose Squeeze (BB inside 1.5 KC) and a hyper-compressed Tight Squeeze (BB inside 1.0 KC) to show the staged intensity of the coiled spring.
While the market coils sideways, a 20-period Linear Regression calculates the trajectory of price deviation inside the bands. The directional bias is shown by customizable markers on the zero line (default ⌃ or ⌄). This reveals hidden institutional accumulation or distribution before the trigger is pulled. To bypass "dead money" risk, the script tracks the first clean candle close or intraday pierce outside the Keltner bounds following a squeeze, catching the expansion phase exactly as it starts.
Furthermore, it accounts for the "Disappearing Mark" phenomenon. Bollinger Bands expand instantly when price moves, causing standard squeeze signals to vanish 1-3 bars before the real breakout candle. This script uses a memory state to remember recent compression, firing a "squeeze release" marker (default ❖) the exact moment price closes outside the Keltner bounds. Trade the release, not the waiting room.
Note: While MACD Dive tracks this compression mathematically on its zero-line, you can see the actual physical boundaries of the breakout by pairing it with my companion Swing Data suite . Plotting its Keltner Channel at 1.5 multiplier over your price chart allows you to visually verify the exact moment the squeeze release mark is ignited.
SATURATION ENGINE: Dual-Lock %R and Momentum Rot
This suite tracks sustained trend maturity using a fast/slow dual Williams %R setup. The conceptual pairing of a fast and slow %R to identify overbought/oversold exhaustion is credited to upslidedown's excellent Trend Exhaustion indicator . I highly recommend applying their script to your chart if you want to visually learn how the two %R lines interact.
While upslidedown’s implementation offers multiple display modes to paint visual boxes and exhaustion zones directly over price action, the focus here is on the discrete icons for trend status at the top and bottom of the MACD pane: Ignition (·), Saturation (□), and Fatigue (×). This suite adapts native ta.wpr() math assuming the trader is already familiar with Dual %R mechanics. Specific "Sprint" and "Marathon" tuning guidance is provided in the tooltips: heavily smoothing the fast line to ignore intraday noise, while lightly smoothing the macro slow line to preserve its reach into extreme zones.
It also features one major addition: the Stall. While Dual %R tracks Price Location (confirming price is structurally pinned at the highs), it doesn't track Velocity (confirming energy is sustained). To solve this, a Stoch RSI "Rot" detector runs quietly inside the saturation state. If price continues to float at the highs but internal velocity drops below a critical threshold, the script overlays a Stall marker (•). Designed as a "one-shot" early warning, it fires only on the first detection per trend saturation leg to prevent chart clutter. This differentiates a strong trend lock from a rotting lock, warning us that the move is running on fumes: giving us the exact cue to tighten stops, trim into parabolic strength, and strictly avoid adding new size.
BACKTESTER READY
Out-of-the-box compatibility with a comprehensive built-in README guide is available directly inside the settings menu. For traders who prefer a "Diamond Hands" approach, the indicator fully maps to Jason5480's TTS Framework convention, outputting strict integer states (1, -1, 2, -2) to hold full position size until the trailing macro baseline completely fractures. My personal backtester, Cosmos Signal Commander (which may be released to the public in the future), broadcasts a composite float signal capable of managing active trade positioning. It tracks entries, hard stops, and partial take-profits (swapping the trailing stop from tight to a wide "runner" buffer upon hitting extended ATR targets).
PERFORMANCE OPTIMIZATION
O(1) Memory States: Replaced lag-heavy ta.barssince() and 50-bar for loops in the Divergence engine with O(1) var state trackers.
String Caching: HUD table strings are built once in the global var scope to prevent constant memory allocation and garbage collection lag.
UI Mutation: The HUD uses table.cell_set_* to alter data dynamically, bypassing the stutter caused by destroying and redrawing tables on every tick.
Native C++ Backend: Replaced custom highest/lowest math arrays with native ta.wpr() functions for the %R engine to maximize computation speed.
Ghost State Resets: When switching the backtester logic to "Long Only" mode, the engine actively hunts and kills lingering short-memory variables so they don't inadvertently suppress valid long signals.
指标

指标

Order Block Detector ProOrder Block Detector Pro — FVG + Volume + Breaker Blocks
━━━━━━━━━━━━━━━━━━━━
CREDIT & OPEN-SOURCE STATEMENT
━━━━━━━━━━━━━━━━━━━━
Zone detection concept inspired by "Market Structure Break & Orderblock" by EmreKb (TradingView open-source). The codebase has been fully rewritten with significant original additions: Fair Value Gap overlap detection, volume confirmation filter, Breaker Block conversion logic, anti-clustering system, unrespected zone cancellation, and FVG-tagged labels. Published open-source in compliance with TradingView reuse rules.
━━━━━━━━━━━━━━━━━━━━
WHY THESE COMPONENTS WORK TOGETHER
━━━━━━━━━━━━━━━━━━━━
Order blocks identify WHERE institutional orders were placed. Volume confirms WHETHER those orders had genuine institutional size. Fair Value Gaps identify WHETHER an imbalance exists inside the zone that price is likely to return and fill. None of these three factors alone is sufficient — an order block without volume may be retail noise; volume without structure has no location context; FVGs without a structural anchor have no directional bias. Combined, they produce a filtered, high-probability zone with multiple layers of institutional confirmation.
━━━━━━━━━━━━━━━━━━━━
WHAT THIS INDICATOR DOES
━━━━━━━━━━━━━━━━━━━━
Detects four zone types based on market structure breaks:
- Bu OB — Bullish Order Block (demand)
- Be OB — Bearish Order Block (supply)
- Bu BB — Bullish Breaker Block (former supply flipped to demand)
- Be BB — Bearish Breaker Block (former demand flipped to supply)
Each zone is volume-confirmed, FVG-tagged when applicable, anti-clustered, and auto-mitigated when price returns.
━━━━━━━━━━━━━━━━━━━━
MARKET STRUCTURE — SWING PIVOTS + BOS
━━━━━━━━━━━━━━━━━━━━
Swing highs and lows detected using ta.pivothigh() and ta.pivotlow() with a configurable pivot length (default 5 bars each side).
Break of Structure (BOS) is confirmed when:
- BOS Up: close crosses above a previously unbroken swing high
- BOS Down: close crosses below a previously unbroken swing low
Each swing point is tracked in a typed array (Swing type: price, bar, broken flag). Once broken, the swing is marked and triggers order block search.
━━━━━━━━━━━━━━━━━━━━
ORDER BLOCK DETECTION
━━━━━━━━━━━━━━━━━━━━
On BOS Up: script searches backwards up to N bars (default 25) for the most recent bearish candle (close < open). That candle is the Bullish Order Block — the last point where sellers were active before institutional buyers took control.
On BOS Down: searches backwards for the most recent bullish candle (close > open). That candle is the Bearish Order Block.
Zone boundaries:
- Full Range mode: top = high, bottom = low of OB candle
- Body Only mode: top = max(open, close), bottom = min(open, close)
━━━━━━━━━━━━━━━━━━━━
VOLUME CONFIRMATION
━━━━━━━━━━━━━━━━━━━━
When enabled, an order block only forms if:
- volume > SMA(volume, 20) × multiplier (default 1.5×)
This filters out low-participation structural moves that are more likely to fail on retest. The volume is read at the OB candle's bar offset, not the current bar.
━━━━━━━━━━━━━━━━━━━━
FAIR VALUE GAP (FVG) DETECTION
━━━━━━━━━━━━━━━━━━━━
After an order block is identified, the script checks for a Fair Value Gap within the zone's price range.
Bullish FVG condition (within OB range):
- low > high — gap between candle m−1's low and candle m+1's high
- Both gap boundaries fall within the OB top/bottom range
Bearish FVG: inverse — high < low .
When a FVG is detected inside the zone, a ★ symbol is appended to the zone label. These zones represent compounded institutional imbalances — price is statistically more likely to react at them.
━━━━━━━━━━━━━━━━━━━━
ANTI-CLUSTERING SYSTEM
━━━━━━━━━━━━━━━━━━━━
Prevents redundant overlapping zones using two filters:
Spacing filter:
- New zone rejected if midpoint is within ATR(14) × spacing multiplier of any existing active zone of the same type
Max active cap:
- Each zone type (Bu OB, Be OB, Bu BB, Be BB) capped at N active zones (default 5)
- When exceeded, oldest zone of that type is removed first
━━━━━━━━━━━━━━━━━━━━
MITIGATION LOGIC
━━━━━━━━━━━━━━━━━━━━
Two mitigation modes:
Body Close (default):
- Bu OB mitigated when close < zone bottom
- Be OB mitigated when close > zone top
Wick Touch:
- Bu OB mitigated when low < zone bottom
- Be OB mitigated when high > zone top
━━━━━━━━━━━━━━━━━━━━
BREAKER BLOCK CONVERSION
━━━━━━━━━━━━━━━━━━━━
When a mitigated zone was previously touched (price entered the zone at least once before violation):
- Bu OB violated → converts to Be BB (Bearish Breaker Block)
- Be OB violated → converts to Bu BB (Bullish Breaker Block)
Breaker Blocks represent zones where institutional orders have been fully absorbed — price is expected to use them as opposition on return.
Unrespected zone cancellation: if a zone is violated without ever being touched (price skipped through it), it is removed entirely rather than converted. This avoids phantom breaker blocks from low-quality structural moves.
━━━━━━━━━━━━━━━━━━━━
ZONE RENDERING
━━━━━━━━━━━━━━━━━━━━
Each zone is drawn as a box extending N bars to the right (default 50, updated each bar via box.set_right). Zone type visual identifiers:
- Bu OB — teal fill, solid border
- Be OB — red fill, solid border
- Bu BB — blue fill, dashed border
- Be BB — orange fill, dashed border
Volume of the OB candle is displayed inside the box (formatted as K/M/B). Labels show zone type and FVG tag (★) when applicable.
━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━
1. Wait for a fresh Bu OB or Be OB to form after a BOS
2. Prioritize zones marked with ★ (FVG overlap = stronger imbalance)
3. Enter when price returns to the zone on lower timeframe confirmation
4. Bu BB and Be BB are counter-trend zones — treat as resistance/support levels after a failed OB
5. Mitigated zones auto-remove — no manual cleanup needed
Entry logic suggestion:
- Long: price enters Bu OB zone → bullish rejection candle → entry above that candle
- Short: price enters Be OB zone → bearish rejection candle → entry below that candle
Stop loss: opposite side of the zone box
Target: next opposing zone or structural high/low
━━━━━━━━━━━━━━━━━━━━
RECOMMENDED SETTINGS
━━━━━━━━━━━━━━━━━━━━
- Scalping (1m–5m): Swing Length 3, OB Search 15, Volume ON 1.5×
- Intraday (15m–1H): Swing Length 5, OB Search 25, Volume ON 1.5×
- Swing (4H–Daily): Swing Length 7, OB Search 40, Volume OFF
- Forex/Gold: Volume OFF (broker tick volume unreliable)
- Stocks/Crypto/Futures: Volume ON
━━━━━━━━━━━━━━━━━━━━
No repainting. Pivot detection is inherently offset by pivot length bars by design. All zone creation and mitigation runs on confirmed price data only. 指标

ADF Stationarity Pulse [forexobroker]ADF Stationarity Pulse runs the Augmented Dickey-Fuller test live on price and gates mean-reversion entries by whether the test currently rejects the unit-root null. The ADF test is the standard econometric tool for asking "is this series mean-reverting or does it have a random-walk component?". When ADF says mean-reverting AND the price z-score says price is stretched away from its rolling mean, the script trades the reversion. Built for crypto pairs, where statistical regimes flip between trending and choppy mean-reversion frequently.
🔶 ALGORITHM
1. Over the ADF window (default N=40 closes), the regression Dp_t = a + g * p_{t-1} + b * Dp_{t-1} + e is fit via closed-form OLS using cross-sum accumulation (single loop, no nested O(N^2)).
2. The variables are centered to absorb the intercept, then a 2x2 system solves for gamma (the unit-root coefficient) and beta (the lag-differenced coefficient).
3. Residual sum of squares is used to compute sigma^2 and the standard error of gamma.
4. ADF statistic = gamma / SE(gamma). Compared to the 5% critical value of -2.86 (approximate, for AR(1)-with-drift).
5. Z-score = (close - SMA(N)) / stdev(N) measures how far price is from its mean.
6. Buy fires when ADF rejects the unit root (mean-reverting) AND z-score is stretched below -threshold. Sell mirrors above +threshold.
🔶 SIGNAL LOGIC
- Buy: ADF stat < critical value AND z-score < -threshold AND session filter passes AND position is not already long AND cooldown bars elapsed AND barstate.isconfirmed.
- Sell: ADF stat < critical value AND z-score > +threshold AND session filter passes AND position is not already short AND cooldown bars elapsed AND barstate.isconfirmed.
Both conditions are required — being stretched in a trending regime is not enough, the test has to first confirm mean-reversion.
🔶 INPUTS
- Calculation group: ADF window N (default 40), 5% critical value (default -2.86), warning line (default -1.5).
- Signal Logic group: z-score threshold (default 1.0), cooldown bars (default 15).
- Filters group: session restriction (default 0000-2400).
- Visual group: z-score plot, dashboard, 3-layer glow, colors.
🔶 ALERTS
ADF Buy, ADF Sell, ADF Any Signal, ADF Regime On, ADF Regime Off, ADF Warning Cross, ADF Z Stretched Down, ADF Z Stretched Up, ADF Z Mean Reclaim, ADF Webhook JSON.
🔶 LIMITATIONS
- The 5% critical value is approximate; published tables vary slightly with sample size and specification. -2.86 is the conventional reference for AR(1)-with-drift at N around 50.
- ADF assumes a specific lag structure (one differenced lag); on higher-order autocorrelated series the test may misclassify regimes.
- The regression uses a fixed window of N closes; very early chart history has insufficient data and the test returns near zero.
- Mean-reversion entries can fight strong trends if the ADF window happens to span a flat patch inside the larger trend — use higher timeframes or a longer N to suppress this.
- Crypto pairs with frequent gap behavior (weekend lulls, exchange halts) violate the i.i.d. residual assumption ADF rests on.
指标

Pro Scanner Multi-Symbol Trend & Momentum Scanner
OVERVIEW
This indicator scans up to 15 user-defined symbols and presents them in a
single color-coded dashboard on your chart. Instead of flipping between charts,
you get a consolidated view of price, change, trend bias, RSI and a combined
signal for every symbol in your watchlist.
HOW IT WORKS
For each symbol, the script requests data on a timeframe you choose and computes:
- LTP: the latest close.
- Chg%: percentage change vs the previous bar of the selected timeframe
(set the Scanner Timeframe to "D" for daily change).
- Trend: bullish (up) when price is above its EMA, bearish (down) when below.
EMA length is adjustable.
- RSI: standard Relative Strength Index with adjustable length; cells are shaded
for overbought (above 70) and oversold (below 30).
- Signal: a combined read from trend direction and RSI — BUY when trend is up
and RSI is firm, SELL when trend is down and RSI is weak, neutral otherwise.
The table can be sorted by percentage change so the strongest movers rise to the top.
HOW TO USE
1. Add the indicator to any chart.
2. In settings, enter your symbols in EXCHANGE:TICKER form (e.g. NSE:RELIANCE).
3. Set the scanner timeframe, EMA length and RSI length to match your style.
4. Use the dashboard to see which symbols share the same trend and momentum bias.
It is meant as a quick filter to shortlist symbols for closer analysis on
their own charts.
SETTINGS
- Scanner Timeframe, Trend EMA Length, RSI Length
- Sort by % change (on/off)
- Table position and text size
- 15 editable symbols
NOTES
This tool is for analysis and education only. It does not predict future prices
and is not financial advice. Reliable results require a valid data feed for each
symbol. Always do your own research and manage risk. 指标

指标

Smart Stochastic Prosmart stochastic pro is a momentum oscillator built to read stochastic structure, buying and selling pressure, and multi-timeframe bias in one clean panel.
the script is designed for traders who want a visual way to track when the market is stretched, when pressure starts to shift, and when a reversal setup becomes more interesting. it does not predict price and it should not be used alone. it is meant to support analysis together with price action, market structure, support and resistance, volume, and risk management.
what the script does
smart stochastic pro uses a smoothed stochastic engine to create rounded %k and %d curves. the goal is to reduce visual noise while keeping the oscillator responsive enough for intraday and swing analysis.
the script includes:
* a smoothed stochastic %k and %d
* extreme overbought and oversold zones
* buying and selling pressure based on candle position and volume
* optional mtf calculation modes
* reversal detection after extreme zones
* optional candle coloring
* a compact dashboard
* visual pressure zones and signal labels
how to use it
add the script to a normal candlestick chart. for the clearest reading, start with the default settings and use a liquid market such as major crypto pairs, forex pairs, indices, or large-cap stocks.
the oscillator moves between 0 and 100.
basic reading:
* above 80 means price is in an overbought area
* below 20 means price is in an oversold area
* above 90 means extreme overbought
* below 10 means extreme oversold
* the 50 line is the neutral zone
* %k above %d shows bullish momentum
* %k below %d shows bearish momentum
the script works best when you do not take every cross. the main idea is to wait for a strong area first, then look for a confirmed shift.
beginner workflow
1. start on the chart mode
use:
calculation / visual mode: chart
this uses the current chart timeframe and is the easiest mode to understand.
2. wait for an extreme zone
for bullish setups, watch for %k to move into the extreme oversold area.
for bearish setups, watch for %k to move into the extreme overbought area.
this arms the setup. it does not mean enter immediately.
3. wait for confirmation
a bullish reversal becomes more interesting when:
* %k crosses above %d
* the oscillator starts rising
* buying pressure improves
* the signal appears after an oversold expansion
a bearish reversal becomes more interesting when:
* %k crosses below %d
* the oscillator starts falling
* selling pressure improves
* the signal appears after an overbought expansion
4. check the pressure
the pressure background and ribbons help show whether buyers or sellers are gaining control.
green pressure means buying is stronger.
red pressure means selling is stronger.
neutral pressure means the market may still be undecided.
5. use the dashboard
the dashboard summarizes:
* active mode
* current bias
* mtf bias
* slope
* oscillator zone
* buying or selling pressure
* %k and %d values
* signal strength
* armed state
for beginners, the most useful dashboard rows are state, zone, pressure, and armed.
recommended settings
for beginners:
* calculation / visual mode: chart
* require explosion first: true
* minimum confluence strength: 2
* hide mid-range noise: true
* show pressure: true
* show dashboard: true
* candle color: off at first
for cleaner signals:
* require explosion first: true
* minimum confluence strength: 3
* hide mid-range noise: true
* mtf bias filters signals: true
for faster signals:
* require explosion first: false
* minimum confluence strength: 2
* hide mid-range noise: true
for multi-timeframe use:
mtf strict shows the oscillator calculated directly from the selected higher timeframe.
mtf bias keeps the chart oscillator smoother while using the higher timeframe as a directional filter.
a simple setup is:
* chart timeframe: 5m or 15m
* mtf timeframe: 1h
* mtf bias filters signals: true
where to use it
the script can be used on:
* crypto
* forex
* indices
* stocks
* futures
it is usually cleaner on markets with good liquidity and enough volume. low-volume markets can create noisy pressure readings and weaker signal quality.
timeframes
for scalping, try 1m to 5m, but expect more noise.
for intraday trading, 5m to 30m is usually easier to read.
for swing trading, 1h to 4h gives slower but cleaner signals.
how not to use it
do not buy only because the oscillator is oversold.
do not sell only because the oscillator is overbought.
do not use one signal without checking market structure.
do not use it as a guaranteed entry system.
do not ignore risk management.
best practice
use the script as a timing and confirmation tool.
a stronger bullish setup usually has:
* price near support or after a liquidity sweep
* %k coming from oversold or extreme oversold
* buying pressure improving
* bullish signal strength at least 2 or 3
* mtf bias not fighting the trade
a stronger bearish setup usually has:
* price near resistance or after a failed breakout
* %k coming from overbought or extreme overbought
* selling pressure improving
* bearish signal strength at least 2 or 3
* mtf bias not fighting the trade
alerts
alerts are available for:
* bullish reversal after extreme oversold
* bearish reversal after extreme overbought
* extreme oversold
* extreme overbought
* pressure flip bullish
* pressure flip bearish
use alerts as reminders to check the chart, not as automatic trade entries.
notes
this script is an analysis tool. it does not guarantee results. all signals should be reviewed with price action, trend context, volatility, and personal risk rules before making a trade decision.
指标

Supply Demand Pro - VWAP + Liquidity ConfluenceSupply Demand Pro — Liquidity + VWAP Confluence
by ApexFlow
━━━━━━━━━━━━━━━━━━━━
INSPIRATION & CREDIT
━━━━━━━━━━━━━━━━━━━━
Credit: Zone base detection concept inspired by "Market Structure Break & Orderblock" by EmreKb (TradingView open-source). All code has been rewritten with significant original additions: quantitative grading system (A+/A/B/C), VWAP confluence scoring, liquidity sweep detection, multi-timeframe overlay, and live backtest panel.
━━━━━━━━━━━━━━━━━━━━
WHAT THIS INDICATOR DOES
━━━━━━━━━━━━━━━━━━━━
Detects institutional supply and demand zones using a three-layer confluence model:
1. Zone formation: explosive impulsive move + consolidation base
2. Zone scoring: quantitative grade based on move strength, volume, VWAP proximity, HTF overlap
3. Signal generation: price returns to zone with rejection confirmation + sweep detection
The combination of these three layers separates this from standard S&D indicators that draw zones without qualification.
━━━━━━━━━━━━━━━━━━━━
ZONE DETECTION METHODOLOGY
━━━━━━━━━━━━━━━━━━━━
A zone forms when a confirmed bar (barstate.isconfirmed) meets all of:
- Bar range > ATR(14) × Move Multiplier — confirms volatility expansion
- Candle body > 55% of total range — filters wicky, indecisive bars
- Optional: Volume > SMA(20) × multiplier — confirms participation
ATR uses ta.atr(14). Body percentage = |close − open| / (high − low).
The base of the zone is built from preceding candle(s) where:
- |close − open| < ATR × 0.5 (small-bodied consolidation)
- Bar is not itself explosive
Base high and low define the zone boundaries:
- Supply zone: base candle(s) before bearish explosive move
→ Top = base high, Bottom = min(base low, explosive open)
- Demand zone: base candle(s) before bullish explosive move
→ Top = max(base high, explosive open), Bottom = base low
All detection references bar and bar on confirmed bars only. No repainting, no lookahead.
━━━━━━━━━━━━━━━━━━━━
ZONE GRADING SYSTEM (A+ / A / B / C)
━━━━━━━━━━━━━━━━━━━━
Each zone receives a score from 0–100 at creation using four measurable factors:
Move strength (max 30 pts):
- score += min((range / ATR ) × 18, 30)
Volume strength (max 20 pts):
- score += min((volume / volAvg ) × 13, 20)
- If volume confirmation disabled: default 10 pts
VWAP confluence (25 pts):
- +25 if session VWAP falls within zone ± (ATR × tolerance)
- Uses ta.vwap (session-anchored)
HTF zone overlap (20 pts):
- +20 if zone price range overlaps a detected higher-timeframe zone
- HTF data pulled via request.security() with lookahead=barmerge.lookahead_off
Freshness bonus (5 pts):
- +5 at creation
Grade thresholds:
- A+ ≥ 80 | A ≥ 65 | B ≥ 50 | C < 50
Grade displayed as badge inside each zone. Signals filterable by minimum grade.
━━━━━━━━━━━━━━━━━━━━
VWAP CONFLUENCE
━━━━━━━━━━━━━━━━━━━━
Session VWAP (ta.vwap) compared to each new zone at creation:
vwapInZone = VWAP ≥ (zoneBottom − ATR × tolerance)
AND VWAP ≤ (zoneTop + ATR × tolerance)
When true, zone receives +25 score and ⊕V tag on label.
━━━━━━━━━━━━━━━━━━━━
MULTI-TIMEFRAME ZONE OVERLAY
━━━━━━━━━━━━━━━━━━━━
Same detection logic runs on a higher timeframe via:
request.security(syminfo.tickerid, htfRes, f_htfDetect(), lookahead=barmerge.lookahead_off)
HTF zones drawn with dashed blue borders. When LTF zone overlaps active HTF zone it receives +20 confluence bonus and ⊕H label tag. HTF zones auto-mitigated when price closes through them.
━━━━━━━━━━━━━━━━━━━━
LIQUIDITY SWEEP DETECTION
━━━━━━━━━━━━━━━━━━━━
A liquidity sweep is defined as:
For demand zones (⚡BUY):
- bar low < zone bottom — wick pierced below
- bar close > zone bottom — body reclaimed inside zone
- Sweep depth = (zoneBottom − low ) / close ≥ minimum threshold
- Current bar confirms bullish (close > open)
For supply zones (⚡SELL): inverse conditions apply.
This represents institutional stop hunting — retail stops below a structural low are triggered, price immediately reverses. These are marked as ⚡BUY / ⚡SELL, visually distinct from regular signals.
━━━━━━━━━━━━━━━━━━━━
SIGNAL LOGIC
━━━━━━━━━━━━━━━━━━━━
Regular BUY signal fires when all confirmed on closed bar:
- Price taps active demand zone (low ≤ zone top)
- Close back above zone top — bullish body
- Lower wick ≥ 50% of candle range — rejection confirmation
- Trend filter: close > EMA(50) — directional bias
- Zone grade meets minimum requirement
- Zone not yet used (one-signal-per-zone mode)
- Cooldown bars passed since last signal
Inverse for SELL at supply zones.
━━━━━━━━━━━━━━━━━━━━
ZONE MITIGATION
━━━━━━━━━━━━━━━━━━━━
Two modes:
- Body Close: zone removed when candle body closes through zone boundary
- Wick Touch: zone removed when any wick touches zone boundary
Mitigated zones are deleted from chart automatically. All related labels and badges deleted simultaneously via parallel array management.
━━━━━━━━━━━━━━━━━━━━
LIVE BACKTEST PANEL
━━━━━━━━━━━━━━━━━━━━
Every fired signal is logged with: entry price, ATR at entry, direction, bar index. On subsequent bars the script evaluates:
- Win: price reaches entry ± (ATR × targetMultiplier) in signal direction
- Loss: price reaches entry ∓ (ATR × stopMultiplier) against signal direction
First level hit determines outcome. Panel displays:
- Total signals tracked (configurable max, default 50)
- Wins / Losses / Open
- Win rate %
- Average R-multiple = (wins × targetMult − losses × stopMult) / closed signals
This is a logic-level simulation using OHLC data. Not slippage or fee adjusted.
━━━━━━━━━━━━━━━━━━━━
WHAT IS ORIGINAL
━━━━━━━━━━━━━━━━━━━━
- Quantitative zone grading (0–100 score → A+/A/B/C) based on four measurable confluences
- Liquidity sweep detection as a separate premium signal class
- VWAP proximity as a scored confluence factor (not just an overlay)
- HTF zone overlap as a scored confluence factor
- Live backtest panel tracking actual signal outcomes with R-multiple
- Adaptive zone extension — boxes track current bar instead of extending infinitely
- All filters stackable independently: grade, trend, wick size, cooldown, session, freshness
━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━
- Green boxes = demand zones | Red boxes = supply zones
- Dashed blue boxes = higher timeframe zones
- Grade badge inside each zone: A+ (yellow) / A (orange) / B (gray) / C (faded)
- ⊕V = VWAP confluence | ⊕H = HTF confluence
- Triangle up = BUY signal | Triangle down = SELL signal
- ⚡BUY / ⚡SELL = liquidity sweep signals (highest probability)
Recommended workflow:
1. Identify A or A+ graded zones with ⊕V or ⊕H tags
2. Wait for price to return to zone
3. Enter on BUY/SELL signal — wick rejection + bullish/bearish close
4. Prioritize ⚡ sweep signals when available
5. Monitor backtest panel to confirm positive expectancy on your asset
━━━━━━━━━━━━━━━━━━━━
RECOMMENDED SETTINGS
━━━━━━━━━━━━━━━━━━━━
- Forex / Gold (XAUUSD): Volume confirmation OFF
- Stocks / Crypto / Futures: Volume confirmation ON
- Scalping: 5m–15m chart, HTF = 1H
- Intraday: 15m–1H chart, HTF = 4H
- Conservative: Min Grade = A, Cooldown = 10
- Aggressive: Min Grade = B, Cooldown = 5
━━━━━━━━━━━━━━━━━━━━
No repainting. No lookahead bias. All signals fire on barstate.isconfirmed only.
Detection uses bar and bar historical references exclusively.
WHY THESE COMPONENTS WORK TOGETHER
Supply and demand zones identify WHERE price is likely to react. VWAP identifies WHERE fair value sits. Neither alone confirms institutional intent. When a zone aligns with VWAP and a higher-timeframe zone simultaneously, the probability of a genuine institutional reaction increases measurably. The liquidity sweep signal adds a third layer — detecting when stops are hunted before reversal. These three components cannot produce the same edge independently; the confluence scoring model is what ties them into one system. 指标

VWAP SD2 Reversion (Long)A patient, momentum-confirmed dip buyer that fades stretches below the session VWAP and targets a return to the mean.
The idea
Intraday price tends to oscillate around its volume-weighted average price (VWAP). When price extends a full two standard deviations below the session VWAP, it is statistically stretched and often springs back toward the average. This strategy is built to capture that snap-back, but it deliberately does not buy the dip blindly. A stretched market can keep falling, so the strategy waits for two independent momentum tools to confirm that the down-move has actually turned before it commits.
The result is a sequential, time-boxed setup: a volatility filter, a price stretch, and then two momentum confirmations that must all line up within a short window. If they do not, the setup is discarded and the strategy stays flat.
How a trade is built
Each long requires the following to occur in order, with every step happening at or after the initial dip and within the confirmation window:
Volatility filter: the lower 2-SD band must sit at least a minimum distance from VWAP (default 10 pips). This skips quiet, low-range conditions where there is little room to revert and the costs would dominate.
Step 1, the stretch: price closes below the lower 2-SD band.
Step 2, RSI confirms: RSI recovers back above its level (default 30), confirming the oversold push is fading.
Step 3, MACD confirms: the MACD line turns bullish over its signal line (or over zero, if you prefer), confirming momentum has flipped up.
Entry: a market long is taken on the bar that completes Step 3.
Why a state machine
Real momentum turns are messy. RSI and MACD often flip within a bar or two of each other, and sometimes on the very same bar. A naive rule that demands three separate single-bar crossovers in strict order misses most of these clusters. This strategy instead tracks the setup through a small state machine that:
anchors both confirmations to the first dip bar, so a momentum cross that happened before the dip cannot be borrowed to validate the trade;
accepts confirmations that arrive in either order or on the same bar, as long as both are recent and post-dip;
keeps the setup alive while price continues to hug the band, and expires it cleanly once the confirmation window passes without a trigger.
A Strict toggle is provided for those who want the original behaviour, where each step must be a fresh crossover on a later bar.
How the exit works
Because the thesis is reversion to the mean, the natural profit target is the mean itself. By default the take-profit is the live VWAP, re-evaluated every bar so it tracks the line as it moves, set a small buffer in front so the order fills on the approach rather than waiting for an exact touch. A minimum-profit floor prevents a falling VWAP from dragging the target back through the entry.
A fixed-pip take-profit mode is available as an alternative. The stop-loss is a fixed pip distance below entry in both modes. Targeting the mean rather than a fixed number of pips tends to produce variable, often larger winners, which also dilutes the impact of fixed spread costs.
Settings
Setup
SD band multiplier — standard-deviation width of the bands (default 2.0).
Min VWAP to SD2 distance — the volatility filter, in pips (default 10).
Confirmation window — how many bars each step has to confirm (default 5).
Strict cross — require a fresh crossover on a bar after the prior step.
RSI and MACD
Standard RSI length and cross level.
Standard MACD fast, slow and signal lengths, with an optional zero-line cross instead of a signal-line cross.
Risk and pips
TP at VWAP, with a front-run buffer and a minimum-profit floor, or a fixed-pip take-profit.
Stop loss in pips.
Auto pip size (mintick × 10), which resolves correctly for 5-decimal FX and 3-decimal JPY pairs, plus a manual override.
Reading the chart
Orange line: session VWAP (the reversion target).
Red and green lines: the lower and upper 2-SD bands.
Markers: 1 marks a close below the band, 2 marks the RSI confirmation, and the triangle marks the MACD confirmation and entry trigger.
Intended use
This is an intraday strategy, developed and tuned on 5-minute FX majors, with a daily VWAP anchor that resets each session. In the author's testing it has behaved most consistently on AUDUSD, and it is also designed for pairs such as EURUSD and USDJPY. As always, behaviour varies by pair, broker feed and period, so test it on your own data before relying on it.
On backtest settings: tight intraday targets are sensitive to execution costs. Before drawing conclusions from the Strategy Tester, set a commission and slippage that match your broker, and choose a position size that reflects the risk you would actually take. Results shown with unrealistic costs can look far better than anything achievable live.
This script is published for educational and research purposes only and is not financial advice or a recommendation to trade. Backtested and hypothetical results do not guarantee future performance, and trading leveraged instruments such as FX carries substantial risk of loss. You are responsible for your own testing, risk management and decisions. 策略

Generalized Fisher Transform [LB] Concept
The Generalized Fisher Transform extends John F. Ehlers' classic Fisher Transform (2002) by introducing an adjustable shape parameter that controls the sensitivity profile of the transformation. While the original Fisher Transform maps any normalized input to a near‑Gaussian output to highlight statistical extremes, this generalized version allows traders to emphasize central regions (shape < 1) or extreme tails (shape > 1) depending on their strategy.
Mathematical Foundation
The indicator first normalizes price to a bounded range using a rolling min‑max window of length N :
x = 2 × (P - L_min) / (H_max - L_min) - 1
A signed power is then applied with a shape factor p :
x_p = sign(x) × |x|^p
The generalized Fisher Transform is computed as :
F = 0.5 × ln( (1 + x_p) / (1 - x_p) )
When p = 1 , the formula reduces to the classic Fisher Transform. Values of p < 1 amplify sensitivity near zero (central price region), while p > 1 amplify sensitivity near the edges (extreme price region). The result is smoothed by an EMA for noise reduction.
What Problem Does It Solve ?
Classic oscillators such as RSI or Stochastic use fixed non‑linear mappings that cannot adapt to different market regimes or trader preferences. The classic Fisher Transform offers a single sensitivity profile. The Generalized Fisher Transform solves this by exposing the shape parameter p , giving traders direct control over where the indicator is most responsive — near the mean or near the extremes — without changing the underlying logic or introducing additional indicators.
How To Interpret
The indicator operates in two selectable modes :
Extremes Mode – the background turns red when Fisher exceeds the upper threshold (statistically overbought), and green when it drops below the lower threshold (statistically oversold). These zones suggest potential mean‑reversion.
Direction Mode – the background turns cyan when Fisher is above zero (bullish bias) and orange when below zero (bearish bias). This mode is suited for trend‑following or directional confirmation.
In both modes, the Fisher line crossing zero indicates a shift in the price distribution relative to its recent range.
Parameters
Source – price data used for the calculation (default: close).
Normalization Period – number of bars used to compute the rolling min‑max for the normalization.
Shape Factor – exponent applied to the normalized price before the Fisher transform. 1 = classic Fisher, < 1 = center‑sensitive, > 1 = tail‑sensitive.
Smoothing Period – EMA length applied to the raw Fisher output.
Coloration Mode – switches between "Extremes" (overbought/oversold highlighting) and "Direction" (bullish/bearish highlighting).
Upper Threshold – Fisher level above which the background turns red in Extremes mode.
Lower Threshold – Fisher level below which the background turns green in Extremes mode.
Reference
Ehlers J.F., "Using the Fisher Transform", Technical Analysis of Stocks & Commodities, Vol. 20, No. 11, pp. 40‑45, November 2002.
Ehlers J.F., "Cybernetic Analysis for Stocks and Futures", Chapter 4 – The Fisher Transform, John Wiley & Sons, 2004. 指标

Relative Volume (RVOL) Surge Dashboard Overview
The **Relative Volume (RVOL) Surge Dashboard** is a utility script designed to visually isolate institutional activity and anomalies in volume. In financial markets, sudden volume spikes that double the recent average often signal institutional presence, news-driven breakouts, or potential trend exhaustion points.
This indicator keeps your main chart clean while feeding you live volume metrics via an on-chart HUD (Heads-Up Display).
Key Features
* **Live Relative Volume Multiplier: ** Instantly displays exactly how many times the current bar's volume is exceeding its standard historical moving average (e.g., 1.54x, 3.10x).
* **Smart UI Dashboard: ** A customizable, clean panel that switches colors (Green/Red) immediately depending on whether a 2x volume surge is active or normal.
* **On-Chart Signals: ** Draws a clean yellow cross at the bottom of the price bar whenever a volume anomaly occurs.
* **Built-in Alert Engine: ** Supports native Trading View alert conditions so you can receive push notifications, email, or webhook alerts the exact second a volume anomaly prints.
How to Use It
1. **Trend Breakout Confirmation: ** Look for the dashboard to trigger a green "2x ALERT: ACTIVE" during a consolidation breakout. High volume confirms validity.
2. **Climactic Reversals: ** If a stock has been in an extended downtrend/uptrend and suddenly prints a massive 2x+ volume spike without making significant price progress, look for a potential reversal.
3. **Customization: ** Use the settings panel to change the lookback period (default is 20 bars) or move the dashboard to any corner of your screen to prevent overlapping other indicators.
DISCLAIMER:
This script is created for educational, informational, and utility purposes only. It does not constitute financial, investment, or trading advice. Past performance of any volume metrics or technical signals is not indicative of future results. Financial markets involve substantial risk of loss, and individual traders are entirely responsible for their own capital allocation and risk management. Always perform your own due diligence before entering any trade. 指标

策略

Crypto Swing buy and sell indicatorCrypto Swing Buy and Sell Indicator is a trend-following swing indicator designed for crypto markets. It combines a 200-period EMA trend filter with MACD histogram momentum shifts, RSI recovery/cooling zones, and MFI volume-flow confirmation to highlight potential buy and sell opportunities.
The indicator plots a dynamic EMA 200 line that changes colour depending on whether price is trading above or below the trend filter. A BUY signal appears when price is above the EMA 200, MACD momentum turns bullish, RSI is recovering from lower levels, and MFI confirms that the move is not yet overextended. A SELL signal appears when price is below the EMA 200, MACD momentum turns bearish, RSI is cooling from higher levels, and MFI confirms weakening buying pressure.
This indicator is intended for swing trading and trend confirmation, especially on higher timeframes such as 4H or daily charts. It can be used to identify possible long and short setups, but should be combined with risk management, support/resistance analysis, and broader market context.
Signals:
BUY: Price above EMA 200 + MACD bullish flip + RSI recovering + MFI below 50.
SELL: Price below EMA 200 + MACD bearish flip + RSI cooling + MFI above 50.
Recommended use: crypto swing trading, trend confirmation, momentum-based entries, and alert-based trade monitoring. 指标

策略
