Prism Channel Architecture [JOAT]Prism Channel Architecture
Introduction
Prism Channel Architecture is a dual-channel overlay indicator that layers two mathematically distinct structural frameworks onto your price chart simultaneously: a best-fit Pivot Channel derived from actual price pivot points, and a Linear Regression Channel built from statistical least-squares fitting. Together they create a structural prism through which trend direction, channel quality, and breakout momentum can be evaluated from multiple angles at once.
Most channel tools force you to choose between objectivity and responsiveness. Pivot channels adapt to real market structure but can lag. Regression channels are statistically rigorous but ignore actual swing highs and lows. PCA runs both engines in parallel and highlights the moments when they agree — bull alignment and bear alignment states — as the highest-conviction reads in the system.
Core Concepts
Pivot Channel Fitting
The indicator collects up to a configurable maximum of confirmed pivot highs and pivot lows using TradingView's built-in pivot functions:
float pivHigh = ta.pivothigh(high, pivLeft, pivRight)
float pivLow = ta.pivotlow( low, pivLeft, pivRight)
From those stored pivot arrays, it searches for the best pair of recent pivot highs to fit the upper channel boundary, and the best pair of recent pivot lows to fit the lower channel boundary. The quality score for each candidate pair is computed by checking how many of the recent bars were actually contained below the upper line (or above the lower line) within an ATR tolerance:
for k = 0 to checks - 1
float lineY = linePrice(x2, y2, x1, y1, bar_index - k)
if high <= lineY + atrVal * 0.3
contained += 1
float q = safeDiv(float(contained), float(checks), 0.0)
The pair with the highest containment ratio wins and becomes the drawn channel. This means the upper channel line is always the tightest valid resistance line through recent pivot highs, not an arbitrary parallel projection.
Linear Regression Channel
The regression channel computes a full manual least-squares fit over the lookback window, producing slope, intercept, and residual standard deviation:
float slope = safeDiv(n * sumXY - sumX * sumY, n * sumXSq - sumX * sumX, 0.0)
float intc = safeDiv(sumY - slope * sumX, n, close)
float stdDev = math.sqrt(safeDiv(ssRes, n, 0.0))
The upper and lower bands are drawn at `stdDev × Deviation Multiplier` distance from the regression midline, giving bands that are statistically calibrated to the actual spread of price around the trend. Color shifts from bull to bear when slope changes sign.
Channel Alignment Confluence
The system declares a Bull Alignment when both channels simultaneously agree price is in a bullish position — the regression slope is rising AND price is above the regression midline, AND price is in the upper half of the pivot channel (between the midline and the upper band):
bool lrBull = close > midNow and slope > 0.0
bool pivBull = close > uMid and close < uNow
bool alignBull = lrBull and pivBull
This confluence state is highlighted with a subtle background color — a quiet but meaningful signal that two independent structural frameworks are pointing in the same direction.
ATR-Based Breakout Detection
Breakout signals fire when price moves more than a configurable ATR multiple beyond the prior bar, provided the regression slope confirms direction:
bool brkUp = ta.crossover(close, close + crossTol * atrVal) and lrSlope > 0.0
bool brkDn = ta.crossunder(close, close - crossTol * atrVal) and lrSlope < 0.0
Breakout labels (▲ BRK / ▼ BRK) appear above or below the breakout bar and are alert-enabled.
Features
Pivot Channel — best-fit upper/lower boundaries through recent pivot highs/lows, quality-scored by containment ratio
Regression Channel — least-squares midline with statistically calibrated deviation bands, auto-colored by slope direction
Channel midline — dashed neutral midline bisecting the pivot channel for zone positioning
Bull and Bear Alignment detection — background highlight when both channels agree on direction
ATR-normalized breakout labels — ▲ BRK and ▼ BRK when price breaks out with trend confirmation
Channel Quality score — displayed in dashboard as percentage of recent bars contained
Pivot position classification — Bull Zone (upper half) or Bear Zone (lower half)
Up to 40 pivot highs and 40 pivot lows stored and evaluated
10-bar channel projection extended to the right of the last bar
Dashboard: LR direction, deviation mult, pivot quality, pivot position, alignment, breakout, ATR, pivot count
Alerts for bullish breakout, bearish breakout, bull alignment, and bear alignment
Webhook JSON alert format
Watermark
Input Parameters
Pivot Channel
Pivot Lookback Left — bars to the left required to confirm a pivot high or low (default 10)
Pivot Lookback Right — bars to the right required to confirm a pivot high or low (default 5)
Max Pivots Stored — maximum number of pivot highs and lows held in memory (default 30)
Quality Check Length — number of recent bars used to score channel containment (default 20)
Breakout ATR Mult — ATR multiplier threshold for breakout label generation (default 1.5)
Show Pivot Channel — toggle the pivot channel lines on/off
Regression Channel
Regression Length — bars used in the least-squares fit (default 50)
Deviation Mult — standard deviation multiplier for band width (default 2.0)
Show Regression Channel — toggle the regression channel lines and fill on/off
ATR Settings
ATR Length — lookback for ATR calculation used in breakout detection and containment tolerance (default 14)
Visuals
Bull Color — color for uptrending channels and bullish labels
Bear Color — color for downtrending channels and bearish labels
Neutral Color — color for channel midlines and neutral dashboard text
Show Dashboard — compact structural summary panel
Show Watermark
Show Breakout Labels — toggle ▲ BRK / ▼ BRK label markers
Alerts
Webhook JSON Format — switches alert messages to JSON format for automation pipelines
How to Use
Add PCA to your chart as a main-pane overlay indicator.
Let the chart load enough history so both channels initialize. A warmup period of at least 60 bars is enforced before channels begin drawing.
Use the Regression Channel to assess macro trend direction. If the midline slope is rising and price is above it, the macro environment is bullish.
Use the Pivot Channel to identify the structural support and resistance boundaries formed by actual price pivots. The upper pivot line is the tightest valid resistance. The lower pivot line is the strongest structural support.
Watch for Bull Alignment (cyan background) when both systems agree price is in a bullish structural position. This is the highest-conviction environment for long setups.
Watch for Bear Alignment (red background) for bearish structural setups.
Treat Breakout labels as momentum confirmation signals — they only fire when an ATR-significant price move occurs in the direction of the regression slope.
Check the Pivot Quality score in the dashboard. A quality above 65% means the channels are actively containing price well. Below 40% means the channel fit is loose and breakouts are less reliable.
Indicator Limitations
Pivot channel fitting evaluates only the 8 most recent pivot highs and the 8 most recent pivot lows when searching for the best pair. In very choppy markets with many closely-spaced pivots, the fitted channel may appear narrow or erratic.
The regression channel is recalculated on every bar over a fixed lookback window. It will repaint the past visually as new bars are added — the channel reflects the lookback window ending at the current bar, not a fixed historical period.
Channel quality scores can be artificially high in low-volatility trending conditions where price barely touches the edges of the channel.
Breakout signals require both an ATR threshold move AND a confirming regression slope. In sideways markets the slope condition filters out most breakout candidates, which may lead to missed signals on genuine horizontal range breaks.
Originality Statement
Prism Channel Architecture is an original Pine Script v6 publication. The dual-engine architecture combining a quality-scored best-fit pivot channel with an independently computed least-squares regression channel, and the definition of alignment confluence as agreement between those two distinct structural systems, is an original design. The pivot quality scoring methodology — measuring the containment ratio of recent bars within the candidate channel bounds with ATR tolerance — is an original technique not derived from any existing published indicator.
Disclaimer
This indicator is for educational and informational purposes only. Channels, alignment states, and breakout labels are analytical tools and do not constitute financial advice. Channel boundaries can and will be violated without warning. Always apply proper risk management and never trade solely based on indicator signals.
-Made with passion by jackofalltrades
지표

Candle Volume Architecture [JOAT]
Candle Volume Architecture
Introduction
Candle Volume Architecture is an overlay indicator that constructs a price-based volume distribution profile for each detected swing, identifies the Point of Control (the price level with the highest bar density within that swing), calculates a configurable Value Area (default 70% of distribution), and renders these findings as a visual volume architecture directly on the price chart. Unlike traditional Volume Profile tools that require fixed time periods or session boundaries, this indicator auto-detects swings from price action and builds its distribution profile dynamically around each structural move.
Volume Profile is a professional tool used to identify price levels with the highest historical trading interest. The Point of Control is the level within any period where the most trading occurred — it functions as a gravitational center that price tends to revisit. The Value Area contains the majority of trading activity and often provides support and resistance as price moves away from and returns to it. This indicator applies these concepts to auto-detected price swings rather than calendar periods, aligning the profile with actual market structure rather than arbitrary time divisions.
Core Concepts
1. Swing Detection
Swings are detected by tracking when price makes a new extreme and then retreats. An upper swing is confirmed when the prior bar's high matched the N-bar highest high, but the current bar fails to match — indicating the swing high has been set. The same logic applies to lower swings. This produces swing high and low markers that update as new extremes form.
2. Volume Distribution Profile
When a swing direction change is detected (bull to bear or bear to bull), the prior swing's price range is divided into a configurable number of bins (default 24). Each bin is populated by counting how many bars within the swing had their closing price fall within that bin's price range. The bin with the highest count becomes the Point of Control.
bin_size = (real_top - real_bot) / i_bins
for j = 0 to bars_in_range
idx = int((close - real_bot) / bin_size)
bins_count.set(idx, bins_count.get(idx) + 1)
3. Point of Control (POC)
The POC is the bin with the highest bar count. It is rendered as a dual-width line (thin solid + thick shadow) that extends forward in time, providing a live reference for where the most concentrated activity occurred in the last swing.
4. Value Area Calculation
Starting from the POC, the Value Area expands outward, adding the next highest-count bin on either side until the cumulative count reaches the configured percentage of total bars (default 70%). The Value Area is rendered as a transparent box covering the identified price range.
5. Profile Bin Visualization
Each bin is rendered as a box whose right edge extends proportionally to its bar count (wider = more activity). Opacity scales with count, so the POC bin is fully opaque and low-count bins are more transparent. This produces a horizontal bar chart appearance directly on the price chart.
Features
Auto-Detected Swing Profiles: Profile builds and renders at each swing direction change
Point of Control Line: Dual-width shadow line extending from each swing, updated to current bar
Value Area Box: Transparent zone covering the configurable percentage of swing volume
Opacity-Scaled Bin Bars: Visual profile bars with count-proportional width and transparency
Swing Range Outline: Dashed box delineating each swing's high-to-low range
Live Swing Direction Line: Current swing trend line drawn on the last bar
POC Proximity Detection: Dashboard highlights when price is within 0.3 ATR of the active POC
8-Row Dashboard: Swing trend, POC level, swing high/low, swing range, POC bias
Input Parameters
Swing Length: N-bar highest/lowest lookback for swing detection (default: 80)
Profile Bins: Number of price bins in the distribution (default: 24)
POC Line Width: Width of the POC rendering line (default: 2)
Value Area %: Percentage of distribution to include in the Value Area (default: 70%)
Show Profiles: Filter to bull only, bear only, both, or none
How to Use This Indicator
POC as Reference
The active POC line represents the most contested price level of the last swing. Price frequently revisits this level. When price is above the POC, the POC functions as potential support. When price is below, potential resistance.
Value Area as Context
Price outside the Value Area (above VAH or below VAL) represents a less-active price zone. Moves outside the Value Area that fail to hold can return toward the Value Area. Sustained acceptance outside the Value Area suggests a new distribution is forming.
Profile Shape for Sentiment
A profile that is skewed toward the top of its range (POC near the high) suggests the swing was dominated by higher-price acceptance — bullish distribution. A POC near the swing low suggests bearish distribution.
Limitations
The distribution is built from closing prices within the swing range, not from actual volume at price. This is a close approximation but differs from true Volume Profile tools that use tick data
The swing detection requires a minimum of swing-length bars before the first profile is generated
On very fast timeframes (1 minute or lower), the swing lengths may be too short to produce meaningful distributions
The maximum bars in range cap (500 bars) prevents the profile builder from analyzing excessively long swings that could cause performance issues
Originality Statement
Applying Volume Profile methodology to auto-detected price swings rather than fixed calendar periods produces profiles that are structurally relevant rather than time-arbitrary. The opacity-scaled bin rendering produces an intuitive visual representation where the most active levels are immediately obvious. The real-time POC proximity detection in the dashboard provides an active alert when price approaches the most significant level of the last swing.
Disclaimer
This indicator is for educational and informational purposes only. The distribution profiles are approximations built from close price counts, not true order flow data. Point of Control and Value Area levels are historical references and do not guarantee future price reactions. Always apply proper risk management.
-Made with passion by officialjackofalltrades
지표

Reversal Entry ZonesReversal Entry Zones
Reversal Entry Zones is an open-source reversal-structure indicator built around one specific analytical idea:
a reversal zone becomes more meaningful when it is not drawn from a simple local pivot alone, but from a pivot that has been confirmed only after price reverses by a minimum threshold.
This script is not designed to predict every turning point in advance, and it is not intended to behave like a generic zigzag clone, a simple support/resistance overlay, or a basic pivot marker that labels every local high and low without further confirmation. Its purpose is to identify confirmed reversal points only after price has moved far enough in the opposite direction, then convert those confirmed points into structured bullish or bearish reversal zones on the chart.
The script also includes extension lines, optional projected zones, a synthetic path connecting one confirmed reversal to the next, and a status panel that summarizes the latest reversal state. These features are included to support chart structure analysis and review, not to imply future performance or automatic trade validity. :contentReference {index=2} :contentReference {index=3}
OPEN-SOURCE NOTE
This script is published open-source so users can inspect the logic directly, verify what the script is doing, and adapt parts of the workflow for their own research if they wish.
Even though the code is open, this description is intentionally detailed because many TradingView users do not read Pine Script. The goal is for a user to understand what the script does, how it works, why its parts belong together, and how it may be used in practice without having to study the code line by line.
OVERVIEW
At a high level, the script does six things:
1. It tracks running highs and lows from a selected source stream.
2. It confirms a pivot only after price reverses by at least a minimum threshold.
3. It classifies the confirmed pivot as either bullish or bearish reversal structure.
4. It draws layered reversal visuals, including core and outer zones, reversal lines, and optional projected zones.
5. It can connect each confirmed reversal to the next using a synthetic path.
6. It summarizes the current structural state in a compact status panel.
The script is therefore meant to function as a complete reversal-structure mapping tool rather than as a single-purpose pivot or line-drawing script. :contentReference {index=4}
CORE IDEA
Many structural tools label local highs and lows immediately, but they do not distinguish clearly between a temporary pause and a reversal that has actually been confirmed by sufficient opposite-side movement.
This script is built around the idea that those two situations are not necessarily equivalent.
A local high is not automatically a bearish reversal.
A local low is not automatically a bullish reversal.
This script waits for price to reverse by a threshold that is large enough to qualify before it confirms the prior pivot as a true reversal point inside the script’s own logic.
That is the core of the model.
Instead of saying:
“a pivot exists here, so draw structure now,”
the script says:
“track the current swing extreme, and only confirm it as reversal structure after price has moved far enough away from it.”
That makes the framework more selective than a simple high/low labeling tool.
The script therefore organizes reversal structure in the following sequence:
track active swing highs and lows,
wait for a sufficient opposite move,
confirm the prior pivot only after that threshold is met,
classify the reversal as bullish or bearish,
then map that reversal into a layered zone and line structure for review.
That narrower focus is the main reason the script exists in its current form. :contentReference {index=5} :contentReference {index=6}
WHY THIS SCRIPT IS NOT A SIMPLE MASHUP
This script combines multiple components, but they are not included simply to place more features into one publication.
Each component has a specific function inside the same analytical process:
- The running high/low engine tracks the currently active swing state.
- The reversal-threshold model decides when a prior extreme is actually confirmed as a reversal.
- The selected source mode controls whether the model works from smoothed averages or raw highs/lows.
- The layered zone display turns each confirmed reversal into a readable structural area rather than a single line.
- The reversal lines extend the confirmed level forward for later reaction analysis.
- The synthetic path shows how one confirmed reversal connects to the next.
- The panel summarizes the most recent reversal state and current threshold context.
These layers are interdependent.
Without the running high/low engine, there is no active swing state to monitor.
Without the threshold model, the script would behave more like a basic pivot high/low marker.
Without the source-mode selection, the user could not control whether the structure is smoother or more reactive.
Without the zone display, the confirmed reversal would remain only a point or line rather than a readable area.
Without the reversal lines, later interaction with the level would be harder to monitor.
Without the synthetic path, the sequence of reversals would be less visually coherent.
Without the panel, the user would have less organized feedback about the latest confirmed reversal, threshold level, and current tracking state.
For that reason, the script is intended as a single reversal-confirmation framework, not as a random collection of unrelated visual elements. :contentReference {index=7} :contentReference {index=8}
WHAT THE SCRIPT DOES
The script monitors price using either:
- raw High/Low values,
- or an Average-based stream built from smoothed highs and lows.
It then tracks the current running swing in one direction until price reverses far enough to meet the active reversal threshold.
Once that happens:
- the prior extreme is confirmed as a reversal point,
- the script classifies it as bullish or bearish,
- stores its bar index and price,
- draws a layered visual structure around that level,
- optionally extends a projected zone forward,
- and updates the panel with the new structural information.
Depending on settings, the chart can show:
- bullish reversal labels,
- bearish reversal labels,
- outer reversal boxes,
- core reversal boxes,
- optional projected reversal zones,
- reversal level lines,
- synthetic path segments,
- and a status panel.
This means the script is not attempting to generate trade entries by itself. It is building a structured visual map of confirmed reversal locations according to the script’s internal threshold model. :contentReference {index=9}
HOW THE SCRIPT WORKS
1) SOURCE MODE
The script can work from two different source modes:
Average
High/Low
In High/Low mode, the script uses raw highs and lows directly.
In Average mode, the script uses smoothed high and low streams based on the selected Average Length.
This distinction matters because the selected source changes how reactive the structure engine is.
High/Low mode is more direct and can react more closely to raw price extremes.
Average mode is smoother and can reduce noise by filtering those extremes through an averaging process.
This allows the same reversal-confirmation logic to operate in either a more reactive or more smoothed structural mode. :contentReference {index=10}
2) EXTRA CONFIRMATION BARS
The script includes an Extra Confirmation Bars setting.
This offsets the source references used by the reversal engine and effectively delays how the script interprets the active high/low streams.
That allows the user to add an additional confirmation delay before reversal recognition is evaluated. In practical terms, this can make the script less reactive and help reduce immediate local noise around current bars. :contentReference {index=11} :contentReference {index=12}
3) REVERSAL THRESHOLD MODEL
The script does not confirm reversals from pivots alone.
It uses a threshold model built from three elements:
- ATR,
- a preset percentage factor,
- and a custom absolute minimum reversal value.
The final reversal threshold is the maximum of those elements.
This matters because the script wants to avoid confirming a reversal from movements that are too small to be meaningful under current market conditions.
In the current implementation, the threshold is derived from:
- the selected preset’s ATR multiplier,
- the selected preset’s percentage factor,
- current ATR,
- current close,
- and the Custom Absolute Reversal input.
The threshold is therefore adaptive rather than completely fixed. It reflects both current volatility and a hard minimum floor. :contentReference {index=13}
4) SENSITIVITY PRESET
The script includes a preset-based sensitivity model.
In the version you shared, the available presets are:
- Low
- Very Low
Those presets change the internal ATR multiplier and percentage factor used inside the reversal threshold model.
This means the preset is not just a cosmetic label. It directly changes how selective the reversal engine is.
A stricter preset requires a larger move before a reversal is confirmed.
A less strict preset allows reversals to be confirmed more easily.
That makes the preset one of the key inputs controlling how much structure the script draws. :contentReference {index=14}
5) RUNNING SWING ENGINE
The script maintains a running high and running low state.
When it is monitoring an upward swing, it continues updating the running high until price reverses by at least the required threshold.
When it is monitoring a downward swing, it continues updating the running low until price reverses by at least the required threshold.
Only after that opposite-side movement is large enough does the script confirm the prior extreme as an actual reversal point.
This is the central mechanism that separates the script from simple pivot markers. It does not mark the pivot at the moment it forms. It waits for the reversal to prove itself by moving far enough away. :contentReference {index=15}
6) BULLISH AND BEARISH REVERSAL CLASSIFICATION
Once a pivot is confirmed, the script classifies it as either:
- bullish reversal,
- bearish reversal.
A confirmed low pivot becomes a bullish reversal.
A confirmed high pivot becomes a bearish reversal.
The script then stores:
- the reversal direction,
- the reversal price,
- and the reversal bar.
These values are also used by the panel and optional synthetic path logic. :contentReference {index=16}
7) LAYERED ZONE DISPLAY
When a reversal is confirmed, the script can draw multiple structural layers around that level.
These include:
- an outer box,
- a core box,
- and, if enabled, an optional projected zone.
The core and outer boxes are centered on the confirmed reversal price and scaled using a volatility-aware half-range derived from ATR and relative price size.
This layered approach is important because it gives the user more than a single line. It creates a visually interpretable reversal area with inner and outer structure.
The optional projected zone extends the reversal level forward as a narrower zone based on the user-defined thickness percentage and extension length. This can help the user monitor how price interacts with the reversal area after it has been confirmed. :contentReference {index=17}
8) REVERSAL LINES
The script can draw a glow line and a main reversal line at the confirmed reversal level.
These lines extend forward by the selected Reversal Line Extension setting.
The purpose of these lines is to make the confirmed reversal level easier to monitor after formation. The thicker glow line improves visibility, while the main line provides the clearer structural reference. :contentReference {index=18}
9) REVERSAL LABELS
If enabled, the script places a bullish or bearish reversal label at the confirmed reversal zone.
These labels are not trade commands. They are structural tags that tell the user which kind of reversal the engine has confirmed and where that confirmation occurred according to the script’s logic. :contentReference {index=19}
10) SYNTHETIC PATH
The script can optionally connect one confirmed reversal to the next using a synthetic path line.
This path is not a price forecast and it is not an order-flow model. It is simply a structural visualization that helps the user follow the sequence of confirmed reversals over time.
This can be useful for understanding whether confirmed reversal points are alternating in a way that creates readable turning structure or whether the market is moving more erratically. :contentReference {index=20}
11) STATUS PANEL
The panel summarizes the most recent state of the reversal engine.
Depending on the current chart state, it can show:
- the latest signal type,
- the last signal price,
- bars since the last reversal,
- current threshold value,
- ATR value and active zone count,
- whether the engine is currently monitoring for a bullish or bearish reversal,
- preset and source mode.
This panel is not meant to predict the next reversal. Its purpose is to organize the script’s current state into a readable summary. :contentReference {index=21}
WHAT MAKES THIS SCRIPT ORIGINAL
This script uses familiar building blocks such as:
- pivots,
- ATR,
- price-percentage thresholds,
- smoothed price streams,
- projected zones,
- panel summaries.
Those building blocks are not original by themselves.
The originality of this script is not in inventing a completely new primitive indicator. The originality lies in how those familiar elements are arranged into one confirmed-reversal workflow:
running swing tracking
→ adaptive reversal-threshold calculation
→ delayed pivot confirmation
→ bullish/bearish reversal classification
→ layered reversal visualization
→ optional projected zone extension
→ synthetic path mapping
→ structural status panel
That full sequence is the main reason this script exists as its own publication.
It is not intended to be simply another pivot script, another ATR-based filter, or another generic dashboard. It is specifically a reversal-confirmation framework that combines threshold-based pivot confirmation, layered reversal-zone display, structural sequencing, and chart-state review in one workflow. :contentReference {index=22} :contentReference {index=23}
WHAT APPEARS ON THE CHART
Depending on settings, the chart may display:
- bullish reversal labels,
- bearish reversal labels,
- outer reversal boxes,
- core reversal boxes,
- projected reversal zones,
- reversal level lines,
- synthetic path lines,
- and a status panel.
Users who want a cleaner chart can disable some visual layers and keep only the elements most relevant to their workflow. :contentReference {index=24}
HOW TO USE THE SCRIPT
A practical workflow is:
1. Add the script to a standard candlestick chart.
2. Choose whether you want to work from Average mode or raw High/Low mode.
3. Set the Average Length if Average mode is used.
4. Set ATR Length and Custom Absolute Reversal so the threshold model matches the instrument’s behavior.
5. Choose the preset that gives the level of selectivity you want.
6. Decide whether to show reversal labels, projected zones, and synthetic path.
7. Watch for newly confirmed bullish or bearish reversal areas.
8. Use reversal lines and projected zones to observe how price behaves around those confirmed levels.
9. Use the synthetic path and recent reversal sequence as structural context rather than as a predictive model.
10. Combine the script’s output with your own market framework, confirmation rules, and risk management.
This script is best understood as a structured decision-support and chart-review tool, not as a self-sufficient automated trading solution. :contentReference {index=25} :contentReference {index=26}
SETTINGS REFERENCE
Confirmation Settings
- Extra Confirmation Bars: adds additional confirmation delay to reversal recognition.
Sensitivity
- Preset: controls how selective the reversal engine is by changing the internal threshold model.
Reversal Calculation
- Swing Source: selects Average or High/Low logic.
- Average Length: smoothing length used in Average mode.
- ATR Length: ATR reference length used in the threshold model.
- Minimum Absolute Reversal: hard minimum reversal filter.
Zone Display
- Show Reversal Labels: shows or hides bullish/bearish reversal labels.
- Show Projected Zones: enables or disables forward reversal zones.
- Max Zones: limits how many projected zones remain visible.
- Zone Extension: controls how far projected zones extend.
- Zone Thickness (%): controls the projected zone thickness relative to price.
Reversal Lines
- Reversal Line Extension: controls how far reversal lines extend.
- Max Reversal Levels: limits how many reversal levels remain visible.
- Label Size: controls reversal-label size.
Synthetic Path
- Show Synthetic Path: enables or disables the structural connection path.
- Path Width: controls the width of the synthetic path.
- Path Style: selects solid, dashed, or dotted display.
- Max Path Segments: limits how many path segments remain on the chart.
Colors
- Bullish Color: sets the bullish reversal color.
- Bearish Color: sets the bearish reversal color.
- Synthetic Path Color: sets the synthetic path color.
Status Panel
- Show Status Panel: enables or disables the panel.
- Panel Position: controls panel location. :contentReference {index=27} :contentReference {index=28}
IMPORTANT PRACTICAL NOTES
This script depends heavily on the selected threshold configuration.
If the threshold is too small, reversals may be confirmed too frequently and the chart may become overly sensitive.
If the threshold is too large, reversal confirmations may become very rare and the script may react too slowly for the intended use.
The selected source mode also matters:
- High/Low mode is more reactive,
- Average mode is smoother.
That means the same instrument can produce meaningfully different reversal structures depending on:
- preset,
- ATR length,
- average length,
- confirmation bars,
- and custom absolute reversal settings. :contentReference {index=29}
LIMITATIONS AND SHORTCOMINGS
This script has important limitations:
- It is a reversal-confirmation model, not a complete market-structure system.
- It does not predict reversals before the threshold is reached.
- It only confirms reversals after sufficient opposite-side movement has already occurred.
- It does not include volume, order flow, fair value gaps, or broader context filters.
- Its behavior depends heavily on ATR, preset sensitivity, source mode, and confirmation settings.
- The synthetic path is a structural visualization, not a predictive model.
- Projected zones are chart-analysis aids, not automatic entry or exit instructions.
- Different instruments, sessions, and volatility conditions can materially change how frequently reversals are confirmed.
- No reversal-threshold model can eliminate all false structure or all regime-dependent behavior.
For those reasons, the script should be used as a structured analysis and review framework, not as a promise of future price direction. :contentReference {index=30} :contentReference {index=31}
WHO THIS SCRIPT MAY BE USEFUL FOR
This script may be useful for traders who:
- want a threshold-based reversal confirmation tool,
- want something more selective than a simple pivot marker,
- want layered reversal zones rather than only single reversal lines,
- want to visualize the sequence of confirmed reversals over time,
- want a compact panel that summarizes the current structural state.
It may be less suitable for traders who:
- want a predictive signal tool,
- want a full trade-execution system,
- want a classic supply-and-demand engine,
- want a very minimal chart with no structural overlays.
DISCLAIMER
This script is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
Market conditions change, historical behavior does not guarantee future results, and users should perform their own analysis, validation, and risk management before using the script in live decision-making. 지표

Liquidity Entry ZonesLiquidity Entry Zones
Liquidity Entry Zones is an open-source liquidity-sweep entry framework built around one specific analytical idea:
when price moves through a recently formed liquidity level, then reclaims back through that area with acceptable candle quality and directional context, that event can be treated as a structured entry opportunity rather than as a generic wick sweep or random rejection candle.
This script is not designed to mark every swing high or swing low, and it is not intended to behave like a generic support/resistance overlay, a basic pivot script, or a simple “liquidity sweep detector” that treats every sweep in the same way. Its purpose is to store recent liquidity levels, detect meaningful sweeps through those levels, validate reclaim behavior, filter the candle using quality conditions, confirm the setup inside a limited time window, and optionally project a fixed-risk trade structure on the chart for review. :contentReference {index=1}
The script also includes optional sweep guides, signal visuals, a compact status panel, and an internal trade simulation layer so users can inspect how the framework behaves under the chosen settings. Those review tools are included to support chart study and comparison, not to imply future performance. :contentReference {index=2}
OPEN-SOURCE NOTE
This script is published open-source so users can inspect the logic directly, verify what the script is doing, and adapt parts of the workflow for their own research if they wish.
Even though the code is open, this description is intentionally detailed because many TradingView users do not read Pine Script. The goal is for a user to understand what the script does, how it works, why its parts belong together, and how it may be used in practice without needing to reverse-engineer the code line by line.
OVERVIEW
At a high level, the script does seven things:
1. It stores recent pivot highs and pivot lows as liquidity reference levels.
2. It checks whether price sweeps through one of those stored levels by a minimum pip distance.
3. It requires reclaim behavior after the sweep, using either a close-back-inside rule or a stronger reclaim condition.
4. It filters the sweep candle using wick percentage, body percentage, candle range, optional EMA context, and optional midline confirmation.
5. It allows a limited confirmation window after the sweep so entries are not forced to happen only on the exact sweep bar.
6. It can project a fixed take-profit / stop-loss model and track simulated outcomes.
7. It summarizes the current state and projected results in a status panel.
The script is therefore meant to function as a complete liquidity-sweep reclaim framework rather than as a single-purpose pivot or line-drawing tool. :contentReference {index=3}
CORE IDEA
Many sweep-based tools detect only one event: price traded above a prior high or below a prior low.
This script takes a narrower and more selective approach.
Its central assumption is that a sweep alone is not enough. A useful entry event requires more than just temporary liquidity violation. The script therefore asks additional questions:
- Was the swept level a recent stored liquidity level derived from pivot structure?
- Did price move far enough beyond that level to qualify as a real sweep?
- Did price reclaim back through that area in a meaningful way?
- Was the sweep candle structurally acceptable in terms of wick, body, and range?
- Did the confirmation happen within a defined number of bars?
- Was the signal aligned with the optional EMA context?
- Did the confirmation candle behave the way the selected setup requires?
Because of that, the script does not treat all sweeps equally. It attempts to organize the process into a more selective sequence:
first identify liquidity,
then detect a sweep,
then validate reclaim quality,
then confirm within a limited window,
then project the resulting setup into a standardized chart-review structure.
That narrower focus is the main reason the script exists in its current form. :contentReference {index=4}
WHY THIS SCRIPT IS NOT A SIMPLE MASHUP
This script combines multiple components, but they are not included simply to place more features into one publication.
Each component has a specific role inside the same analytical process:
- Pivot storage defines where recent liquidity levels exist.
- Sweep detection checks whether those levels have actually been taken by price.
- Reclaim logic checks whether price closes back through the swept area in a meaningful way.
- Candle-quality filters reduce weak or low-information sweeps.
- The EMA filter provides optional directional context.
- The confirmation window prevents stale sweeps from remaining valid indefinitely.
- The cooldown logic reduces clustered signals.
- The trade simulation layer maps the resulting setup into a consistent risk framework.
- The panel organizes current state and projected review metrics into one readable output.
These layers are interdependent.
Without the pivot-based liquidity storage, there is no structured level to sweep.
Without the minimum sweep distance, trivial overextensions would count too easily.
Without reclaim validation, the script would mark many sweeps that never actually regained the level.
Without wick/body/range filters, weak candles would be treated too similarly to stronger rejection candles.
Without the confirmation window, old sweep conditions could stay alive for too long.
Without the EMA filter, the framework would lose one of its optional directional context filters.
Without the simulation layer, the user would still need to draw projected entry, stop, and target structure manually.
Without the status panel, the user would have less organized feedback when monitoring current sweep state, bias, and simulated results.
For that reason, the script is intended as a single liquidity-reclaim framework, not as a random bundle of unrelated features. :contentReference {index=5}
WHAT THE SCRIPT DOES
The script stores recent pivot highs and lows as liquidity levels, then watches for price to trade through those levels by at least the selected sweep distance in pip terms.
Once a sweep occurs, the script can evaluate whether the candle reclaimed back through the level. That reclaim can be interpreted in one of two ways:
- Close Back Inside
- Strong Reclaim
After that, the script can apply candle-quality filters based on:
- wick percentage,
- body percentage,
- minimum candle range,
- optional EMA alignment,
- optional midline-break confirmation,
- and candle-body direction for long or short confirmation.
If the setup remains valid within the selected confirmation window, the script can confirm a BUY or SELL signal.
When enabled, the simulation layer can then project:
- entry,
- fixed stop loss,
- fixed take profit,
- entry zone,
- target box,
- stop box,
- entry and invalidation lines,
- and active trade labels.
The script can also show sweep guides, signal markers, bar coloring, and a status panel summarizing its current state and projected statistics. :contentReference {index=6}
HOW THE SCRIPT WORKS
1) LIQUIDITY LEVEL STORAGE
The script uses pivot highs and pivot lows to create recent liquidity reference points.
A pivot high becomes a candidate buy-side liquidity reference.
A pivot low becomes a candidate sell-side liquidity reference.
The script stores a configurable number of recent levels so that sweep detection is based on previously identified structural points rather than arbitrary price movement. This makes the framework level-based rather than purely candle-based. :contentReference {index=7}
2) SWEEP DETECTION
Once liquidity levels are stored, the script checks whether current price moves beyond a recent level by at least the configured minimum sweep distance.
For a bearish sweep setup:
price must move above a stored high.
For a bullish sweep setup:
price must move below a stored low.
This distance is measured in pip terms using the selected pip-size logic. That means the same script can adapt to forex, JPY pairs, gold, or index-style symbols more consistently, assuming the pip mode is set correctly. :contentReference {index=8}
3) RECLAIM RULE
A sweep alone is not enough.
After the level is taken, the script requires reclaim behavior. It supports two reclaim interpretations:
Close Back Inside:
price must close back inside the swept level.
Strong Reclaim:
price must close back inside the swept level and also close beyond the candle midline in the reclaim direction.
This is important because many sweep candles do not actually reclaim decisively. The reclaim rule exists to distinguish “level taken” from “level taken and then actively rejected back through.” :contentReference {index=9}
4) CANDLE QUALITY FILTERS
The script evaluates sweep-candle quality using:
- minimum wick percentage,
- maximum body percentage,
- minimum candle range in pips.
This means the framework prefers sweeps where the wick expresses the actual sweep behavior and the body does not dominate too heavily relative to the total candle. The minimum-range filter helps avoid very small candles that technically sweep a level but do not carry enough information.
The script also allows:
- long confirmation must be bullish,
- short confirmation must be bearish.
These body-direction filters make the confirmation stricter and help align the final signal with the intended reclaim direction. :contentReference {index=10}
5) OPTIONAL EMA CONTEXT
The script includes an optional EMA trend filter using a configurable EMA length.
If enabled:
- long-side confirmations require price above the EMA,
- short-side confirmations require price below the EMA.
This does not turn the script into a full trend-following system. Instead, it acts as a directional context filter designed to reduce signals that reclaim against the selected EMA bias. :contentReference {index=11}
6) CONFIRMATION WINDOW
The script does not require the final entry to happen only on the exact sweep candle.
Instead, when a valid sweep is detected, it can remain eligible for a limited number of bars. During that confirmation window, the script checks whether the final bullish or bearish confirmation conditions are met.
This matters because some traders want the sweep candle itself to reclaim strongly, while others want to allow one or two bars for the actual confirmation to develop. The confirmation window makes that possible without letting very old sweep conditions remain valid indefinitely. :contentReference {index=12}
7) MIDLINE CONFIRMATION
The script also supports an optional requirement that price close beyond the midpoint of the sweep candle.
For bullish confirmation:
price must close above the sweep candle midpoint.
For bearish confirmation:
price must close below the sweep candle midpoint.
This adds an additional reclaim-strength condition and is intended to reduce weaker closes that technically qualify but do not show enough directional reclaim behavior. :contentReference {index=13}
8) SIGNAL COOLDOWN
The script includes a cooldown period between signals.
Once a signal fires, the framework waits the configured number of bars before allowing a new one. This reduces clustered signals and prevents the chart from rapidly stacking similar setups in a short space of time. :contentReference {index=14}
9) QUALITY SCORE
The script computes an internal quality score for the sweep using a weighted combination of:
- wick contribution,
- body contribution,
- candle-range contribution,
- EMA alignment,
- reclaim success,
- and midline-break success.
This score is used as an internal summary of signal quality and also appears in the panel or labels depending on the visual configuration.
The score is not a guarantee of outcome. It is simply an internal ranking model that summarizes how well the current setup meets the script’s own filter conditions. :contentReference {index=15}
10) TRADE SIMULATION
When enabled, the script can simulate a fixed-risk trade projection.
For long signals:
- entry is placed at close,
- TP is placed above entry by the selected take-profit pip distance,
- SL is placed below entry by the selected stop-loss pip distance.
For short signals:
- entry is placed at close,
- TP is placed below entry by the selected take-profit pip distance,
- SL is placed above entry by the selected stop-loss pip distance.
The simulation can also:
- block new signals while a trade is active,
- keep or hide stopped trades,
- draw entry zone, target zone, stop zone, entry line, invalidation line, and projection line,
- track total trades, wins, losses, and net pips.
This is a chart-review tool, not an execution engine. Its purpose is to make the framework easier to inspect after the signal appears. :contentReference {index=16}
11) SAME-BAR PRIORITY
In the version you shared, same-bar TP/SL handling is conservative: if both target and stop appear to be touched on the same bar after entry, SL takes priority. This matters because bar data alone does not reveal exact intrabar order, and a strict rule prevents artificially optimistic results. :contentReference {index=17}
12) PANEL AND STATE MODEL
The status panel summarizes the current internal state of the framework. It can display items such as:
- whether simulation is on,
- current EMA-based bias,
- sweep state,
- signal state,
- quality score,
- volatility state,
- session state,
- risk state,
- total trades,
- win rate,
- net pips,
- max drawdown in pips.
This panel is meant to condense the script’s state into one readable location rather than force the user to infer everything visually from price bars and labels alone. :contentReference {index=18}
WHAT MAKES THIS SCRIPT ORIGINAL
This script uses familiar building blocks such as:
- pivots,
- liquidity sweeps,
- EMA filtering,
- candle wick/body analysis,
- fixed TP/SL simulation,
- status panels.
Those building blocks are not original by themselves.
The originality of this script is not in inventing a completely new primitive indicator. The originality lies in how those familiar elements are arranged into one selective workflow:
pivot-based liquidity storage
→ minimum-distance sweep detection
→ reclaim validation
→ wick/body/range quality filtering
→ optional EMA alignment
→ limited-bar confirmation
→ cooldown control
→ fixed-risk trade projection
→ status-panel review
That full sequence is the main reason this script exists as its own publication.
It is not intended to be simply another pivot script, another stop-hunt detector, another EMA tool, or another TP/SL box script. It is specifically a liquidity-reclaim entry framework that combines structural level storage, sweep validation, candle-quality filtering, confirmation logic, and projected review in one workflow. :contentReference {index=19}
WHAT APPEARS ON THE CHART
Depending on settings, the chart may display:
- EMA filter,
- sweep guides,
- signal markers,
- BUY / SELL labels,
- signal bar coloring,
- entry zone,
- target zone,
- stop zone,
- entry line,
- invalidation line,
- projection path,
- status panel,
- TP / SL hit labels.
Users who want a cleaner chart can disable some visual components and keep only the layers most relevant to their workflow. :contentReference {index=20}
HOW TO USE THE SCRIPT
A practical workflow is:
1. Add the script to a standard candlestick chart.
2. Choose the correct pip mode for the instrument you are analyzing.
3. Set the pivot length and stored-level count to define how the script builds liquidity references.
4. Set the minimum sweep distance so trivial level violations are filtered out.
5. Choose the reclaim rule you want to use.
6. Configure candle-quality filters such as wick %, body %, and minimum range.
7. Decide whether to use the EMA trend filter.
8. Decide whether to require midline confirmation.
9. Choose the confirmation window and cooldown length.
10. If simulation is enabled, set TP and SL distances and decide whether new signals should be blocked while a trade is active.
11. Wait for a confirmed bullish or bearish liquidity reclaim.
12. Use the projected trade structure and panel as an analysis framework rather than as a blind instruction.
13. Review how the same rules behave over time and across symbols before relying on the framework in a live decision process. :contentReference {index=21}
This script is best understood as a structured decision-support and chart-review tool, not as a fully self-sufficient trading system.
SETTINGS REFERENCE
Trend Filter
- EMA Length: sets the EMA used for optional directional context.
- Use EMA Trend Filter: enables or disables EMA filtering.
Pip Settings
- Pip Mode: controls how pip size is interpreted for the current instrument.
Liquidity Sweep Detection
- Swing Pivot Length: defines the pivot depth used to create liquidity levels.
- Stored Liquidity Levels: controls how many recent levels remain in memory.
- Minimum Sweep Distance (Pips): defines how far price must move beyond a level to count as a sweep.
- Reclaim Rule: selects whether reclaim is based on close back inside or a stronger reclaim condition.
Candle Quality Filters
- Minimum Sweep Wick %: minimum wick contribution required from the sweep candle.
- Maximum Body %: maximum body share allowed for the sweep candle.
- Minimum Candle Range (Pips): minimum size required for the sweep candle.
- Long Confirmation Must Be Bullish: requires bullish body for long confirmations.
- Short Confirmation Must Be Bearish: requires bearish body for short confirmations.
Entry Confirmation
- Max Bars After Sweep For Confirmation: limits how many bars can pass before confirmation expires.
- Require Sweep Candle Midline Break: adds midpoint-based reclaim confirmation.
- Cooldown Bars Between Signals: prevents signals from clustering too closely.
Trade Simulation
- Enable Internal Trade Simulation: enables or disables projected trade logic.
- Take Profit (Pips): projected target distance.
- Stop Loss (Pips): projected stop distance.
- Block New Signals While Trade Is Active: prevents overlapping simulated trades.
- Show Stopped Trades: controls whether stopped-out trades remain visible.
Visual Settings
- Show Signal Labels: shows or hides BUY / SELL labels.
- Show Entry Line: shows or hides the projected entry line.
- Show Status Panel: enables or disables the panel.
- Color Signal Bars: colors confirmed signal bars.
- Show Sweep Guides: enables or disables sweep-guide visuals.
- Guide Extension Bars: controls how far guides extend.
- Signal Label Size: controls label size.
- Panel Position: controls panel location. :contentReference {index=22}
IMPORTANT PRACTICAL NOTE ON PIP MODE
The script uses pip-based calculations for:
- sweep distance,
- minimum candle range,
- take-profit distance,
- stop-loss distance.
Because of that, pip interpretation is critical.
If sweeps appear too small, too large, too frequent, too rare, or if projected TP/SL distances look inconsistent for the instrument being analyzed, the first setting to verify is Pip Mode. This is especially important on gold, JPY pairs, index-style symbols, and broker-specific tick formats. :contentReference {index=23}
LIMITATIONS AND SHORTCOMINGS
This script has important limitations:
- It is a liquidity-reclaim model, not a full market-structure engine.
- It only evaluates sweeps of stored pivot-based levels.
- It does not identify fair value gaps, order blocks, or discretionary structure beyond the stored liquidity levels.
- Signal quality depends heavily on the selected wick/body/range filters.
- EMA filtering is optional and only provides one form of directional context.
- The confirmation window can materially change signal frequency and behavior.
- The simulation layer uses simplified projected TP/SL logic and is not equivalent to real execution.
- Same-bar TP/SL handling uses a rule-based priority rather than true intrabar reconstruction.
- Historical projected outcomes should not be interpreted as guaranteed tradable results.
- No sweep-based model can remove all false signals or all regime-dependent behavior.
For those reasons, the script should be used as a structured analysis and review framework, not as a promise of future profitability. :contentReference {index=24}
WHO THIS SCRIPT MAY BE USEFUL FOR
This script may be useful for traders who:
- focus on liquidity sweeps and reclaim behavior,
- want a rules-based alternative to purely discretionary sweep reading,
- want candle-quality filters in addition to simple level breaks,
- want optional EMA context for directional alignment,
- want projected entry/TP/SL structure on the chart,
- want a compact state panel for monitoring the framework.
It may be less suitable for traders who:
- want a minimal pivot-only tool,
- want a complete multi-concept smart-money framework,
- want a full execution engine,
- want historical projected results to be treated as live-performance evidence.
DISCLAIMER
This script is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
Market conditions change, historical behavior does not guarantee future results, and users should perform their own analysis, validation, and risk management before using the script in live decision-making. 지표

RSI Entry EngineRSI Entry Engine
RSI Entry Engine is an open-source RSI-based entry framework built around one specific analytical idea:
when a smoothed RSI leaves an extreme condition and reclaims back through a defined threshold, that reclaim can be treated as a structured entry event rather than as a generic oscillator fluctuation.
This script is not designed to mark every RSI movement, and it is not intended to behave like a generic “overbought / oversold indicator” that treats all oscillator readings the same way. Its purpose is to smooth RSI behavior, define a hierarchy of RSI states, detect reclaim-style transitions out of extreme zones, and optionally map those reclaim events into a projected risk framework directly on the price chart.
The script also includes a compact status panel and an alert structure so users can monitor RSI condition, internal signal state, and projected trade behavior in a more organized way. These features are included to support analysis and review, not to imply future performance.
OPEN-SOURCE NOTE
This script is published open-source so users can inspect the logic directly, verify what the script is doing, and adapt parts of the workflow for their own research if they wish.
Even though the code is open, this description is intentionally detailed because many TradingView users do not read Pine Script. The goal is for a user to understand what the script does, how it works, why its parts belong together, and how it may be used in practice without having to study the code line by line.
OVERVIEW
At a high level, the script does seven things:
1. It calculates a base RSI from a selected source and length.
2. It optionally smooths that RSI and also derives a separate signal line from the smoothed RSI.
3. It organizes RSI values into multiple zones such as overbought, oversold, extreme high, extreme low, bullish, bearish, and neutral.
4. It detects reclaim-style entry signals when the smoothed RSI exits an extreme condition by crossing back through the selected extreme boundary.
5. It can project entry, stop loss, and take profit structure onto the main chart.
6. It can maintain a compact status panel summarizing RSI state, momentum, and structure.
7. It provides alert conditions for RSI / signal crosses, reclaim events, centerline transitions, and optional trade outcomes.
The script is therefore meant to function as a complete RSI reclaim-entry and review framework rather than as a single-purpose oscillator plot.
CORE IDEA
Many RSI tools are used in one of two broad ways:
- as a visual overbought / oversold reference,
- or as a simple cross-based signal tool.
This script takes a narrower and more structured approach.
Its main idea is that a reclaim out of an extreme zone may be more useful than the extreme reading by itself.
In other words, the script does not assume that simply being overbought or oversold is enough. Instead, it focuses on the transition that occurs when smoothed RSI moves out of a more extreme condition and crosses back through a defined reclaim threshold.
That is the reason the main signal model is based on:
- reclaim above the extreme-low boundary for a bullish entry event,
- reclaim below the extreme-high boundary for a bearish entry event.
This means the script is not centered on “RSI is high” or “RSI is low” alone. It is centered on the moment when a smoothed oscillator moves from extreme positioning into a reclaim state that can be interpreted as a structured shift in short-term momentum.
WHY THIS SCRIPT IS NOT A SIMPLE MASHUP
This script combines several components, but they are not included simply to add more features to one publication.
Each part has a specific role inside the same analytical workflow:
- The RSI engine defines the core oscillator state.
- The smoothing layer reduces noise and makes reclaim logic less reactive to small fluctuations.
- The signal line provides a secondary internal reference for oscillator structure.
- The zone system divides RSI behavior into interpretable states such as neutral, bullish, bearish, oversold, overbought, and extreme conditions.
- The reclaim logic defines the actual entry event.
- The trade projection layer maps that event onto the price chart using entry, stop, and target logic.
- The panel and alerts organize the resulting information for monitoring and review.
These parts are interdependent.
Without RSI calculation, there is no oscillator framework.
Without smoothing, reclaim logic becomes more sensitive to noise.
Without the level structure, reclaim events lose contextual meaning.
Without the reclaim rule, the script becomes a more generic RSI plot.
Without trade projection, the user still has to manually draw entry, stop, and target after each signal.
Without the panel and alerts, the script offers less structure for monitoring and review.
For that reason, the script is intended as a single RSI reclaim-entry framework, not as a random collection of unrelated features.
WHAT THE SCRIPT DOES
The script calculates RSI from a selected source and length, then optionally smooths it using one of several averaging methods.
It also creates a signal line from the smoothed RSI.
Once those two internal series exist, the script can:
- classify RSI state using multiple threshold levels,
- highlight extreme conditions visually,
- detect reclaim signals out of extreme zones,
- plot labels on the RSI pane,
- project BUY / SELL trade structures on the main price chart,
- update TP / SL boxes over time,
- show a compact state panel,
- create alerts for multiple RSI-related events.
This means the script is not just an oscillator display. It is an oscillator-driven entry framework with optional on-chart trade projection.
HOW THE SCRIPT WORKS
1) RSI ENGINE
The script begins with a standard RSI calculation based on a user-selected source and length.
That raw RSI can then be smoothed using one of several methods:
- None,
- EMA,
- SMA,
- RMA.
The smoothed RSI is the main series used for interpretation and signaling.
A second line called the signal line is then derived from the smoothed RSI using its own smoothing method and length.
This creates two internal oscillator references:
- the smoothed RSI itself,
- and a signal line built from that smoothed RSI.
The spread between those two series is also used in the panel to describe whether RSI is currently above or below its signal structure.
2) RSI STATE MODEL
The script does not treat RSI as a single binary oscillator. It organizes RSI values into multiple states:
- Extreme High,
- Overbought,
- Bullish,
- Neutral,
- Bearish,
- Oversold,
- Extreme Low.
These states are determined by the user-defined threshold levels:
- Overbought,
- Oversold,
- Extreme High,
- Extreme Low,
- and the centerline area around 50.
This state model is important because it gives the reclaim signals context. A reclaim signal is not interpreted in isolation; it is interpreted relative to where the smoothed RSI has been and which region it is leaving.
3) LEVEL STRUCTURE
The script plots:
- 0,
- 100,
- 50 centerline,
- Overbought,
- Oversold,
- Extreme High,
- Extreme Low.
It also fills the overbought and oversold regions for easier visual reading, and can optionally highlight the background when RSI is in an extreme condition.
This visual structure is not only cosmetic. It helps the user see why the script treats certain transitions differently from ordinary oscillator movement.
4) PRIMARY ENTRY SIGNAL MODEL
The main entry logic is reclaim-based.
Bullish entry event:
- the smoothed RSI crosses upward through the Extreme Low level,
- and the bar must be confirmed on close.
Bearish entry event:
- the smoothed RSI crosses downward through the Extreme High level,
- and the bar must be confirmed on close.
This means the script does not trigger merely because RSI becomes extreme. Instead, it waits for RSI to transition back through the selected extreme boundary.
That distinction is important.
A low RSI reading alone can persist for multiple bars.
A reclaim above the extreme-low threshold is a different event.
Likewise, a high RSI reading alone can persist,
but a reclaim downward through the extreme-high threshold is a different event.
The script is built around that reclaim event rather than around static RSI position alone.
5) BAR-CLOSE CONFIRMATION
Signals are confirmed only on bar close.
This is an important implementation detail because RSI can move intrabar and then reverse before the bar closes. By requiring confirmation on the close, the script avoids treating temporary intrabar movement as a completed reclaim signal.
This makes the signal model more conservative and more stable.
6) OPTIONAL TRADE PROJECTION
When a valid bullish or bearish reclaim signal appears, the script can optionally project a trade framework onto the main price chart.
This is done even though the script itself is plotted in a separate RSI pane.
Depending on settings, the projection includes:
- entry reference,
- stop-loss calculation,
- take-profit projection,
- TP box,
- SL box,
- entry line,
- BUY or SELL label.
The user can choose the entry reference method:
- Close,
- Open,
- HLC3.
The user can also choose the stop-loss mode:
- Signal Candle,
- ATR,
- Percent.
This means the script separates signal generation from risk projection. The reclaim event comes from RSI behavior, but the projected stop logic can be adapted to different preferences.
7) STOP-LOSS MODES
The script supports three stop-loss methods:
Signal Candle:
The stop is based on the high or low of the signal candle, depending on trade direction.
ATR:
The stop is based on ATR distance from the projected entry.
Percent:
The stop is based on a percentage distance from entry.
This allows the same reclaim signal model to be projected using different risk frameworks without changing the core RSI logic.
8) TAKE-PROFIT PROJECTION
Take profit is projected using a risk/reward multiple applied to the chosen stop distance.
This means the target is not arbitrary. It is derived from the actual stop distance created by the selected stop-loss mode and then multiplied by the chosen RR value.
This makes the trade projection internally consistent:
signal
→ entry method
→ stop-loss method
→ risk distance
→ take-profit distance.
9) SAME-BAR TP / SL PRIORITY
The script includes an explicit rule for bars where both TP and SL appear to be touched after entry.
The user can choose whether the same-bar priority should be:
- SL,
- or TP.
This is an important implementation detail because it affects projected review behavior. Without an explicit priority rule, same-bar ambiguity can produce inconsistent outcome interpretation.
10) TRADE BOX MAINTENANCE
The script stores projected trades internally and extends TP / SL boxes and entry lines forward as long as the trade remains active.
It also limits how many historical projected trades remain visible by using a maximum stored trade setting. This keeps the chart more manageable and prevents the projection layer from expanding indefinitely.
11) STATUS PANEL
The script includes a compact panel that can display:
- the current RSI value,
- the signal-line value,
- the current RSI state,
- short-term momentum direction based on RSI change,
- whether RSI is above or below its signal line.
This panel is designed to summarize the oscillator’s state without requiring the user to read every value directly from the plot.
12) ALERT STRUCTURE
The script can generate alerts for several types of events:
- RSI crossing above its signal line,
- RSI crossing below its signal line,
- RSI reclaiming above oversold,
- RSI rejecting below overbought,
- RSI crossing above the centerline,
- RSI crossing below the centerline,
- bullish reclaim entry signal,
- bearish reclaim entry signal,
- projected TP hit,
- projected SL hit.
This allows the script to be used either visually or as an alert-based monitoring tool.
WHAT MAKES THIS SCRIPT ORIGINAL
This script uses familiar technical-analysis building blocks such as:
- RSI,
- smoothing methods,
- threshold zones,
- ATR-based risk projection,
- percentage-based stops,
- RR-based targets,
- on-chart annotation.
Those building blocks are not original by themselves.
The originality of this script is not in inventing a completely new oscillator primitive. The originality lies in how those familiar elements are arranged into one structured RSI reclaim workflow:
RSI calculation
→ smoothing
→ signal-line derivation
→ multi-zone RSI state model
→ reclaim detection out of extreme conditions
→ optional on-chart trade projection
→ panel-based monitoring
→ alert and review behavior
That full sequence is the main reason this script exists as its own publication.
It is not intended to be simply another RSI plot, another overbought / oversold overlay, another signal-line cross tool, or another TP / SL box script. It is specifically an RSI reclaim-entry framework that combines oscillator conditioning, reclaim detection, projection, and monitoring in one workflow.
WHAT APPEARS ON THE CHART
Depending on settings, the script may display in the RSI pane:
- smoothed RSI,
- the signal line,
- 0 / 100 bounds,
- centerline,
- overbought and oversold levels,
- extreme-high and extreme-low levels,
- overbought / oversold zone fill,
- optional extreme background highlights,
- UP / DOWN labels,
- a status panel.
On the main price chart, it may also display:
- BUY / SELL labels,
- entry line,
- TP box,
- SL box,
- TP hit labels,
- SL hit labels.
This split design is intentional. RSI analysis remains in the oscillator pane, while projected execution structure appears on the price chart.
HOW TO USE THE SCRIPT
A practical workflow is:
1. Add the script to a chart and choose the RSI source and RSI length.
2. Select whether the RSI should remain raw or be smoothed.
3. Configure the signal line used for internal oscillator structure.
4. Set the overbought, oversold, extreme-high, and extreme-low thresholds.
5. Decide whether you want trade projection on the main chart.
6. Choose entry mode, stop-loss mode, and risk/reward multiple.
7. Wait for a bullish or bearish reclaim signal to be confirmed on bar close.
8. Use the projected trade structure as an analysis framework rather than as a blind instruction.
9. Use the panel and alerts to monitor RSI state and signal transitions.
10. Adjust settings only after reviewing how the same logic behaves across the symbols and timeframes you actually use.
This script is best understood as a structured decision-support and review tool, not as a self-sufficient automated trading system.
SETTINGS REFERENCE
RSI Engine
- RSI Source: input source used for RSI calculation.
- RSI Length: length of the base RSI.
- RSI Smoothing: smoothing method applied to raw RSI.
- Smoothing Length: length of the first smoothing stage.
- Signal Length: length of the signal line.
- Signal Smoothing: smoothing method used for the signal line.
Zones
- Overbought: upper reference threshold.
- Oversold: lower reference threshold.
- Extreme High: upper extreme reclaim boundary.
- Extreme Low: lower extreme reclaim boundary.
Visuals
- Highlight Extreme Background: highlights the panel background during extreme conditions.
- Show Status Panel: enables or disables the panel.
- Panel Position: controls panel location.
- Panel Text Size: controls panel text size.
Trade Engine
- Show TP / SL Boxes On Main Chart: enables or disables price-chart projection.
- Entry Price: selects the projected entry reference.
- Stop Loss Mode: selects how stop loss is calculated.
- Risk Reward: sets the take-profit multiple.
- ATR Length: ATR length used when ATR stop mode is selected.
- ATR Multiplier: ATR multiplier used for ATR stop mode.
- Percent Stop Loss: percentage stop value used in Percent mode.
- Same Bar TP/SL Priority: defines which outcome wins when both are touched on one bar.
- Max Stored Trade Boxes: limits how many projected historical trades remain visible.
Alerts
- Enable RSI / Signal Cross Alerts: alerts for oscillator / signal crosses.
- Enable OB / OS Reclaim Alerts: alerts for reclaim behavior around overbought / oversold.
- Enable Centerline Alerts: alerts for 50-line crosses.
- Enable Entry Signal Alerts: alerts for bullish and bearish reclaim entries.
- Enable TP / SL Hit Alerts: alerts for projected trade outcomes.
IMPORTANT PRACTICAL NOTES
This script depends heavily on the chosen RSI thresholds.
If thresholds are too wide, signals may become very rare.
If thresholds are too narrow, signals may become too frequent.
Signal quality and frequency will also change depending on:
- RSI length,
- smoothing method,
- signal-line length,
- timeframe,
- symbol volatility,
- stop-loss mode.
Because trade projection is built from RSI events rather than from direct price-structure analysis, the projected boxes should be understood as a standardized review layer, not as proof that the market itself respects those projected levels.
LIMITATIONS AND SHORTCOMINGS
This script has important limitations:
- It is an oscillator-based reclaim model, not a full market-structure system.
- It does not identify support and resistance or discretionary chart structure.
- It does not claim that all extreme RSI conditions will reverse.
- It does not use volume profile, order flow, or trend structure beyond the oscillator model itself.
- Its signals depend on smoothing choices and threshold definitions.
- Projected TP / SL outcomes depend on the chosen entry and stop-loss method.
- Same-bar ambiguity is handled by a rule, not by true intrabar reconstruction.
- Historical projected trade behavior should not be interpreted as guaranteed live performance.
- No RSI-based reclaim model can remove all false signals or all regime-dependent behavior.
For those reasons, the script should be used as a structured analysis and review framework, not as a promise of future profitability.
WHO THIS SCRIPT MAY BE USEFUL FOR
This script may be useful for traders who:
- use RSI as a state and transition tool rather than as a static threshold indicator,
- care about reclaim behavior out of extreme zones,
- want optional projected risk structure on the price chart,
- want a compact RSI-state panel,
- want alert-based monitoring of oscillator events.
It may be less suitable for traders who:
- want a pure trend-following tool,
- want structural support / resistance logic,
- want a complete strategy with no need for outside confirmation,
- want projected trade statistics to be treated as live-execution evidence.
DISCLAIMER
This script is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
Market conditions change, historical behavior does not guarantee future results, and users should perform their own analysis, validation, and risk management before using the script in live decision-making. 지표

Reaction Entry EngineReaction Entry Engine
Reaction Entry Engine is an open-source supply and demand reaction indicator built around one specific analytical idea:
the first meaningful return into a structurally valid zone can carry different information than later retests of the same area.
This script is not designed to mark every possible touch of every level, and it is not intended to behave like a generic supply and demand overlay that treats repeated interaction the same way. Its purpose is to build supply and demand zones from confirmed pivot structure, optionally validate the strength of the move that created the zone, rank the zone using an internal quality model, detect first-touch reactions, and map those reactions into a structured on-chart framework for analysis and review.
The script also includes review panels so users can inspect how projected setups behaved over time under the current settings. Those review tools are included to support study and comparison, not to imply future performance.
OPEN-SOURCE NOTE
This script is published open-source so users can inspect the logic directly, verify what the script is doing, and adapt parts of the workflow for their own research if they wish.
Even though the code is open, this description is intentionally detailed because many TradingView users do not read Pine Script. The goal is for a user to understand what the script does, how it works, why its parts belong together, and how it may be used in practice without having to study the code line by line.
OVERVIEW
At a high level, the script does six things:
1. It builds supply and demand zones from confirmed pivot structure.
2. It can source those zones from the chart timeframe, from a higher timeframe, or from both.
3. It can filter weak formations by checking whether the move surrounding the pivot had enough directional strength.
4. It can score zone quality using post-formation displacement, reaction behavior, penetration depth, and repeated-touch penalties.
5. It can detect first-touch reactions into valid zones.
6. It can project entry, stop, and target structure on the chart and summarize projected historical behavior in review panels.
The script is therefore meant to function as a complete first-touch zone reaction framework rather than as a single-purpose zone-drawing tool.
CORE IDEA
Many structural tools identify areas where price may react, but they do not distinguish clearly between the first meaningful return into a zone and later repeated interaction with that same area.
This script is built around the idea that those two situations are not necessarily equivalent.
A fresh or relatively intact zone may behave differently from a zone that has already been tested multiple times. Because of that, the script does not treat all contact events in the same way. It attempts to organize the workflow into a more selective sequence:
first identify structure,
then filter weak structure,
then rank remaining zones,
then focus on the earliest qualifying return,
then map that return into a consistent visual framework for review.
This narrower focus is the main reason the script exists in its current form.
WHY THIS SCRIPT IS NOT A SIMPLE MASHUP
This script combines multiple components, but they are not included simply to place more features into one publication.
Each component has a specific function inside the same analytical process:
- Zone construction defines the structural areas.
- Multi-timeframe sourcing expands or narrows the structural map.
- The impulse filter reduces zones formed without meaningful directional expansion.
- The quality engine separates stronger and weaker structural candidates.
- The first-touch logic makes the model more selective than a repeated-touch zone script.
- The projection layer reduces the need for manual chart annotation after a setup appears.
- The review panels allow the user to examine projected historical behavior under the chosen settings.
These layers are interdependent.
Without the zone engine, there is no structural area to evaluate.
Without impulse validation, the model accepts more weak or noisy pivots.
Without quality scoring, all detected zones are treated too similarly.
Without first-touch logic, the script behaves more like a generic touch-based zone tool.
Without the projection layer, the user still has to manually draw entry, stop, and target structure after each setup.
Without the review layer, the user has less organized feedback when comparing settings or reviewing behavior across time.
For that reason, the script is intended as a single first-touch supply and demand reaction framework, not as a random collection of unrelated features.
WHAT THE SCRIPT DOES
The script identifies supply and demand zones from confirmed pivot highs and pivot lows.
Once a zone is created, the script can continue to monitor it and decide whether it should remain only as a structural reference or whether it qualifies for deeper evaluation inside the reaction framework.
Depending on settings, the script can:
- draw supply and demand zones,
- create zones from the chart timeframe,
- create zones from a selected higher timeframe,
- merge nearby zones of the same type,
- classify zones using an internal quality model,
- detect first-touch BUY or SELL reactions,
- project entry, stop loss, and take profit structure,
- retain historical projected trades on the chart,
- summarize projected behavior in performance and daily review panels.
This allows the chart to function not only as a zone map, but also as a structured review environment for the script’s own reaction model.
HOW THE SCRIPT WORKS
1) SUPPLY AND DEMAND ZONE CONSTRUCTION
The script uses pivot highs and pivot lows to define structural areas.
A pivot high can produce a supply zone.
A pivot low can produce a demand zone.
Rather than treating a pivot as one exact price, the script expands the pivot into a zone using a configurable pip-based thickness. This is important because many traders interpret supply and demand as areas rather than as single lines.
The script can build zones from:
- the current chart timeframe,
- a selected higher timeframe,
- or both at the same time.
If nearby zones of the same type are close enough to one another, the script can merge them into a broader structural area. This is meant to reduce overlap and make the displayed structure easier to read.
2) CONFIRMED ZONE LOGIC
The script includes a minimum-touch setting for confirmed zones.
This setting allows users to distinguish between:
- zones that have merely been detected,
- and zones that have accumulated enough interaction to be considered more established.
Different traders interpret this differently. Some prefer relatively fresh zones. Others prefer zones that have already shown repeated market interaction. The script is designed to support both approaches through settings rather than by forcing one interpretation.
3) TOUCH DETECTION
Zone interaction can be recognized using:
- wick touch,
- body touch,
- or both.
This affects how strict or permissive the model is when determining whether price has returned into a zone.
A wick-based model can capture sharp rejections that only briefly enter the area.
A body-based model is stricter and may reduce noise.
Using both provides broader coverage.
This means the same structural framework can be adapted to different preferences without changing the core logic of the script.
4) IMPULSE VALIDATION
Not every pivot represents meaningful structure.
Some pivots are formed during weak, indecisive, or noisy movement. To reduce that problem, the script can apply an impulse filter around the pivot that created the zone.
The impulse filter can evaluate factors such as:
- candle direction,
- candle range relative to ATR,
- candle body size relative to ATR,
- close location near the candle extreme,
- optional relative-volume participation.
The purpose of this filter is not to predict future direction by itself. Its purpose is simply to reduce zones that were formed without enough directional commitment.
5) QUALITY ENGINE
After a zone is created, the script can score it using an internal quality model.
The quality engine can consider:
- displacement after formation,
- reaction size after the first touch,
- penetration depth into the zone,
- repeated-touch penalty.
That information is then used to classify zones into internal grades such as:
- A,
- B,
- TRASH.
These grades are not guarantees and should not be interpreted as objective truth. They are simply the script’s own ranking method for separating stronger and weaker structural candidates under the current settings.
Users can keep all zones visible or restrict the workflow to higher-grade zones only.
6) FIRST-TOUCH REACTION MODEL
The central idea of the script is first-touch selection.
Rather than treating every revisit of a zone as equally important, the script attempts to detect the earliest qualifying return into a valid zone.
This makes the script more specific than:
- a basic supply and demand overlay,
- a general touch-alert tool,
- or a repeated-contact zone script.
For traders who consider early reactions to be structurally important, this framework may be useful because it intentionally avoids reacting in the same way to every later revisit of the same area.
7) TRADE PROJECTION LAYER
When a valid first-touch reaction is detected, the script can project a structured trade framework on the chart.
Depending on settings, this can include:
- BUY or SELL labels,
- an entry reference,
- stop loss,
- take profit,
- guide lines,
- TP and SL boxes,
- retained historical visual structure for later review.
This projection layer is not meant to claim that a setup will succeed. Its purpose is to reduce manual chart annotation and make the script’s reaction logic easier to inspect after the fact.
8) REVIEW PANELS
The script includes review panels that summarize projected historical behavior.
Depending on available chart history and current settings, the review may include metrics such as:
- total projected trades,
- wins,
- losses,
- win rate,
- profit factor,
- average result,
- net result,
- drawdown behavior,
- streak behavior.
A separate daily panel summarizes projected daily behavior according to the script’s configured timezone logic.
These panels are review tools only. They do not replace formal strategy testing, execution analysis, or live validation, and they should not be interpreted as promises of future performance.
WHAT MAKES THIS SCRIPT ORIGINAL
This script uses familiar technical-analysis building blocks such as pivots, ATR, candle structure, relative range expansion, optional volume comparison, and zone interaction logic.
Those building blocks are not original by themselves.
The originality of this script is not in inventing a completely new primitive indicator. The originality lies in how these familiar elements are arranged into one selective workflow:
pivot-based zone construction
→ optional multi-timeframe structure sourcing
→ impulse validation
→ quality scoring
→ first-touch selection
→ trade projection
→ on-chart review
That full sequence is the main reason this script exists as its own publication.
It is not intended to be simply another pivot tool, another ATR-based filter, or another chart dashboard. It is specifically a first-touch supply and demand reaction framework that combines structure detection, formation filtering, zone ranking, selective reaction logic, projection, and review in one workflow.
WHAT APPEARS ON THE CHART
Depending on settings, the chart may display:
- supply zones,
- demand zones,
- higher-timeframe zones,
- confirmed-zone coloring,
- zone labels,
- zone grades,
- BUY and SELL markers,
- entry / stop / target lines,
- TP / SL boxes,
- review panel,
- daily review panel.
Users who want a cleaner chart can disable some visual layers and keep only the ones most relevant to their workflow.
HOW TO USE THE SCRIPT
A practical workflow is:
1. Add the script to a standard candlestick chart.
2. Decide whether you want zones from the chart timeframe, from a higher timeframe, or from both.
3. Choose how strict touch detection should be by using wick touch, body touch, or both.
4. Enable the impulse filter if you want to reduce weaker pivot-based formations.
5. Enable the quality engine if you want to rank zones and restrict the workflow to stronger structural candidates.
6. Select the minimum accepted grade if you want stricter setup filtering.
7. Wait for a qualifying first-touch BUY or SELL reaction.
8. Use the projected entry, stop, and target structure as an analysis framework rather than as a blind instruction.
9. Review how prior projected setups behaved under the same settings.
10. Combine the script’s output with market context, execution rules, and risk management.
This script is best understood as a structured decision-support and chart-review tool, not as a fully self-sufficient trading system.
SETTINGS REFERENCE
Supply & Demand Engine
- Enable Supply & Demand Engine: turns structural zone detection on or off.
- Show S&D Zones: controls whether zone boxes are visible.
- Pip Value: converts pip-based calculations into instrument-specific price units.
- Pivot Left / Pivot Right: define pivot-confirmation depth.
- Use Chart Timeframe Zones: includes zones from the active chart timeframe.
- Use Higher Timeframe Zones: includes zones from the selected higher timeframe.
- Higher Timeframe: selects the HTF used for additional zone sourcing.
- Minimum Touches for Confirmed Zone: defines when a zone is considered confirmed.
- Zone Thickness (pips): controls zone thickness.
- Zone Merge Distance (pips): controls when nearby zones may be merged.
- Break Close Buffer (pips): defines the close-through buffer used in break logic.
- Maximum Stored Zones: limits how many zones remain in memory.
- Use Wick Touch / Use Body Touch: define how interaction with a zone is recognized.
Impulse Filter
- Enable Impulse Filter: turns pivot-strength filtering on or off.
- Impulse Candle Count: number of candles checked after pivot formation.
- ATR Length: ATR period used by the impulse model.
- Minimum Range x ATR: required range expansion relative to ATR.
- Minimum Body x ATR: required body expansion relative to ATR.
- Close Near Extreme: requires the candle to close near its extreme.
- Require Volume Condition: optionally adds a relative-volume filter.
- Volume SMA Length / Minimum Volume x SMA: control the volume filter.
Quality Engine
- Enable Quality Engine: turns zone scoring on or off.
- Displacement Bars: measures post-formation expansion.
- Minimum Displacement (pips): required structural push after formation.
- Reaction Window (bars): number of bars used to evaluate post-touch behavior.
- Minimum Reaction (pips): minimum bounce or rejection required.
- Maximum Penetration %: limits acceptable penetration into the zone.
- Touch Penalty: reduces score as repeated interaction accumulates.
- Hide TRASH Grade Zones: removes weaker zones from view.
- Show Grade on Zones: displays grade labels on the chart.
- Show Zone Labels / Zone Label Size: control zone-label visibility and size.
Trade Projection
- Enable Simulator: turns first-touch trade projection on or off.
- Take Profit RR: sets the target multiple relative to stop distance.
- Stop Loss (pips): sets the projected stop distance.
- Use Chart TF Signals Only: restricts projected setups to chart-timeframe zones.
- Minimum Grade: defines the lowest accepted grade for projected setups.
- Show Entry / Exit Labels: displays entry and exit labels.
- Show Entry / SL / TP Lines: displays projection lines.
- Projection Length (bars): extends projected visuals into future bars.
- Show TP / SL Boxes: displays TP and SL boxes.
- Box Fill / Border controls: change trade-box styling.
- Show Performance Panel / Panel Position: control review-panel visibility and position.
- Show Daily PnL Panel / Number of Days / Panel Position: control daily-review settings.
IMPORTANT PRACTICAL NOTE ON PIP VALUE
The script uses a Pip Value setting to convert internal pip-based distances into actual price distances.
This matters because different instruments use different decimal structures.
If zones, stop loss, take profit, or projected distances appear too compressed, too large, or otherwise inconsistent for the instrument being analyzed, the first setting to verify is Pip Value.
On some symbols, especially small-decimal forex instruments, this setting may need adjustment for the script’s structural and projection logic to behave as intended.
LIMITATIONS AND SHORTCOMINGS
This script has important limitations:
- It relies on pivot confirmation, so some structural elements are recognized only after a confirmation delay.
- Zone behavior can vary across symbols, brokers, spreads, sessions, and volatility regimes.
- Higher-timeframe zones depend on the selected timeframe and can materially change the number and spacing of setups.
- The quality engine is a ranking model, not an objective truth detector.
- The review panels reflect the script’s own projected logic and settings, not guaranteed tradable outcomes.
- The script can be sensitive to pip-conversion settings on some markets.
- First-touch logic is selective by design, so it may ignore later reactions that some traders would still consider relevant.
- No zone model can remove all false signals or all regime-dependent behavior.
For those reasons, the script should be used as a structured analysis and review framework, not as a promise of future profitability.
WHO THIS SCRIPT MAY BE USEFUL FOR
This script may be useful for traders who:
- study supply and demand behavior,
- care more about first-return reactions than repeated retests,
- want structural filtering rather than raw touch alerts,
- want automatic trade mapping for chart review,
- want historical on-chart review of projected outcomes.
It may be less suitable for traders who:
- want every zone retest marked,
- want a minimal chart with almost no overlays,
- want a finished strategy that requires no outside confirmation or discretion.
DISCLAIMER
This script is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
Market conditions change, historical behavior does not guarantee future results, and users should perform their own analysis, validation, and risk management before using the script in live decision-making. 지표

지표

Market Internals SPY[TP]# Market Internals SPY Dashboard - TradingView Publication
## 📊 Overview
**Market Internals SPY ** is a comprehensive multi-factor market sentiment dashboard designed specifically for SPY (S&P 500 ETF) traders. This indicator combines four powerful market breadth signals into one easy-to-read interface, helping traders identify high-probability setups and avoid false breakouts.
---
## 🎯 What Makes This Indicator Unique?
Unlike single-indicator tools, this dashboard synthesizes **multiple market internals** to provide confluence-based trading signals:
- **CPR (Central Pivot Range)** - Institutional pivot levels
- **VIX (Volatility Index)** - Fear gauge
- **Put/Call Ratio** - Options sentiment with dynamic crossover alerts
- ** USI:ADD (Advance/Decline Line)** - Market breadth strength
All presented in a clean, real-time dashboard with visual alerts directly on your chart.
---
## 📈 Key Features
### 1. **Static Daily CPR Levels**
- Automatically plots Top CPR, Pivot, and Bottom CPR
- Levels remain fixed throughout the trading day (no repainting)
- **Trend Bias Indicator**: Green = Current Pivot > Previous Pivot (Bullish structure)
### 2. **Put/Call Ratio Crossover System**
- 10-period SMA smoothing for cleaner signals
- **Bullish Signal** (Green background): Put/Call crosses below SMA
- Indicates decreasing hedging activity (bullish)
- **Bearish Signal** (Red background): Put/Call crosses above SMA
- Indicates increasing hedging activity (bearish)
### 3. **Price/Breadth Divergence Detection**
- **Yellow Candles**: Highlight when price and USI:ADD diverge
- Price rising but USI:ADD falling = Potential reversal
- Price falling but USI:ADD rising = Possible bottom
### 4. **Comprehensive Real-Time Dashboard**
A top-right table displaying:
- **CPR Trend Bias**: Bullish/Bearish structure
- **VIX Level**: Current value + directional bias
- **Put/Call Ratio**: Live value + trend arrows
- **AD Line**: Breadth strength with directional indicators
### 5. **Intelligent Bar Coloring**
- **Green bars**: USI:ADD rising (breadth improving)
- **Red bars**: USI:ADD falling (breadth deteriorating)
- **Yellow bars**: Divergence warning (potential reversal)
---
## 🔧 How to Use
### Setup Instructions
1. **Add to Chart**: Apply to SPY on your preferred intraday timeframe (5m, 15m, 30m, 1H)
2. **Configure Symbols** (if needed):
- Default settings work for most platforms
- If "PCC" doesn't load, try: `PCCR`, `INDEX:PCC`, `USI:PCC`, or `CBOE:PCC`
- Ensure you have market internals data access ( USI:ADD , VIX)
### Trading Signals
#### 🟢 **Bullish Confluence** (High-Probability Long Setup)
- CPR Trend = BULLISH
- VIX falling or low (<20)
- Put/Call below SMA (or green background crossover)
- USI:ADD rising (green bars)
- **Entry**: Look for bullish price action at support levels
#### 🔴 **Bearish Confluence** (High-Probability Short Setup)
- CPR Trend = BEARISH
- VIX rising or elevated (>25)
- Put/Call above SMA (or red background crossover)
- USI:ADD falling (red bars)
- **Entry**: Look for bearish rejection at resistance
#### ⚠️ **Divergence Warning**
- Yellow candles indicate mismatch between price and breadth
- Consider profit-taking or reversals when divergence appears at extremes
### Best Practices
- **Multi-Timeframe Confirmation**: Check higher timeframes (4H, Daily) for trend alignment
- **Volume Confirmation**: Combine with volume analysis for stronger signals
- **Risk Management**: Always use stop losses; no indicator is 100% accurate
- **News Awareness**: Be cautious around major economic releases
---
## 📚 Understanding the Components
### CPR (Central Pivot Range)
Traditional floor trader pivot levels calculated from previous day's High, Low, Close:
- **Pivot (PP)** = (High + Low + Close) / 3
- **Top CPR (TC)** = (PP - BC) + PP
- **Bottom CPR (BC)** = (High + Low) / 2
### VIX (Volatility Index)
- **< 15**: Complacency, potential for sudden moves
- **15-20**: Normal conditions
- **20-30**: Elevated uncertainty
- **> 30**: High fear, potential bottoming process
### Put/Call Ratio
- **< 0.7**: Excessive optimism (contrarian bearish)
- **0.7-1.0**: Balanced sentiment
- **> 1.0**: Defensive positioning (contrarian bullish potential)
### USI:ADD (NYSE Advance/Decline)
- **> 0**: More stocks advancing than declining (bullish breadth)
- **< 0**: More stocks declining than advancing (bearish breadth)
- **Extreme readings** (±2000+): Potential exhaustion
---
## ⚙️ Customization Options
### Input Parameters
- **AD Line Symbol**: Default "ADD" (try "ADVN" or "NYSE:ADD" if needed)
- **VIX Symbol**: Default "VIX" (try "CBOE:VIX" if needed)
- **Put/Call Symbol**: Default "PCC" (alternatives listed above)
### Color Scheme
- Blue: CPR levels
- Purple: Pivot point
- Green: Bullish signals/backgrounds
- Red: Bearish signals/backgrounds
- Yellow: Divergence warnings
---
## 💡 Pro Tips
1. **Wait for Confluence**: Don't trade on a single indicator - wait for 3+ signals to align
2. **Use CPR as Dynamic S/R**: Price tends to react at TC and BC levels
3. **Watch the Crossovers**: Put/Call crossovers often precede significant moves
4. **Monitor Divergences**: Yellow candles at key levels are high-value signals
5. **Combine with Price Action**: This tool confirms direction - you still need entry triggers
---
## ⚠️ Limitations & Disclaimers
- Requires **premium data** for USI:ADD and VIX on most platforms
- Best suited for **intraday SPY trading** (may adapt to other indices)
- **Not a standalone system** - use with proper risk management
- Past performance does not guarantee future results
- Always backtest before live trading
---
## 🎓 Example Scenario
**Bullish Setup**:
- 9:45 AM EST: Price pulls back to Bottom CPR
- Dashboard shows: ✅ Bullish CPR Bias, ✅ VIX 16.5 (falling), ✅ Put/Call 0.68 ⬇️ Bull, ✅ USI:ADD +850 ⬆️
- Green background flashes (Put/Call crossunder)
- **Action**: Enter long at BC with stop below TC of previous day
---
## 📊 Ideal Timeframes
- **Primary**: 5-minute, 15-minute (day trading)
- **Secondary**: 30-minute, 1-hour (swing entries)
- **Confirmation**: Daily chart for trend context
---
## 🔄 Updates & Support
This indicator is actively maintained. If you encounter symbol loading issues:
1. Check your data provider includes market internals
2. Try alternative symbols in inputs
3. Ensure you're using a premium TradingView plan (if required)
---
## 📝 Version Information
- **Version**: 5 (Pine Script v5)
- **Type**: Overlay Indicator
- **Author**: tapaspattanaik
- **Category**: Market Internals / Breadth Analysis
---
## 🏆 Final Thoughts
This indicator is designed for **serious traders** who understand that edge comes from confluence, not single signals. By combining institutional pivot levels with real-time market internals, you gain a significant advantage in reading market sentiment and timing entries with precision.
**Remember**: The best trades happen when multiple independent factors align. Use this dashboard to find those moments.
---
## 📌 How to Add This Indicator
1. Open TradingView and navigate to Pine Editor
2. Copy the complete script code
3. Click "Add to Chart"
4. Configure symbols if needed (see Setup Instructions above)
5. Adjust position/colors to your preference
---
**Happy Trading! 📈**
*This indicator is for educational purposes. Always manage risk appropriately and never risk more than you can afford to lose.*
---
### Tags
`#SPY` `#MarketInternals` `#CPR` `#VIX` `#PutCallRatio` `#BreadthAnalysis` `#DayTrading` `#SwingTrading` `#TechnicalAnalysis` `#PivotPoints` 지표

[GrandAlgo] Liquidity Pivot Cloud - LPCLiquidity Pivot Cloud (LPC) is a visualization tool that extends all pivot levels to the right, creating a structured liquidity map across the chart. Instead of treating pivot points as static levels, LPC transforms them into a dynamic cloud, highlighting key areas where price has historically reacted.
Key Features:
Extended Pivot Levels – Automatically stretches all pivot highs and lows, forming a continuous liquidity zone.
Clear Structure – Provides an organized view of price action, making it easy to identify reaction zones.
Dynamic Liquidity Map – Helps traders spot potential liquidity sweeps and areas of price absorption.
How to Use:
Identify Liquidity Zones – Areas with multiple overlapping pivots signal strong liquidity pools.
Look for Reactions – Price often consolidates, wicks, or reverses around extended pivot clouds.
Combine with Confluence – Use alongside Fair Value Gaps, Institutional Price Blocks, or Market Structure shifts for higher probability setups.
LPC aligns with smart money concepts by revealing key liquidity areas where stop hunts, liquidity grabs, and institutional activity are likely to occur. It helps traders see where price is likely to be drawn before a major move, making it a valuable tool for those trading liquidity-based strategies. 지표

Fractal Breakout Trend Following System█ OVERVIEW
The Fractal Breakout Trend Following System is a custom technical analysis tool designed to pinpoint significant fractal pivot points and breakout levels. By analyzing price action through configurable pivot parameters, this indicator dynamically identifies key support and resistance zones. It not only marks crucial highs and lows on the chart but also signals potential trend reversals through real-time breakout detections, helping traders capture shifts in market momentum.
█ KEY FEATURES
Fractal Pivot Detection
Utilizes user-defined left and right pivot lengths to detect local highs (pivot highs) and lows (pivot lows). This fractal-based approach ensures that only meaningful price moves are considered, effectively filtering out minor market noise.
Dynamic Line Visualization
Upon confirmation of a pivot, the system draws a dynamic line representing resistance (from pivot highs) or support (from pivot lows). These lines extend across the chart until a breakout occurs, offering a continuous visual guide to key levels.
Trend Breakout Signals
Monitors for price crossovers relative to the drawn pivot lines. A crossover above a resistance line signals a bullish breakout, while a crossunder below a support line indicates a bearish move, thus updating the prevailing trend.
Pivot Labelling
Assigns labels such as "HH", "LH", "LL", or "HL" to detected pivots based on their relative values.
It uses the following designations:
HH (Higher High) : Indicates that the current pivot high is greater than the previous pivot high, suggesting continued upward momentum.
LH (Lower High) : Signals that the current pivot high is lower than the previous pivot high, which may hint at a potential reversal within an uptrend.
LL (Lower Low) : Shows that the current pivot low is lower than the previous pivot low, confirming sustained downward pressure.
HL (Higher Low) : Reveals that the current pivot low is higher than the previous pivot low, potentially indicating the beginning of an upward reversal in a downtrend.
These labels provide traders with immediate insight into the market structure and recent price behavior.
Customizable Visual Settings
Offers various customization options:
• Adjust pivot sensitivity via left/right pivot inputs.
• Toggle pivot labels on or off.
• Enable background color changes to reflect bullish or bearish trends.
• Choose preferred colors for bullish (e.g., green) and bearish (e.g., red) signals.
█ UNDERLYING METHODOLOGY & CALCULATIONS
Fractal Pivot Calculation
The script employs a sliding window technique using configurable left and right parameters to identify local highs and lows. Detected pivot values are sanitized to ensure consistency in subsequent calculations.
Dynamic Line Plotting
When a new pivot is detected, a corresponding line is drawn from the pivot point. This line extends until the price breaks the level, at which point it is reset. This method provides a continuous reference for support and resistance.
Trend Breakout Identification
By continuously monitoring price interactions with the pivot lines, the indicator identifies breakouts. A price crossover above a resistance line suggests a bullish breakout, while a crossunder below a support line indicates a bearish shift. The current trend is updated accordingly.
Pivot Label Assignment
The system compares the current pivot with the previous one to determine if the move represents a higher high, lower high, higher low, or lower low. This classification helps traders understand the underlying market momentum.
█ HOW TO USE THE INDICATOR
1 — Apply the Indicator
• Add the Fractal Breakout Trend Following System to your chart to begin visualizing dynamic pivot points and breakout signals.
2 — Adjust Settings for Your Market
• Pivot Detection – Configure the left and right pivot lengths for both highs and lows to suit your desired sensitivity:
- Use shorter lengths for more responsive signals in fast-moving markets.
- Use longer lengths to filter out minor fluctuations in volatile conditions.
• Visual Customization – Toggle the display of pivot labels and background color changes. Select your preferred colors for bullish and bearish trends.
3 — Interpret the Signals
• Support & Resistance Lines – Observe the dynamically drawn lines that represent key pivot levels.
• Pivot Labels – Look for labels like "HH", "LH", "LL", and "HL" to quickly assess market structure and trend behavior.
• Trend Signals – Watch for price crossovers and corresponding background color shifts to gauge bullish or bearish breakouts.
4 — Integrate with Your Trading Strategy
• Use the identified pivot points as potential support and resistance levels.
• Combine breakout signals with other technical indicators for comprehensive trade confirmation.
• Adjust the sensitivity settings to tailor the indicator to various instruments and market conditions.
█ CONCLUSION
The Fractal Breakout Trend Following System offers a robust framework for identifying critical fractal pivot points and potential breakout opportunities. With its dynamic line plotting, clear pivot labeling, and customizable visual settings, this indicator equips traders with actionable insights to enhance decision-making and optimize entry and exit strategies.
지표

Intelligent Support & Resistance Lines (MTF)This script automatically detects and updates key Support & Resistance (S/R) levels using a higher timeframe (MTF) approach. By leveraging volume confirmation, levels are only identified when significant volume (relative to the SMA of volume) appears. Each level is drawn horizontally in real time, and whenever the market breaks above a resistance level (and retests it), the script automatically converts that resistance into support. The opposite occurs if the market breaks below a support level.
Key Features:
Multi-Timeframe (MTF) Data
Select a higher timeframe for more robust S/R calculations.
The script fetches High, Low, Volume, and SMA of Volume from the chosen timeframe.
Automatic Role Reversal
Resistance becomes Support if a breakout retest occurs.
Support becomes Resistance if a breakdown retest occurs.
Dynamic Line Width & Labeling
Each S/R line’s thickness increases with additional touches, making frequently tested levels easier to spot.
Labels automatically display the number of touches (e.g., “R 3” or “S 2”) and can have adjustable text size.
Volume Threshold
Only significant pivots (where volume exceeds a specified multiplier of average volume) are plotted, reducing noise.
Horizontal Offset for Clarity
Lines are drawn with timestamps instead of bar_index, ensuring that old levels remain visible without chart limitations.
Adjustable Maximum Levels
Maintain a clean chart by limiting how many S/R lines remain at once.
How It Works:
Pivot Detection: The script identifies swing highs and lows from the higher timeframe (timeframeSR).
Volume Check: Only pivots with volume ≥ (SMA Volume * volumeThreshold) qualify.
Line Creation & Updates: New lines are drawn at these pivots, labeled “R #” or “S #,” indicating how many times they’ve been touched.
Role Reversal: If price breaks above a resistance and retests it from above, that line is removed from the resistance array and re-created in the support array (and vice versa).
Inputs:
Timeframe for S/R: Choose the higher timeframe for S/R calculations.
Swing Length: Number of bars to consider in a pivot calculation.
Minimum Touches: Minimum required touches before drawing or updating a level.
Volume Threshold (Multiplier): Determines how much volume (relative to SMA) is needed to confirm a pivot.
Maximum Number of Levels: Caps how many S/R lines can be shown at once.
Color for Resistance & Color for Support: Customize your preferred colors for lines and labels.
Label Size: Select from "tiny", "small", "normal", "large", or "huge" to resize the labels.
Disclaimer:
This script is intended for educational purposes and should not be interpreted as financial or investment advice. Always conduct your own research or consult a qualified professional before making trading decisions. 지표

Pivot Point Profile [LuxAlgo]The Pivot Point Profile indicator groups and displays data accumulated from previous pivot points, providing a comprehensive method for prioritizing and displaying areas of interest directly given by swing highs and lows.
Users have access to common settings present in other profile-type indicators.
🔶 USAGE
The Pivot Point Profile is particularly helpful in identifying highly active reversal zones that have been visited multiple times by price. Because of this, we could generally expect these areas to serve as future points of interest, often acting as support or resistance when re-visited.
The profile displays data associated with both Pivot Highs and Pivot Lows. Each row consists of pivot high and pivot low counts side-by-side, forming the total width of the row.
By analyzing the row as a whole, we can gain a better understanding of WHERE to look for interactions.
By analyzing the pivot counts independently, we can gain a better understanding of WHAT to expect when returning to these areas.
For example:
If a row in the profile contains entirely Pivot Lows, this could be seen as an indication to look for buyers to hold that level for a continuation upwards. A break of this level could be interpreted as a lack of interest from previous buyers at this level, indicating a further move down.
🔹 Concentrated Areas
Each row in the profile displays the current count of high pivots and low pivots within the selected lookback. The largest count for each pivot direction is identified as a "Concentrated Area (CA)", these CAs are highlighted over the chart with a line displaying the average of all pivots within that CA. The CA Average is the average of all pivot points (in the majority direction) within the given row.
These can hold more importance as potential support/resistance areas.
Note: The CA Threshold can be manually adjusted to highlight all rows based on a user-selected value.
🔶 DETAILS
🔹 Calculation
The idea behind the Pivot Point Profile is a new analysis method for pivot points, taking the idea of a volume profile and adapting it to display pivot points instead of volume. By using this data, in theory, we should be able to better prioritize zones to anticipate reversals, as well as identify key levels to watch for buyer & seller interactions to use as confirmations in direction.
The (vertical) width of each row is the product of the script's "Row Size", this is the number of rows that the profile will consist of. With a max of 250, the profile can be decently granular. That being said, A more granular profile will have fewer overlapping pivot points. By decreasing the row size (Using fewer rows in the profile) you will increase the tolerance for grouping pivot points. Potentially leading to a more comprehensive Profile. Inversely, By reducing the tolerance for grouping, you will better visualize only similar highs and lows but may have noisier data to sift through.
The Profile is calculated based on a "Lookback" parameter, using only the lookback amount of previous high and low pivots to calculate the profile. Configuring this parameter alongside "Pivot Length", will allow for great control over the frame of reference of the profile.
Note: This indicator is capable of utilizing the full chart history of pivot points, this can be done by enabling the "Use Full Chart History" setting, this will cause the script will calculate from everything it has access to on your current chart.
🔹 Display
The Pivot Point Profile display can be customized to fit a various range of chart styles and visual needs. The specific settings to adjust these can be located in the "Profile Display" Section of the User Inputs.
Profile Width: Sets the Left to Right Width of the Profile. This is the maximum width that the profile will occupy and will scale to fit within this width.
Profile Offset: Sets the distance of the Profile's Axis from the current chart candle. This moves the entire profile left and right to enable to user to set the distance between the profile and the current candle.
Direction: Changes the display direction of the profile, allowing for "Left", "Right", or "Center" display styles.
🔶 SETTINGS
🔹 Pivot Point Parameters
Pivot Type: Choose between "Fractal Pivots" or "SMC Structure" to use as the basis for pivots.
Length: Sets the length for the pivot calculations.
🔹 Profile Calculations Parameters
Lookback: Sets the number of pivots to calculate within, in increments of high and low pairs. (Setting this to 1 = 1 Pivot High & 1 Pivot Low)
Use Full Chart History: Disregards the set lookback and instead uses all available chart data to calculate from.
Row Size: Sets the total number of rows to calculate the profile with.
🔹 Profile Display
Profile Width: Sets the max left & right width (in bars) that the profile will occupy.
Profile Offset: Sets the distance of the profile axis from the last chart bar.
Direction: Sets the display direction
🔹 Concentrated Areas
Highlight CAs: Extends the rows left from concentrated areas.
CA Threshold: Manually set the threshold for determining concentrated areas, when disabled, only the largest rows will be displayed.
CA Averages: Toggles the concentrated area averages for each pivot direction.
Note: CA Averages can be displayed independently without CA Highlights being displayed, and vice versa.
지표

지표

Market Pivot Levels [Past & Live]Market Levels provide a robust view of daily pivot points of markets such as high/low/close with both past and live values shown at the same time using the recently updated system of polylines of pinescript.
The main need for this script arose from not being able to use plots for daily points because plots are inherently once drawn can't be erased and because we can't plot stuff for previous bars after values are determined we can't use them reliably. And while we can use traditional lines, because we would have extremely high amount of lines and we would have to keep removing the previous ones it wouldn't be that effective way for us. So we try to do it with the new method of polylines .
Features of this script:
- Daily High/Low Points
- Yesterday High/Low/Close Points
- Pre-Market High-Low points.
Now let's preview some of the important points of code and see how we achieve this:
With the code below we make sure no matter which chart we are using we are getting the extended hours version of sessions so our calculations are made safely for viewing pre-market conditions.
// Let's get ticker extended no matter what the current chart is
tc = ticker.new(syminfo.prefix, syminfo.ticker, session.extended)
Coding our own function to calculate high's and low's because inbuilt pinescript function cannot take series and we send this function to retrieve our high's and lows.
// On the fly function to calculate daily highlows instead of tv inbuilt because tv's length cannot take series
f_highlow(int last) =>
bardiff = last
float _low = low, float _high = high
for i = bardiff to 0 by 1
if high > _high
_high := high
if low < _low
_low := low
With doing calculations at the bars of day ending points we can retrieve the correct points and values and push them for our polylines array so it can be used in best way possible.
// Daily change points
changeD = timeframe.change("D")
// When new day starts fill polyline arrays with previous day values for polylines to draw on chart
// We also update prevtime values with current ones after we pushed to the arrays
if changeD
f_arrFill(cpArrHigh, cpArrLow, prevArrh, prevArrl, prevArrc, prevMarh, prevMarl)
valHolder.unshift(valueHold.new(_high, _low, _high, _close, _low, time, pr_h, pr_l))
The rest of the code is annotated and commented. You can let me know in comments if you have any questions. Happy trading. 지표

지표

지표

지표

지표

지표

지표

지표

지표

지표
