Session block profileEvery part of the trading day has a personality. See yours in one table.
Description
Splits the trading session into fixed-length blocks and, for each block, keeps a rolling history of what that part of the day has done over the last N sessions. Three descriptive measures per block: how large its range tends to be relative to the average block, how much volume it tends to carry relative to the average block, and how directional it tends to be, measured as the average of the block's body over its range.
How it calculates
Each bar is assigned to a block from its minute of the day in the chosen time zone. A block's high, low, open, close, and volume accumulate on confirmed bars. When the first confirmed bar of a different block or a different day arrives, the completed block is written into its rolling history and that block's means are recomputed once. Range and volume indices are each block's mean divided by the average across all blocks with enough history, so 1.00 is an average block. Body ratio is the mean of |close - open| divided by (high - low) for the block, so 0 is a doji and 1 is a full-body bar.
How to read it
Range and volume shade toward green as they rise above the average block. Body shades toward amber as blocks become more directional. The current block's label is amber. Alternate blocks can be shaded on the chart so the grid is visible against price. This is a description of what each part of the day has tended to do. It is not a forecast.
Repainting
Closed blocks do not repaint. History is written only when a block completes. The current block is marked but its partial values are not shown as a statistic.
Originality and attribution
Session statistics by time of day are a familiar idea. What is original here is the block-keyed rolling history with cached per-block means, the three-measure normalization against the session's own average block, and the heat-table presentation. This is not derived from and does not reuse code from any existing published script.
Honest limitations
The session must start and end on the same calendar day in the chosen time zone. Sessions that cross midnight are not supported.
A partial first day in chart history contributes a partial block. The minimum-sessions setting exists to absorb that.
Half days, holidays, and early closes pollute a block's history for as many sessions as the lookback.
Range and volume are relative to the average block within this session window, so the indices are only comparable inside one configuration.
Body ratio is not a trend measure. A block can have a high body ratio and still be a small, meaningless move.
Nothing here is a signal. A high-range block is not a direction. Indicator

Realized volatility term structureVolatility has a curve too. See whether the short end is screaming or sleeping.
Description
Measures realized volatility of bar returns over five horizons at once, from short to long, and draws the resulting curve at the right edge of the pane so you can see its shape rather than a single number.
How it calculates
Realized volatility at each horizon is the population standard deviation of log returns over that many bars, scaled by the square root of the number of bars in a year for the current timeframe, shown as a percentage. The plotted history is horizon one divided by horizon five. The curve is drawn as four connected segments through five points placed just past the last bar, each point's height equal to that horizon's volatility divided by the longest horizon's.
How to read it
Above 1.0 the short end is running hotter than the long end, which is what a fresh shock looks like. Below 1.0 the short end is quieter than the long end, which is what compression looks like. The pane shades amber while the short end is elevated. The curve at the right edge is normalized to the longest horizon so its shape is comparable across instruments and timeframes. Each point is labeled with its horizon in bars and its annualized value.
Repainting
Closed bars do not repaint. The live bar updates until it closes. The curve at the right edge is redrawn on the last bar only.
Originality and attribution
Realized volatility over a window is standard. What is original here is presenting it as a term structure: five horizons measured together, the short-to-long ratio tracked through time, and the live curve drawn on the chart as connected points. This is not derived from and does not reuse code from any existing published script.
Honest limitations
Realized volatility is backward looking by construction. The short end reacts within a few bars. The long end takes as many bars as its horizon to fully reflect a change.
Annualization is a display convention. The trading-minutes-per-day and days-per-year inputs only scale the percentages shown.
On timeframes above daily the annualization assumes 52 weekly or 12 monthly bars per year.
The elevated and subdued thresholds are conventions, not calibrations.
Five horizons is a choice. The curve between them is a straight line.
Nothing here is a signal. An elevated short end is not a direction. Indicator

Time-of-day volume normalizerHigh volume at 9:31 is not high volume. See each bar against its own time of day.
Description
Raw volume is not comparable across the trading day. The first minutes of the regular session routinely print several times the volume of a midday bar, so reading "high volume" off the raw histogram usually just tells you that it is early in the session. Most relative volume tools compare a bar against a trailing average of the last N bars regardless of clock time, which carries the same problem forward.
This compares each bar's volume only against the same clock time on prior sessions, and returns the result as a z-score.
How it calculates
Every bar is assigned to a time slot from its minute of the day, in the time zone you choose, and the chart timeframe. Each slot keeps an independent rolling history of volume, one observation per prior session. For the current bar the script reads that slot's cached center and spread and returns how far current volume sits from the center in spread units. The cache is refreshed only when the slot receives a new observation, so the current bar is never part of its own baseline. Median with median absolute deviation, scaled by 1.4826, is the default. Mean with population standard deviation is the alternative.
How to read it
A reading of 0 means this bar is doing what this time of day normally does. A reading of +2 means it is two spread units above its own slot's history. Green marks readings above the norm, amber marks unusually high, and a lighter grey marks unusually quiet. The pane shades faintly while a slot is still warming or has no spread. The table shows the current slot, its warmup state, its norm, and the current reading.
Repainting
Closed bars do not repaint. The live bar updates until it closes. History is written on confirmed bars only.
Originality and attribution
The z-score is textbook. What is original here is the slot-keyed baseline: one independent rolling history per minute-of-day bucket, with the current bar excluded from its own baseline, and per-slot statistics cached and recomputed only when that slot's history changes. This is not derived from and does not reuse code from any existing published script.
Honest limitations
Nothing plots until a slot reaches the minimum sample count. The table reports warmup progress.
If a slot's stored volumes are near-identical the spread collapses to zero and no z-score is defined. The table reports this as flat.
Half days, holidays, and session changes pollute a slot's history.
Futures roll and contract changes shift volume levels.
Slots and the session filter both key to the time zone you choose.
Requires an intraday timeframe of 1 minute or higher and a symbol that reports volume.
This is not a signal, it says nothing about direction, and a high reading is not inherently bullish or bearish. Indicator

Risk-Sizing CalculatorA simple, visual position-sizing tool for any market or timeframe.
Enter your account size and risk percentage, choose a stop-distance
method (ATR-based, manual stop price, or fixed % of entry), and the
indicator calculates your position size, stop distance, dollar risk,
notional exposure, and an optional reward-to-risk target — displayed
in a clean live table with entry and stop lines on your chart.
Also includes a 3-scenario Size Ladder (0.5% / 1% / 2% account risk
side-by-side) so you can see the sizing range at a glance, plus an
optional Market Context panel showing ATR %, RSI, ADX, volatility
class, and session state.
FEATURES
- Three stop-distance methods: ATR-based, Manual Stop Price, Fixed %
- Position size in units, notional dollars, and % of account
- Size Ladder table showing what 0.5% / 1% / 2% risk each produce
- Reward-to-risk target row (optional · pairs with an R multiple)
- Market Context panel: ATR %, RSI(14), ADX(14), volatility class,
session flag
- Live entry + stop + target lines drawn on the chart
- Adjustable table position (top-right, middle-right, etc.)
- Clean numeric output for quick pre-trade sanity check
HOW TO USE
1. Set Direction (Long / Short) and optionally a Manual Entry Price
2. Choose your Stop Distance method — ATR, manual price, or fixed %
3. Enter Account Size and Risk per trade % (1% is a common default)
4. Optional: enable target row and set R multiple
Pairs naturally with any ATR-based visualizer or manual entry planning.
Educational only · not financial advice · does not generate buy/sell signals. Indicator

ATR Stop & Target VisualizerA simple, visual risk-planning tool for any market or timeframe.
Choose a direction (Long/Short) and the indicator plots an ATR-based
stop-loss, three reward-to-risk targets (TP1, TP2, TP3), shaded
risk / reward zones, and a live trade-plan table summarizing entry,
stop, targets, R:R math, ATR value, dollar risk, and a simplified
position-size estimate.
Also includes an optional Market Context panel showing ATR %, RSI,
ADX, volatility class, and session state — so the risk plan sits
alongside the environment reading you're planning against.
FEATURES
- ATR-based stop distance with selectable smoothing (RMA/SMA/EMA/WMA)
- Three reward-to-risk targets (TP1/TP2/TP3) with independent R
multiples · defaults 1R / 2R / 3R
- Layered shaded reward zones (densest at TP1, lightest at TP3)
- Auto or manual entry price
- Trade-plan table with all key numbers at a glance
- Simplified position-size estimate (account × risk %)
- Market Context panel: ATR %, RSI(14), ADX(14), volatility class,
session flag
- Clean single-bar drawing to keep charts readable
HOW TO USE
1. Set Direction (Long / Short) and optionally a Manual Entry Price
2. Tune the ATR length and stop multiple to fit the instrument's
volatility
3. Set each target as an R multiple (defaults 1R / 2R / 3R)
4. Enter account size and risk % to see a suggested position size
This is a visual risk-planning tool built to help traders think in
terms of risk first. Educational only · not financial advice · does
not generate buy/sell signals. Indicator

Aurora_Channel_V1█ Overview
The Aurora Channel is an adaptive multi-layer volatility and expansion framework that fuses Bollinger Bands, Keltner Channels, volume-sensitive dynamics, and intelligent moving-average selection into a single coherent system.
Instead of treating channels as static statistical boundaries, Aurora continuously evaluates market behavior, selects the most suitable moving-average engine in real time, expands or contracts outer envelopes according to volume and width regimes, and projects dynamic trigger and crossover levels that respond to actual price action.
The result is a hybrid channel system that blends:
• Adaptive MA selection (Auto / Adaptive Scoring)
• Volume-modulated Keltner expansion
• Hybrid Bollinger–Keltner “Aurora” bands
• Multi-layer expansion envelopes
• Peak-aware or dynamically tracking Trigger Channel
• Crossover Multiplier Engine with adaptive overlays
• Regime-aware visuals and a live Dashboard HUD
█ Why is this one unique
Most channel indicators are fixed formulas. Aurora is a full adaptive channel engine built in Pine Script v6.
It does not simply plot Bollinger or Keltner bands. It constructs a hybrid core, surrounds it with volume-aware expansion logic, maintains intelligent outer triggers, and generates dynamic crossover projection lines whose multiplier is itself adaptive.
⚪ What it does
At a high level:
Auto MA Selection Engine
Continuously scores SMA, EMA, RMA (SMMA), WMA, and VWMA candidates using a combined lag-error + jitter penalty. The engine automatically selects the MA with the lowest overall score (or lets the user force a manual choice). This becomes the center line for every subsequent calculation.
Hybrid Aurora Core
Builds classic Bollinger Bands and a volume-sensitive Keltner Channel around the selected midline. The Keltner multiplier dynamically expands between 3.0–4.0 during volume spikes. The difference between the two outer bands is then smoothed and re-applied, creating the final Aurora Upper / Lower bands.
Expansion Envelope
Measures the current Aurora width, smooths it, and projects outer envelope levels that react to both width expansion and tick-volume intensity. Optional “Breakouts Only” mode shows the envelope solely when price is already expanding beyond the Aurora bands.
Trigger Channel
Two memory modes:
• Dynamic Tracking – continuously follows expansion and decays when price returns inside.
• Hold Peak Level – latches the highest/lowest expansion extremes.
A proportional buffer is then added, creating clean outer trigger lines.
Crossover Multiplier Engine
Monitors crosses of a user-selected target (Midline, Aurora Bands, Envelope, or Trigger). On every cross it captures the current Keltner multiplier × volume ratio, latches that value, smooths it with the same adaptive MA engine, and projects symmetric overlay lines around the midline. These act as adaptive reaction / target levels.
Multi-Layer Clouds + Regime Visuals
Soft gradient fills between midline → Aurora and Aurora → Envelope, plus a softer fill toward the Trigger. Candles are colored by regime (above/below midline). A compact Dashboard HUD displays the active MA, cross target, current multiplier, expansion state, and regime.
⚪ Why it is good
The strongest aspect is the combination of adaptive center selection, volume-aware expansion, and quality-aware outer structures in one coherent framework.
Most channel tools are either pure statistical (Bollinger) or pure volatility (Keltner/ATR). Aurora merges both, then adds intelligent memory (Trigger modes) and a live crossover-driven multiplier engine. The visual hierarchy (multi-layer clouds) makes regime and expansion instantly readable, while the Dashboard keeps the key adaptive values visible without cluttering the chart.
⚪ What makes it sophisticated
• Real-time adaptive MA scoring with lag + jitter penalty
• Dynamic Keltner multiplier driven by volume ratio
• Hybrid band construction that re-injects smoothed BB–KC difference
• Dual-mode Trigger memory (peak hold vs continuous tracking + decay)
• Crossover-triggered multiplier latching and adaptive projection
• Multi-layer gradient fills that scale with the actual channel hierarchy
• Non-repainting alerts on confirmed crosses
⚪ Why It’s Marketable
Traders looking for more than a simple Bollinger or Keltner band receive a complete adaptive channel ecosystem. The Auto MA engine removes the endless debate of “which MA is best,” the Expansion Envelope and Trigger Channel give clear breakout and reaction zones, and the Crossover Multiplier Engine turns every significant cross into dynamic, volume-aware target lines. The result is a selective, visually rich, and highly configurable system that adapts to the instrument and timeframe instead of forcing a fixed formula onto every market.
⚪ Main weakness
The system is still rule-based adaptive logic, not deep learning. Performance depends on the chosen lengths, the quality of volume data (especially on tick-volume charts), and the current market regime. Over-optimization of the many parameters can reduce robustness.
█ How It Works
⚪ Auto MA Selection Engine
Scores five classic moving averages on tracking error (squared lag) plus a jitter penalty. The lowest combined score becomes the active center line used by every channel component.
⚪ Aurora Core Construction
• Midline = selected MA
• Bollinger = midline ± StdDev × multiplier
• Keltner = midline ± ATR × volume-modulated multiplier (3.0–4.0)
• Aurora bands = Keltner ± smoothed (BB – KC) difference
⚪ Expansion Envelope
Average Aurora width is multiplied by a base factor and further expanded by excess volume. The resulting offset is added outside the Aurora bands. Optional breakout-only plotting keeps the chart clean until genuine expansion occurs.
⚪ Trigger Channel
On expansion the system either latches the extreme (Hold Peak) or follows and slowly decays the level (Dynamic Tracking). A proportional buffer creates the final trigger lines.
⚪ Crossover Multiplier Engine
Detects crosses of the chosen target, captures kcMult × volRatio, latches the value, smooths it with the adaptive MA engine, and projects midline ± ATR × smoothed multiplier as dotted overlay lines.
█ How To Use
• Use the Aurora bands as the primary dynamic support/resistance zone.
• Watch the Expansion Envelope for genuine volatility breakouts.
• Treat the Trigger Channel as outer reaction / invalidation levels.
• The Crossover Multiplier lines act as adaptive targets or reaction zones after significant crosses.
• Candle color and the Dashboard HUD give instant regime and state information.
• Enable alerts on the crossover condition for automated notifications.
█ Settings
Auto MA Selection Engine
• MA Selection Engine (Auto Adaptive / Manual)
• Manual MA type
• Jitter Penalty strength
Core Channel Engine
• Base Center Length
• Bollinger StdDev multiplier
• Keltner ATR Length
• Tick Volume MA Length & Expansion Factor
• Band Difference MA Length
Expansion Envelope
• Show / Breakouts Only
• Expansion MA Length
• Envelope Base Multiplier & Volume Boost
Trigger Channel
• Show Trigger
• Buffer Multiplier
• Memory Mode (Dynamic Tracking / Hold Peak Level)
Crossover Multiplier Engine
• Show Dynamic Lines
• Cross Monitoring Target
• Multiplier MA Smoothing Length
Visual Settings
• Candle Coloring
• Multi-Layer Cloud
• Dashboard HUD
• Full color customization for every layer
█ Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. Past performance is not indicative of future results. All trading involves risk, and you are solely responsible for your own trading decisions. Indicator

Fundamental Valuation Snapshot [FVS]Fundamental Valuation Snapshot
Fundamental Valuation Snapshot is a compact fundamental dashboard designed to provide a quick view of a company's profitability, valuation, financial strength, growth, cash generation, and analyst expectations directly on the chart.
The panel includes ROA, ROE, ROIC, Current Ratio, P/E, PEG, P/S, P/B, Debt/Equity, Dividend Yield, Market Capitalization, Cash-Adjusted Price, Revenue, Gross Profit, Net Income, Return on Capital (ROC), Revenue Growth, Net Margin, Free Cash Flow, Debt/EBITDA, Piotroski F-Score, and analyst price targets when the data is available from TradingView.
Valuation Color Profiles
FVS includes four configurable valuation profiles:
* Conservative
* Balanced
* Growth
* Custom
The selected profile changes only the thresholds used for color grading. It does not alter the underlying financial data.
Green indicates that a metric meets the selected profile's preferred threshold. Blue represents a neutral tolerance zone around the threshold. Red indicates that the metric is outside the profile's preferred range. Gray indicates unavailable data.
The Neutral Zone Tolerance setting can be adjusted to make the grading system stricter or more flexible.
Because valuation norms differ significantly between industries and business models, these profiles should be treated as screening guidelines rather than universal definitions of fair value. The Custom profile allows users to define their own thresholds.
Credits
This indicator was originally inspired by and partially adapted from the open-source "Valuation Table" by TradingView author kenhuangsy2.
FVS substantially expands the original concept with additional fundamental metrics, configurable fiscal periods, valuation and quality profiles, tolerance-based color grading, cash-adjusted price calculations, analyst price targets, Piotroski F-Score, additional financial statement data, formatting utilities, configurable panel sizing and positioning, and a Pine Script v6 implementation.
Published open-source under the Mozilla Public License 2.0.
This indicator is intended as a fundamental research and screening tool. Its colors and valuation profiles are contextual aids and should not be interpreted as investment recommendations or automatic buy/sell signals.
Indicator

On Balance VolumeOverview
This indicator is based on On Balance Volume (OBV) and is designed to analyze the relationship between price and volume, helping traders identify potential accumulation, distribution, trend confirmation, and changes in volume flow.
In addition to the traditional OBV, the indicator allows users to apply different moving-average types to smooth the OBV and, optionally, add Bollinger Bands around the smoothed OBV.
The indicator also uses dynamic colors, making it easier to visually identify the direction of both the OBV and its moving average.
1. On Balance Volume (OBV)
OBV accumulates or subtracts volume according to price movement:
If the current closing price is higher than the previous close, volume is added to OBV.
If the current closing price is lower than the previous close, volume is subtracted from OBV.
If there is no change in price, OBV remains unchanged.
Interpretation
Rising OBV:
May indicate increasing buying pressure, accumulation, or confirmation of an uptrend.
Falling OBV:
May indicate increasing selling pressure, distribution, or confirmation of a downtrend.
OBV should not be used in isolation. Combining it with price action, trend structure, support and resistance, and other technical factors may improve the quality of the analysis.
2. OBV Dynamic Colors
The main OBV line uses three colors:
🟢 Green
OBV is increasing compared with the previous period.
This indicates positive volume flow.
🔴 Red
OBV is decreasing compared with the previous period.
This indicates negative volume flow.
🟡 Yellow
OBV has not changed compared with the previous period.
3. Smoothing
The Type setting allows users to apply a moving average to the OBV.
Available options:
None
SMA
SMA + Bollinger Bands
EMA
SMMA (RMA)
WMA
VWMA
Smoothing can be used to reduce short-term fluctuations and make the underlying direction of OBV easier to identify.
4. Moving Average Type
None
No moving average is applied.
Only the original OBV is displayed.
Useful for:
Faster analysis;
Immediate identification of OBV changes;
Traders who prefer raw volume-flow information.
SMA — Simple Moving Average
Calculates the arithmetic average of OBV over the selected number of periods.
Characteristics:
Smoother than the raw OBV;
Slower to react to sudden changes;
Useful for identifying the broader direction of volume flow.
SMA + Bollinger Bands
Applies an SMA to OBV and adds Bollinger Bands.
This option displays:
A central moving average;
An upper Bollinger Band;
A lower Bollinger Band.
The bands help identify periods when OBV is moving relatively far from its recent average.
EMA — Exponential Moving Average
The EMA gives greater weight to recent OBV values.
Characteristics:
Responds faster to changes in OBV;
Useful for short- and medium-term analysis;
Generally more responsive than an equivalent SMA.
SMMA (RMA)
The SMMA/RMA is a smoother moving average designed to reduce short-term fluctuations.
It can be useful for traders who want a more stable view of the underlying OBV trend.
WMA — Weighted Moving Average
The WMA assigns greater weight to more recent values.
It generally responds faster to changes in OBV than an equivalent SMA.
VWMA — Volume Weighted Moving Average
The VWMA weights values according to volume.
Because OBV itself is already volume-based, this option may produce a different smoothing behavior compared with traditional moving averages and should be evaluated according to the trader's strategy.
5. Length
The Length parameter determines the number of periods used to calculate the moving average.
The default value is:
14 periods
Shorter Length
Examples: 5, 9, or 10.
The moving average becomes faster and more sensitive.
Potentially useful for:
Short-term trading;
Faster detection of changes in volume flow;
Scalping and intraday strategies, depending on the market.
However, shorter lengths can also generate more noise and false signals.
Longer Length
Examples: 20, 50, or 100.
The moving average becomes slower and smoother.
Potentially useful for:
Trend analysis;
Swing trading;
Identifying the dominant volume-flow direction.
The longer the length, the greater the delay in reacting to changes in OBV.
6. Moving Average Dynamic Colors
The OBV moving average also changes color dynamically.
🟢 Green
The moving average is rising.
🔴 Red
The moving average is falling.
🟡 Yellow
The moving average is unchanged.
This allows traders to quickly identify the direction of the smoothed OBV.
7. Bollinger Bands
Bollinger Bands are available only when:
Type = SMA + Bollinger Bands
The bands are calculated using the standard deviation of OBV.
The indicator displays:
Upper Bollinger Band
SMA / Middle Band
Lower Bollinger Band
The distance between the bands expands or contracts according to changes in OBV volatility.
8. BB StdDev
The BB StdDev parameter controls the distance of the Bollinger Bands from the moving average.
Default value:
2.0
Lower value
Example: 1.0–1.5.
The bands become narrower.
This increases sensitivity and causes OBV to reach the bands more frequently.
Higher value
Example: 2.5–3.0.
The bands become wider.
This reduces the frequency of band touches and can help highlight more extreme OBV movements.
9. How to Interpret the Indicator
The indicator can primarily be used for four types of analysis:
1. Trend Confirmation
During an uptrend:
Price rising + OBV rising
may indicate volume confirmation of the bullish trend.
During a downtrend:
Price falling + OBV falling
may indicate confirmation of selling pressure.
2. Bullish Divergence
A potential bullish divergence occurs when:
Price makes lower lows while OBV makes higher lows.
This may indicate weakening selling pressure and a possible loss of bearish momentum.
3. Bearish Divergence
A potential bearish divergence occurs when:
Price makes higher highs while OBV makes lower highs.
This may indicate weakening buying pressure.
Important: Divergences do not guarantee a reversal. They should be considered warning signals and ideally confirmed by price action or other technical factors.
10. Using Bollinger Bands on OBV
When Bollinger Bands are enabled, they can help identify unusual movements in volume flow.
OBV near or above the Upper Band
May indicate an unusually strong positive OBV movement relative to its recent average.
OBV near or below the Lower Band
May indicate an unusually strong negative OBV movement.
However, touching or crossing a Bollinger Band does not automatically mean buy or sell.
During strong trends, OBV may remain near one of the bands for extended periods.
11. Suggested Settings
There is no universally optimal configuration. The appropriate settings depend on the asset, timeframe, volatility, and trading strategy.
Short-Term Analysis
A possible starting configuration:
Type: EMA
Length: 9 or 14
This provides a faster response to changes in OBV.
Medium-Term Analysis
A possible starting configuration:
Type: SMA
Length: 20
This provides a balance between responsiveness and smoothing.
Longer-Term Trend Analysis
A possible starting configuration:
Type: SMA
Length: 50
This provides greater smoothing and reduces sensitivity to short-term fluctuations.
Bollinger Band Analysis
A possible starting configuration:
Type: SMA + Bollinger Bands
Length: 20
BB StdDev: 2.0
These settings are reference points for testing and are not investment recommendations.
12. Practical Usage
One possible approach is to use the indicator together with price structure.
Potential Bullish Setup
Look for a combination such as:
Price showing a bullish market structure;
OBV rising;
OBV moving average turning green;
OBV confirming upward price movements;
A breakout or recovery of an important price level.
Potential Bearish Setup
Look for a combination such as:
Price showing a bearish market structure;
OBV falling;
OBV moving average turning red;
OBV confirming downward price movements;
A breakdown or rejection of an important price level.
The indicator is best used as a confirmation tool, rather than as the sole reason to enter a trade.
13. Recommended Starting Configuration
For traders who are new to the indicator, a simple starting configuration is:
Type: SMA
Length: 14
Then compare it with:
Type: EMA
Length: 14
Observe which configuration better represents the behavior of the asset and timeframe being analyzed.
For Bollinger Band analysis:
Type: SMA + Bollinger Bands
Length: 20
BB StdDev: 2.0
14. Important Notes
OBV is a cumulative indicator. Therefore, its absolute values can vary significantly depending on the available historical data and the asset being analyzed.
Signals should be interpreted in the context of:
Market trend;
Price structure;
Support and resistance;
Volume;
Volatility;
Timeframe;
Overall market conditions.
No parameter should be considered universally superior.
It is recommended to test different configurations using historical data, Bar Replay, and paper trading before applying any strategy to live trading.
This indicator is a technical analysis tool and does not constitute financial, investment, or trading advice. Indicator

SDCA System | TR📊 OVERVIEW
The SDCA System | TR is an advanced trading indicator that combines three powerful technical metrics (RSI, ROC, and Sharpe Ratio) into a single weighted score, then applies a Symmetric Dollar-Cost Averaging (SDCA) strategy to manage entries and exits. This system provides both visual signals and automated position management based on extreme market conditions.
🎯 CORE CONCEPT
The indicator normalizes and smooths three independent indicators, combines them with user-defined weights, and generates buy/sell signals when the combined score crosses predefined thresholds. The SDCA logic then executes position adjustments using a percentage-based allocation model.
🔧 KEY COMPONENTS
1. RSI (Relative Strength Index)
Length: Adjustable (default 42)
Normalized and smoothed using a two-stage exponential smoothing process
Clipped to prevent extreme values
Range: -100 to +100
2. ROC (Rate of Change)
Length: Adjustable (default 14)
Normalized and smoothed with the same double-smoothing technique
Clipped to control sensitivity
Range: -100 to +100
3. Sharpe Ratio
Calculates risk-adjusted returns
Lookback period: Adjustable (default 42)
Includes risk-free rate adjustment
Normalized and smoothed similarly to RSI and ROC
Range: -100 to +100
4. Combined Weighted Score
Weighted average of all three indicators
User-adjustable weights (default: RSI 1.0, ROC 1.0, Sharpe 0.5)
Final score range: -100 to +100
5. SDCA Position Management
Buy Signal: Score ≤ Lower Threshold (default: -80)
Sell Signal: Score ≥ Upper Threshold (default: +80)
Percentage-based allocation per signal (default: 10% of capital)
Tracks capital, position size, average price, and total return
📈 HOW IT WORKS
Normalization Process:
Each raw indicator is calculated
Values are clipped to control outliers
First exponential smoothing applied
Normalized to 0-100 range
Second exponential smoothing applied
Final transformation: (smooth2 - 50) × 2 → Range: -100 to +100
Signal Generation:
BUY when: Weighted Score ≤ Lower Threshold AND not in a sell cycle
SELL when: Weighted Score ≥ Upper Threshold AND not in a buy cycle
Cycle states prevent conflicting signals
Position Management:
Each buy signal invests a fixed percentage of remaining capital
Each sell signal liquidates the same percentage of current position
Tracks:
Remaining capital
Position size (shares/units)
Average entry price
Total portfolio value
Total return percentage Indicator

Crypto Correlation Dashboard [StrixEDGE]Overview
A real-time Pearson correlation matrix built for crypto portfolio analysis. Tracks the statistical co-movement between up to 6 assets across selectable timeframes, using log-return correlation — not raw price correlation — to avoid the inflated readings that plague most correlation tools.
Whether you're managing a multi-asset portfolio, hunting pairs trades, or monitoring regime shifts, this dashboard tells you exactly when diversification is real and when it's an illusion.
🔍 What Makes This Different
Most correlation indicators on TradingView calculate Pearson r on raw closing prices. That's a statistical mistake: two assets trending upward will always show near-perfect correlation on price, even if their returns are completely independent. This indicator correlates **logarithmic returns**, which isolates actual co-movement from shared trend bias.
The multi-timeframe engine uses a period-scaling method through `request.security` that preserves mathematical accuracy when projecting higher-timeframe correlations onto lower-timeframe charts — consuming only 6 security calls total, leaving headroom for other indicators on your layout.
⚡ Key Features
6×6 Correlation Matrix
Full heatmap-style matrix covering all 15 unique pair combinations (C(6,2)). Color intensity maps directly to correlation strength: teal for strong positive, red for strong negative, neutral gray for uncorrelated pairs. Diagonal cells are blanked — no wasted space showing you that BTC correlates with BTC.
Multi-Timeframe Support
Select from Chart / 1H / 4H / 1D / 1W directly in settings. The lookback period auto-scales to the target timeframe resolution, so "20 periods on Daily" means 20 trading days regardless of your chart timeframe.
Rolling Correlation Chart
Select any pair (Leg A / Leg B) and track its correlation coefficient over time as a continuous line. Shaded fill between the line and zero gives an instant visual read of direction and magnitude. A dynamic label on the last bar displays the current ρ value.
Aggregate Statistics Bar
Footer row shows AVG / MIN / MAX across all 15 pairs at a glance. When the minimum correlation drops to or below your threshold, a ⚠ BREAKDOWN tag appears.
Three Independent Alert Conditions
- Pair Breakdown — fires when any single pair falls to or below your threshold
- Average Breakdown — fires when the market-wide average correlation collapses
- Rolling Crossunder — fires when your selected pair crosses under the threshold
📐 How to Use
Portfolio Diversification Check
Add your held assets as Symbols 1–6. If the matrix is mostly dark teal (all pairs > 0.7), your portfolio moves as a single block — you're concentrated, not diversified. Look for pairs with low or negative correlation to add genuine hedging value.
Regime Change Detection
Monitor the AVG stat in the footer. A sudden drop in average correlation often precedes volatility expansion, sector rotation, or flight-to-quality moves. The average breakdown alert automates this surveillance.
Pairs Trading
Identify pairs with historically high correlation (> 0.8). When their rolling correlation temporarily collapses, it may signal a mean-reversion opportunity. Use the rolling chart to time entries and the crossunder alert for notifications.
Risk Management
During market stress, correlations tend to spike toward 1.0 across the board ("correlation breakdown to the upside"). When the matrix turns uniformly teal, portfolio risk is higher than position sizing alone suggests.
⚙️ Settings
| Parameter | Default | Description |
|---|---|---|
| Symbols 1–6 | BTC, ETH, SOL, BNB, XRP, ADA | Any tradable asset — crypto, forex, equities, commodities |
| Lookback Period | 20 | Number of target-TF bars for Pearson calculation |
| Timeframe | Chart | Correlation resolution: Chart / 1H / 4H / 1D / 1W |
| Breakdown Alert ≤ | 0.30 | Threshold for all three alert conditions |
| Rolling Pair | 1 × 2 | Which pair (by index) to plot on the rolling chart |
| Matrix Position | Top Right | Table placement on the pane |
| Colors | Brand defaults | Full control over positive, negative, neutral, header, and accent colors |
🧠 Technical Notes
- Log returns `ln(close / close )` are used instead of simple returns for better statistical properties (additivity, normality approximation).
- TF scaling: When the selected timeframe exceeds the chart timeframe, the lookback is multiplied by the bar ratio. Pearson r is invariant under uniform observation duplication, so accuracy is preserved.
- Security calls: 6 total (one per symbol), well within Pine's 40-call limit.
- Symbol parsing: Automatically strips exchange prefixes (Binance, Bybit, Coinbase, OKX, etc.) and quote currencies (USDT, USD, BUSD, USDC) for clean matrix labels.
- Works on any asset class — not limited to crypto despite the default symbols.
⚠️ Limitations
- Selecting a timeframe **lower** than your chart TF (e.g., "1H" on a Daily chart) will not produce hourly-resolution correlation. The multiplier floors at 1 and you get chart-TF correlation. For true 1H correlation, view on a 1H chart.
- Pearson correlation measures **linear** relationships. Non-linear dependencies (tail risk, asymmetric co-movement during crashes) require different tools.
- Past correlation does not guarantee future correlation. Regime shifts can invalidate historical readings without warning — which is exactly why the breakdown alerts exist. Indicator

STP Top 10 Trade Opportunity Scanner / ScreenerSTP Top 10 Trade Opportunity Scanner / Screener
The STP Top 10 Large Move Radar is a multi-symbol market scanner designed to help traders quickly identify stocks showing conditions that may support a larger-than-normal price move.
Instead of reviewing charts individually, the Radar continuously analyzes up to 20 user-selected symbols and ranks the strongest opportunities based on a proprietary scoring system. The highest-ranked symbols are displayed in an easy-to-read Top 10 table.
The system evaluates multiple technical factors, including price trend, EMA alignment, VWAP positioning, RSI, DMI/ADX, buying and selling pressure, Range Oscillator conditions, relative volume, ATR, volatility expansion, squeeze and compression conditions, breakouts and breakdowns, supply and demand proximity, Fair Value Gaps, price movement speed, and overall trend strength.
Radar Table Information
Each ranked symbol includes:
Score: Overall opportunity score from 0–100 based on the combined technical conditions evaluated by the Radar.
Direction: Identifies the current directional bias as BULL, BEAR, or NEUTRAL.
Setup: Identifies conditions such as BREAKOUT, BREAKDOWN, SQZ RELEASE, COMPRESSED, AT S/D, AT FVG, NEAR BREAK, or BUILDING.
RVOL: Measures current volume relative to average volume to identify unusually active symbols.
ATR: Displays the previous completed daily 10-period ATR in dollars to provide context for the symbol's typical daily movement.
ATR Used: During regular market hours, estimates how much of the symbol's daily ATR has been used so far. Before and after the regular session, the Radar identifies the applicable market session instead.
Speed: Measures the magnitude of short-term EMA movement relative to ATR.
T-Strength: Classifies directional trend conditions as Strong, Moderate, Weak, or None.
Evidence: Highlights supporting technical conditions including squeeze activity, breakouts, supply/demand proximity, and Fair Value Gaps.
How Traders Can Use the Radar:
The Radar is designed primarily as an opportunity-discovery tool. A high ranking does not automatically represent a trade entry. Instead, traders can use the Top 10 list to identify which symbols deserve further chart analysis.
For example, a high-scoring bullish symbol showing elevated relative volume, a breakout or squeeze release, increasing speed, and strong trend conditions may warrant closer review for a potential bullish setup. The opposite conditions may identify potential bearish opportunities.
The Radar can be used alongside the STP Elite Prediction System or a trader's existing technical analysis process to confirm chart structure, support and resistance, risk, entry timing, and trade direction before entering a position.
Customizable Symbol List:
Users can configure up to 20 symbols, allowing the Radar to monitor a personal watchlist of stocks, ETFs, or other supported TradingView symbols. The scan timeframe is also configurable, with the default set to 5 minutes.
Dynamic Alerts:
The Radar includes a dynamic alert system for the highest-ranked opportunity. Users can set a minimum score threshold and optionally receive alerts when the leading symbol changes, its direction changes, or it crosses the configured threshold. Alerts include the symbol, direction, opportunity score, relative volume, ATR Used status, and scan timeframe.
Important:
The STP Top 10 Large Move Radar is intended to identify and rank developing technical conditions. Rankings and scores can change as new market data becomes available. A high score does not guarantee a large move and should not be considered a standalone buy or sell signal.
This indicator is intended for educational and informational purposes only and does not constitute financial advice. Indicator

Equal Highs & Lows [ITA]🟠 OVERVIEW
Equal Highs & Lows marks the places where liquidity pools build, and then
tracks what happens to them.
When two swing highs form at almost the same price, the stops of everyone who
sold that level sit just above it. The same is true in reverse below two equal
lows. Those clusters are what price often reaches for before it turns, and they
are visible on the chart long before anything happens to them.
Most tools that find these draw the two swings and stop there. This one keeps
the level alive until price actually takes it, then marks it as swept rather
than deleting it, so you can look back and see whether a symbol respects its
pools at all before you trade one.
🟠 CONCEPTS
* Equal Highs (EQH) - Two swing highs within a set tolerance of each other.
Stop orders rest above them.
* Equal Lows (EQL) - Two swing lows within tolerance. Stops rest below.
* Liquidity Pool - The cluster of resting orders those stops form. It is a
reason for price to travel somewhere, not a reason for it to reverse there.
* Sweep - Price trading through the level and taking the orders. What happens
immediately after the sweep is the part that matters.
🟠 FEATURES
🔹 Equality tolerance is set as a percentage of price rather than in points, so
the same setting behaves consistently on a five dollar stock and a seven hundred
dollar index
🔹 The level is drawn at the higher of the two equal highs, and the lower of the
two equal lows, because that is where the stops actually sit. Averaging the two
puts the line underneath the liquidity it is meant to mark
🔹 Levels extend forward on every bar until they are taken, so an untouched pool
stays visible for as long as it survives
🔹 Swept pools are greyed out and labelled instead of being removed, which
leaves a record of how the symbol has treated its pools historically
🔹 A cap on active pools, so old levels retire instead of filling the chart
🔹 Separate alerts for equal highs taken and equal lows taken
🟠 HOW TO USE
Start with the tolerance. It is the setting that decides everything else. On a
daily chart 0.1 to 0.3 percent is usually right. Intraday, drop it to 0.05 to
0.15. If you are seeing almost no pools, raise it. If everything is a pool,
lower it.
Read an unswept level as a destination, not a wall. Liquidity sitting above the
current price is a reason to expect price to reach up there at some point. It is
not a reason to short it.
The information is in what follows the sweep. Price taking equal highs and then
continuing up means the pool was simply passed through. Price taking them and
immediately failing back below is the sequence that traders are usually looking
for, and the sweep alert is there so you do not have to watch for it.
Swing Lookback controls how significant a swing has to be before it counts.
Raise it for fewer and more meaningful pools.
🟠 CONCLUSION
Equal highs and lows are easy to see once someone points at them and easy to
miss while a chart is moving. This marks them as they form, keeps them until
they are taken, and leaves the record behind. Indicator

Precision PushBack [MohaveTrader]WHAT PUSHBACK IS
PushBack is a support-and-resistance overlay whose levels are built from a dual Williams %R engine, paired with a rail-based trend layer that runs on its own detection. Where the source oscillator treats a %R extreme as exhaustion — a spent move likely to reverse — PushBack reads that same condition as sustained directional pressure: the side in control pushing price to an extreme.
Two terms carry the whole design. Every completed pressure run is an EVENT. An event that clears qualification earns a LEVEL. Events that do not qualify are marked, but no level is built. When an event does qualify, PushBack takes the price extreme reached by that push and stamps it as a structural zone, then carries that zone through its own lifecycle of resistance, support, reclaim and testing. The panel counts both, so how selective the current settings are running on this instrument is readable at a glance.
It is intended for traders who want structure that emerges from qualifying pressure events rather than levels drawn on a fixed schedule, with a separate trend read layered on the same chart.
WHAT'S ORIGINAL
PushBack retains the dual fast and slow %R detection from upslidedown's open-source "%R Trend Exhaustion" (credited below and in the source code) and uses it only as the raw event source. Everything built on top is original: the reinterpretation of the extreme as directional pressure; event qualification by price range and, when enabled, sustained duration; the Event Mode presets that set how selective that qualification is; event-derived zone geometry, where a zone's depth is taken from the run's own candles; the support and resistance lifecycle with reclaim and testing states; role-flip management and retirement; ATR relevance hiding; optional same-state merging; the live run ribbon; the candle coloring modes; the trend layer with its fast and structure rails, defended-level state machine and rail-assisted transitions; and the information panel. The following image illustrates upslidedown's "%R Trend Exhaustion," the open-source indicator PushBack's detection comes from. Each filled box is one %R run — red where both fast and slow %R are overbought, blue where both are oversold — with a triangle where the run ended. PushBack reads these same runs as pressure rather than exhaustion, and keeps the price extreme each one reached as a structural level. For comparison the second image renders PushBack and %R Trend Exhaustion on the same chart.
WHAT MAKES IT DIFFERENT
The structure is emergent, not scheduled. No structural zone is created without a completed qualifying pressure run, so the absence of nearby zones is itself information rather than a missing calculation.
Structure and events are kept separate. The zones are the structural layer and carry the role-based color set. The pressure marks and run ribbon are a distinct event layer in a single neutral color, held off the price and clear of the zones, so a mark is never mistaken for a directional signal.
The run ribbon reads live. It sketches in real time across the pressure run and settles into the completion triangle, so a developing run is visible on price as it happens rather than only after it ends.
The trend line is the rail, not a separate object. The plotted line is the fast adaptive rail itself rather than an average derived from it, so the drawn line and the value the engine reads are the same series and cannot disagree.
%R PRESSURE
Pressure is read from a dual fast and slow Williams %R with independent smoothing. Both periods and the threshold are fixed internally at settled values rather than exposed as inputs. A shared threshold defines the overbought condition (bullish pressure) and the oversold condition (bearish pressure), and a run is the span in which that condition holds. The single event PushBack acts on is the run's completion — the bar the condition is lost.
Not every run qualifies. A completed run must clear a size test — its price range as a multiple of ATR — and, when duration filtering is on, a duration test as well: it must have persisted for the required number of bars. Both conditions must be met, and a larger or faster move does not waive the duration requirement. An Event Mode control — Responsive, Balanced, Strict, or Manual — sets how demanding that qualification is; in Manual, the Advanced values are read instead and the duration test can be turned off to gate on range alone. The duration test is not scaled by timeframe.
ZONES
When a qualifying run completes, its price extreme seeds a zone: a bullish pressure run's high becomes resistance, a bearish pressure run's low becomes support — the rail where the push stalled. Zone depth is set at birth from the run's own candles: the mean or the median of the run's bar ranges, median by default so a single outlier bar does not distort the level. Neither method applies a multiplier, so depth comes from the same bars that produced the level and there is no width setting to tune. Depth is frozen at birth. An optional merge step, off by default, can consolidate same-state zones that overlap or fall within a configurable price gap; with it off, distinct qualified levels stay separate.
A level holds until price closes through it. A close through flips it to a reclaim, which can firm back into support or resistance as price tests and holds. Red is resistance, green is support, cyan is reclaim, yellow is testing. A level keeps flipping between roles until it reaches its Max Role Flips limit — three by default — after which it is retired rather than reclaimed again; fresh pressure re-seeds it if it matters again.
Zones persist as structural objects and can change role as price interacts with them. A zone originally created as support or resistance may later become reclaim, enter testing, and resolve back into support or resistance. Its displayed color and label represent its current state, not necessarily the state in which it originated.
Previously established zones can remain stored after the pressure event that created them has passed. A zone outside the configured ATR relevance distance is hidden rather than deleted and can reappear when price returns. Because a zone can persist through multiple state changes, a currently visible zone may have originated much earlier, in a different role, and its original completion mark may no longer be visible on the chart. A fresh reclaim is held visible for a short grace period regardless of distance. A per-side cap limits the number of native support and resistance zones retained; reclaim zones are exempt from that cap.
PRESSURE MARKS AND RUN RIBBON
A triangle marks where each run completed — a down triangle where a bullish run ended, an up triangle where a bearish run ended. The run ribbon traces the run into that completion, one bar short of the triangle. Both use a single neutral color and float off the price in ATR-scaled offset space, so side is read from triangle direction and ribbon position rather than color. They show the duration and completion of a pressure run and are not buy or sell signals. By default every completed run is marked with a triangle. A qualified event also carries a ribbon into its triangle and seeds a zone; a filtered turn — one that did not clear qualification — is marked identically but with no ribbon and no zone, so the triangle shows that an event occurred while the ribbon and zone show whether it earned a level. Show All Event Marks turns the filtered triangles on or off.
TREND LAYER
A second engine runs alongside the zones, with its own dual %R detection independent of the one above. Its pressure runs do not create zones; they set rails. A completed bullish run leaves a lower rail at its low, a completed bearish run leaves an upper rail at its high, and one of those rails is held as the defended level that owns the current trend state. A close beyond the defended level flips the campaign, but only when an opposing rail exists and price has cleared it; otherwise the campaign continues.
Two adaptive followers of the body-weighted midpoint support that state machine. The fast rail shortens its own averaging length as a bar's body sits further from it, so a displaced bar moves it most of the way in one bar. The structure rail uses the same formula with a longer base and sits inside a hysteresis channel scaled to a long-period ATR, so its direction holds through ordinary pullbacks and only turns when price crosses the far edge of that channel.
Between them these supply two transitions the defended level alone cannot make. Once a bullish event has set a campaign ceiling, a failure of the fast rail can end the campaign early at that ceiling. In the other direction, both rails turning up together can start a bullish campaign with no completed %R event at all. These rail-assisted transitions print a diamond alongside the flip triangle so they are distinguishable from a defended-level flip. A campaign entered by the rails alone carries no defended level and exits late by construction.
The plotted trend line is the fast rail, drawn in the campaign color rather than the rail's own direction, so the line's shape comes from the follower and its color from the campaign. An optional two-tier fill runs from price to the fast rail and from the fast rail out to the structure rail, each tier colored by its own source, so a disagreement between the two renders as a two-tone band. Optional sequence marks compare each completed rail event's extreme to the previous event on the same side and print HH, LH, HL or LL; these are instrumentation only and drive nothing.
CANDLE COLORS
Candles can optionally be recolored, in one of two modes.
Pressure mode carries the bar's own direction as hue and whether a %R pressure run is active as brightness, so a bearish bar inside a buying-pressure run stays a bright bearish candle and a developing push is visible on the candles themselves.
Wave mode drops bar direction and paints the campaign instead, reusing the trend line's own two colors so the candles and the line always agree. Three independent sources are then readable at once on the same bars: campaign state sets the candle's hue, an active %R pressure run sets its brightness, and the inner fill follows the fast rail's own direction. Because the fill is the only one of the three tied to the fast rail, a pullback inside a campaign renders as candle color standing against fill color, while an actual campaign flip changes the candles themselves. That is the distinction Wave exists to make. Wave draws nothing before the first campaign is established, since no trend state exists yet to color.
Both modes dim between pressure runs and brighten during them. This uses plotcandle, so native candles should be hidden in chart settings to avoid overlap. Turned off, it draws nothing and leaves the native candles untouched.
INFO PANEL
An optional corner panel reports three rows. RSI is colored relative to the current campaign rather than against fixed bands, since RSI ranges differently in an advance than in a decline; the color meaning is constant — one color when buyers hold RSI control, another when sellers do, and a neutral shade in between — while the bands themselves shift with the campaign. EVENTS counts every completed pressure run for the session. LEVELS counts how many of those earned structure, with the percentage being that earned share. That percentage largely reflects how demanding the current Event Mode is rather than a property of the instrument, so it reads as feedback on whether the mode suits what is being traded: a very low share suggests qualification is tighter than the instrument supports, and a very high one suggests it is filtering little. The panel frame carries the RSI color so the state reads from across the screen. The session count can include extended hours or regular hours only.
ALERTS
Two alert conditions are provided, one for a qualified bullish pressure event and one for a qualified bearish pressure event. Alerts fire only when a completed run clears PushBack's active qualification requirements and earns structure; filtered event marks do not alert. The trend layer does not carry its own alerts.
HOW TO READ IT
Read the zones as structure and the marks as events: every triangle is an event, and only the ones carrying a ribbon and a zone earned a level. PushBack keeps four things distinct: the pressure event is where a zone came from; price interaction is what has since happened to it; the current color and label are what the level means now; and ATR relevance decides whether it is shown at all. A currently visible zone may have originated much earlier, in a different role, than the state now displayed. Treat a blank area as the absence of currently relevant qualifying pressure structure, not a missing calculation. Use the live ribbon to watch a qualifying run develop. The completion triangle identifies where a pressure run ended; when that completion also qualifies, its ribbon remains, a structural zone is established, and the corresponding alert can fire.
The two layers are independent and can disagree. The zones and the trend campaign are computed from separate detections and neither gates the other, so a level forming against the prevailing campaign is a normal reading rather than a conflict to resolve.
LIMITATIONS
A zone is not created until its run completes, so the level is confirmed after the move that produced it, not during. The %R condition can persist for a long time in a strong trend, so a run's duration is not itself a timing signal. PushBack is most expressive on instruments that produce qualifying pressure events and is quiet on orderly price.
The trend layer's rail events carry no qualification of their own, so a very short pressure run can set a rail. Because two of its transitions are driven by the rails rather than by a completed event, the campaign can change direction with no %R event involved, and a campaign entered that way holds no defended level. Zone role changes are driven by subsequent price interaction, so a zone's displayed state reflects the bar being evaluated and changes as price develops. On very low-priced instruments a run whose bar ranges are near the minimum tick can produce a zone thin enough to render as a line rather than a band.
PushBack does not predict future prices, does not manage risk, and does not guarantee any outcome.
ATTRIBUTION AND LICENSE
PushBack's dual-period Williams %R detection is derived from the open-source "%R Trend Exhaustion" indicator by upslidedown, who is credited here and in the source code. That indicator reads the %R extreme as exhaustion; PushBack uses the same detection only as a raw event source and reinterprets the extreme as sustained directional pressure. The pressure-event qualification, the persistent zone construction and event-derived geometry, the support and resistance interpretation, the reclaim and testing lifecycle, flip management and retirement, relevance behavior, merging, the run ribbon, the candle coloring modes, the trend layer and its rails and transitions, and the price-overlay presentation are original to PushBack. PushBack is published open-source under the Mozilla Public License 2.0.
DISCLAIMER
PushBack's zones, marks and trend state are analytical structures derived from the rules described above, not recommendations to buy or sell any instrument. You remain solely responsible for every trading decision. Indicator

The Magnet ModelThe Magnet Model — Opening Range Volume Profile
The Magnet Model ORVP is designed to turn the opening auction into a simple, repeatable map of where volume established value and where those levels may continue to matter throughout the trading session. It will automatically map the key volume-based levels established during New York opening range.
Instead of manually drawing a Fixed Range Volume Profile each morning, the indicator automatically builds the opening profile and identifies the Point of Control (POC), Value Area High (VAH), and Value Area Low (VAL). Once the opening range is complete, these levels extend to the right, allowing traders to monitor how price interacts with them throughout the session.
Key Features
Automatic 9:30–9:46 AM New York Opening Range Volume Profile
Automatically calculates VAH, POC, and VAL
70% Value Area by default
VAH, POC, and VAL automatically extend to the right
Shaded Value Area between VAH and VAL for quick visual reference
Current ORVP is highlighted pink
Previous ORVP zones can use different colors to distinguish sessions
Adjustable number of historical ORVPs displayed
Clean date labels such as 8/31 ORVP
Adjustable profile rows and profile width
Customizable colors, line widths, and line styles
Optional Overlap Detection Deletion to automatically remove older ORVP zones that overlap the newest value area
Designed to maintain a clean chart while preserving important historical opening-range levels
How It Can Be Used
The ORVP provides a structured framework for evaluating the market after the opening range has formed.
VAH, VAL, and POC can serve as important areas to monitor for:
Acceptance and rejection
Support and resistance
Breakouts and failed breakouts
Retests
Potential price magnets
Continuation or reversal opportunities
Historical ORVP levels can also remain on the chart, allowing traders to identify when price returns to areas of value established during previous sessions.
Best Used With Confluence
While The Magnet Model ORVP is powerful on its own, it can become even more effective when combined with other high-quality market references and confirmation tools.
Consider looking for confluence with VWAP, Simple Moving Averages (SMAs), Initial Balance (IB), key session levels, and order flow.
Some of the strongest areas of interest can develop when multiple independent levels or signals align with an ORVP VAH, VAL, or POC, providing additional context for potential support, resistance, acceptance, rejection, and directional movement.
The goal is not to trade an ORVP level blindly, but to use it as part of a broader framework of confluence.
Overlap Detection
When Overlap Detection Deletion is enabled, the indicator compares each newly completed value area with older ORVP zones.
If an older VAH-to-VAL value area overlaps the newest value area, the older profile is automatically removed.
This optional feature helps reduce chart clutter and keeps the focus on distinct opening-range value areas.
Default Configuration
Opening Range: 9:30–9:46 AM New York
Value Area: 70%
Profile Rows: 100
VAH / VAL / POC: Black, 2-width lines
Current Value Area: Pink, 20% opacity
Historical Value Areas: Differentiated by color
Send me a message with any questions or requests.
For educational and informational purposes only. This indicator does not provide financial advice or guarantee future market behavior. Indicator

Altcoin Strength Ranker - BTC DominanceALTCOIN STRENGTH RANKER - BTC DOMINANCE
This indicator ranks a list of cryptocurrencies by how strongly each one is moving
relative to Bitcoin, and uses BTC.D (Bitcoin Dominance) as a regime filter to indicate when that
ranking is actually worth acting on.
Instead of checking one chart at a time, it reads up to 18 symbols (divided into groups) in a single pass and presents them as a sorted table: strongest against Bitcoin at the top, weakest
at the bottom.
HOW IT WORKS
1) Normalized momentum
For every coin, the script takes the logarithmic return over N bars and divides it by the standard deviation of one-bar log returns over the same window, scaled by the square root of N.
In plain words: rather than asking "how much did it move?", it asks "how big was the move compared with this coin's own everyday noise?" The result is a t-statistic — a number expressing the move in units of typical volatility. Around +2 means an unusually strong advance; around -2 is the mirror image; near 0 means the move is indistinguishable from ordinary fluctuation.
The point of normalizing is comparability. A raw 15% weekly move means something very different for a large cap than for a low-liquidity newcomer. After normalization, every coin sits on the same scale and the ranking is meaningful.
2) Two readings per coin
z/BTC — momentum of the synthetic ratio ALT/BTC, built as ALTUSDT / BTCUSDT. This is relative strength: the coin measured against Bitcoin. Building it as a spread means the indicator works for any coin that has a USDT pair, even when no direct BTC pair is listed on the exchange.
z/USD — momentum of the coin against the quote currency (USDT by default). This is absolute direction: whether the coin is going up or down in dollar terms.
The distinction matters because the two frequently disagree, and the disagreement is the interesting part. A coin can be rising in dollars while still losing ground to Bitcoin — capital is flowing in, but less than it is flowing into BTC.
3) Composite score
score = w × (z/BTC) + (1 − w) × (z/USD)
The weight w (0.6 by default) sets how much the ranking cares about beating Bitcoin versus simply going up. Set w = 1 for pure relative strength; set w = 0 to rank by absolute momentum alone.
4) Dominance regime filter
The same normalization is applied to BTC.D and shown as the histogram in the lower
panel, with the background shaded accordingly:
- z_D above the threshold: dominance is rising, capital is rotating toward Bitcoin, altcoins tend to underperform.
- z_D below the negative threshold: dominance is falling, altcoins tend to outperform.
- In between: neutral, no directional signal is issued.
This is what keeps the ranking from being read out of context. The same table means something different depending on where the whole market's capital is heading.
READING THE COLORS
In the dominance plot, teal means Bitcoin is gaining ground on the rest of the market, red means it is losing ground:
- Dominance rising -> teal histogram bar, teal background -> capital concentrating
in Bitcoin -> Bitcoin strong, altcoins weak.
- Dominance falling -> red histogram bar, red background -> capital dispersing into
the rest of the market -> Bitcoin weak, altcoins strong.
The table uses the opposite convention, because it describes altcoins rather than Bitcoin: a negative z-score is red, a positive one is teal, and the score column runs on a gradient between them.
One qualification is important here. Dominance is a ratio, not a price. Rising dominance tells you Bitcoin is outperforming the market — it does not tell you Bitcoin is going up in dollar terms, and the two frequently part ways. In a market-wide sell-off, altcoins normally fall harder than Bitcoin, so dominance rises while Bitcoin itself declines. The reverse also happens: in the later stage of an advance, capital rotates outward and dominance falls while Bitcoin keeps making new highs. So read the panel as a statement about relative flow between Bitcoin and the rest of the market, and pair it with the Bitcoin chart itself before drawing any conclusion about direction.
READING THE TABLE
Coin — the ticker, without the quote currency
z/BTC — normalized momentum of the ALT/BTC ratio (relative strength)
z/USD — normalized momentum against the quote currency (absolute direction)
RSI/B — RSI (Relative Strength Index, a 0–100 oscillator measuring a series against its own recent history) computed on the ALT/BTC ratio
RSI/U — RSI computed on the coin against the quote currency
Score — the composite above, colored on a gradient from weak to strong
Signal — see below
The top line reports the group being evaluated, the current dominance regime, and
the value of z_D.
THE SIGNAL COLUMN
No signal: either the regime is neutral or z/BTC has not cleared the significance threshold.
▼ or ▲ direction consistent with the regime, and relative strength beyond the
threshold. ▼ = weak against Bitcoin during rising dominance; ▲ = strong against
Bitcoin during falling dominance.
★ divergence between the two readings: the coin is still moving up in dollar
terms while losing ground against Bitcoin (or the reverse). This is the
configuration where relative-strength setups typically live, because the crowd
watching the dollar chart sees strength while the capital flow says otherwise.
★★ the same divergence, plus timing from the RSI of the ratio: above 55 on the
weak side, below 45 on the strong side — meaning the ratio is stretched in the
direction that is about to be given up.
An alert fires on bar close listing every coin currently showing ★ or ★★.
SETTINGS
Analysis timeframe — leave empty to follow the chart, or fix it (e.g. 1D) to keep one reading regardless of the chart you are on
Momentum length — lookback window for the normalized momentum
RSI length — lookback for both RSI columns
Exchange / Quote — how symbols are assembled (BINANCE + USDT by default)
Display — strongest, weakest, or both lists
Top N per list — how many rows per list
Weight w — relative strength versus absolute direction in the score
Significance |z| — how large z/BTC must be before a signal is issued
BTC.D momentum — lookback for the dominance regime
Regime |z_D| — how decisive dominance must be before the regime is called
Groups 1–4 — four editable comma-separated symbol lists (large caps, mid caps and DeFi, memes and new listings, plus a free slot)
⚠️ NOTES AND LIMITATIONS
- The table is drawn on the last bar only; it is a live cross-section, not a
historical record.
- Symbols that do not resolve on the chosen exchange are silently skipped, which is
why a group may show fewer rows than it lists.
- The ranking is relative and descriptive, not a forecast. In a broad market decline
the "strongest" coin can still be falling — it is simply falling less.
- The dominance regime is a context filter, not an entry trigger. Position sizing,
invalidation levels and exits are outside the scope of this tool.
For research and educational purposes. Nothing here is financial advice. Indicator

Unicode Heatmap CandlesUnicode Heatmap Candles
■Overview: Analytical Paradigm & Value Proposition
This indicator introduces a fundamentally new approach to micro-structural market analysis within TradingView. Transcending the visual limitations of standard OHLC (Open, High, Low, Close) candles, it leverages Pine Script v6's dynamic array processing to completely reconstruct price bars into high-resolution liquidity heatmaps. Engineered specifically for active traders and quantitative analysts, it visualizes the true order flow and volume concentrations (Point of Control) hidden beneath superficial price action in real-time.
1. Concept & Analytical Edge
Standard candlestick charts display static geometrical shapes, which inherit a critical flaw: they completely obscure internal transaction dynamics. A long wick or a large body tells you where the price moved, but not where the actual capital was deployed. In institutional quantitative analysis, a candlestick is not a solid bar, but a vertical aggregation of micro-transactions.
By utilizing Unicode block characters with sub-tick precision, this indicator maps the exact distribution of executed lower-timeframe (LTF) volume across price tiers within each individual candle—without relying on external footprint tables. It separates "empty price movements" from "solid liquidity zones.
2. Core Mechanics & Mathematical Logic
A. Dynamic Volatility Slicing (ATR Adaptive)
To maintain consistent visual resolution across varying market conditions (from low-volatility Asian sessions to high-impact news events), the price tier step is dynamically derived from the Average True Range (ATR).
Calculate dynamic price step based on 14-period ATR
float current_atr = global_atr
if na(current_atr) or current_atr == 0
current_atr := close * 0.005
int active_ticks = math.max(1, math.round((current_atr / 30) / syminfo.mintick))
float step = syminfo.mintick * active_ticks
int total_r = math.ceil((bar_h - bar_l) / step) + 1
Why this calculation? Fixing the tier size by a static tick value causes resolution breakdown during volatility spikes. By dividing the 14-period ATR by 30 and rounding to the nearest minimum tick, this mathematical normalization guarantees that each candle is systematically divided into approximately 20 to 30 micro-tiers, outputting a consistent heatmap resolution regardless of the timeframe or asset class.
B. Geometry Detection: Real Body vs. Wick
The script evaluates the exact numerical center of each vertical price tier to identify whether it structurally belongs to the candle body or the wick, rendering distinct Unicode glyphs to preserve the traditional candlestick silhouette.
Determine Body vs Wick geometry
float top_p = price_p + (step / 2)
float bot_p = price_p - (step / 2)
bool is_body = (top_p > body_bot) and (bot_p < body_top)
string current_char = is_body ? body_char : wick_char
Candle Body: Stacks wide block glyphs (███) to represent the high-density range between Open and Close.
Candle Wick: Stacks slender vertical glyphs (┃) to trace extreme price rejections up to the High/Low limits.
3. Scope of Capability & Technical Boundaries
To maintain institutional-grade transparency, the operational boundaries and strict design choices of this tool are detailed below. This is a specialized hyper-local lens, not a historical charting tool.
Intra-Candle Heatmap : Maps LTF volume directly inside the candle shape.
Real-Time POC Tracking : Visualizes highest volume nodes via color saturation.
Multi-Asset Support : Works flawlessly across Equities, Crypto, Forex, and Futures.
Full Historical Backtesting : Restricted by the Pine Script 500-label buffer limit.
High-ATR Max Display : Optimized strictly for real-time, active execution setups.
System Constraint & Design Architecture: Pine Script v6 enforces a hard maximum of 500 label objects (max_labels_count=500). Because each high-resolution candle consumes 20 to 40 individual labels to render the micro-tiers, the simultaneous display limit is mathematically capped around the most recent 5 to 8 bars in high-ATR environments. Older bars are systematically garbage-collected. This is an intentional architectural choice: 100% of the maximum allowed computing and drawing resources are allocated to maximizing the resolution of the current market structure.
Important Note on Higher Timeframes (Daily/Weekly/Monthly): TradingView Data Limits
You may notice that when applied to high timeframes like the Monthly chart, older candles render as gray (Zero Volume). This is not a bug. TradingView imposes a strict limit of 100,000 historical bars for lower-timeframe (request.security_lower_tf) data requests. If your LTF is set to 1-minute, 100,000 bars cover only about 70 days. Therefore, older macro candles cannot retrieve micro-volume data.
Remember: This indicator is a "Microscope" built for active intraday/swing execution. It is fundamentally designed for micro-structure analysis, not macro-historical profiling.
Anti-Crash Fail-Safe (For Non-Premium Users)
TradingView strictly limits access to seconds-based timeframes (e.g., 1S, 15S) to Premium plan subscribers. To prevent runtime crashes for Essential/Plus users, this script features a built-in safety toggle: "Premium Plan (Allow Seconds TF)".
If this box is unchecked (default), any attempt to input a seconds-based LTF will be automatically intercepted and safely downgraded to a 1-minute (1m) resolution, ensuring uninterrupted operation for all user tiers.
4. How to Use
Add the indicator to your chart.
Open Chart Settings (Gear Icon) -> Symbol -> Uncheck Body, Wick, and Borders (hide standard candles).
Observe the internal liquidity distribution:
Red / Orange Nodes: Point of Control (POC) and high-liquidity concentration zones.
Blue / Muted Nodes: Low volume nodes (slippage zones, price vacuums, or liquidity voids).
Disclaimer
This script and its description are published solely for the purpose of learning, researching, and providing technical analysis methodologies. The developer assumes no responsibility for any direct, indirect, incidental, or consequential losses or damages (including trading losses or loss of profits) arising from the use of this tool. Trading in financial markets involves substantial risk. Please conduct thorough verification and implement appropriate risk management at your own risk before using this in a live trading environment. Indicator

Volatility Regime Engine [TRADION]Volatility Regime Engine is a multi-layer market regime analysis framework designed to identify changes in volatility structure, expansion/compression cycles, directional pressure, and continuation quality.
Rather than treating volatility as a single measurement, the engine evaluates multiple dimensions of market behavior to determine whether price is transitioning into compression, expansion, continuation, exhaustion, or a potentially unstable regime.
The objective is not simply to detect high or low volatility, but to identify how volatility is evolving, whether directional participation supports the move, and whether the current regime has sufficient quality to persist.
CORE ARCHITECTURE
The engine combines several analytical components into a unified regime model:
Volatility Regime
Evaluates the current volatility environment and classifies market conditions according to contraction and expansion behavior.
Fast & Confirmed Scores
Two-stage scoring separates early regime detection from confirmed conditions.
The Fast Score reacts more quickly to developing volatility changes, while the Confirmed Score provides a more stable assessment of established conditions.
This architecture is designed to balance responsiveness with confirmation.
ATR Regime
Measures volatility behavior relative to the instrument's recent range structure, helping distinguish subdued conditions from elevated or extreme volatility environments.
Bandwidth Analysis
Tracks contraction and expansion in the underlying price distribution to identify volatility compression and developing expansion phases.
Relative Volume (RVOL)
Provides participation context by comparing current activity with its historical baseline.
Directional & Setup Bias
Evaluates whether the developing volatility structure favors bullish or bearish conditions.
Bull and Bear Setup Scores quantify the relative strength of each side, while Dominance summarizes the resulting directional imbalance.
Cycle Engine
The Cycle Bias and Cycle State components classify the current phase of the volatility cycle.
Possible conditions include developing ignition, expansion, continuation and exhaustion phases.
This allows the indicator to distinguish between a market that is merely volatile and one that may be entering a structured directional expansion.
Ignition Detection
Ignition logic searches for early evidence that volatility is beginning to transition from a dormant or compressed state into directional expansion.
Bull Ignition and Bear Ignition events are designed as regime-transition signals, not standalone trade entries.
Release Quality
When volatility begins to release, the engine evaluates the quality of that transition.
Release Quality, Quality Grade and Follow Through help determine whether an expansion is developing sufficient structural confirmation or losing momentum.
Macro Continuation
Continuation logic reduces repetitive signaling once a directional regime has already been established.
This allows the engine to distinguish between:
initial ignition,
confirmed release,
established continuation,
and potential exhaustion.
Higher-Timeframe Context
Higher-timeframe regime information is incorporated into the scoring architecture to determine whether the active regime is supported or opposed by broader volatility conditions.
The HTF Quality Modifier adjusts regime quality according to this alignment.
False Expansion Risk
Not every volatility expansion develops into a sustainable move.
The False Expansion Risk model evaluates contextual conditions that may indicate a weak or unstable expansion and classifies the risk accordingly.
This component is intended to provide an additional layer of caution when volatility increases without sufficient structural support.
VISUAL ENGINE
The lower oscillator provides a compact visualization of regime behavior.
Histogram structure represents changes in volatility state and regime intensity, while the accompanying momentum structure helps visualize directional pressure and developing transitions.
Background regime zones provide additional context for compression, expansion and directional phases.
Event markers highlight significant transitions such as:
BULL IGNITION
Potential bullish volatility ignition.
BEAR IGNITION
Potential bearish volatility ignition.
BULL RELEASE
Bullish expansion gaining confirmation.
BEAR RELEASE
Bearish expansion gaining confirmation.
EXHAUST
Potential exhaustion of an extended volatility phase.
Continuation states are intentionally filtered to reduce unnecessary signal repetition.
DASHBOARD
The integrated dashboard provides a real-time summary of the engine, including:
Regime
Fast Score
Confirmed Score
ATR Regime
Bandwidth State
RVOL
Direction
Setup Bias
Bull / Bear Setup
Dominance
Breakout Memory
Cycle Bias
Cycle State
Ignition Score
Macro Continuation
Release Quality
Quality Grade
Follow Through
HTF Regime
HTF Quality Modifier
Risk Adjustment
False Expansion Risk
Active Event
The dashboard is designed to provide a compact overview of the current volatility environment without requiring interpretation of every individual component.
HOW TO USE
Volatility Regime Engine is designed primarily as a market-context and regime-analysis tool.
It can be used to:
identify volatility compression before potential expansion,
detect early bullish or bearish ignition,
evaluate the quality of developing volatility releases,
distinguish expansion from established continuation,
identify potential exhaustion conditions,
compare directional setup strength,
evaluate higher-timeframe regime alignment,
and assess the risk of unstable or false expansion.
The indicator should not be interpreted as a mechanical buy/sell system. Signals represent changes in volatility structure and should be evaluated together with price action, market structure, trend context, support/resistance and appropriate risk management.
NON-REPAINTING DESIGN
The engine is designed around confirmed-bar calculations for signal generation. Historical signals are not intentionally repositioned after confirmation.
Higher-timeframe information is handled with confirmation-oriented logic to minimize look-ahead bias.
IMPORTANT
Volatility expansion does not necessarily imply bullish price movement. Expansion can occur in either direction.
The primary purpose of the engine is to determine when the volatility environment is changing, which side currently has structural dominance, and whether that transition has sufficient quality to develop into continuation.
Volatility Regime Engine is intended for technical analysis, research and educational purposes only. It does not constitute financial or investment advice. Indicator

Premium + Discount Ranges (M1D)Premium + Discount Ranges
Measures the range you are trading inside, the way it is read by eye from the newest swing point on a chosen timeframe across to the swing of the opposite kind, split into premium and discount either side of an equilibrium. Three ranges can run at once, each on its own timeframe, so an execution range can be read inside the higher one that frames it.
Two ways to bound a range
Period takes the timeframe's own high and low so far: one month is one range, it starts empty at the open and is gone at the rollover. It answers where price sits in the month.
Swing takes the newest confirmed swing high across to the newest swing low on that same timeframe, which owes nothing to the calendar and can run across many periods. It answers which structural range price is inside right now.
Each range picks its own mode, and the chart says which: "1M High" is this month's high, "1M Swing High" is the monthly swing high.
What counts as a swing
A swing is a level price actually turned at, not merely a high that sits above its neighbours while price kept running the same way. The candle has to hold the extreme against a chosen number of candles either side of it, and by default it also has to mark the change of direction — a swing high on the turn from an up candle to a down one, a swing low on the turn from down to up. That second condition can be switched off to accept any candle holding the extreme, regardless of what it turned into.
Every swing is read from candles already closed on its own timeframe, one bar clear of the newest bar, so nothing on a forming higher-timeframe candle can confirm or unconfirm it.
The raided edge
A confirmed swing is the last level price turned at, which is not always the edge of the range being traded right now — the moment a boundary is taken, the real range is already wider than the swings describe. Each boundary is carried out to the extreme price has actually reached since its swing confirmed, and draws dotted while it is out there: a level price has not yet turned at is a raid in progress, not structure. It settles back to solid the moment a new swing confirms behind it. This can be switched off to pin both boundaries to confirmed swings only, with price free to trade outside the range.
Direction and shading
The range is read from whichever swing formed most recently. A new swing low means price has already turned up away from it, so the leg is bullish and discount is the side being worked from; a new swing high reads the other way. The first range is shaded premium and discount by default; the shading can optionally lean toward the side being worked from, fading the other side back. Ranges two and three draw as bare levels by default so a bias range never muddies the range being traded.
Anchoring and labels
Every boundary starts at the candle that set it, never drawn back across bars that closed before that price existed. The equilibrium and the shading begin at the later of the two swings, because a range has no midpoint until both ends exist.
Each range's names can follow the global label settings or override them: centred over the range's own span, to the left, to the right, at the swing that set the level, or off. Two names landing on the same price are merged into one label rather than left stacked; two that land close together without being the same level are separated by a blank line rather than overlapping.
The readout
One panel, two blocks. The first names each active range's timeframe, whether it fits under the chart's own timeframe, which way it is working, which half of it price is trading in, and how far through it price has travelled. The second is a calendar statistic rather than a swing one: the average daily, weekly and monthly range over a chosen number of completed periods, how much of that average the current period has already used, and a countdown to the period's close.
Alerts
Six. Price crossing into premium, price crossing into discount, price trading the equilibrium, the range high taken, the range low taken, and a new swing redrawing the range. All six read the range being traded — range one.
Method and repainting
Swings on ranges two and three are read on their own timeframe via a higher-timeframe request; range one's swing test is likewise timeframe-bound to whichever timeframe is chosen for it. Every swing reads only candles already closed, one bar back, so nothing about it depends on lookahead revealing an unclosed bar.
A confirmed boundary moves only when a genuinely new swing prints. The one part of the drawing that is live by design is a boundary carried out to a raid in progress, and it draws dotted so that is visible rather than implied.
What it will not do
It places no entries, exits, stops or targets, and it does not size a position. It draws no trend line, no bias score and no target projection beyond the range itself. It does not identify order blocks, fair value gaps or liquidity pools — only the swing highs and lows that bound the range and the equilibrium between them.
Settings
Per range: on/off, timeframe, Period or Swing, label placement override, swing strength, premium/discount shading, boundary width. Swing definition: whether a direction turn is required, whether a raided boundary is carried out to price. Shading: premium and discount colours, transparency, whether the shading leans with direction and by how much. Lines: boundary and equilibrium colour and width, how far boundaries extend past the last bar. Labels: side and nudge for the high, low and equilibrium of each range, whether premium/discount get their own names, the collision distance that separates two close labels, whether price is shown in the label, label size and colour. Readout: show/hide, position, size. Average ranges: show/hide, lookback length for each of daily, weekly and monthly, and whether the close countdown is shown.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. Indicator

Trinity ATR LevelsTrinity ATR Levels
Is an open-source overlay that draws volatility levels from the previous period close and a period ATR, then adds a session-aware signal layer on top of those levels.
Credit
The level map is a derivative of Saty ATR Levels by satymahajan, published open-source on TradingView in 2022.
Original:
What this script keeps from Saty:
Previous period close as the anchor
Trigger at a user-set share of ATR (default 0.236)
38.2, 50, 61.8, 78.6, ±1 ATR, and the same extension stack
Day / Multiday / Swing / Position / Long-term period selector
Optional "Use Current Close" switch
8-21-34 ribbon used only to color the small range/ATR info table
What this script adds:
Three modes that change when a signal may fire, not the level math
Confirmed-close ENTER and EXIT through the trigger
Golden Gate open at 38.2 percent, with 61.8 percent as the gate target
Optional pullback markers: trigger pullback (T-PB) and 10-minute EMA8
Optional first-hour previous-close reclaim on 10-minute closes
Session clock for regular hours, premarket, or 24-hour markets
Entry budget, cooldown, debounce, gap-safe open, and an optional entry buffer that does not move the stop
A dashboard that states location, action, targets, stop, and why nothing is firing
Historical percentages that appear only on the exact sample they were measured on
Alerts for the mechanical events above
This is not a republish of Saty ATR Levels with new colors. The ruler is Saty's. The traffic lights, session clock, and scoped percentages are new. Source is open so both parts can be inspected.
What the levels are
Every line is the chosen period's reference close plus or minus a fraction of that period's ATR.
PDC — previous period close. The anchor. Nothing is measured from live price unless you turn "Use Current Close" on.
Call / Put trigger — default 23.6 percent of ATR either side of PDC. A confirmed close through this line is the entry gate. A confirmed close back through it is the exit.
38.2 percent — the Golden Gate opens.
50 percent — midpoint of the gate. The script treats fresh entries here as poor reward versus the stop at the trigger.
61.8 percent — the gate target. Scale out is the intended action.
78.6 percent and ±1 ATR — extension and full-range lines. Rare on a single day. The script does not treat them as add-on zones.
Leave "Use Current Close" OFF for trading. When it is ON, the forming close becomes the anchor, the levels drift with price, the trigger boxes cannot arm correctly, and none of the historical percentages apply. The only intended use is a last-minutes preview of the next period's map. Note the numbers, then switch it back OFF.
The three modes
The levels are the same in every mode. Mode only changes signal timing, re-entry policy, and whether percentages print.
MILKMAN — default. Day period forced. Regular-hours previous close and ATR. Signals only on a 3-minute chart during regular hours. One long and one short trigger entry per session. No entry buffer. Three-bar cooldown after an exit. Percentages print only when the chart is SPY or SPX, 3-minute, Day period, regular session. That is the only configuration those figures were compiled for. On any other symbol they hide.
UNIVERSAL — same structure on any market and timeframe. Signals on every bar. Unlimited re-entries with a longer cooldown. 1 percent ATR entry buffer. Percentages hidden everywhere. They were not measured outside SPY regular hours, so the script does not show SPY numbers on other markets.
CUSTOM — every control under "Signal Rules" applies. Use this only when you know which rule you are changing and why.
How a signal is taken
A wick does not count. The script waits for a confirmed bar close.
Long trigger entry: confirmed close above the call trigger, session and timeframe allowed, entry budget remaining, cooldown finished, and the close beyond any buffer you set.
Long exit: confirmed close back below the call trigger. The stop does not use the buffer.
Short side is the mirror.
After the Golden Gate is open, two extra entries can print: a pullback that tags the trigger again (T-PB), and a pullback to the 10-minute EMA8 inside the gate. The 10-minute EMA8 is requested from the 10-minute timeframe. It is not your chart's own 8 EMA. Above a 10-minute chart that line is only an approximation and those signals are suppressed. The Status row says so.
PDC reclaim is a first-hour 10-minute close back through the previous close after price started the session on the other side of it. It is not a trigger entry. It is a flip warning. It is also suppressed above 10 minutes.
Historical percentages
When they are visible they are historical frequencies from SPY, regular session 09:30-16:00 ET, 3-minute confirmed closes, sample window 2000-2025, compiled as "Milkman stats v2026-08-29". Examples the dashboard and labels may show:
Confirmed call close through the trigger: 73.6 percent reached 38.2 percent the same day. If price then closed back below the trigger, that fell to 59.5 percent.
Median time from a winning call trigger to 38.2 percent: 18 minutes. That is a median, not a deadline.
Trigger day to 38.2 percent: 78.5 percent bull, 79.0 percent bear.
38.2 percent to 61.8 percent: 62.7 percent bull, 65.5 percent bear.
Gate completion from a trigger day: 62.5 percent bull (n=3,421), 65.4 percent bear (n=3,196).
Full ±1 ATR on any day: 13.8 percent up, 16.1 percent down.
The 3-minute close study that produced the 73.6 / 59.5 pair was run on calls only. The script says so on the put trigger. Do not apply that pair to shorts.
These figures are not a win rate for your account, not a forecast, and not valid on QQQ, ES, BTC, a 5-minute chart, weekly levels, or extended-hours closes. If the dashboard says stats are hidden, believe it. The mechanics still run. The percentages do not.
Bilbo
Bilbo is a 1-hour Phase Oscillator state used as context, not as an entry trigger. It can only be read cleanly on a chart of 60 minutes or less. On higher timeframes the dashboard drops the intraday rows rather than inventing a value. Outer-zone states were associated with higher gate-completion frequencies in the same SPY sample. Treat that as sample context, not a filter you must wait for.
How to use it
For the published configuration: AMEX:SPY or SPCFD:SPX , 3-minute, regular hours, Mode = MILKMAN, Level Period left on Day, Use Current Close OFF.
Wait for a confirmed close through the trigger, or for GG / T-PB if you take those.
Stop is a confirmed close back through the same trigger.
Primary target is 61.8 percent. Scale at least half there. Trail remaining size. Do not add at 50 percent.
Read STATUS before you assume the script is broken. It will say if you are on the wrong timeframe, in cooldown, out of entries, or still short of the level.
On crypto, FX, futures, or a 4-hour chart, switch to UNIVERSAL or CUSTOM and ignore percentages.
Swing or Position level periods rebuild the same map from monthly or quarterly ATR. Use a 4-hour or daily chart for those. They are structure, not a 3-minute day-trade signal.
Alerts
Alert text is mechanical on purpose. TradingView freezes alertcondition text at compile time, so the message cannot know your mode or symbol. Percentages live on the dashboard, which does know the scope.
Limitations
Not financial advice. You are responsible for orders, risk, and venue rules.
Percentages describe one historical sample on one product. They can fail going forward.
10-minute EMA8, PDC reclaim, and 1-hour Bilbo are wrong or suppressed above their native timeframes.
Milkman stats require an exact ticker match. SPYG and SPYD do not inherit SPY figures.
A buffer, if set, moves only the entry. You can be in a trade and not yet stopped. The dashboard prints both prices when a buffer is on.
This script plots levels and discrete events. It does not place orders and it is not a strategy report.
Originality
Saty published the close ± ATR fib map and the period selector. This publication keeps that map, credits it, and adds a separate signal and session layer plus scoped historical labels. Code is open so the split is visible. If you only need the original lines, use Saty ATR Levels.
Published under the Mozilla Public License 2.0, subject to TradingView Script Publishing Rules, which take precedence for what may appear in the public library.
Full user guide: What this tool is
Trinity ATR Levels is a map of where the current period sits inside yesterday’s (or last week’s, month’s, quarter’s, year’s) volatility, plus a set of rules for when a bar is allowed to count as an entry or an exit.
It does not know your account size, your options expiry, or whether the next bar will continue. It answers four questions:
Where is price relative to the previous close and the ATR grid?
Has a confirmed close gone through the trigger?
Is the Golden Gate open?
If nothing is printing, why?
If you treat the percentages as a promise, you will misuse it. If you treat the lines as a fixed map and the markers as timestamps of confirmed events, it does what it was built to do.
### What you need on the chart
Add the script to a standard candlestick chart. Do not use Heikin Ashi, Renko, Kagi, line break, point and figure, or range bars if you care about the signals. Those charts change the close that the engine tests.
For the configuration the historical numbers belong to:
Open SPY or SPX.
Set the chart to 3 minutes.
Use regular trading hours for the Milkman mode. Turn extended hours on only if you also want premarket high and low drawn. Premarket lines stay blank without extended hours.
Leave Mode on MILKMAN.
Leave Level Period on Day. Milkman forces Day even if you change the input.
Leave Use Current Close OFF.
Leave Trigger at 0.236 unless you have a reason to move it. Every label reads that input, so the text will follow you if you change it.
If you are on QQQ, ES, NQ, a single name, FX, or crypto, switch Mode to UNIVERSAL before you look at the dashboard. The lines will still draw. The percentages should not.
### The map, from the middle outward
All distances are a fraction of the selected period’s ATR, measured from the previous period close (PDC).
PDC is the spine. On a Day period in Milkman mode it is yesterday’s regular-session close, not last night’s extended print and not the live price.
The call trigger sits 0.236 ATR above PDC. The put trigger sits 0.236 ATR below it. These two lines are the only entry gate and the only mechanical stop. Price touching them is not an event. A confirmed candle close through them is.
38.2 percent of ATR beyond PDC is where the Golden Gate opens. From there to 61.8 percent is the corridor the script treats as the trade. 61.8 percent is the gate target, not a suggestion to hold for a full ATR.
50 percent is halfway through that corridor. The script’s labels tell you not to start a new position there. Reward left to 61.8 is smaller than the risk back to the trigger. If you are already in, you hold and you still use the trigger as the stop.
78.6 percent is past the gate. The intended action on arrival is to trail, not to add.
±1 ATR is the full daily range relative to PDC. In the SPY sample a complete +1 ATR day happened on 13.8 percent of days and a complete −1 ATR day on 16.1 percent of days. Treat it as rare air, take remaining profits, and do not invent a second system beyond it.
Extensions past 1 ATR (1.236, 1.618, 2.0, and so on) are optional. Simple Mode hides them. They are orientation, not entries.
Previous period high and low, and premarket high and low, are extra structure. They are not part of the trigger rule. Premarket needs the 04:00–09:30 window (exchange time) and extended hours enabled.
The 10-minute EMA8 is pulled from the 10-minute timeframe so it is the same line on a 1-minute, 3-minute, or 10-minute chart. Confirmed mode steps every 10 minutes. That staircase is the real completed value. Live mode is smoother and it moves inside the bar. Signals test the confirmed value.
### Confirmed close is the whole mechanic
Saty’s original script drew the lines and stopped. Trinity adds a rule: the event is the close of a finished bar that is allowed to speak.
Allowed to speak means three things at once.
The chart timeframe is allowed. In Milkman that is 3 minutes only. On a 1-minute or 5-minute chart in Milkman, signals stay off and STATUS will say so.
The session is allowed. In Milkman that is regular hours only. Overnight bars do not arm the trigger.
The bar is confirmed. A live wick through the trigger during the forming bar is not an entry.
Exit is the same test in reverse: a confirmed close back through the trigger ends the setup. That invalidation is the filter. In the call-side 3-minute sample, a confirmed close above the trigger reached 38.2 percent the same day 73.6 percent of the time. If price then closed back below the trigger, that dropped to 59.5 percent. The numbers are history. The rule is: if the trigger gives the close back, you are out.
Wicks do not count on the way in and they do not count on the way out.
### The markers you will see
ENTER under or over a bar is a trigger entry. Long is a confirmed close above the call trigger. Short is a confirmed close below the put trigger.
EXIT is the invalidation close back through that same trigger.
GG is the Golden Gate opening: a confirmed close that first reaches 38.2 percent with the trade already allowed. That bar can also be painted gold if you leave gate coloring on.
T-PB is a pullback to the trigger after the gate is already open. The script ranks this as the best expected-value add or re-entry in the sample it displays. It is not a second daily trigger budget item in the same way as ENTER. It is a pullback event.
EMA8 is a pullback to the 10-minute EMA8 while price is inside the gate. Off by default because it prints often. It is suppressed above a 10-minute chart.
PDC is a first-hour reclaim or loss of the previous close on a 10-minute close. First hour means sixty minutes from the session start the mode is using. On SPY in Milkman that is 09:30–10:30 Eastern. It is a flip warning, not an order.
If markers are missing, read STATUS before you hunt through settings. The usual causes are: not 3 minutes, not regular hours, already used the one entry per direction, still inside the cooldown after an EXIT, or the chart is coarser than 10 minutes so EMA8 and PDC reclaim are disabled.
### How to take a long, step by step
Set Milkman on SPY 3-minute before the cash open if you can, so the levels are fixed and you can mark the call trigger and 38.2 / 61.8 before price gets there.
Do nothing in the trigger box except watch. The box is the space between PDC and the call trigger. Occupying it is common. It is not a signal.
When a 3-minute candle closes above the call trigger during regular hours, that is ENTER. In Milkman you get one of those per direction per session. After that, further longs come from T-PB, GG, or EMA8, not from another raw trigger fire.
Stop is already defined: a later 3-minute close back below the call trigger. You do not trail that stop until the gate target is reached. You do not move it to 50 percent. You do not use a wick.
If price reaches 38.2 percent, the gate is open. You may already be in from the trigger. You may enter there immediately. You may wait for a pullback to the trigger. The sample ranked those options in that order of expected value, with a fresh entry at 50 percent last and negative. Use that ranking as context, not as a second strategy.
At 61.8 percent, scale out at least half. Trail what is left. If price continues to 78.6 percent, trail again; do not add. If a full ATR prints, the script’s guidance is to finish the position. Mean reversion toward PDC is the next map, not a reason to press the same trade.
If you get stopped and the session still has time, Milkman will not give you another raw ENTER in that direction. That is intentional. A stop-out is the invalidation. Chasing a second trigger fire is how the 73.6 percent figure becomes the 59.5 percent figure.
Shorts are the mirror image. One extra warning: the 73.6 / 59.5 pair is call-side only. Bear-side labels use the bear frequencies (trigger to 38.2, gate completion, hold rates) and they say so. Do not quote the call study on a put.
### The three modes in practice
MILKMAN is the published study shape. Use it when you want the script to behave like the sample: SPY or SPX, cash session, 3-minute closes, daily ATR, one bite per side. If you take it to TSLA or to a 5-minute chart and wonder why stats vanished or signals died, that is the mode working.
UNIVERSAL is the same ruler on a market that has no cash open. Crypto and FX should live here. Signals run all day. Re-entries are unlimited. A 1 percent ATR buffer sits beyond the trigger so a messy close through the line does not count until price clears it. The stop stays on the trigger, so there is a band where you can be in and not yet stopped. The dashboard prints both prices when that buffer is on. Percentages stay off. Showing 73.6 percent on BTC would be invented evidence.
CUSTOM is a workshop. Every item under Signal Rules starts to matter: which timeframe may fire, which session, how many entries, how many bars of cooldown, how large a buffer, whether pullbacks fire once or on every linger, whether an overnight gap through the trigger still counts, and whether stats hide off the SPY 3-minute Day RTH scope. Change one thing at a time. If you do not know why you are changing it, stay on Milkman or Universal.
### Reading the dashboard
Full layout is the operator panel. Compact keeps the six lines you act on and shortens the wording. Off removes the panel and leaves levels and markers. Above a 1-hour chart the script drops the intraday rows instead of leaving them marked inactive, because the 3-minute entry rules and the 1-hour Bilbo state cannot be evaluated there.
The Mode row is a one-line reminder of which preset is live and whether stats are on.
Location is where price sits on the map: still inside the trigger box, through the trigger, inside the gate, past 61.8, or out at a full ATR.
Watch and Entry tell you what would have to happen next. If the next event is “need a confirmed close above 612.40,” that is the instruction. If the next event is “cooldown, 2 bars left,” that is also the instruction.
Targets and Stop reprint 61.8 and the trigger so you do not have to hunt labels during a fast bar.
Stall guidance is what to do when price is inside the gate and not moving. The default answer is hold until a trigger close against you or a 61.8 print.
Bilbo is the 1-hour Phase Oscillator context: high or low zone, rising or falling. In the same SPY sample, outer-zone states came with higher gate-completion frequencies, with Low+Falling the strongest bear-side figure in that set. You do not wait for Bilbo to take a trigger. You use it to decide how hard you lean on a runner.
Context and Timing cover session phase, first hour, and how the sample behaved in similar locations. Distance prints how far you are from the trigger, 38.2, and 61.8 in price and in percent of ATR, and how far an open trade has traveled through the gate.
STATUS is the line to trust when the chart looks dead. It will say signals are gated off, the timeframe is degraded, the daily budget is spent, cooldown is running, or you are simply waiting and how far the level still is. If STATUS and your eyes disagree, STATUS wins. The script is telling you which rule blocked the print.
The smaller range/ATR info table is Saty’s original idea: period name, how much of the ATR the current period has already used, and the two trigger prices. Green / orange / red on that range reading is utilization, not a signal. A day that has already spent most of its ATR has less room left to the full-range line. That does not forbid a trigger trade. It tells you the remaining runner is smaller.
### Bilbo, without mystique
Bilbo is not a person and it is not an extra level. It is a classification of the last completed 1-hour Phase Oscillator reading into high/low and rising/falling.
The script can only request that 1-hour series cleanly when your chart is 60 minutes or finer. On a 4-hour or daily chart the value you would get is not the completed hour the sample used, so the script stops showing the row.
Use it as a weight, not a gate. A call trigger with High+Rising or High+Falling in the sample completed the gate more often than the unfiltered baseline. A put trigger with Low+Falling was the strongest cell in that grid. None of those cells are 100 percent. None of them override a confirmed close back through the trigger.
### Historical numbers, and how not to lie to yourself
When stats are on, labels and the dashboard splice in frequencies from one compiled block: SPY, regular hours, 3-minute confirmed closes, 2000–2025, version tag Milkman stats v2026-08-29.
A few more figures you will see in Detailed labels, so they are not a surprise:
Trigger day reaching 38.2 percent: 78.5 percent bull, 79.0 percent bear.
38.2 to 61.8: 62.7 percent bull, 65.5 percent bear.
61.8 to 78.6: 68.9 percent bull, 74.7 percent bear.
78.6 to full ATR: 60.9 percent bull, 66.9 percent bear.
Gate completion from the trigger day: 62.5 percent bull, 65.4 percent bear.
Expected-value ranking in that sample put trigger pullback first, immediate 38.2 second, 10-minute EMA8 third, and a fresh 50 percent entry last and negative.
First-hour 10-minute PDC reclaim then reaching a trigger: 73.0 percent in that sample. Reclaim then reaching the gate: 49.0 percent.
Those are counts of past days that did a thing after another thing. They are not the probability of your next trade. They disappear the moment you leave SPY/SPX, leave 3 minutes, leave Day levels, or leave the regular-session close. SPYG is not SPY. The script checks the ticker exactly.
If you publish commentary, quote the scope in the same sentence as the number. “73.6 percent of confirmed SPY 3-minute call closes through the trigger reached 38.2 percent the same day in the 2000–2025 regular-hours sample” is honest. “This setup wins 74 percent of the time” is not.
### Settings that change behavior versus settings that only change paint
Mode, Level Period, ATR length, Trigger share, PDC/ATR session, and Use Current Close change the map or the clock.
Signal Rules change who is allowed to fire. They are ignored unless Mode is CUSTOM, except that Milkman and Universal already stamp their own values onto those same internal switches.
Display, colors, Simple Mode, dashboard position and size, legend, and label detail change what you see. Simple Mode keeps PDC, both triggers, 38.2, and 61.8, and hides 50, 78.6, extensions, prior high/low, and premarket. That is the right first view if the chart is unreadable.
Chart Markers turn ENTER, EXIT, GG, T-PB, EMA8, PDC, and gate-candle color on or off one at a time. Turning markers off does not turn the logic off. Alerts can still fire.
The colour-blind palette replaces gold/green pairs that collapse under deuteranopia. Use it if you cannot separate the default gate and trigger colors.
Runner Target under Trend & Runner is a discretionary extra line at 1.0, 1.236, 1.618, 2.0, 2.618, or 3.0 ATR. It is not the researched gate target. If both tags are on, 61.8 is the gate, the runner tag is optional greed. Do not confuse them.
Alert checkboxes only enable the long or short trigger alerts. The other alertconditions still exist in the script’s alert list when you create an alert on the chart.
### Alerts
Create the alert from this script on the chart, not from a second copy. Pick the condition by name.
ENTER Long / ENTER Short: confirmed close through the trigger.
EXIT Long / EXIT Short: confirmed close back through it.
Gate Open: first 38.2 event.
T-PB: pullback to the trigger with the gate already open.
EMA8 Pullback: 10-minute EMA8 tag inside the gate.
Gate Complete: confirmed close through 61.8.
PDC Reclaim: first-hour 10-minute close back through PDC.
The message body is mechanics only. It will not paste a SPY percentage onto a Bitcoin alert. That is deliberate. Read the dashboard for numbers.
### Timeframes other than 3 minutes
The levels will draw on any chart because they come from a higher-timeframe request. The signals will not always draw.
On 1 minute in Milkman, the engine refuses to fire because the study used 3-minute closes. Switch to Custom and “Any chart timeframe” only if you accept that you have left the sample.
On 5 or 15 minutes the Day levels still sit in the right place. A 15-minute close through the trigger is a different event from a 3-minute close through the trigger. Do not quote the 73.6 percent figure there.
On 1 hour and above, EMA8 pullback, PDC reclaim, and Bilbo are degraded or removed. STATUS and the swing layout of the dashboard are the honest view: location, targets, stop, distance.
On Swing or Position periods the same fibs are built from monthly or quarterly ATR. That is a multi-week map. Read it on a 4-hour or daily chart of a liquid name. Thin small-cap crypto can travel several of those ATRs in a session and then go dead. Daily period is safer there.
### The one setting that breaks the tool
Use Current Close ON rebuilds every line from the live close. Price is then sitting on the anchor by definition. The trigger box is “price between the close and a trigger,” which can never be true when the close is the live price. The gate cannot open. History on the chart becomes look-ahead because each past day is drawn from that day’s own close. The Milkman percentages assume a locked prior close. Turn this on only after the session, to preview tomorrow, then turn it off.
### What this script will not do
It will not size the position.
It will not know your option delta or your expiry.
It will not place the Webull or broker order.
It will not stay honest if you show it on Heikin Ashi and take the signals.
It will not carry SPY frequencies onto another product.
It will not keep a trade alive after a confirmed close back through the trigger just because 38.2 “usually” gets reached.
It will not replace Saty ATR Levels if all you wanted was the quiet fib grid. Use Saty’s script for that. Use Trinity when you want the grid and a clock that says when a close counts.
### A simple daily routine
Before 09:30 Eastern on SPY, load the 3-minute chart, Milkman, current close off. Write down PDC, call trigger, put trigger, upper 38.2, upper 61.8, lower 38.2, lower 61.8.
During the first hour, note whether price is stuck in a box, already through a trigger, or reclaiming PDC on a 10-minute close.
Take at most one raw trigger per side. Prefer a close, not a poke. Put the stop on the other side of that same line as a close, not as a tick.
If the gate opens, manage to 61.8. If it fails back through the trigger, flatten and stop trading that direction on the raw trigger for the rest of the session.
After 16:00, if you want tomorrow’s sketch, flip Use Current Close on for one minute, write the projected levels, flip it off.
If STATUS ever says you are out of scope, you are. Change product or mode on purpose, not by accident.
That is the whole tool: Saty’s ruler, a confirmed-close clock, a gate from 38.2 to 61.8, and a dashboard that tells you when the clock is not allowed to tick. Indicator

Consolidation DNA | Flux ChartsGENERAL OVERVIEW:
Consolidation DNA is a market structure tool that finds price consolidations and describes what is happening inside them. A consolidation is any stretch where price stops travelling and starts moving sideways in a contained area. Most tools stop at drawing a box around that area. Consolidation DNA draws the box and then measures twelve properties of the price action inside it. Eleven of those measurements are compared against five reference profiles, and the indicator reports which profile the consolidation matches most closely. It has two detection methods, one that builds a range out of consecutive compressed candles and one that builds a range out of a fixed price area that price has stayed inside, and both produce the same output, so a trader can choose whichever suits the instrument and the timeframe.
Once a range is confirmed, the indicator watches for the moment price leaves it. It marks that break, freezes the box at the break bar, and then follows price for a set number of bars afterwards to record how far it travelled away from the range. Those measurements are grouped by consolidation type and shown in a dashboard, so a trader can look at the loaded chart history and see how each type of consolidation behaved after it broke. The five types are Clean Coil, Choppy Range, Directional Pressure, Exhaustion, and High Effort Balance, and each one describes a different kind of sideways market. A Clean Coil and a Choppy Range both look like a box on a chart, but the price action inside them is very different, and the indicator separates them using measurements taken from the candles.
WHAT IS THE THEORY BEHIND THE INDICATOR?
Price spends a large part of every session moving sideways. Traders call these areas consolidations, ranges, bases, or coils. The common idea behind all of these names is the same. Buyers and sellers are close to balanced, so price stays inside a contained area for a while before one side takes control and price leaves the area. The problem is that not every sideways area is the same. Two boxes on a chart can look identical in width and height while the candles inside them tell completely different stories.
In one box, the candles are small, they overlap each other heavily, they close near the middle of the area, they alternate direction only occasionally, and volume is quiet. This is the classic picture of a market winding up, and traders call it a coil. In another box of the same size, the candles have long wicks on both sides, closes land near the edges, direction alternates almost every bar, and volume is higher. This is the picture of a market fighting itself, and traders call it chop. A third box holds together while the closes keep drifting toward one edge and the wicks build up on one side, so price is still contained while pressure builds in a direction. A fourth box holds while volume drops away compared with the period before it and directional progress slows down, which is a market running out of participation. A fifth box shows heavy volume, split fairly evenly between rising and falling candles, while price makes almost no net progress, so a large amount of activity is being taken inside a small area.
These five pictures are the reference profiles the indicator uses. Each one is defined by a set of numeric targets across eleven measurements. When a consolidation confirms, the indicator measures the same eleven properties on the live range and finds which of the five profiles sits closest to it in measurement space. The closeness of that match becomes a fit score, and the distance between the best match and the second best match becomes a confidence gap. Both figures describe how closely the structure resembles a profile, and neither one describes what price is likely to do next. The value of this approach is that the description comes from the price action itself. A trader reading the dashboard sees which measurements are high, which are low, and which profile they add up to, and can form a view about the range from that.
The second half of the theory is the record keeping. Once a range breaks, the indicator follows price for a fixed number of bars and records the furthest it travelled away from the range in the break direction. That travel is expressed as a multiple of the range height, so a two point move away from a two point range and a twenty point move away from a twenty point range both record as one times the range. Grouping those records by consolidation type produces a small table describing what happened after each type of consolidation broke on the loaded chart history.
CONSOLIDATION DNA FEATURES:
Consolidation Detection
Consolidation Classification
Range Break Detection
Expansion Tracking
Consolidation Dashboard
Alerts
CONSOLIDATION DETECTION
🔹 What is Consolidation Detection?
Consolidation Detection is the part of the indicator that finds the sideways areas and draws boxes around them. It runs on every bar and produces a range that has a start bar, a high, and a low. That range moves through two states. It starts as a developing range, which means the indicator has found the beginning of something but the area has not lasted long enough to be treated as real. It then becomes a mature range once it has lasted for the required number of bars.
The classification measurements run while a range is still developing, and the dashboard may show a provisional type before confirmation. Only the classification calculated at maturity is held and used afterwards, and only mature ranges can produce a break or be added to the statistics.
🔹 Why is Consolidation Detection important?
Every other part of the indicator depends on getting the range right. If the box is drawn around the wrong bars, the measurements inside it describe the wrong price action, the classification is wrong, and the statistics are wrong. Two detection methods are offered because instruments behave differently. A fast futures contract on a low timeframe produces clean runs of small candles, which suits candle based detection. A slower instrument, or a higher timeframe, often produces a contained area made of mixed candle sizes, which suits area based detection.
🔹 How is Consolidation Detection calculated?
The Candles method looks at each candle on its own and decides whether it is a compressed candle. A candle is compressed when two conditions are both true. The body must be smaller than half of the total candle height, measured as the distance from open to close against the distance from high to low. The candle height must also be smaller than the four period Average True Range. A candle that has a small body but a large height is not compressed, and a candle that is short but almost all body is not compressed either. Both conditions must be true together.
When a compressed candle appears, a run starts. The bar it appeared on becomes the start of the range, and its high and low become the first range boundaries. Every following compressed candle extends the run, and the range high and range low widen to include that candle. While a range is still developing, the moment a candle appears that is not compressed, the run ends and is cleared completely. The range must be rebuilt from a new compressed candle.
The Visual Range method works on a fixed area. On each bar the indicator takes the highest high and the lowest low of the last three bars and treats that area as a seed range. If price then trades above the top of that area or below the bottom of it, the area is cleared and a new seed is taken from the most recent three bars. If price stays inside, the area is kept and the count of bars inside it grows. The range boundaries in this method do not widen once the seed is set, because any move outside them clears the range and starts a new one.
In both methods, the number of bars the range has lasted is measured from the start bar to the current bar. When that count reaches the required minimum, the range becomes mature. At that moment the range high and range low are frozen and they no longer move.
While a range is still developing, the indicator checks on every bar that the detection run still starts on the same bar it started on before. If the start bar changes, meaning the run was broken and a new one began, the developing range is cleared and its box is removed. Nothing is recorded for a developing range that never matured. This check stops once a range matures. A mature range holds its fixed boundaries and stays active through candles of any size until price breaks out of it.
After a mature range breaks, a new range cannot open from a detection run that began before the break bar. The indicator waits for a run that starts after the break.
🔹 Settings
Detection Method: Chooses how ranges are found. Candles builds the range from consecutive compressed candles. Visual Range builds the range from a fixed price area that price has stayed inside. This changes the logic of the indicator and the default is Candles.
Min. Consolidating Candles: The number of consecutive compressed candles required before a range becomes mature. Lower numbers produce more ranges and shorter ones. Higher numbers produce fewer ranges that lasted longer. This setting is only active when Detection Method is set to Candles. The default is 4 and the range is 1 to 20.
Min. Candles in Range: The number of bars price must stay inside the seed area before the range becomes mature. This setting is only active when Detection Method is set to Visual Range. The default is 20 and the range is 3 to 160.
🔹 Customization
Developing Boxes: Draws the box while the range is still developing. The default is on.
Mature Boxes: Draws the box once the range has matured, and controls whether the box is kept on the chart after the range breaks. When this is off, a mature range still produces breaks and statistics while no box is drawn for it. The default is on.
Developing: The border and fill color used while the range is developing. The default is a light blue.
Mature: The border and fill color used for a mature range whose type reads Unclear. Ranges with a matched type use that type color. The default is a green.
CONSOLIDATION CLASSIFICATION
🔹 What is Consolidation Classification?
Consolidation Classification is the part of the indicator that describes what kind of consolidation has formed. When a range matures, the indicator measures twelve properties of the price action inside it and compares eleven of them against five reference profiles. The closest profile becomes the type of that consolidation, and the type is shown on the box color, on the label, and in the dashboard.
The five types are Clean Coil, Choppy Range, Directional Pressure, Exhaustion, and High Effort Balance. A sixth outcome, Unclear, appears when no profile is close enough.
🔹 Why is Consolidation Classification important?
A box on a chart tells a trader where a range is, and that is all. It says nothing about whether the market inside that box was winding up quietly, fighting itself, leaning in a direction, running out of participation, or absorbing heavy volume. Those are different situations and traders treat them differently. Classification gives the box a description built from the candles inside it, so the box carries information beyond its own outline.
🔹 How is Consolidation Classification calculated?
The indicator measures twelve properties on every bar. Each one is expressed as a number from zero to one hundred so they can be compared with each other.
The three Structure readings describe how contained the area is. Range Tightness compares the height of the current range against a pool of previously confirmed ranges on the same chart, so a high reading means the current range is small compared with the ranges that came before it. Candle Overlap measures how much price area each bar shares with the bar before it, averaged across the range, and a high reading means the bars sit on top of each other cleanly. Close Containment measures the share of closes that land inside the range after a padding is trimmed from the top and the bottom, and a high reading means closes are staying in the middle area.
The three Pressure readings describe whether the range is leaning in a direction. Trend Drift compares the net move from the first close in the window to the last close against the total of every close to close move in between, and a high reading means most of the movement went in one direction. Close Bias measures how far the average close sits away from the middle of the range, where a reading of zero means closes averaged out at the midpoint and a reading of one hundred means closes sat at one edge. Wick Bias measures the difference between total upper wick and total lower wick as a share of all wick, and a high reading means the wicks are concentrated on one side.
The three Chop / Effort readings describe how much back and forth action the area is taking and how busy it is. Flip Rate measures how often a candle points in the opposite direction to the one before it, and a high reading means direction alternated frequently. Wick Rejection measures the total length of all upper and lower wicks as a share of the total candle height across the range, so a high reading means a large part of the price action was wicks. Effort compares the average volume inside the range against the average volume of the window of equal length that came before it, where a reading of fifty means volume matched the earlier window and a reading above fifty means volume was higher.
The three Balance / Exhaust readings cover volume symmetry, the change in pace, and how long the setup has run. Volume Balance measures how evenly the estimated bullish and bearish volume inside the range are matched, where a high reading means the two sides are close to equal and a low reading means one side dominates, and on a symbol that reports no volume this reading is left blank and the profiles are compared on the remaining ten measurements. Slowdown compares the directional progress of the earlier window against the directional progress of the current one, and a high reading means the market made much less directional progress than it did before. Duration compares how long the current setup has lasted against the number of bars required for confirmation.
The Volume Balance reading is an estimate built from one minute candles when the chart timeframe is above one minute. Each one minute candle is counted as bullish or bearish using its body direction, falling back to its close against the previous close when the body is flat, and a candle that is flat on both counts has its volume split evenly between the two sides. That volume is then scaled by how much of the candle's price range overlaps the consolidation. This approximates how much participation happened inside the area. It is not order flow and it is not volume at price data, so it cannot show which side initiated a trade or where inside a candle the volume changed hands. When one minute data is unavailable the estimate is built from the chart candles directly. This measurement reads the most recent thirty bars of the range.
Each of the five profiles holds a target value for eleven of these measurements. The indicator measures the squared difference between every live reading and its target, averages those differences, takes the square root, and subtracts the result from one hundred. That produces a fit score for each profile. The profile with the highest fit becomes the primary type and the next highest becomes the secondary type. Two thresholds then decide what is displayed. If the highest fit is below fifty five, the type reads Unclear, because no profile was close enough to describe the range. If the highest fit is at least fifty five but the gap between the best and second best is smaller than eight, both names are displayed together separated by a slash, because two profiles describe the range almost equally well. When the fit is at least fifty five and the gap is eight or more, a single type name is displayed.
The Duration measurement is calculated and displayed in the dashboard while the five profiles hold no target for it, so it reports on the setup without affecting which type is chosen. Every other measurement in the dashboard is compared against the profiles. The type is recorded at the moment the range matures and it is held from then on. It does not change while the range waits for a break.
🔹 Reading the five types
Clean Coil sits at high Range Tightness, high Candle Overlap, high Close Containment, low Wick Rejection, low Trend Drift, and low Flip Rate. It describes a small, orderly area where the candles sit on top of each other and the closes stay in the middle.
Choppy Range sits at high Wick Rejection and high Flip Rate with weaker Close Containment. It describes a sideways area where direction changes constantly and a large part of the movement is wicks.
Directional Pressure sits at high Trend Drift and high Close Bias with a lean in Wick Bias and volume leaning to one side. It describes a range that is still holding while the closes keep pushing toward one edge. Trend Drift, Close Bias, and Wick Bias are all measured as magnitudes, so this profile reports that a lean exists while it does not name which side the lean favours. The direction is recorded separately at the moment the range breaks.
Exhaustion sits at low Effort and high Slowdown. It describes a contained area where volume has fallen away compared with the earlier window and directional progress has dropped.
High Effort Balance sits at very high Effort and very high Volume Balance while Trend Drift stays low. It describes an area taking heavy volume that is split fairly evenly between rising and falling candles while price makes almost no net progress.
🔹 Settings
Comparison Lookback: The number of previously confirmed ranges kept as the comparison pool for Range Tightness. A larger number compares the current range against a longer history and a smaller number compares it against recent conditions only. The pool fills up as ranges confirm on the loaded chart, so Range Tightness reads a neutral fifty until the first range has been recorded. The default is 200 and the range is 40 to 1000.
Analysis Window: The largest number of bars used to measure the price action inside a range. A range longer than this number is measured using its most recent bars up to this limit. The default is 200 and the range is 10 to 1000.
Inner Close Padding %: The share of the range height trimmed from the top and the bottom before Close Containment counts which closes are inside. A larger number demands that closes sit closer to the middle before they count as contained. A value of zero counts every close inside the range. The default is 10 and the range is 0 to 40.
🔹 Customization
Clean Coil: The color used for boxes, labels, and dashboard text when the type is Clean Coil. The default is teal.
Choppy Range: The color used when the type is Choppy Range. The default is orange.
Directional Pressure: The color used when the type is Directional Pressure. The default is blue.
Exhaustion: The color used when the type is Exhaustion. The default is amber.
High Effort Balance: The color used when the type is High Effort Balance. The default is purple.
Detection Labels: Draws a label above the box on the bar a range matures, showing the type name and the fit percentage. The label carries a tooltip describing the type and listing the fit and the confidence gap. This option requires Mature Boxes to be on. The default is off.
Developing Labels: Draws a label at the midpoint of the box on the bar a developing range starts. This option requires Developing Boxes to be on. The default is off.
RANGE BREAK DETECTION
🔹 What is Range Break Detection?
Range Break Detection is the part of the indicator that decides when a mature range has ended. Price leaving the range in either direction ends the range. The indicator records the bar it happened on, the direction it happened in, and the height of the range at that moment, then freezes the box so it stops extending to the right.
🔹 Why is Range Break Detection important?
The point at which a range ends is the point a trader cares about, because it is where the contained period stops and directional movement begins. It is also the anchor for every measurement that follows. The expansion travel is measured from the range boundary, and it is expressed as a multiple of the range height, so both numbers must be fixed at the break bar for the statistics to mean anything.
🔹 How is Range Break Detection calculated?
The indicator offers two definitions and the trader chooses one. Under Close Break the range ends when a candle closes above the range high or closes below the range low, so a candle that pushes outside the range during the bar and closes back inside does not end it. Under Wick Break the range ends the moment any part of a candle trades above the range high or below the range low, and the close is not considered at all. Close Break therefore produces fewer breaks, each one requiring a candle to settle outside the area, while Wick Break produces more and catches the first touch outside it.
The direction is recorded as up when the range high was broken and down when the range low was broken, and when both boundaries are exceeded on the same bar the upward break takes priority. At that moment the box stops extending and its right edge is fixed at the break bar, where it stays on the chart as a record of the completed range, while the live range is cleared so the indicator can begin looking for the next one.
The Close Break check reads the current close value, and the Wick Break check reads the current high and low. On a bar that has already closed these are the finalized candle values. On the bar currently forming they are live and still moving, so a break can appear and then disappear while the bar is still open, and it settles when the bar closes. An alert set to fire Once Per Bar Close will report only the breaks that survived to the candle close.
🔹 Bullish Example
A mature range holds for several bars while the dashboard release state reads Waiting. A candle then closes above the range high. With Invalidation Method set to Close Break, the range ends on that candle, the box stops extending and its right edge is fixed at that bar, and a Break Up label is placed at the range high. From that bar the indicator begins measuring how far price travels above the range high, and it continues for the number of bars set in Expansion Window.
🔹 Bearish Example
A mature range holds for several bars while the dashboard release state reads Waiting. A candle then closes below the range low. With Invalidation Method set to Close Break, the range ends on that candle, the box stops extending and its right edge is fixed at that bar, and a Break Down label is placed at the range low. From that bar the indicator begins measuring how far price travels below the range low, and it continues for the number of bars set in Expansion Window.
🔹 Settings
Invalidation Method: Chooses the definition used to end a mature range. Wick Break ends the range on any trade outside the boundaries. Close Break requires a candle to close outside the boundaries. The default is Close Break.
🔹 Customization
Release Labels: Draws a label at the broken boundary on the break bar, reading Break Up or Break Down. The label carries a tooltip listing the method used, the type of the range, the fit percentage, and the range height. The default is off.
Max Stored Boxes: The largest number of completed boxes kept on the chart. Once the count passes this number, the oldest completed box is removed. The default is 80 and the range is 10 to 180.
Max Stored Labels: The largest number of labels kept on the chart across all label types. Once the count passes this number, the oldest label is removed. The default is 120 and the range is 10 to 400.
EXPANSION TRACKING
🔹 What is Expansion Tracking?
Expansion Tracking follows price after a range has broken and records the furthest it travelled away from the range in the break direction. It watches for a set number of bars, records the largest travel it saw, and then adds that record to a running total for the consolidation type.
🔹 Why is Expansion Tracking important?
A break on its own says only that price left the area. It says nothing about how far it went afterwards. Measuring the travel and expressing it as a multiple of the range height makes those measurements comparable across instruments, timeframes, and range sizes, which means they can be grouped and averaged. Grouping them by consolidation type produces a description of how each type behaved after breaking on the loaded chart history.
🔹 How is Expansion Tracking calculated?
When a mature range breaks, the indicator starts a record holding the break direction, the two range boundaries, and the height of the range at that moment, and from that point onward it measures on every bar how far price has travelled away from the broken boundary. For an upward break that travel is the distance from the range high up to the bar high, and for a downward break it is the distance from the range low down to the bar low, so only movement away from the range counts and a bar that trades entirely back inside contributes zero. Each measurement is divided by the range height and compared against the largest value seen so far, and whenever a new largest value appears the indicator records the bar and the price where it occurred so that exact point can be marked on the chart.
The record continues until the window set in Expansion Window has elapsed, counting the break bar itself as the first bar of that window, at which point the largest travel it saw is added to the running total for that consolidation type, the sample count for that type is added to, and the record itself is removed. Records that are still inside their window are held back and they join the averages once their window has finished. Because every measurement is expressed against the height of its own range, a travel equal to one hundred percent of the range height displays as one times, so a range that was ten points tall followed by a move of eighteen points away from the boundary records as one point eight times, which lets ranges of very different sizes be compared on one scale.
Every mature range that breaks is credited to the type profile that scored highest for it, and this includes ranges whose label read Unclear, where the fit sat below the display threshold and no type name was shown. Those breaks are still recorded and they are credited to whichever profile came closest. This is a fixed convention in the indicator, so the counts in the dashboard describe every break that occurred on the loaded chart.
🔹 Settings
Expansion Window: The length of the measurement window, counted from the break bar. The break bar itself counts as the first bar, so a value of 50 covers the break bar and the 49 bars that follow it. A short window records the immediate reaction to the break. A long window records how far the move eventually reached. Changing this number changes every average in the dashboard, because it changes how long each break is followed. The default is 50 and the range is 1 to 500.
🔹 Customization
Expansion Labels: Draws a label showing the travel as a multiple of the range height. It is placed once the window has finished, on the earlier bar where the furthest travel occurred, so it marks a completed outcome in hindsight and it is not present while that move is happening. The default is off.
CONSOLIDATION DASHBOARD
🔹 What is the Consolidation Dashboard?
The Consolidation Dashboard is a table drawn on the chart that reports the current state of the indicator and the history it has recorded. It has three parts. The header reports what state the indicator is in and which type the active setup matches. The middle section reports twelve readings for the active setup, which are the eleven compared against the profiles plus Duration. The lower section groups the recorded breaks by type.
🔹 Why is the Consolidation Dashboard important?
The box and its color report the conclusion. The dashboard reports the measurements the conclusion was drawn from, together with Duration, which describes the setup without feeding it. A trader who can see that Range Tightness is at ninety, Candle Overlap is at eighty five, and Flip Rate is at fifteen understands why the range was described as a Clean Coil, and can also see when a reading is borderline. The type and the fit percentage are held from the moment the range matured while the measurement rows keep updating on every bar, so on a range that has been holding for a while the live readings describe the range as it stands now and the type describes it as it was at confirmation. Every cell in the table carries a tooltip explaining what it measures.
🔹 How is the Consolidation Dashboard calculated?
The header row reports the state of the indicator. It reads No active setup when nothing has been found, Developing while a range is forming, and Mature once a range has confirmed. A range is cleared on the bar it breaks, so from that bar the header returns to No active setup until the next range is found. Beside the state, the header reports the type name and the fit percentage. When a range matched two profiles closely, a second header row appears carrying the second type name and its fit percentage.
The Current Setup row appears while a setup is active. It reports the range low and the range high as a pair, and it reports the release state. The release state reads Not confirmed while the range is still developing and Waiting once it has matured and is holding.
The four measurement rows appear once the active setup has lasted at least a quarter of the bars required for confirmation, and they carry three readings each. Structure reports Range Tightness, Candle Overlap, and Close Containment, which together describe how contained the area is. Pressure reports Trend Drift, Close Bias, and Wick Bias, which together describe whether the range is leaning in a direction. Chop / Effort reports Flip Rate, Wick Rejection, and Effort, which together describe how much back and forth action the area is taking and how busy it is. Balance / Exhaust reports Volume Balance, Slowdown, and Duration. Volume Balance and Slowdown both feed the classification, and Slowdown carries its highest target of any profile in Exhaustion, while Duration describes the setup without feeding it.
The History by Type section lists all five types with two columns. Samples reports how many breaks of that type have completed the full Expansion Window. Avg Max Expansion reports the average of the furthest travel across those completed breaks, shown as a multiple of the range height. Hovering a Samples cell shows the total number of breaks detected for that type, including any that are still inside their window.
Every figure in the History section describes what occurred on the loaded chart history. Loading more history, changing the timeframe, or changing Expansion Window will change these figures.
🔹 Settings
Show Dashboard: Draws the dashboard table on the chart. The default is on.
Position: Places the dashboard at one of nine points on the chart. The options are Top Right, Top Center, Top Left, Middle Right, Middle Center, Middle Left, Bottom Right, Bottom Center, and Bottom Left. The default is Top Right. This dropdown sits beside Show Dashboard and carries no label of its own.
Size: Sets the text size of the dashboard. The options are Tiny, Small, Normal, Large, and Huge. The default is Normal. This dropdown sits beside the position dropdown and carries no label of its own.
ALERTS
🔹 What are the Alerts?
The indicator provides nine alert conditions covering confirmation and range breaks, so a trader can be told when a range confirms, what kind of range it is, and which way it eventually left.
🔹 How are the Alerts calculated?
Consolidation Confirmed fires on the bar a range matures, whatever type it was given. Five further conditions cover the individual types, named Clean Coil Confirmed, Choppy Range Confirmed, Directional Pressure Confirmed, Exhaustion Confirmed, and High Effort Balance Confirmed. Each of those fires on the same bar as the general confirmation when the range matched that type. A range carrying a combined label fires the condition for the profile that scored highest, and a range reading Unclear fires the general confirmation only.
Range Break fires on the bar a mature range is broken in either direction, and Range Break Up and Range Break Down split the same moment by side, so a trader can act on one direction alone. All three follow whichever definition is set in Invalidation Method. Developing ranges that are cleared without maturing produce no alert at all.
Conditions are created through the TradingView alert dialog by selecting the indicator and then choosing one from the condition list.
IMPORTANT NOTES:
The Volume Balance measurement is an estimate that reads one minute data through a lower timeframe request, and this happens only when the chart timeframe is above one minute, so on a one minute chart and on any chart where one minute data is unavailable for the symbol the estimate is built from the chart candles themselves, and instruments that publish no volume leave the Volume Balance row blank, in which case the measurement is left out of the profile comparison entirely so the gap cannot push the result toward any one type. The comparison pool used for Range Tightness is built from confirmed ranges on the loaded chart and it starts empty, so Range Tightness reports a neutral fifty until the first range has been confirmed and added, the reading becomes more meaningful as the pool grows toward the number set in Comparison Lookback, and loading more chart history fills the pool faster. Every figure in the History by Type section is built from the chart currently loaded, so scrolling back to load more bars, switching timeframe, switching symbol, or changing Expansion Window will rebuild these figures from scratch, while breaks that are still inside their Expansion Window are held and they join the averages once their window has finished. The type recorded for a range is fixed at the moment the range matures and it is measured from the bars available at that point, meaning a range that changes character after it confirms keeps the type it was given. Ranges that are still developing produce no records of any kind, and if a developing range is cleared before it matures its box is removed and nothing is added to the statistics. Turning Mature Boxes off removes the box drawing for mature ranges while the detection, classification, breaks, alerts, and statistics all continue to run, and with that option off no completed box is left on the chart after a break.
UNIQUENESS:
Most consolidation tools answer one question, which is where the range sits, while Consolidation DNA answers that question and then answers a second one, which is what kind of range it is. The classification is built from twelve measurements of the candles inside the range, eleven of which are compared against five reference profiles, and it is reported with a fit percentage and a confidence gap so a trader can see how strong the match is, and when two profiles describe the range almost equally well the indicator displays both names together, while a range that matches nothing closely enough is reported as Unclear. The measurement set itself covers ground that range tools normally leave out, because alongside the expected structural readings of tightness, overlap, and containment, the indicator measures how often candle direction alternates, how wick length is split between the two sides, how average close location sits against the middle of the range, how current volume compares with the window that came before it, and how much directional progress has slowed, while the bullish and bearish volume split is estimated from one minute candles and scaled by how much of each candle's price range overlaps the consolidation, so candles with less price range overlap carry less weight in the balance reading. The indicator also keeps its own record of what happened after each range ended, where travel away from the range is expressed as a multiple of the range height, which makes measurements from a two point range and a two hundred point range directly comparable, and those measurements are grouped by consolidation type to produce a small table describing how each type of consolidation behaved after breaking on the chart in front of the trader. Historical figures are built from finalized candles, while readings on the bar currently forming remain provisional until it closes. Two detection methods are offered so the tool fits different instruments and timeframes, and both feed the same classification and record keeping, while every measurement in the dashboard carries a tooltip explaining what it means and most drawing categories can be turned on or off separately, with developing and detection labels depending on their matching box setting, so the chart can be reduced to boxes alone or expanded to show labels at detection, at maturity, at the break, and at the point of furthest travel. Indicator

Markus Channel + Dual Expansion Envelopes_V1Markus Channel + Dual Expansion Envelopes (Crossover Multiplier MA)
█ OVERVIEW
Markus Channel + Dual Expansion Envelopes is a multi-layer expansion trading system originally designed and calibrated around XAUUSD for spot traders.
Most retail brokers (Vantage, IC Markets, Pepperstone, etc.) do not provide a true order book or Level 2 data on gold. The only reliable real-time participation metric available is tick volume. This indicator was built from the ground up to extract maximum information from tick volume and turn it into a clean, adaptive expansion framework.
At its core sits an original hybrid construction — the Markus Channel — which fuses a volume-sensitive Keltner core with the statistical width of Bollinger Bands. Around this core, two adaptive outer envelopes (Orange Expansion + Blue Trigger) and a dynamic Crossover Multiplier MA are projected.
The result is a complete visual hierarchy for gold expansion / breakout trading when you only have tick volume to work with:
Core structure → First expansion → Confirmed expansion → Dynamic multiplier targets
█ HOW IT WORKS
⚪ 1. Auto MA Selection Engine (Adaptive AI)
Five classic moving averages are calculated in parallel (SMA, EMA, RMA, WMA, VWMA).
Each candidate is scored using a combined error function:
Lag Error = SMA( (MA − Source)² , length )
Jitter = SMA( (ΔMA)² , length )
Score = Lag Error + (Jitter × Penalty)
The MA with the lowest score is automatically selected. This keeps the center line optimally responsive on the highly volatile XAUUSD tick stream.
⚪ 2. Markus Channel (Original Hybrid Construction for Spot Gold)
Because no real order book is available, the entire channel is driven by tick volume:
1. Midline = Auto-selected MA of close (Base Center Length)
2. Bollinger Bands = Midline ± (StdDev × BB Multiplier)
3. Tick Volume Ratio = Volume / SMA(Volume, Vol Length)
4. Dynamic Keltner Multiplier = clamp( 3.0 + (Volume Ratio − 1) × Volume Sensitivity , 3.0 , 4.0 )
5. Keltner Bands = Midline ± (ATR × Dynamic Multiplier)
6. Band Difference = Bollinger − Keltner
7. Smoothed Difference = SMA(Band Difference, Diff MA Length)
Final Markus Bands:
Markus Upper = Keltner Upper + Smoothed Upper Difference
Markus Lower = Keltner Lower + Smoothed Lower Difference
This construction allows the channel to:
• Expand aggressively when tick volume spikes (the only real-time participation signal available on most brokers)
• Retain the statistical properties of Bollinger Bands
• Smooth the difference so the final bands remain stable even during gold’s fast moves
⚪ 3. Orange Expansion Envelope
Channel Width = Markus Upper − Markus Lower
Average Width = SMA(Channel Width, Expansion MA Length)
Volume Boost = 1 + max(0, Tick Volume Ratio − 1) × Orange Volume Boost
Orange Offset = (Average Width × 0.5 × Orange Base Multiplier) × Volume Boost
Orange Upper / Lower = Markus Bands ± Orange Offset
Optional “Breakouts Only” mode keeps the chart clean until price actually leaves the Markus channel.
⚪ 4. Blue Trigger Channel
Two memory modes designed for gold’s expansion behavior:
• Dynamic Tracking – slowly decays after the expansion ends
• Hold Peak Level – latches the extreme expansion level until a new expansion occurs
A final volatility buffer (scaled by the same tick-volume boost) is applied to create the Blue Trigger zone.
⚪ 5. Crossover Multiplier MA Engine
On every cross of the selected target (Midline / Markus / Orange / Blue):
Raw Multiplier = Dynamic Keltner Multiplier × Tick Volume Ratio
The multiplier is latched on the cross and smoothed by the Auto MA engine. Projection lines are then drawn:
Cross Upper / Lower = Midline ± (ATR × Smoothed Multiplier)
These lines act as adaptive, volume-scaled targets that expand and contract with real participation — critical when trading XAUUSD without an order book.
█ HOW TO USE (XAUUSD Spot Focus)
• Expansion Detection
Background turns green/red when price breaks a Markus band while channel width is expanding on rising tick volume.
• First Target
Orange Envelope = initial expansion objective on gold.
• High-Conviction Expansion
Blue Trigger Channel = stronger expansion zone (especially useful in Hold Peak mode during London/NY gold sessions).
• Dynamic Targets After Cross
Crossover Multiplier lines provide live support/resistance that scale with the intensity of the tick-volume surge.
• Regime Context
The HUD shows active MA type, current multiplier strength, expansion state, and bullish/bearish regime at a glance.
Built specifically for traders who trade gold spot CFDs and only have tick volume as their real-time activity metric.
█ SETTINGS
• Auto MA Selection Engine – Adaptive AI or Manual
• Markus Engine – Base length, BB multiplier, ATR length, tick-volume sensitivity, difference MA
• Orange Expansion Envelope – Base multiplier + volume boost + breakout-only mode
• Blue Trigger Channel – Buffer size + Dynamic / Hold Peak memory
• Crossover Multiplier MA – Target layer + smoothing length
• Full visual control (clouds, backgrounds, candle coloring, HUD, colors)
█ NOTES
The Markus Channel is an original hybrid construction developed and tuned on XAUUSD. It deliberately uses tick volume (the only participation data most brokers provide) instead of relying on a non-existent order book. All outer envelopes and the Crossover Multiplier engine are derived from this core structure.
Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
Not financial advice ! Indicator

Filter Reality Check# Filter Reality Check — does your condition actually select anything?
My last script measured what entering at random would have produced on a
chart at a given reward-to-risk. The question everybody asked next was the
obvious one: *fine — does my filter beat that?*
Almost nobody measures it. This does.
It resolves every bar in the sample exactly once, then counts the outcome
twice: into the baseline, and into the filtered set if your condition was
true on that bar. Same bars, same distances, same resolutions — so the
difference between the two rates is the filter and nothing else.
## What the table shows
**All bars.** The baseline. What entering at random would have produced
here at your reward-to-risk.
**When condition true.** The same measurement, restricted to bars where
your filter passed.
**The filter is worth.** The difference, in percentage points of hit rate.
This is the number you came for.
**Bars it kept.** What share of the sample survived the condition. This
matters more than it looks: a filter true on 97% of bars is not selecting
anything, and its hit rate will match the baseline for that reason alone.
If this figure is near 100%, the filter is decoration.
**Filtered vs break-even.** Whether the filtered rate clears what your
reward-to-risk actually demands, after costs.
## Conditions you can test
Price above or below a moving average (EMA or SMA, any length), ADX above
a level, RSI above or below a level, volatility rising (ATR above its own
average), volume above a multiple of average, inside a session window, or
**any custom source above a level** — which lets you point it at another
indicator on your chart and test that.
## What you should expect to find
Most filters are worth nothing.
That is the finding, not a failure of the tool. A condition that moves the
hit rate by half a point is a condition you can delete, and knowing which
of yours those are is worth more than adding another indicator. The script
says so plainly when it happens.
Occasionally you will find one that costs you points — where you would
genuinely do better entering at random. Those are worth knowing about
before they are load-bearing in a strategy.
## Method, and its limits
**The condition is read on the entry bar itself**, using only data that
existed then. A filter evaluated with information that arrived later would
flatter itself and the result would be worthless.
**A bar spanning both stop and target counts as a loss.** There is no way
to know which came first from bar data, and being wrong pessimistically is
the only honest way to resolve it.
**Samples that reach neither level within the holding window are reported
as timed out**, not quietly dropped.
**Distances can scale with each historical bar's own ATR**, so the test
uses the volatility of the time rather than today's.
**The table states the period covered.** Six hundred bars is two days on a
5m chart and two years on a daily one, and a percentage with no period
attached invites more confidence than it has earned.
**Thirty resolved samples is the floor.** Below that the script refuses to
draw a conclusion, and it will tell you when your condition was true too
rarely to judge — which happens often with tight filters on short samples.
## What it is not
It places no trades, gives no signals and predicts nothing. It measures
what a condition would have selected on the history in front of you, on
this instrument, over this window. Run it across several windows before
you believe any single number, and check whether the direction you are
testing happened to be the way the market was going.
A filter that improves the hit rate may still be worthless for other
reasons — overfitting, costs, or a sample too small to mean anything.
This measures one thing and only claims that one thing.
Open source. Companion to *Edge Reality Check*, which measures the
baseline this compares against. Indicator

Accumulation / Distribution Density (VD)A volume indicator for TradingView (Pine Script v6), modeled after Mieczyslaw Siudek's "Accumulation / Distribution Density" (VD) from xStation (XTB). It hunts for candles where a disproportionately large volume produced a disproportionately small price move at a fresh local extreme - a classic footprint of a big player building (accumulation) or unloading (distribution) a position.
█ 🧠 THE IDEA: DENSITY
Density = volume / candle range (high - low) - "how much turnover per unit of movement".
🚚 A lot of volume + a small candle = high density. Someone big is absorbing everything the market throws at them, so price cannot move.
🪶 A lot of volume + a big candle = normal. The volume simply traveled with the price.
normal candle density candle
volume: ██ 2K volume: ████████ 8K
range: │ (big) range: ▮ (small)
│
│ ▮ ← 8K went in, price barely moved:
│ ▲ someone ABSORBED it (marker)
When such a candle also sets a new local low , buyers were absorbing the sell-off → accumulation (marker below the candle). At a new local high , sellers were absorbing the buying → distribution (marker above the candle).
price
│ ▼ ← distribution: new high, huge volume, small candle
│ ┌──┸──┐
│ ─┘ └─┐
│ └──┐ ┌───
│ └─┐ ┌──┘
│ └─┰─┘
│ ▲ ← accumulation: new low, huge volume, small candle
└────────────────────────── time
█ ⚙️ SIGNAL CONDITIONS
A marker appears on a candle only when all of these hold:
📉 New extreme - the candle's low is at or below the lowest low of the previous Max/Min of candles (accumulation), or its high is at or above the highest high of those candles (distribution).
🚚 High density - volume / range >= Density Factor x average density .
🤏 Small candle (optional, Spread condition ) - range <= Spread Factor x average range .
🎯 Close position (optional, Bar close % ) - for accumulation the close must sit at least X% above the low; for distribution at least X% below the high. 0 disables the filter.
🔊 volume > 0 - instruments without volume data never signal.
Both averages (range and density) use a window ending at the previous candle - the signal candle does not inflate its own threshold.
By default the conditions are checked only once the candle closes ( Signal on closed candle only ) - a marker never appears and then disappears on the live candle.
█ 🛠️ PARAMETERS
Parameters (as in xStation)
Max/Min of (bars) (default 5) - how many previous candles the signal candle must out-low / out-high.
Average Spread of (bars) (default 5) - window for the average range.
Average Density of (bars) (default 5) - window for the average density.
Spread condition (default on) - toggle for the "candle must not be too big" filter.
Spread Factor (default 1.4) - how much larger than the average range the signal candle may be.
Density Factor (default 2) - how many times the average density the candle must reach.
Bar close (%) (default 0) - the close-position filter described above.
Signal on closed candle only (default on) - evaluate signals only when a candle closes (no repainting). Turn off to watch signals form in real time on the unclosed candle - such a signal may vanish before the close.
Appearance (Style tab)
Markers are plotshapes, so each signal gets its own row in the Style tab of the indicator settings - with a visibility checkbox, a marker-shape picker, a position dropdown ( Above bar / Below bar ), and a color:
Accumulation (default: triangle below the bar) ,
Distribution (default: triangle above the bar) .
█ 🔔 ALERTS
Accumulation density - potential bullish signal (heavy volume, little movement, new low).
Distribution density - potential bearish signal (heavy volume, little movement, new high).
With Signal on closed candle only on (default) alerts fire at the candle close. If you turn that option off, set the alert trigger to Once Per Bar Close - otherwise an alert can fire on a live-candle signal that later vanishes.
█ 📤 SIGNAL OUTPUT
The script exposes a hidden Signal series: +1 (accumulation), -1 (distribution), 0 (none). It is visible in the Data Window and can be used as an external source in other indicators and strategies (any input.source field) - e.g. to build your own strategy on top of these signals.
█ ✅ CORRECTNESS - VERIFIED
The implementation was verified empirically (2026-08-18): signals recomputed independently (Node.js, same formulas) from OHLCV bars pulled off a live TradingView chart (COMEX:GC1!, 60m, 300 bars) and compared with the markers the Pine script actually drew:
default parameters → 1 signal, exact match (and 299 bars correctly without a marker),
relaxed parameters (Max/Min 3, Spread Factor 2.5, Density Factor 1.2) → 63 signals, exact match , zero missing, zero extra.
The script does exactly what this note describes.
█ ⚠️ WHY MARKERS DIFFER FROM XSTATION
Even with identical parameter values, markers will not land 1:1 on xStation's. This is expected, not a bug:
📊 Different data. xStation runs on XTB's own CFD feed; its volume is XTB tick volume (count of price updates in XTB's book). TradingView shows real exchange volume (futures/stocks) or another provider's feed. Density = volume / range is extremely sensitive to both - different volume and different OHLC (session hours, timezone, weekend CFD candles) shift every threshold in the formula.
🔒 The original algorithm is closed source. XTB only published parameter descriptions, not formulas. Ambiguities the port had to decide (each can move single markers):
averages computed over the window ending at the previous candle (the original may include the signal candle),
new-extreme check uses <= / >= (the original may require a strict break),
a zero-range candle (doji) divides by one tick instead of being skipped,
"Bar close %" measured from the low (accumulation) / from the high (distribution).
⏳ Live-candle behavior. With Signal on closed candle only turned off, conditions are evaluated on live values, so a marker on an unclosed candle can disappear before the close. The default (on) evaluates only closed candles; xStation's behavior here is unknown.
Practical takeaway: compare the two on the same market data type (e.g. gold futures on both), expect agreement in character (markers cluster in the same spots), not in identical candles.
█ ⛔ LIMITATIONS
Requires an instrument with volume data - many TVC CFDs (TVC:GOLD, TVC:USOIL) have zero volume and never signal; the script then shows a warning in the top-right corner of the chart. Check per symbol (e.g. TVC:UKOIL does have volume) or use futures (e.g. COMEX:GC1!).
A signal on an unclosed candle may vanish before the close - only with Signal on closed candle only turned off (see above).
© Piotr Kowalski "piecioshka". License: Mozilla Public License 2.0.
Indicator
