Trend Angle Momentum [MarkitTick]💡 This tool measures market structure not just as a sequence of highs and lows, but as a rate of directional change. It detects confirmed swing pivots and then calculates the geometric angle of the trendline connecting each pivot to the one before it, translating pure price action into a single, intuitive metric: degrees of trend steepness. Instead of asking traders to infer momentum from candle shape or oscillator divergence, it hands them a number — the actual angle of ascent or descent between structural turning points — along with an optional smoothed reading of how that angle is evolving over time.
✨ Originality and Utility
Most swing-detection tools stop at marking the high or low. This script goes a step further by quantifying the relationship between consecutive swings using trigonometry. Each swing-to-swing move is converted into a percentage price change, which is then run through an arctangent function to produce a true geometric angle in degrees, independent of the instrument's absolute price scale. A move on a $2 stock and a move on a $2,000 stock that share the same percentage steepness will report the same angle, making the readings comparable across symbols and timeframes in a way that raw price-based slope calculations cannot achieve.
The utility here is twofold. First, the angle itself acts as a quantified momentum proxy: a shallow angle after a strong prior swing signals decelerating momentum well before a lagging oscillator would confirm it, while a steepening angle on successive swings signals acceleration. Second, an optional Angle Momentum layer tracks a rolling average of the last several swing angles, smoothing out single-swing noise and revealing whether the broader structural rhythm of the market is strengthening or weakening. This combination — geometric normalization plus rolling angle smoothing — gives traders a structural momentum read that is not available from stock pivot tools or generic slope indicators alone.
🔬 Methodology and Concepts
• Confirmed Pivot Detection
The script identifies swing highs and swing lows using a symmetric fractal method: a bar is only confirmed as a pivot high if it is higher than a defined number of bars to its left and right, and likewise for a pivot low. The "Left Bars" and "Right Bars" inputs control how many bars on each side must confirm the extreme. Because the right-side bars must fully close before a pivot can be validated, every pivot marked on the chart is confirmed historical structure, not a live, moving estimate — the marker is deliberately plotted with a backward offset equal to the right-bar count so that its horizontal position matches where the actual swing extreme occurred, not where it was confirmed.
• Percent-to-Angle Conversion
Once two consecutive confirmed pivots of the same type (high-to-high or low-to-low) are available, the script calculates the percentage price change between them. This percentage is then optionally normalized by the number of bars separating the two pivots (via the "Normalize Angle by Bars" input), which converts the reading from "how much did price move" into "how much did price move per bar," a more useful measure of steepness when swings vary widely in duration. The resulting rate is passed through an arctangent function and converted from radians to degrees, producing a bounded, intuitive angle: values approaching plus or minus ninety degrees represent extremely steep percentage moves, while values near zero represent flat, sideways structure.
• Angle Momentum (Optional Smoothing Layer)
When enabled, the script maintains a running array of the most recent swing angles (separately for highs and lows) and reports their simple average over a user-defined lookback length. This produces a second-order reading: rather than looking at a single swing's angle in isolation, it shows whether the sequence of recent swing angles is, on average, steep or shallow, positive or negative — a way of gauging whether structural momentum is building or fading across several swings rather than just the most recent one.
• Live Dashboard
A compact on-chart table continuously summarizes the last confirmed high pivot price, the last confirmed low pivot price, the most recent high-swing angle, the most recent low-swing angle, and whether Angle Momentum smoothing is currently active, giving traders a persistent numerical snapshot without needing to hover over chart objects.
🎨 Visual Guide
Diagonal trend lines connecting consecutive swing highs (default red/green by angle sign) and consecutive swing lows are drawn directly between the two pivot points, visually representing the geometric slope being measured.
A small numeric label at the midpoint of each swing line displays the calculated angle in degrees, colored green for a positive (upward) angle and red for a negative (downward) angle by default.
When Angle Momentum is enabled, an additional label appears at the most recent pivot showing the smoothed "Mom" value in a distinct color (orange for highs, blue for lows by default), separated visually from the raw single-swing angle label.
Cross-style markers plot at each confirmed pivot high and pivot low directly on price, offset backward to align with the actual bar where the extreme occurred.
The dashboard table (position configurable) shows the symbol, timeframe, last high and low pivot prices, the latest angle readings for each, and the current on/off state of Angle Momentum.
📖 How to Use
Treat the angle label on each swing line as a normalized momentum reading for that specific leg of price action: steep angles indicate strong directional conviction, shallow angles indicate a weakening or consolidating move.
Compare the angle of the most recent swing to the angle of the swing before it. A sequence of progressively shallower high-to-high angles during an uptrend can indicate fading bullish momentum even while price is still making new highs, a structural early warning that pure price action alone may not show.
When Angle Momentum is enabled, use the smoothed "Mom" reading as a broader confirmation layer: a rising average angle across several swings supports the idea that momentum is genuinely building, rather than reacting to a single outlier swing.
Divergences between price structure and angle behavior — for example, higher swing highs paired with a declining angle momentum reading — can be used as a discretionary caution signal ahead of a potential trend deceleration.
The two alert conditions ("High Pivot Formed" and "Low Pivot Formed") can be used to build automated or semi-automated workflows that trigger only once a swing point is fully confirmed, rather than on every bar.
⚠️ Confirmation Lag Notice
All pivots and their associated angle calculations are confirmed structure. Because a pivot cannot be validated until the required number of bars on its right side have closed, every marker, line, and label is necessarily plotted a number of bars after the actual high or low occurred, equal to the "Right Bars" setting. The plotted markers are intentionally offset backward to align visually with the true location of the swing extreme — this does not mean the indicator is predicting or anticipating pivots in real time. Traders should treat swing confirmations as lagging structural events by design, not as leading signals.
⚙️ Inputs and Settings
Left Bars / Right Bars: Define the symmetric lookback and lookahead window used to validate a swing high or low. Larger values filter out minor fluctuations and confirm only more significant structural turning points, at the cost of a longer confirmation delay. Smaller values confirm pivots faster but are more sensitive to short-term noise.
Show High Swing Lines / Show Low Swing Lines: Independently toggle the diagonal trend lines connecting consecutive high or low pivots.
Show Swing Point Dots: Toggles the cross markers plotted directly at each confirmed pivot price.
Normalize Angle by Bars: When enabled, divides the percentage move between two pivots by the number of bars separating them before calculating the angle, producing a "steepness per bar" measure rather than a raw total-move angle. Useful for comparing swings of different durations on a more equal footing.
Use Angle Momentum: Enables the rolling average smoothing layer over the last several swing angles, plotted as an additional label at each new pivot.
Angle Momentum Length: Sets how many recent swing angles are averaged together for the smoothed momentum reading. Shorter lengths react faster to recent swings; longer lengths produce a smoother, slower-changing average.
Dashboard Position / Show Dashboard: Controls visibility and screen placement of the summary table.
High Pivot Action / Low Pivot Action: Custom text tags embedded into the JSON alert payload for each pivot type, useful for routing alerts to external automation systems that key off a specific action string.
Color inputs: Independently control the color of swing lines, angle text, pivot cross markers, momentum labels, and dashboard theming to match personal charting preferences.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The core of this indicator rests on classical trigonometric slope analysis rather than any single named technical analysis school. Converting a price move into an angle is mathematically equivalent to computing the arctangent of a rate of change, the same operation used broadly in engineering and physics to express a gradient as an angular measure rather than a raw ratio. Expressing the swing-to-swing move as a percentage change before applying the arctangent function normalizes the calculation across instruments of different absolute price levels, addressing a well-known limitation of naive "price-per-bar" slope measures, which are not comparable between a low-priced and high-priced instrument, or between two different timeframes without adjustment. The optional bar-normalization step draws on the same logic used in rate-of-change and momentum oscillators broadly, where a raw price delta is scaled by the time or bar interval over which it occurred to produce a comparable velocity-style reading rather than a simple magnitude.
The pivot detection mechanism itself is a fractal/symmetric extremum test, a widely used method in swing-structure analysis (related in spirit to Bill Williams' fractal indicator and to classical Dow Theory's emphasis on confirmed swing highs and lows as the building blocks of trend structure) that requires a candidate bar to dominate a defined number of bars on both sides before being accepted as a genuine local extremum. This symmetric confirmation requirement is a standard technique for filtering transient noise out of swing-point identification, at the deliberate cost of confirmation lag, a well-documented trade-off in any lookback-based extremum detection method. The Angle Momentum layer applies a simple moving average — one of the most foundational smoothing techniques in time-series analysis — to the sequence of discrete angle readings themselves rather than to price, effectively treating "swing angle" as its own derived data series and smoothing it the same way a moving average would smooth a price or oscillator series, in order to separate signal (the underlying trend in momentum) from noise (single-swing outliers).
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Kyokutan-Ashi◈ Description
The Kyokutan-Ashi is a unique indicator designed to visualize the exact price deviation (noise) that standard Heikin-Ashi (HA) calculations normally smooth out and hide. By completely stripping away the trend component, it isolates pure market volatility and overextension.
◈ The Math Behind It (Why this calculation & Expected Output)
The core logic subtracts the Heikin-Ashi values from standard Japanese candlestick values. The purpose of this calculation is to extract the pure "difference" (noise) between the actual price and the smoothed trend, and then reconstruct it based on a chosen anchor point.
【 Calculation Example 】
Current actual candle: open = 100, high = 105, low = 95, close = 102
Previous HA candle: haOpen = 98, haClose = 100
Settings: Anchor Point = "Open", Multiplier = 1.0
haClose = (100 + 105 + 95 + 102) / 4.0 = 100.5
haOpen = (98 + 100) / 2.0 = 99
Subtract HA from standard values to isolate the noise.
rawOpen = 100 - 99 = 1
rawClose = 102 - 100.5 = 1.5
Add the isolated noise to the baseline (Anchor = Open: 100).
antiOpen = 100 + 1 = 101
antiClose = 100 + 1.5 = 101.5
【 Actual Output 】
A small bullish candle from 101 to 101.5 is plotted on the chart. Although the actual price moved from 100 to 102, removing the trend component reveals that the "pure overextension" (deviation) is only 0.5.
◈ Key Features
Pure Deviation Visualization: Shows only how far the actual price is stretching away from the Heikin-Ashi smoothed price.
Anchor & Base Settings: Choose where to project the deviation (Open, Close, or HL2).
Deviation Multiplier: Scale the noise up or down to easily spot extreme market extensions.
Chart-Type Independent: Built with robust data handling. Even if you change your main chart view to Heikin-Ashi, Renko, or Kagi, Kyokutan-Ashi always forcefully retrieves standard raw price data in the background to guarantee accurate deviation calculations.
◈ Why Use It
Use it in combination with other charts or indicators to extract your own unique noise and trading edges. When Kyokutan-Ashi prints unusually large candles, it signals that the actual price is violently snapping away from the smoothed trend — often indicating exhaustion, potential mean-reversion, or hidden volatility.
◈ Author's Note
While Kyokutan-Ashi was developed independently to address the loss of actual price data in Heikin-Ashi, I later discovered "BERLIN Candles" by lejmer. He had already recognized this critical issue and beautifully engineered a hybrid solution long before I did. I want to express my deepest respect for his foresight and pioneering work in tackling this specific problem.
Indicator

Key Levels, Trading Sessions & Dynamic Long/Short SignalsThis all-in-one PulseWire indicator is designed to streamline your daily market analysis by automatically plotting critical higher-timeframe liquidity levels, tracking major trading sessions, and highlighting potential trade directional biases in real time.
✨ Key Features
1. Dynamic Key Levels (Daily & Weekly Liquidity)
Yesterday’s Daily High & Low: Automatic projection of yesterday's key liquidity boundaries.
Previous Day High & Low: Tracks the levels from two days ago for broader context.
Previous Week High & Low: Keeps major weekly extremes clear on your lower-timeframe charts.
Custom Projections: Lines extend cleanly without cluttering past historical price action.
2. Actionable Trade Direction (Long & Short Bias Signals)
Automatic Level Sweeps/Touches: Detects when price interacts with key liquidity zones.
Visual Directional Labels:
"Buscar Long" (Look for Longs): Appears below key support / Daily Low touches with precise visual spacing.
"Buscar Shorts" (Look for Shorts): Appears above key resistance / Daily High touches.
ATR-Based Spacing: Labels and arrows dynamically adjust using Average True Range (ATR) to avoid overlapping candles or arrows across any asset (Crypto, Forex, Indices, Stocks).
3. Session Shadings & On-Screen Legend
Session Background Highlights: Customizable session ranges for Asia, London, and New York (NYC).
Reference Table: An elegant, customizable on-screen legend displaying active session colors.
Day Separators: Optional vertical lines marking the start of each new trading day.
🔔 Work Smarter: Use Alerts to Avoid Screen Fatigue
You don't need to sit in front of your charts all day waiting for levels to get touched.
Recommended Workflow:
Set Up Alerts: Create custom PulseWire alerts on the indicator when price reaches key levels or when a signal triggers.
Step Away: Go about your day while the market moves.
Evaluate & Execute: When you receive an alert notification, it simply means price has reached a key decision zone. Open your chart, evaluate price action at that moment, and decide whether or not to take the trade.
⚙️ Fully Customizable
Adjust line colors, styles, and text offsets.
Enable or disable individual sessions, daily separators, and session tables according to your trading setup. Indicator

Daily & Weekly Levels + Sessions + Legend### Daily & Weekly Levels + Sessions + Legend
This indicator is specifically designed for intraday and swing traders who rely on **Market Structure, Liquidity Sweeps, and Multi-Timeframe Analysis (ICT / SMC / Price Action)**.
It keeps your chart clean and uncluttered by projecting only the most critical key liquidity levels (Yesterday, Day Before Yesterday, and Last Week) into the present, paired with an optional background shading for major market trading sessions.
---
### 📌 Why Use This Indicator?
1. **Liquidity Sweeps & Institutional Reaction Zones:**
Previous Highs and Lows (PDH, PDL, Weekly High/Low) carry large clusters of stop-loss orders and institutional interest. This indicator automatically plots these key levels to help you identify liquidity sweeps, market reversals, dynamic support/resistance, and high-probability profit targets (TPs).
2. **Macro-to-Micro Context Without Frame Switching:**
Analyze higher timeframe (HTF) Daily and Weekly levels directly on your execution charts (1H, 15M, 5M, 1M) without constantly switching chart timeframes.
3. **Zero Session Confusion:**
Instantly track which market session is active (Asia, London, or New York) with customizable background shading and a clean, on-screen legend table.
---
### 🛠️ Key Features
* **Yesterday's Levels :** Projects yesterday's *Daily High* and *Daily Low* with exact price labels.
* **Day Before Yesterday's Levels :** Plots *Prev Day High* and *Prev Day Low* (2 days ago) to track unmitigated liquidity pools.
* **Weekly Levels:** Displays the previous week's *Weekly High* and *Weekly Low* for higher timeframe directional bias.
* **Clutter-Free Projection:** Lines extend smoothly into the future instead of cluttering historical chart price action.
* **Session Background Shading (Optional):** Highlight **Asia**, **London**, and **New York** sessions using your preferred timezone (UTC, America/New_York, Exchange).
* **Vertical Day Separator (Optional):** Draws a clean dashed vertical line marking the start of each new trading day.
* **Dynamic On-Screen Legend Table:** A customizable HUD table showing active session color references.
---
### ⚙️ Full Customization via Settings
* **Colors & Visibility:** Toggle individual levels on/off and adjust line colors and opacities independently.
* **Schedules & Timezones:** Easily adjust session hours and timezones to match your local time or traded asset class (Crypto, Forex, Indices).
* **Legend Position:** Choose table placement anywhere on your screen (Top Right, Middle Right, Bottom Right, Top Left, etc.).
---
### 💡 Practical Setup Example
1. **HTF Context (1H / 15M):** Monitor price as it approaches a key level such as *Yesterday's Low* or *Prev Day Low*.
2. **Rejection:** Watch for a liquidity sweep (price taking out the level and leaving a rejection wick).
3. **LTF Execution (5M / 1M):** Drop down to lower timeframes to confirm a Market Structure Shift (MSS) or Fair Value Gap (FVG) entry, targeting the opposite side (*Daily High*) as your Take Profit. Indicator

Support & Resistance Zones [HexaTrades]
This indicator automatically finds the price levels where the market has turned around before the places where buyers stepped in (support) and where sellers took over (resistance) and draws them as clean rectangular zones on your chart.
Instead of a thin line, each level is drawn as a zone with real thickness, because support and resistance are never one exact price; they are areas where price reacts. The zones update live, extend forward as long as they are valid, and turn into light "ghost" boxes once price finally breaks through them, so you always keep the full picture of the market's history.
Bitcoin 4h: the indicator marking support and resistance zones
How it works
- Finds swing points. A swing high is a candle whose high is higher than the 10 candles on each side of it (the "Swing Length" setting). A swing low is the same idea upside down. These are the exact spots where the market turned.
- Builds a zone from the candle. The zone covers the candle's wick from the extreme tip to the candle body. That wick is where orders actually pushed price back, so it becomes the zone.
- Keeps zone size sensible. Very small wicks get padded to a minimum height, and no zone can grow taller than a maximum height (both measured in ATR, so they adapt automatically to each market's volatility).
- Merges duplicate levels. If a new swing forms at a level that already has a zone, the two are combined into one box instead of stacking clutter on your chart.
- Watches for breaks. When a candle closes beyond a zone, the zone is "broken." what happens next is up to you (see below).
What happens after a zone breaks?
The indicator provides three different zone-management options.
Keep As Past Zone: The broken zone stops extending and remains visible as a faded historical zone. This makes it easier to review how price behaved around previous levels.
Flip Support/Resistance: A broken resistance zone becomes support, while a broken support zone becomes resistance.
This is useful for studying the common market concept of role reversal, where old resistance may act as new support and old support may act as new resistance.
Delete Zone: The zone is completely removed after it breaks. This option is useful for traders who prefer a cleaner chart showing only active zones.
Optional volume filter:
Volume-Confirmed Zones Only can be enabled to filter out lower-volume swing points.
When enabled, the volume of the swing candle must be higher than: Average Volume × Volume Multiplier
For example, with a Volume Multiplier of 1.2, the swing candle’s volume must be greater than 120% of its average volume.
The volume filter is automatically ignored when volume data is unavailable. Volume quality can vary between markets, exchanges and brokers.
Indicator settings
- Swing Length: Controls how significant a swing must be. Lower values create more zones, while higher values create fewer but potentially more significant zones.
- Maximum Zones: Limits the number of active zones displayed. When the limit is exceeded, the oldest active zone is removed.
- ATR Length: Sets the calculation period used to measure volatility.
- Minimum Zone Height: Sets the minimum zone thickness as a multiple of ATR.
- Maximum Zone Height: Prevents zones from becoming excessively wide.
- Merge Overlapping Zones: Combines overlapping or nearby active zones.
- Merge Distance: Controls the ATR-based distance used when deciding whether zones should be merged.
- Maximum Past Zones: Limits how many broken historical zones remain on the chart.
- Past Zone Transparency: Controls how clearly broken zones are displayed.
Alerts
- Built-in alerts
- Zone Touched — price entered a support or resistance zone.
- Resistance Broken — a candle broke above a resistance zone.
- Support Broken — a candle broke a support zone below.
- Set them up from PulseWire's alert dialog: Create Alert → Condition → S/R Zones.
How to use it in trading
🔶Bounce trades: when price falls into a support zone and prints a rejection candle, that's a long setup with a stop just below the zone.
A blue support zone represents an area where buyers previously entered the market.
When price returns to support:
- Wait for price to enter or test the zone.
- Look for evidence that buyers are responding.
- Consider an entry only after confirmation.
- Place the stop beyond the opposite side of the zone, with an appropriate buffer.
- Use the next resistance zone as a possible target.
Possible bullish confirmation includes:
- A candle rejecting the lower part of the zone.
- A long lower wick followed by a bullish close.
- A bullish engulfing candle.
- Price closing back above the support zone.
- Increasing volume during the reaction.
- A higher low forming near the zone.
A support touch by itself is not a long signal. Price can move directly through the zone, especially during a strong downtrend.
Example image below:
🔶Rejection from resistance
A pink resistance zone represents an area where sellers previously entered the market.
When price reaches resistance:
- Wait for price to test the zone.
- Look for signs of selling pressure.
- Consider an entry only after bearish confirmation.
- Place the stop beyond the upper edge of the zone, with a suitable buffer.
- Use the next support zone below as a possible target.
Possible bearish confirmation includes:
- A long upper wick inside the resistance zone.
- A bearish engulfing candle.
- Price entering the zone and closing back below it.
- A lower high forming near resistance.
- Increasing selling volume during the rejection.
A resistance touch alone is not a short signal. Strong bullish momentum can break through resistance without producing a meaningful reversal.
Example image:
🔶Trading a breakout
A breakout occurs when price moves beyond an active zone.
- A break above resistance may indicate increasing bullish strength.
- A break below support may indicate increasing bearish strength.
For more conservative confirmation, select Close under Break Confirmation. In this mode, a resistance zone breaks only after a candle closes above it, while a support zone breaks only after a candle closes below it.
The Wick option reacts as soon as price trades beyond the zone. It responds faster but is more sensitive to temporary spikes and false breakouts.
Before considering a breakout trade, traders may look for:
- A strong candle closing beyond the zone.
- A candle body that closes clearly outside the zone.
- Higher-than-average volume.
- Momentum in the breakout direction.
- Alignment with the broader market trend.
- A successful retest of the broken zone.
🔶Trading a role reversal
Support and resistance can sometimes exchange roles after a breakout.
-Broken resistance may later act as support.
- Broken support may later act as resistance.
Select Flip Support/Resistance under the When Broken setting to display this behaviour automatically.
For example, after price closes above a pink resistance zone, the indicator converts that area into a blue support zone. If price later returns to it, traders can watch for a bullish reaction.
Similarly, when price breaks below blue support, the indicator converts the zone into pink resistance. A later retest may provide an area to watch for bearish confirmation.
Role reversal is a commonly observed price-action concept, but it does not occur successfully after every breakout. Wait for confirmation instead of entering only because price has returned to a flipped zone.
🔶Using zones for targets and stops
Zones can also help organise trade management.
For a long setup:
- A stop may be placed below the support zone.
- The next resistance zone may be used as an initial target.
- A higher resistance zone may be considered as a secondary target if momentum remains strong.
For a short setup:
- A stop may be placed above the resistance zone.
- The next support zone may be used as an initial target.
- A lower support zone may be considered as a secondary target.
Avoid placing the stop exactly on the edge of a zone. Price may briefly move beyond the boundary before reacting. The appropriate buffer depends on the symbol, timeframe, volatility and the trader’s risk plan.
Always calculate the potential risk and reward before entering a trade. A visible zone does not automatically make a setup worth taking.
🔶 Using multiple timeframes
Higher-timeframe zones can provide broader market context, while lower timeframes can help refine entries.
A simple process is:
- Identify important support and resistance on a higher timeframe.
- Determine whether the broader structure is bullish, bearish or ranging.
- Move to the preferred trading timeframe.
- Wait for price to reach a relevant zone.
- Use candle structure, volume or momentum for confirmation.
Higher timeframes generally produce fewer but more widely watched zones. Lower timeframes produce more zones and may contain more market noise.
Support and Resistance Zones help traders identify and manage important price areas with less chart clutter. Its volatility-based sizing, zone merging, break confirmation, role reversal, and alerts make it suitable for different markets and timeframes. Use the zones as areas to watch—not automatic trade signals and always combine them with price confirmation, broader market structure and proper risk management.
We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.
Wedge pattern detector indicator is for educational and analytical purposes only. It is not financial advice. Trading involves risk. Always use proper risk management and combine this indicator with your own analysis before taking any trade.
Indicator

Bollinger-Fibonacci Trend Extension [MarkitTick]💡 This tool automates the identification of three-point corrective price structures (A-B-C swings) and projects a suite of Fibonacci-based extension targets from them, filtered through a Bollinger Band mean-reversion confirmation layer and an optional trend-strength gate. Rather than requiring a trader to manually draw retracement/extension tools every time price forms a pullback, the script continuously scans pivot structure in real time, validates the geometry of each swing against strict corrective-wave rules, and projects a set of forward-looking price zones — including a shaded "Golden Zone" between the 1.5 and 1.618 extensions — the moment a qualifying structure is confirmed.
✨ Originality and Utility
Fibonacci extension tools are common on PulseWire, but most require manual anchor placement on every swing and provide no objective criteria for which swings are valid setups. This script closes that gap by fully automating structure detection: it runs a custom zigzag engine with a significance threshold (ATR-based or percentage-based) to filter noise, then validates any three consecutive pivots against explicit corrective-structure rules (alternating high/low sequence, with the C-point required to retrace between the A and B extremes) before it will draw anything.
Two independent confirmation layers are stacked on top of raw structure detection: a Bollinger Band basis-cross filter that requires price to be trading on the correct side of its short-term mean before a new structure is accepted, and an optional ADX/DMI filter that suppresses structures formed during low directional-strength conditions. A configurable "adaptive filter" further lets traders pre-smooth the high/low series feeding the pivot engine using one of eight smoothing methods — including a Kalman filter and an LLAMA (linear-regression-slope-adjusted moving average) implementation — before pivots are ever detected, changing the sensitivity and lag characteristics of what counts as a swing point. The combination of automated, rule-based structure validation, dual confirmation filters, and selectable pre-smoothing is what differentiates this from a static or manually-drawn extension tool.
🔬 Methodology and Concepts
• Adaptive Pivot Detection
The script identifies swing highs and lows using a symmetric lookback/lookforward window (the "Pivot Lookback Depth" input): a bar qualifies as a pivot high only if no other bar within that window on either side has a higher value, and analogously for pivot lows. Traders can choose to feed this detection engine either raw high/low price or a smoothed version of it via the Adaptive Filter setting. Available smoothing methods include standard SMA, EMA, and RMA; a Double WMA (a WMA applied twice in succession, sharpening lag reduction); a Triple VWMA (volume-weighted MA applied three times); HMA (Hull Moving Average); LLAMA, a custom method that adds a linear slope projection (calculated from the change in price over the lookback window) on top of a simple average; and a lightweight Kalman filter that recursively updates a state estimate based on a fixed process/measurement noise ratio. Smoothing the pivot source changes which swings register as significant, effectively tuning the sensitivity of the whole structure-detection pipeline.
• Significance Threshold
Not every alternating high/low pair is kept — a new pivot only replaces the prior point of the same type, or is added as a new leg, if it clears a minimum distance threshold from the last opposite-type point. This threshold can be set as a multiple of ATR (Average True Range, over a configurable period) or as a fixed percentage of the current close, letting the sensitivity of the zigzag scale with volatility or stay fixed in percentage terms.
• A-B-C Structure Validation
Once at least three qualifying zigzag points exist, the script inspects the most recent three (A, B, C) to determine whether they form a valid corrective structure. A bullish setup requires the sequence low → high → low (A is a low, B a high, C a low), with the additional geometric constraint that point C must close above point A but below point B — meaning the pullback from B did not fully retrace into new lows and did not exceed the origin of the move. The bearish case is the mirror image (high → low → high, with C bounded between A and B). Structures that don't satisfy these geometric constraints are rejected outright; the script will not draw a structure from just any three consecutive swings.
• Bollinger Band Confirmation Filter
When enabled, a newly detected A-B-C structure is only accepted if the prior confirmed close is positioned correctly relative to the Bollinger Band basis (an SMA of price, with upper/lower bands built from standard deviation multiples): bullish structures require the close to be above the basis, bearish structures require it to be below. This filters out structures forming against the prevailing short-term mean, reducing the incidence of countertrend triggers.
• ADX/DMI Trend-Strength Filter (optional)
When the ADX filter is enabled, new structures are only confirmed if the ADX value (calculated from the Directional Movement Index over a configurable length) meets or exceeds a user-defined threshold. This is intended to suppress structure formation during ranging, low-momentum conditions where corrective patterns are statistically less reliable.
• Fibonacci Extension Projection
Once a structure is confirmed, the script projects forward price targets from the A-B-C swing using the standard extension formula: target = C + ((B − A) × ratio). An optional logarithmic-scale calculation is available, which performs the equivalent projection in log-price space before converting back — useful on instruments or timeframes where percentage moves are more meaningful than absolute point moves. Selectable extension ratios include 0.618, 1.000, 1.272, and 1.618, each independently toggleable, plus a fixed internal 1.5 ratio used only to bound the shaded "Golden Zone." Each level is optionally annotated with a loose Elliott Wave association label (e.g., the 1.618 level is labeled "Wave 3") purely as a descriptive reference point for traders familiar with that framework — the script does not perform full Elliott Wave counting or degree analysis.
• Structure Invalidation
Active structures are continuously monitored: a bullish structure is invalidated if the close trades back below point A, and a bearish structure is invalidated if the close trades back above point A. This uses the point-A extreme as a structural stop level, consistent with the idea that a valid corrective pattern should not be revisited past its origin. On invalidation, the trader can choose to have the structure's drawings grayed out in place (to preserve chart history) or fully deleted.
🎨 Visual Guide
Gold and blue lines plotted directly on price represent the Bollinger Bands: the basis (gold, an SMA of price) and the upper/lower bands (blue, basis ± a standard-deviation multiple). These can be hidden independently of the confirmation filter itself.
Solid colored lines connect point A to point B, and dashed colored lines connect point B to point C, forming the visual "A-B-C" skeleton of each detected structure. Color reflects direction: the Bullish Structure Color for up-setups and the Bearish Structure Color for down-setups (both user-configurable, default green/red).
Small labeled tags marked "A," "B," and "C" are placed at each swing point, color-matched to the structure's direction, with their vertical orientation (label above or below price) automatically flipped depending on whether the point is a high or a low.
Dotted horizontal lines extending from point C represent each active Fibonacci extension level (0.618, 1.000, 1.272, 1.618, as enabled). The 1.618 level is rendered as a solid line rather than dotted, distinguishing it as the primary extension target. Each line carries a right-aligned label showing the ratio, its optional Elliott Wave tag, and the exact price level.
A shaded rectangular zone between the 1.5 and 1.618 extension levels — tinted in the structure's directional color — marks the "Golden Zone," a commonly-referenced confluence area for potential reversals or profit-taking, with a "Golden Zone" text label at its midpoint.
When a structure is invalidated and the "Gray Out" invalidation action is selected, all of the above elements (lines, labels, the zone fill) desaturate to the Invalidated Structure Color, visually distinguishing historical, no-longer-valid structures from the currently active one without removing them from the chart.
An on-chart dashboard (top-right by default, repositionable) displays: the current symbol and timeframe, an overall directional Bias read from the most recent structure, the current ATR value, the active significance threshold in price terms, a visual bar-gauge showing how many structures are currently tracked relative to the configured maximum, the pass/block state of the Bollinger Band filter, the live ADX reading and pass/fail state, the selected Adaptive Filter method, and a log of the last structural event (new bullish/bearish structure, or bullish/bearish invalidation).
📖 How to Use
Wait for a complete A-B-C structure to be drawn and confirmed — the script only finalizes structures on confirmed bar closes, so no signal will repaint intrabar.
A newly confirmed bullish structure (green by default) suggests the recent pullback (B to C) may extend toward the plotted Fibonacci levels; the 1.618 extension and the shaded Golden Zone are commonly treated as primary target/reaction areas.
A newly confirmed bearish structure works symmetrically to the downside.
Point A acts as the structural invalidation level: if price closes back through point A against the direction of the setup, treat the structure as void — the script will automatically flag this via graying-out or deletion, along with a dashboard "Last Event" update and an optional alert.
Use the Bollinger Band filter to avoid structures forming against the short-term mean, and the ADX filter to avoid trading corrective setups during flat, low-momentum conditions.
The dashboard's Bias, Threshold, and filter-status rows are designed to be checked at a glance before acting on any newly drawn structure.
Built-in alerts are available for new bullish/bearish structures and for bullish/bearish invalidations, each firing a JSON-formatted payload (ticker, timeframe, direction, entry, TP, SL) suitable for direct use with webhook-based automation, with the action keywords for each alert type fully customizable in the Alerts group.
⚙️ Inputs and Settings
Pivot Lookback Depth — the number of bars checked on each side of a candidate bar when detecting swing highs/lows. Larger values produce fewer, more significant pivots and slower reaction time; smaller values increase sensitivity and structure frequency.
Use ATR-Based Threshold / ATR Period / ATR Multiplier — when enabled, the minimum move required to register a new zigzag leg scales with recent volatility (ATR × multiplier) rather than a fixed percentage.
Fixed Deviation % — used instead of the ATR threshold when ATR-based thresholding is disabled; sets the minimum percentage move required between opposite-type pivots.
Enable Structure Invalidation — toggles whether structures are automatically invalidated when price closes back through point A.
Keep Last N Structures — caps how many structures remain tracked/drawn simultaneously; older structures are cleaned up once the cap is exceeded.
Enable BB Confirmation Filter / BB Length / BB StdDev Mult — controls the Bollinger Band basis-cross requirement for new structures, and the parameters of the underlying Bollinger Band calculation.
Use ADX Filter / ADX Threshold / ADX Length — controls the optional trend-strength gate and its calculation parameters.
Adaptive Filter / Adaptive Filter Length — selects the smoothing method (if any) applied to the high/low series before pivot detection, and its lookback length.
Invalidation Action — choose whether invalidated structures are grayed out in place or deleted from the chart.
Show Bollinger Bands / Use Logarithmic Scale — visual toggle for the BB plots, and whether extension targets are computed in log-price space.
Show 0.618 / 1.000 / 1.272 / 1.618 Level — independently toggle each Fibonacci extension line.
Extend Lines Right — extends extension lines indefinitely to the right instead of stopping at the current bar.
Show A-B-C Labels / Show Structure Lines / Show Elliott Wave Labels — independent visibility toggles for each drawing category.
Show Dashboard / Position — toggles the on-chart dashboard table and sets its screen corner.
Alert action fields (Open Long/Short, Close Long/Short) — customizable text keywords embedded in the JSON alert payloads, matching the syntax expected by the trader's automation/webhook setup.
Enable Test Alert — fires a payload on every confirmed bar close, intended only for verifying webhook routing before disabling it.
Color inputs — full control over structure colors, label backgrounds, invalidated-structure color, Bollinger Band plot colors, and dashboard styling.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The script's structural core rests on the concept of a zigzag transformation, a standard technique in technical analysis for reducing noisy price series into a simplified sequence of significant turning points, filtered here by a volatility-normalized (ATR-scaled) or percentage-based significance threshold rather than a fixed tick count — a design choice that keeps the sensitivity of the transformation consistent across instruments and volatility regimes.
The A-B-C labeling convention and the specific extension ratios offered (0.618, 1.000, 1.272, 1.618) draw on the Fibonacci sequence and its derived ratios, which have a long history of application in corrective-wave analysis, most notably within Elliott Wave Theory and W.D. Gann's work on proportional price projections. The mathematical basis is the golden ratio (φ ≈ 1.618) and its reciprocal/power relationships, which recur in the ratios above; their use in this script is descriptive and pattern-based rather than derived from any claim of causal market structure — the script projects targets from these ratios but does not assert that price is mechanically obligated to reach them.
The optional Bollinger Band filter is grounded in the standard statistical definition of a Bollinger Band: a moving-average basis with bands set at a multiple of the rolling standard deviation, functioning here as a simple mean-reversion/trend-context gate rather than a full volatility-breakout system.
The ADX/DMI filter derives from Welles Wilder's Directional Movement System, which measures trend strength independently of trend direction by comparing the magnitude of directional price movement to overall volatility (true range) over a smoothing period; using it as a pre-condition for structure confirmation is consistent with its original design purpose of distinguishing trending from non-trending regimes.
The adaptive smoothing options span several distinct estimation philosophies: SMA/EMA/RMA represent classical fixed- and exponentially-weighted moving averages; the Double WMA and Triple VWMA apply cascaded weighted/volume-weighted averaging to reduce lag at the cost of some smoothness; HMA (Hull Moving Average) is a weighted-average construction specifically designed to reduce lag while preserving smoothness; the Kalman filter implementation applies a simplified recursive Bayesian estimation approach (balancing a process-noise and measurement-noise ratio to continuously re-weight new observations against the prior estimate), a technique originally developed for state estimation in control systems and adapted here for price smoothing; and the LLAMA method combines a simple average with a linear slope term derived from the net change in price over the lookback window, a basic linear-regression-style adjustment for trend drift.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

CORTEX MULTI-TIMEFRAME POI ENGINE# CORTEX MULTI-TIMEFRAME POI ENGINE
The CORTEX MULTI-TIMEFRAME POI ENGINE is a rules-based PulseWire indicator designed to identify, qualify, and manage supply-and-demand Points of Interest across multiple structural timeframes.
Rather than marking every pivot, opposing candle, or conventional order block, CORTEX applies a structured qualification process built around confirmed market structure, consolidation quality, displacement, retracement depth, imbalance, liquidity proxies, and breaker-block behavior.
## Multi-Timeframe Market Structure
CORTEX organizes market location into three distinct layers:
- **Daily POIs** establish higher-timeframe macro location.
- **H4 POIs** identify intermediate structural areas.
- **M15 and M5 AM-session POIs** support intraday refinement on NQ and ES.
Daily, H4, M15, and M5 layers are independently controlled, allowing traders to reduce chart clutter and focus only on the context relevant to their current workflow.
## POI Qualification
A standard CORTEX POI progresses through an objective detection pipeline:
1. Meaningful retracement
2. Compressed base formation
3. Institutional Footprint Candle refinement
4. Directional displacement
5. Mandatory break of structure
6. Liquidity and imbalance evaluation
7. Width and location validation
8. Transparent quality scoring
9. Confirmed zone creation
Break of structure is mandatory. Additional characteristics contribute to a configurable quality score rather than relying on unexplained probability claims.
Available qualification modes include:
- **Loose** for broader structural identification
- **Balanced** for the recommended combination of quality and frequency
- **Strict** for selective, higher-confluence zones
- **Custom** for complete user control
## Breaker-Block Fusion
The engine includes an independently developed ICT breaker-block module.
A potential order block becomes a breaker only after a later confirmed candle closes through its opposite boundary. Wick-only violations do not qualify.
Breaker blocks may:
- Create standalone breaker POIs
- Add confluence to existing supply or demand zones
- Merge with overlapping, same-direction POIs
- Refine the final area to the valid price intersection
- Increase the zone’s score without exceeding 100
Merged areas are classified as **Breaker-Confluent POIs**, helping distinguish ordinary structural zones from areas supported by a confirmed failed-block transition.
## CORTEX AM Session POI Layer
The intraday module is designed specifically for NQ and ES during the default **08:00–11:00 America/New_York** session.
It provides:
- M15 POIs on M15 and M5 charts
- M5 POIs on M5 charts
- Automatic daylight-saving adjustment
- Automatic NQ and ES futures-root recognition
- Optional manual instrument override
- Confirmed post-session BOS allowance
- Independent demand, supply, timeframe, and display controls
Mandatory default width limits are:
- **NQ: 250 ticks**
- **ES: 40 ticks**
Zone width is calculated using the instrument’s native minimum tick size. Candidates exceeding the applicable limit are rejected before publication.
## Transparent Scoring
Each POI receives an objective score from 0 to 100. Depending on the selected mode and timeframe, the score may incorporate:
- Confirmed BOS
- Base quality
- Retracement depth
- Departure strength
- Liquidity sweep
- Fair-value gap or imbalance
- Resting-liquidity proxy
- Breaker-block confluence
Scores and classifications can be displayed directly on zone labels and in the Data Window.
## Zone Lifecycle Management
Every confirmed POI is actively managed through the following lifecycle:
- **Fresh**
- **Tested**
- **Mitigated**
- **Invalidated**
- **Expired**
Users can configure mitigation and invalidation behavior, retain invalidated zones for historical review, and control how long intraday zones remain available.
## Non-Repainting Design
CORTEX uses confirmed source-timeframe information for zone creation.
Higher-timeframe results are transported using confirmed historical offsets, preventing unfinished Daily, H4, M15, or M5 candles from publishing premature zones. A confirmed POI may be anchored to its original footprint candle, but it does not become logically active before its qualifying structure is complete.
This deliberate confirmation delay is intended to support stable behavior across:
- Historical charts
- Realtime execution
- PulseWire Bar Replay
## Diagnostics and Alerts
The CORTEX diagnostics dashboard reports:
- Latest qualification stage
- Signals detected
- Candidates awaiting BOS
- Width-filter rejections
- Breaker flips
- Zones retained
- Session status
- Detected instrument
- Applicable tick limit
- Chart-timeframe compatibility
Alerts are available for new POIs, breaker zones, confluence, first tests, mitigation, and invalidation. Alerts should be configured for **Once Per Bar Close**.
## Intended Workflow
CORTEX is designed to support a top-down process:
1. Use Daily zones to establish macro location.
2. Use H4 zones to refine structural context.
3. Use M15 zones for intraday directional areas.
4. Use M5 zones for lower-timeframe refinement.
5. Evaluate price behavior at qualified zones rather than treating every zone as an automatic entry.
CORTEX does not claim to identify actual institutional orders. Supply, demand, liquidity, imbalance, and breaker classifications are objective technical proxies derived from price action.
This indicator is an analytical framework—not financial advice or a guarantee of future performance. Traders should combine it with appropriate confirmation, risk management, and independent judgment. Indicator

MSnR CC Level [6 Types]MSnR CC Level
This script detects and maps Confirmation Candle (CC) levels, a 3-candle confirmation structure that checks whether a previously created level gets touched and rejected by the latest closed candle while keeping directional continuation.
Rather than looking at single swing points, CC detection requires a specific three-part pattern to validate a level. The result is a complete structural map of confirmed rejections inside the scan window, with each of the six CC types drawn so it can be told apart at a glance.
WHAT MAKES THIS DIFFERENT
1. Complete structural confirmation, not just arbitrary levels.
Most level tools draw lines where price has simply turned around. This tool requires a strict 3-candle structural proof. A level must be established, tested, and actively rejected with continuation to be drawn on the chart.
2. Identifies six distinct CC structures.
The script distinguishes between A CC, V CC, Bullish Gap CC, Bearish Gap CC, SBR CC, and RBS CC. The type is visually indicated, so you know exactly what structure formed the level without having to check the candles manually.
3. SBR and RBS are one-shot dynamic flips.
When an established level is broken, the script immediately starts looking for the very next candle to act as the signal candle, confirming a Support Become Resistance (SBR) or Resistance Become Support (RBS) setup.
THE SIX CC TYPES
A candle is Green when close is greater than or equal to open (a Doji counts as Green) and Red when close is less than open. The running candle is never used.
For the first four types, a 3-candle sequence is evaluated:
- Candle 1 establishes the reference level (the close of the first candle).
- Candle 2 provides the middle structure.
- Candle 3 is the signal candle that must reject the level and maintain directional strength.
V CC (Bullish)
Red, Green, Green. The signal candle low touches the V level, the body remains above it, and its close is greater than or equal to the middle candle's close.
Bullish Gap CC
Green, Green, Green. Follows the same touch, body, and continuation rules as the V CC.
A CC (Bearish)
Green, Red, Red. The signal candle high touches the A level, the body remains below it, and its close is less than or equal to the middle candle's close.
Bearish Gap CC
Red, Red, Red. Follows the same touch, body, and continuation rules as the A CC.
For the broken levels:
SBR CC
When a support level breaks down, the very next candle must act as the signal candle. It must reject the freshly flipped level from below, satisfying the same touch, body, and continuation rules as a bearish CC.
RBS CC
When a resistance level breaks up, the very next candle must act as the signal candle. It must reject the freshly flipped level from above, satisfying the same touch, body, and continuation rules as a bullish CC.
READING THE CHART
Colour tells you the side:
- Red labels: bearish rejections. A CC, Bearish Gap CC, SBR CC.
- Green labels: bullish rejections. V CC, Bullish Gap CC, RBS CC.
Each CC level starts at the candle that created its structure and extends to the right. The labels sit cleanly at the right edge of the chart to keep the price action visible. If multiple CC levels form at the same price, their labels are merged into a single entry to keep the chart clean. Nearby labels are automatically staggered horizontally to avoid overlap.
SETTINGS
Scan
- Scan Length (closed candles): how many closed candles are scanned backwards from the latest bar. Every CC Level found inside this window is drawn. The running candle is always excluded.
Display
- An individual switch for each of the six CC types, plus a toggle for the text labels.
Style
- Level Line Color, Label Size, and spacing options. You can adjust the distance used to merge same-price labels, the gap before staggering, and the horizontal stagger step.
ALERTS
Six alert conditions are available: A CC, V CC, Bullish Gap CC, Bearish Gap CC, SBR CC and RBS CC.
Each message carries the level type, the symbol, the timeframe and the closing price. The same messages are also sent through the alert function, so the "Any alert() function call" alert type can deliver everything through a single alert.
All alerts are evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts one bar behind the latest bar, so the candle that is still forming is never part of any calculation.
- Alert signals can only become true once a candle has finished. Price moving inside an open candle cannot make a signal appear and then disappear.
- Levels are rebuilt on the last bar from confirmed history. A level's price never moves. Once drawn, nothing shifts backwards.
When you create an alert, PulseWire may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses them for the opposite purpose: one of them is what restricts every signal to bar close, and the other is what redraws the levels efficiently on the final bar. Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- PulseWire caps drawings at 500 lines and 500 labels. A very long Scan Length will hit that ceiling and the oldest drawings will be dropped.
- The label offset and merge gap are measured in ticks. Expect to adjust these settings when moving between symbols with different tick values.
- Detection is purely structural. It reports where valid CC patterns have formed. It does not measure what happened afterwards, or produce entries, targets or stops.
HOW TO USE IT
Use these CC levels to map where the market has shown confirmed structural rejection. Areas where multiple CC structures stack together often represent stronger zones of interest.
These are reference areas, not automated entry signals. Use them alongside higher timeframe structure, and apply your own confirmation and risk management.
DISCLAIMER
This indicator is a level detection tool. It is not financial advice and it makes no claim about profitability. Trading involves risk. Always apply your own analysis and risk management. Indicator

MSnR Fresh & Unfresh LevelMSnR Fresh & Unfresh Level
This script tracks the real-time strength of support and resistance levels by assigning them one of two states: Fresh or Unfresh.
Every new level—whether it is an A Level, V Level, Bullish Gap, or Bearish Gap—starts its life in the strongest possible state: Fresh. As price action continues and interacts with these levels, their state changes based on exactly how price reacts to them. This provides an ongoing read of a level's current structural importance.
WHAT MAKES THIS DIFFERENT
1. Dynamic state tracking.
Most tools draw a line and leave it there forever. This indicator constantly monitors price interaction with every level. If a level is touched and rejected, its state updates. If it is broken, its state updates again. The chart always shows what the level means right now, not what it meant when it was created.
2. Breakouts revive old levels.
A level that has been tested multiple times doesn't just die. If price finally closes through it, breaking out to the other side, that level flips its role (support becomes resistance, or vice versa) and becomes Fresh all over again.
3. Clear visual distinction.
The two states are instantly recognizable through color coding. Fresh levels are displayed in deep green, while Unfresh levels are displayed in deep red. You don't need to guess whether a zone has been tested; the color tells you at a glance.
4. Built on market structure.
Levels are not arbitrary lines. They are built precisely from A Levels, V Levels, Bullish Gaps, and Bearish Gaps, using the closes as the level prices. This anchors everything in actual market agreement rather than just wicks.
THE TWO STATES
Fresh
The strongest state a level can be in. A level is Fresh under two conditions:
- When it is newly created. It has not yet been touched or tested on its current side.
- When it undergoes a breakout. If price closes through an existing level, the level flips to the opposite side and becomes Fresh again, because it is entirely untested in its new role.
Unfresh
A level that has been tested but still holds. A level becomes Unfresh when price comes back to it, touches it with a wick (High or Low), and gets rejected without closing through it. This means the market has reacted to the level at least once. While still a valid reference point, it is structurally weaker than a Fresh level.
HOW A LEVEL CHANGES STATE
Every level is continuously re-evaluated against new price action. The state transitions work like this:
Rejection -> Unfresh
For a resistance level (A Level, Bearish Gap), if the High touches the level but the Close stays below it, the level has been rejected and becomes Unfresh.
For a support level (V Level, Bullish Gap), if the Low touches the level but the Close stays above it, the level has been rejected and becomes Unfresh.
Breakout -> Fresh (and Flip)
For a resistance level, if price Closes above it, this is a breakout. The level flips to become support and becomes Fresh again.
For a support level, if price Closes below it, this is a breakout. The level flips to become resistance and becomes Fresh again.
Breakouts always take priority. If a single candle touches a level and then closes through it, that is a breakout, not a rejection. A single level can toggle back and forth between Fresh and Unfresh many times as it gets rejected, broken, rejected again, and broken again.
READING THE CHART
The visual language is straightforward:
- Green line and green label: The level is currently Fresh.
- Red line and red label: The level is currently Unfresh.
Both the line and the label update their color automatically when a level changes state. Lines extend forward from the point the level was created, and the label sits at the origin. You can easily spot clusters of Fresh levels or areas where multiple Unfresh levels indicate heavy previous testing.
SETTINGS
Scan
- Scan Length (closed candles): how many closed candles are scanned backwards. Every level inside that window is monitored and drawn.
Display
- Show Fresh Levels: Toggle visibility of levels currently in the Fresh state.
- Show Unfresh Levels: Toggle visibility of levels currently in the Unfresh state.
- Show Text Labels: Toggle the text labels on the levels.
Style
- Fresh Level Line Color: The color of the line for levels currently in the Fresh state.
- Unfresh Level Line Color: The color of the line for levels currently in the Unfresh state.
- Label Offset (ticks): How far the label sits above or below the level. This is measured in ticks, so adjust it depending on the asset you are trading.
- Label Size: The size of the text labels drawn at each level.
ALERTS
Three alert conditions are available: Fresh Created, Fresh -> Unfresh, and Unfresh -> Fresh.
Each message carries the event type, the symbol, the timeframe and the closing price. The same messages are also sent through the alert function, so the "Any alert() function call" alert type can deliver everything through a single alert.
All alerts are evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts one bar behind the latest bar, so the candle that is still forming is never part of any calculation.
- Alert signals can only become true once a candle has finished. Price moving inside an open candle cannot make a signal appear and then disappear.
- Levels are rebuilt on the last bar from confirmed history. A level's price never moves. Its state can change, but only forward and only when a candle CLOSES through it or rejects from it. Once drawn, nothing shifts backwards.
When you create an alert, PulseWire may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses them for the opposite purpose: one of them is what restricts every signal to bar close, and the other is what redraws the levels efficiently on the final bar. Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- This chart can become dense. Since every candle pair forms a level, a wide scan window will produce many levels. If you want fewer lines, lower the Scan Length.
- PulseWire caps drawings at 500 lines and 500 labels. A very long Scan Length will hit that ceiling and the oldest drawings will be dropped. The default is chosen to stay well inside it.
- The label offset is measured in ticks, and a tick is worth a very different amount on a crypto pair than on a forex pair. Expect to adjust it when you move between symbols.
- Level prices come from closes, so a level can sit in the middle of a long wick. That is deliberate, not a bug.
- The same level can toggle between Fresh and Unfresh multiple times. This is the intended behavior reflecting the ongoing story of market structure.
HOW TO USE IT
Use the states to gauge the strength of support and resistance zones. Fresh levels represent untouched, maximum-strength zones, making them ideal areas to watch for initial reactions. Unfresh levels indicate areas where price has already struggled, showing proven but potentially weakening support or resistance.
When multiple Fresh levels cluster together, it signals a highly confluent, untested zone. Breakouts that convert a cluster of old levels into Fresh levels in the opposite direction can signal significant structural shifts.
These are structural references, not automatic entry signals. Use them alongside higher timeframe context, and apply your own confirmation and risk management.
DISCLAIMER
This indicator is a level detection tool. It is not financial advice and it makes no claim about profitability. Trading involves risk. Always apply your own analysis and risk management. Indicator

SATTAM | Lost Balance | Digital LevelsOVERVIEW
Lost Balance plots a price grid derived from digit-sum arithmetic on a swing pivot, then looks for break-and-retest entries at those levels with a full risk map attached.
The idea is that a market's reaction distances are not arbitrary: the digits of a significant swing price are reduced to a single root number, and that root selects one of three fixed spacing "families". Every level in the grid sits an exact multiple of that spacing away from the pivot.
HOW IT WORKS
1 — Core code
The script finds the most recent confirmed pivot high or low on a higher timeframe. It takes the first four digits of that price from the left (ignoring the decimal point), adds them, then reduces the sum to a single digit between 1 and 9.
Example: pivot 4065.33 → 4065 → 4+0+6+5 = 15 → 1+5 = 6. Core code = 6.
2 — Family law
The core code selects the grid spacing:
• codes 1, 4, 7 → family 12 → 12.0 price units
• codes 2, 5, 8 → family 15 → 15.0 price units
• codes 3, 6, 9 → family 18 → 18.0 price units
3 — Level grid
From the pivot, the script draws N levels above and N below, each exactly one family step apart. The pivot line itself is highlighted.
4 — Structure filter
Market bias is read from the same higher timeframe using swing sequence: higher high plus higher low is bullish, lower high plus lower low is bearish, anything else is neutral. Longs are only allowed in a bullish structure, shorts only in a bearish one, and no signals are produced when structure is neutral.
5 — Entry
On the chart timeframe, a signal requires two events in order. First a candle closes through a grid level. Then price returns to that same level and closes back in the direction of the break. The setup is discarded if price closes back on the wrong side, or if the retest does not occur within the configured bar window.
6 — Risk map
Entry is placed at the broken level itself, which makes every distance a whole number of family steps:
• Stop loss — one step back (the previous level)
• Target 1 — one step forward, 1:1
• Target 2 — two steps forward, 1:2
• Target 3 — three steps forward, 1:3
A red box marks the risk zone and a green box the reward zone. When Target 1 is touched, a "SL → BE" marker appears and the script switches its own stop tracking to breakeven.
SETTINGS
• Level timeframe — where the pivot and grid come from (15 / 30 / 60 / 120 / 240)
• Pivot length — left/right bars required to confirm a swing
• Manual pivot price — type a swing price yourself to override auto-detection
• Levels per side — how many grid lines to draw above and below
• Structure filter — enable or disable the directional filter
• Max bars to wait for retest — how long a break stays valid
• Enable Target 3
• Colors for levels, pivot, risk zone and reward zone
An on-chart table shows the pivot price, its first four digits, the digit sum, the core code, the family, the step in price units, and the current structure.
ALERTS
Four alerts are available through "Any alert() function call": long signal, short signal, Target 1 touched (move stop to breakeven), and stop loss hit.
HOW TO USE
Open a 3-minute chart, leave the level timeframe on 60 minutes, and wait for the grid and structure to settle. When a signal prints, the entry, stop and targets are already drawn at exact grid prices — no measuring required.
IMPORTANT NOTES
The family steps of 12, 15 and 18 are absolute price units, not percentages or ATR multiples. This makes the script meaningful on gold, where those values correspond to 120, 150 and 180 points, and meaningless on instruments quoted at a very different scale such as major FX pairs. Adjust your expectations accordingly, or use the manual pivot input to experiment.
The source method does not define how market structure should be measured, so a standard swing-sequence read is used here. It can be turned off if you prefer to set the bias yourself.
Only one position is tracked at a time. A new signal is not accepted until the current one resolves at its stop or final target.
This script draws levels and setups for study and execution assistance. It does not place orders and it is not financial advice.
CREDITS
The digital-levels method — core code extraction, the three spacing families, and the step-based stop and target map — comes from the "Lost Balance" chapter of the SOVEREIGN trading book. The Pine implementation, structure filter, break-and-retest state machine and trade tracking are original work.
نظرة عامة
يرسم المؤشر شبكة أسعار مشتقة من جمع أرقام سعر بيفوت، ثم يبحث عن دخول بكسر وإعادة اختبار عند تلك المستويات مع خريطة مخاطرة كاملة.
آلية العمل
1. الشفرة المركزية — يرصد آخر قمة أو قاع مؤكد على فريم أعلى، يأخذ أول 4 أرقام من اليسار، يجمعها، ثم يبسّط الناتج لرقم واحد بين 1 و 9.
مثال: 4065.33 ← 4065 ← 4+0+6+5 = 15 ← 1+5 = 6.
2. قانون العائلات — الشفرات 1-4-7 تعطي عائلة 12، والشفرات 2-5-8 عائلة 15، والشفرات 3-6-9 عائلة 18. وهذه هي المسافة الثابتة بين المستويات.
3. الشبكة — من البيفوت تُرسم مستويات فوق وتحت، المسافة بينها خطوة العائلة بالضبط.
4. الهيكلة — قمة أعلى مع قاع أعلى = صاعد، وقمة أدنى مع قاع أدنى = هابط. الشراء مسموح في الصاعد فقط والبيع في الهابط فقط، ولا إشارات في العرضي.
5. الدخول — إغلاق شمعة خارج المستوى، ثم عودة السعر للمستوى نفسه وإغلاقه في اتجاه الكسر.
6. خريطة المخاطرة — الدخول عند المستوى المكسور، والوقف عند المستوى السابق، والأهداف الثلاثة عند المستويات التالية بنسب 1:1 و 1:2 و 1:3. عند لمس الهدف الأول يظهر وسم SL → BE.
ملاحظة مهمة
خطوات العائلة (12 و 15 و 18) قيم سعرية مطلقة وليست نسباً، فهي ذات معنى على الذهب حيث تعادل 120 و 150 و 180 نقطة، وبلا معنى على أدوات ذات تسعير مختلف كلياً مثل أزواج العملات الرئيسية.
المؤشر أداة رسم ومساعدة تنفيذ، لا ينفّذ أوامر ولا يُعد نصيحة مالية.
المصدر
منهج المستويات الرقمية مأخوذ من فصل "التوازن المفقود" في كتاب SOVEREIGN. التنفيذ بلغة Pine وفلتر الهيكلة وآلة حالة الكسر وإعادة الاختبار ومتابعة الصفقة عمل أصلي. Indicator

Single Timeframe Multi-EMA Trend Table### Overview
The **Single Timeframe Multi-EMA Trend Table** displays the directional bias of 7 customizable Exponential Moving Averages (EMAs) calculated from a single, higher timeframe of your choice.
This allows traders working on lower execution timeframes (e.g., 1-minute or 5-minute charts) to effortlessly monitor macro trend alignment and EMA support/resistance zones from higher timeframes (e.g., 15m, 1h, or 4h) without switching charts.
---
### Key Features
* **Selectable Target Timeframe:** Choose any timeframe (1m, 5m, 15m, 1h, 4h, 1D, etc.) to fetch EMA data from.
* **7 Customizable EMAs:** Define 7 individual EMA lengths (e.g., EMA 9, 20, 50, 100, 150, 200, 800) to monitor full trend structure.
* **Consolidation Detection:** Identifies when price is compressing or trading close to a specific EMA line, marking it as a **RANGE 🟡** state.
* **Clean UI:** Displays chosen timeframe in the table header alongside active EMA lengths and clear color-coded statuses.
---
### How to Use
1. **Set Target Timeframe:** In the settings, choose the macro timeframe you want to base your analysis on (e.g., 15m).
2. **Configure EMAs:** Input your preferred EMA lengths.
3. **Gauge Trend Strength:**
* **Full Bullish Alignment:** All or most EMAs show `BULLISH 🟢`.
* **Compression/Ranging:** Multiple EMAs show `RANGE 🟡`, warning of choppy price action. Indicator

MSnR QM LevelMSnR QM Level
This script detects Quasimodo (QM) levels from the close prices of consecutive candles and draws
them as horizontal support and resistance lines.
A QM Level forms when price creates a turning point, breaks it, builds a second turning point on
the other side, and then breaks that too. What is left behind is the price of the original turning
point, which is where liquidity was trapped and where the market often reacts again.
The result is a structural map of QM levels across the scan window, drawn as horizontal lines that
extend to the right from the candle that set the price.
WHAT MAKES THIS DIFFERENT
1. Strict four step detection.
Most QM tools look for swing highs and swing lows relative to some lookback period. This script
uses a precise four step sequence built entirely from consecutive candle pairs. Every step must
complete before a QM Level is confirmed, which eliminates the vague heuristics that plague swing
based detection.
2. The level price is the CLOSE, not the wick.
Every level sits at the close of the candle that set it. Closes are where the market actually
agreed on a price, which is why a close through a level counts as a break here while a wick through
it does not.
3. Every level is checked for uniqueness.
Duplicate prices within a small tolerance are not drawn twice. If two QM Levels land on the same
price, only one line appears. This keeps the chart clean without losing any information.
4. Detection reads confirmed candles only.
The running candle is never used. Every detection step requires a fully closed candle, and the scan
starts one bar behind the latest bar. Nothing on the chart changes while a candle is still open.
THE TWO QM TYPES
A candle is Green when close is greater than open and Red when close is less than open. A Doji,
where close equals open, is neither and forms no level. Only fully closed candles are read.
Buy QM (support)
Step 1. Find a V Level: a Red candle followed by a Green candle. The V Level price is the close of
the Red candle.
Step 2. Find the earliest Red candle after the V Level that closes below the V Level price. This is
the V Breakdown.
Step 3. Between the V Level and the V Breakdown, find an A Level: a Green candle followed by a Red
candle. Use the one nearest the V Breakdown if several exist. The A Level price is the close of the
Green candle.
Step 4. After the V Breakdown, find any Green candle that closes above the A Level price. The A
Level is now broken upward.
If all four steps confirm, the V Level price becomes the Buy QM Level. The line is drawn at that
price and extends to the right.
Sell QM (resistance)
Step 1. Find an A Level: a Green candle followed by a Red candle. The A Level price is the close of
the Green candle.
Step 2. Find the earliest Green candle after the A Level that closes above the A Level price. This
is the A Breakout.
Step 3. Between the A Level and the A Breakout, find a V Level: a Red candle followed by a Green
candle. Use the one nearest the A Breakout if several exist. The V Level price is the close of the
Red candle.
Step 4. After the A Breakout, find any Red candle that closes below the V Level price. The V Level
is now broken downward.
If all four steps confirm, the A Level price becomes the Sell QM Level. The line is drawn at that
price and extends to the right.
In both cases the QM Level marks the price of the ORIGINAL turning point: the one that was broken,
rebuilt from the other side, and then had its counterpart broken as well. That is the price where
liquidity was trapped, and it is the price the script watches.
READING THE CHART
Color tells you the side:
- Green line and green label: Buy QM. This level sits below price as support.
- Red line and red label: Sell QM. This level sits above price as resistance.
Each line starts at the candle that set its price and extends to the right, so you can see how
price has behaved around it since. The label sits at that same candle, below the line for a Buy QM
and above it for a Sell QM, so it never covers the line itself.
A summary table in the corner counts how many Buy QM and Sell QM levels were found in the current
scan window, including those that are hidden by a toggle. The table always reflects what the market
actually printed rather than what is currently switched on.
SETTINGS
Scan
- Scan Length: how many closed candles are scanned backwards from the latest bar. Every QM Level
inside that window is drawn. The running candle is always excluded.
Level Types
- An individual switch for Buy QM and Sell QM. Hiding one side is useful when you only want to
see levels in one direction.
Style
- Sell QM Color and Buy QM Color.
Labels
- Show Labels, Label Offset in ticks, and Label Size. The offset is measured in ticks, so a value
that looks right on one symbol may need adjusting on another.
Summary Table
- Show, position and size of the corner table.
ALERTS
Two alert conditions are available: Buy QM and Sell QM.
Each message carries the level type, the symbol, the timeframe and the closing price. The same
messages are also sent through the alert function, so the "Any alert() function call" alert type
can deliver both through a single alert.
All alerts are evaluated only after a candle has fully closed.
An alert fires when the four step QM sequence completes on the latest closed candle. Because
completion requires a breakout of the inner level, these alerts do not fire on every bar; they fire
only when price actually confirms a new QM structure.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts one bar behind the latest bar, so the
candle that is still forming is never part of any calculation.
- Alert signals can only become true once a candle has finished. Price moving inside an open candle
cannot make a signal appear and then disappear.
- Levels are rebuilt on the last bar from confirmed history. A level's price never moves. Once
drawn, nothing shifts backwards.
When you create an alert, PulseWire may show a caution banner saying the indicator can repaint.
That banner appears automatically for any script that uses the built in bar state variables, no
matter how they are used, because the platform cannot check the intent behind them. This script
uses them for the opposite purpose: one of them is what restricts every signal to bar close, and
the other is what redraws the levels efficiently on the final bar. Choosing "Once Per Bar Close"
when creating the alert is still recommended.
NOTES AND LIMITATIONS
- A QM Level requires a specific four step sequence to complete. That makes them less common than
plain A and V Levels, so stretches with few or no QM Levels are normal and expected.
- PulseWire caps drawings at 500 lines and 500 labels. A very long Scan Length will hit that
ceiling and the oldest drawings will be dropped. The default is chosen to stay well inside it.
- The label offset is measured in ticks, and a tick is worth a very different amount on a crypto
pair than on a forex pair. Expect to adjust it when you move between symbols.
- Level prices come from closes, so a level can sit in the middle of a long wick. That is
deliberate, not a bug.
- Duplicate prices within a tolerance of two ticks are drawn only once. If two QM Levels land on
nearly the same price, you see one line instead of two stacked on top of each other.
- Detection is purely structural. It reports where QM Levels are and which side they sit on. It
does not rank them by strength, measure what happened afterwards, or produce entries, targets or
stops.
HOW TO USE IT
A QM Level marks a price where price created a turning point, broke it, built the opposite turning
point, and then broke that too. The original turning point is where one side was trapped, and price
returning to that price often produces a reaction.
Buy QM Levels below price act as support. Sell QM Levels above price act as resistance. When
several levels cluster near the same price, the area is often more significant than any single
level, since separate structures agreeing on one price is what a real zone looks like.
These are reference levels, not entry signals. Use them alongside higher timeframe structure, and
apply your own confirmation and risk management.
DISCLAIMER
This indicator is a level detection tool. It is not financial advice and it makes no claim about
profitability. Trading involves risk. Always apply your own analysis and risk management. Indicator

Volume Regression Channel [BOSWaves]Volume Regression Channel - Regression-Anchored Volume Flow Visualization with Inward Pressure Bars, Edge Flares, and Cumulative End Profile
Overview
Volume Regression Channel is a regression-anchored volume flow analysis system that fits a polynomial or linear curve to recent price history and maps buy and sell volume pressure inward from the channel boundaries toward the centerline on every bar, where bar height, coloring, edge flare intensity, and end profile distribution are all driven by actual volume participation and close-position-derived directional weighting rather than fixed histogram positions or arbitrary price levels.
Instead of displaying volume as a separate panel histogram detached from price context, this system integrates volume directly into the regression channel structure. Each bar's volume is split into buy and sell components based on where close sat within the bar's range, and those components are rendered as inward-pointing bars anchored to the upper and lower channel edges, with bar height proportional to normalized volume and coloring distinguishing above-average from below-average participation. The result is a channel where the volume activity on every bar is visible in spatial relationship to the channel boundaries that define the structural context.
This creates a complete price and volume framework within a single overlay. The regression curve defines the trend's expected path. The gradient channel fills communicate the statistical distance from the centerline. The inward volume bars reveal participation intensity and directional split at each bar. The flow-colored centerline segments expose directional pressure evolution across the window. Edge flares highlight exceptional volume events occurring near the channel boundaries. Bound diamond markers identify the first bar of each new boundary touch. And the cumulative end profile extending from the current bar provides a full buy-sell volume distribution summary across the channel's price range for the entire regression window.
Price is therefore evaluated not just for its position within the regression channel but for the volume participation and directional flow composition supporting its location at every bar across the full lookback window.
Conceptual Framework
Volume Regression Channel is founded on the principle that a regression channel becomes significantly more analytically powerful when volume participation is integrated directly into its structure rather than displayed separately, allowing the trader to simultaneously assess where price sits relative to the statistical trend expectation and how much and what type of volume supported each bar's position within that channel.
Standard regression channel tools provide structural price context through the curve and its standard deviation bounds but offer no volume intelligence, leaving traders to consult a separate panel to understand participation dynamics. This framework eliminates that separation by embedding volume directly into the channel geometry, with inward bars, edge flares, centerline flow coloring, and the end profile all deriving from the same volume and price data that defines the channel itself.
Three core principles guide the design:
Volume should be displayed in direct spatial relationship to the channel structure it relates to, with inward bars anchored to the boundaries and sized proportionally to participation intensity so that high-volume bars are immediately identifiable within their structural context.
Buy and sell volume should be separated using close position within the bar range, rendering the directional split of each bar's participation as distinct inward segments that reveal whether volume at each price location was predominantly absorbed by buyers or sellers.
A cumulative end profile should summarize the full window's volume distribution at the current channel position, providing a reference for where participation has been most concentrated across the regression window without requiring a separate profile indicator.
This shifts regression channel analysis from structural price context alone into an integrated price-volume framework where participation intensity, directional flow composition, and cumulative distribution are all visible within the channel geometry itself.
Theoretical Foundation
The indicator combines matrix ordinary least squares regression fitting to HL2 price data, standard deviation channel construction, close-position buy-sell volume splitting, volume SMA normalization for significance classification, three-layer gradient polyline fill construction, inward volume bar rendering with dynamic width scaling, flow-weighted centerline segment coloring, edge flare detection combining volume and boundary proximity conditions, and an overlap-weighted cumulative buy-sell profile with smoothing applied across the channel rows.
The regression is computed using the same OLS matrix approach as conventional polynomial regression, producing a prediction array covering all bars in the lookback window for both linear and quadratic modes. The channel width is scaled by the rolling standard deviation of HL2, ensuring channel boundaries adapt to the instrument's actual price variability. Volume splitting uses close position within the high-low range as the proxy for directional commitment, with bars closing near the high allocating more volume to buying and bars closing near the low allocating more to selling. The end profile smooths each row's accumulated buy and sell volume with a three-point weighted average before normalizing and rendering.
Four internal systems operate in tandem:
Regression Channel Engine : Computes OLS curve fitting in linear or polynomial mode, derives the standard deviation channel width, and constructs all polyline geometry for the gradient fills, glow boundary lines, and centerline using chart.point arrays that follow the regression curve.
Inward Volume Bar System : For each bar in the recent display window, normalizes volume against the window maximum, splits the normalized height into buy and sell components by close position, and renders inward lines from the channel edges with dynamic width scaling and above-average volume coloring.
Edge Flare and Bound Marker System : Monitors each recent bar for the combination of above-threshold volume and boundary zone proximity, rendering bright glowing line segments on the channel edge when qualifying conditions are met, and places diamond markers at the first bar of each new boundary touch.
Centerline Flow and End Profile Engine : Divides the centerline into sixty flow segments and computes volume-weighted directional bias for each, coloring segments by flow direction and strength. Simultaneously accumulates overlap-weighted buy and sell volume into channel rows across the full window, smooths the distribution, and renders horizontal profile bars extending from the current bar edge.
This design ensures volume participation is embedded into every layer of the channel visualization while the end profile provides a complete cumulative distribution summary that updates with each new bar.
How It Works
Volume Regression Channel evaluates price through a sequence of regression-aware and volume-integrated processes:
Regression Curve Fitting : On the last bar, the OLS matrix computation produces a prediction array covering all bars in the configured lookback window using either a linear or polynomial fit to HL2, providing the baseline curve that all channel geometry and volume positioning follows.
Channel Width Calculation : The standard deviation of HL2 over the regression window multiplied by the SD multiplier defines the channel half-width, establishing the upper and lower boundary distances from the curve at each bar position.
Gradient Fill Construction : Three polyline polygon regions are constructed for each of the upper and lower channel halves at proportional fractions of the standard deviation width, filled with progressively increasing opacity from inner to outer to produce a smooth visual gradient across the channel depth.
Boundary Glow Rendering : Triple polylines at the upper and lower channel boundaries create a glow effect using wide low-opacity outer lines and a narrow full-opacity core line, providing visually prominent boundary markers that follow the regression curve.
Volume Normalization and Splitting : For each bar in the volume display window, raw volume is normalized against the window maximum to produce a proportional height score. Close position within the high-low range splits this height into buy and sell components, with the buy portion anchored to the lower boundary and the sell portion anchored to the upper boundary pointing inward.
Inward Bar Rendering : Buy and sell component heights are rendered as inward-pointing lines from the respective channel edges with dynamic width scaling based on relative volume and opacity intensifying for above-average participation bars.
Edge Flare Detection : Each recent bar is tested for the combination of volume exceeding the flare multiplier threshold and price high or low reaching within the configured edge zone percentage of the channel boundary. Qualifying bars receive bright dual-layer line segments on the boundary edge with width scaling by relative volume strength.
Bound Diamond Placement : Each bar is tested for initial channel boundary contact, with a diamond marker placed at the first bar of each new upper or lower boundary touch to mark where price newly reached the statistical extremes.
Centerline Flow Coloring : The centerline is divided into sixty equal segments and each segment's volume-weighted close position bias is computed across its constituent bars. Segments are colored green, red, or neutral based on the directional flow value and intensity with line width scaling to strength.
End Profile Construction : All bars in the regression window contribute their volume to the profile rows based on price overlap between the bar range and each row boundary, with the contribution split into buy and sell portions by close position. The accumulated distribution is smoothed and normalized before rendering as horizontal buy and sell bars extending from the current bar.
Together, these elements form a continuously updating integrated price-volume framework where the regression structure, volume participation, flow direction, and cumulative distribution are all rendered within the same channel geometry on each bar update.
Interpretation
Volume Regression Channel should be interpreted as a regression-anchored structural framework with embedded volume participation intelligence at every level:
Regression Curve : The fitted centerline represents the trend's statistical best-fit path through the lookback window, with the flow-colored segments revealing whether volume-weighted directional bias above or below the curve was predominantly bullish or bearish across each portion of the window.
Channel Boundaries : The upper boundary with its red glow represents the upper standard deviation limit where price is statistically extended above the regression expectation. The lower boundary with its green glow represents the lower limit where price is statistically extended below.
Gradient Fill Depth : The three-layer gradient within each channel half provides visual depth cues, with the innermost near-transparent fill representing mild deviation and the outermost fully opaque fill representing maximum channel boundary proximity.
Inward Buy Bars (Green) : Lines extending upward from the lower channel boundary reflect the buy-attributed volume portion of each bar. Taller bars indicate greater buying participation. Brighter coloring indicates above-average total volume on that bar.
Inward Sell Bars (Red) : Lines extending downward from the upper channel boundary reflect the sell-attributed volume portion of each bar. Taller bars indicate greater selling participation. Brighter coloring indicates above-average total volume.
Neutral Volume Bars (Gray) : Below-average volume bars render in neutral gray regardless of direction, identifying periods of low participation where the directional split carries reduced analytical significance.
Edge Flares : Bright glowing line segments on the channel boundary mark bars where significant volume occurred close to the boundary edge, identifying high-participation boundary interaction events that frequently precede reversals or continuations from the statistical extremes.
Bound Diamonds : Small colored diamonds at boundary touch initiation bars mark where price first reached the channel edge after a period of interior activity, identifying the onset of boundary interaction sequences.
End Profile : The horizontal bar chart extending from the right edge shows the cumulative volume distribution across the channel's price range for the full regression window, with green segments showing buy-attributed volume and red segments showing sell-attributed volume at each price row. The longest bars identify the price levels with the greatest total participation concentration.
Colored Candles : Optional candle coloring reflects whether price is above or below the regression centerline, providing a continuous directional bias reference directly on the price chart.
Boundary proximity, inward bar height and direction, edge flare frequency, centerline flow coloring, and end profile distribution collectively provide more analytical depth than any element in isolation.
Signal Logic & Visual Cues
Volume Regression Channel does not generate discrete buy or sell signals but provides continuous structural and volume participation reference through several interaction cues:
Edge Flare Events : High-volume boundary proximity bars highlighted by bright edge flares identify exceptional participation at the statistical extremes, marking the bars most likely to precede structural reactions from channel boundaries.
Bound Diamond Initiation : Diamond markers at the first bar of new boundary touches identify where price has newly entered channel extreme territory, providing early warning of boundary interaction sequences before their outcome is determined.
Centerline flow segment coloring provides ongoing directional pressure context across the full window, with color and width encoding whether the volume-weighted bias at each point in the regression history was bullish, bearish, or neutral.
Strategy Integration
Volume Regression Channel fits within regression-informed structural and volume-participation-based analytical approaches:
Boundary Interaction Trading : Use channel boundary touches combined with edge flare presence as elevated-significance interaction events. High-volume flares at the boundary suggest meaningful participation at the statistical extreme that frequently precedes a reaction back toward the centerline or a volume-supported continuation beyond it.
End Profile Acceptance Reading : Use the end profile distribution to identify the price rows with the greatest cumulative participation concentration. Price returning to high-volume profile rows encounters levels where the greatest historical participation occurred within the regression window, making them structurally significant references for support, resistance, or reversion.
Inward Bar Volume Divergence : Monitor situations where price is approaching a boundary but inward bar height from the opposing direction is increasing, indicating growing participation against the directional move and potentially signaling that the boundary interaction will result in rejection rather than continuation.
Centerline Flow Direction : Use centerline flow coloring as a mid-channel directional bias indicator. Sustained green flow segments suggest dominant buying pressure within the regression window. Sustained red segments suggest dominant selling. Neutral gray segments indicate a contested equilibrium without clear directional participation weight.
Regression Mode Selection : Use Polynomial mode for markets with visible curvature in their trend structure where the quadratic bend produces a more accurate fit. Use Linear mode for markets trending in a straight consistent direction where the polynomial's additional degree of freedom would overfit noise.
Profile Distribution Skew Analysis : Compare the buy and sell distribution balance in the end profile to assess whether the window's participation was predominantly concentrated above or below the centerline, providing a volume-based directional bias reading that complements the price-based trend assessment.
Technical Implementation Details
Regression Engine : Matrix OLS with design matrix construction, normal equation formation, matrix inversion, and prediction array application for linear or polynomial curve fitting to HL2
Channel Construction : Standard deviation-scaled channel width with three-layer gradient polyline fills and triple-line glow boundaries following the regression curve
Inward Volume System : Window-maximum normalization with close-position buy-sell splitting, dynamic width scaling by relative volume, and above-average volume color intensification
Edge Flare System : Volume multiplier threshold combined with boundary zone percentage proximity testing with dual-layer glow line rendering and width scaling by relative volume
Centerline Flow : Sixty-segment volume-weighted close-position bias computation with directional color and width encoding
End Profile : Overlap-weighted row accumulation across the full regression window with three-point smoothing, normalization, and horizontal buy-sell bar rendering with curved outline polyline
Performance Profile : All rendering triggered on last bar with full object cleanup and rebuild each cycle, configurable regression length capped at 490 bars for object management
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Intraday regression flow tracking with shorter length and tighter SD multiplier for fast-adapting channel that captures intraday trend structure with responsive volume distribution
15 - 60 min : Session-level structural volume analysis with balanced regression length and moderate SD multiplier for meaningful channel geometry across typical session directional moves
4H - Daily : Swing-level regression channel profiling with longer lookback and polynomial mode for a curve-following channel spanning multi-session trend structures
Suggested Baseline Configuration:
Regression Length : 236
SD Multiplier : 1.75
Mode : Polynomial
Volume SMA : 15
Bar Height (ATR×) : 2.1
Show Edge Flares : Enabled
Show Bound Diamonds : Enabled
Show Centerline : Enabled
Show End Profile : Enabled
Color Candles : Enabled (requires disabling original chart candles in chart settings)
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's volatility characteristics, volume behavior, and preferred channel sensitivity, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Channel too wide or narrow : Adjust SD Multiplier to expand or contract the channel width relative to the instrument's typical deviation from the regression curve, calibrating boundary distance to realistic price excursion ranges.
Curve fits too loosely to recent price : Decrease Regression Length to shorten the lookback window, producing a tighter curve that adapts more quickly to recent structural changes. Switch to Polynomial mode if visible trend curvature is present.
Inward bars too tall or short : Adjust Bar Height (ATR×) to scale the maximum inward bar height, making volume bars more prominent during high-participation sessions or more subtle on instruments with lower volume variance.
Too many or too few edge flares : Increase Flare Volume Multiplier to restrict flares to only exceptional volume events, or adjust Flare Edge Zone % to control how close to the boundary price must be before a flare qualifies.
End profile too wide or compact : Adjust Profile Width to control the maximum horizontal extent of the end profile bars, calibrating the profile size to the available chart space at the current zoom level.
Profile rows too coarse or granular : Adjust Profile Rows to increase or decrease vertical resolution, with higher values providing finer detail across the channel's price range and lower values producing broader, more readable rows.
Too many bound diamonds cluttering the chart : The diamond system marks only first-bar boundary touches. On instruments with frequent boundary contact the marker density may be high. Disable Show Bound Diamonds and rely on edge flares alone for boundary interaction identification.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets where the regression curve provides an accurate fit to the directional price path and the channel boundaries represent meaningful statistical extremes with genuine participation significance
Liquid instruments with consistent volume where the buy-sell splitting produces reliable directional participation readings and the end profile accumulates a statistically meaningful distribution across the regression window
Boundary interaction strategies where edge flares and bound diamond markers identify high-participation channel extreme events that frequently precede structural reactions
Distribution analysis workflows where the end profile provides a regression-relative volume profile summary that replaces or complements standalone volume profile indicators
Reduced Effectiveness:
Choppy, directionless markets where the regression curve has no clear shape and channel boundaries are penetrated frequently without the sustained trend structure required for meaningful boundary interaction analysis
Low-liquidity instruments where thin volume produces unreliable buy-sell splits and end profile distributions that reflect random participation patterns rather than genuine directional flow
Markets with frequent gaps where the HL2 series used for regression produces curves distorted by discontinuous price events that shift the channel relative to actual price structure
Very short regression windows where insufficient bars per channel row produce end profiles dominated by noise rather than statistically meaningful participation concentration
Consolidation environments where price oscillates near the regression centerline without reaching channel boundaries, reducing the analytical value of edge flares and bound diamonds while producing uniformly short inward bars
Integration Guidelines
Confluence : Combine with BOSWaves momentum tools, order block analysis, or structural indicators to validate channel boundary interactions and edge flare events with broader analytical context
End Profile Reference : Use the end profile distribution as a volume-based reference layer for price levels visited by price within the regression window. High-volume rows in the profile identify price levels with the greatest historical participation concentration, making them structurally significant references for future interaction.
Inward Bar Divergence Monitoring : Monitor inward bar height on opposing sides as price approaches boundaries. Growing opposing-side bars during boundary approach suggest increasing counter-directional participation that may oppose the boundary continuation.
Regression Mode Consistency : Maintain a consistent regression mode when using the channel as an ongoing structural reference. Switching between Linear and Polynomial shifts the curve and redistributes the channel geometry, making successive comparisons of profile distribution and boundary levels unreliable.
Centerline Cross Awareness : Treat price crossing the regression centerline as a potential flow transition event. Combined with a centerline flow segment color change from one direction to the other, centerline crossings with above-average volume suggest genuine directional repositioning within the channel structure.
Disclaimer
Volume Regression Channel is a professional-grade regression-anchored volume flow analysis tool. It uses OLS curve fitting with close-position volume splitting and cumulative profile construction but does not predict future price movements. Results depend on market conditions, instrument volume characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates momentum context, order flow analysis, and comprehensive risk management. Indicator

Indicator

TheStrat Suite [Open Source] Entries, Targets, and Stop LossTheStrat Suite automates the detection, visualization, and alerting of price action setups based on TheStrat methodology (developed by Rob Smith) across up to six configurable timeframes simultaneously.
The guiding principle: show only the most valuable information. Rather than cluttering charts with every possible level and signal, the indicator uses logic based on user settings to determine what's relevant and worth displaying at any given moment.
WHAT IT DOES
The indicator identifies candle combinations (combos), actionable signals (inside bars, hammers, shooters), Failed 2s (range reclaims), and calculates magnitude and exhaustion targets — then draws entries, targets, stop losses, and take action windows directly on your chart. A real-time data table displays combo status, bar types, and Full Timeframe Continuity (FTFC) across all enabled timeframes. Candles themselves can be colored by Strat classification or by FTFC. Alerts can be filtered by timeframe continuity, signal type, specific timeframes, or Domino setups.
HOW IT WORKS
Multi-Timeframe Data Architecture
The indicator requests OHLC data from up to six user-configured timeframes in a single pass, then processes each timeframe's candle relationships independently. This allows the 5-minute, 60-minute, daily, and weekly structure to coexist on one chart without switching views.
Candle Classification Logic
Each closed candle is classified by comparing its high and low to the prior candle's range. A candle entirely within the prior range is type 1 (inside). A candle that exceeds one side is type 2 (directional). A candle that exceeds both sides is type 3 (outside). Directional bias (u/d) is determined by comparing close to open. A Failed 2 (also known as a Range Reclaim, 2d Green, or 2u Red) occurs when a directional candle breaks one side of an inside bar but fails to continue.
Hammer and Shooter Detection
The indicator offers three detection methods. Classic requires the candle to breach the prior candle's high or low but close back inside the prior range. Pin Bar adds a wick-to-body ratio requirement, filtering for candles where the rejecting wick is significantly longer than the body. Broad relaxes the close requirement, allowing the close to be near (not strictly inside) the prior range. Users select which method matches their trading style.
Failed 2 / Range Reclaim Detection
A Failed 2 occurs when price breaks one side of an inside bar (type 1) but reverses through the opposite side. The indicator provides four detection methods. Open flags the setup when the reversal candle opens beyond the broken level. Reclaim flags when price closes back through the opposite side of the inside bar's range. Both requires both conditions (open beyond AND close reclaim). Either flags when either condition is met. This configurability lets traders match detection to their preferred confirmation style.
Stop Loss Levels
When a signal fires with stops enabled, the indicator places a stop loss level on the opposite side of the trigger and locks it for the duration of the signal. The stop reference is selectable — the current candle for tighter risk, or C1 for wider invalidation — and an optional Break Even mode moves the stop to entry once magnitude or exhaustion is hit. A Smallest Timeframe Only mode draws just the tightest active stop when several timeframes are in force. Stop prices can be appended to alert messages.
Level Hierarchy and Consolidation
When multiple timeframes produce levels at similar prices, the indicator intelligently consolidates them into combined labels rather than hiding important information. Higher timeframes take display priority over lower timeframes — a weekly level takes precedence over a daily level at the same price — but both are represented in the consolidated label. Actionable signals (inside bars, hammers, shooters with defined triggers) take priority over static reference levels. This prevents chart clutter while preserving all relevant information in a readable format.
Intelligent Label Adaptation
Labels dynamically update as market structure changes. When a magnitude target from one timeframe coincides with a trigger level from another, the label consolidates to reflect both roles (e.g., "W MAG + D Trigger"). When levels are hit, invalidated, or superseded, labels update color and text to reflect current status rather than disappearing — preserving context for the trader.
Full Timeframe Continuity (FTFC) Filtering
FTFC status is calculated by evaluating directional bias across all enabled timeframes. When all timeframes show bullish bias (closing up relative to open), FTFC is bullish. When all show bearish bias, FTFC is bearish. Mixed bias means no continuity. Users can filter signals to only appear when FTFC aligns with the signal direction, reducing noise during consolidation.
Take Action Windows
When a signal forms on a higher timeframe, the indicator highlights the period during which that timeframe's candle remains open. This visual window reminds traders when a setup is "in force," providing a frame of reference for seeking entries on smaller timeframes.
Domino Detection
A Domino setup occurs when a signal on one timeframe can trigger another signal on an adjacent timeframe. The indicator detects and alerts on these conditions.
Bar Coloring
New in v3. Chart candles can be painted by their Strat classification or by the current Full Timeframe Continuity state, with optional highlighting when a bar flips to a Failing 2. One mode is active at a time, and coloring is off by default.
Preview Mode
When the market is closed, the indicator shifts to the next period's levels so setups can be planned before the open. The Auto default detects the instrument type and activates during off-hours — weekends for futures, pre/post-market for equities, even holidays — and turns itself off when trading resumes.
IMPLEMENTATION DETAILS
This implementation addresses several practical challenges traders face.
Multi-timeframe consolidation: Rather than constantly switching chart timeframes or mentally tracking multiple structures, all analysis exists in one view with intelligent deduplication when levels overlap.
Configurable detection methods: Hammer/shooter and Failed 2 detection aren't one-size-fits-all. The four Failed 2 methods and three hammer/shooter definitions let traders match the indicator to their specific confirmation requirements rather than accepting a single rigid definition.
Dynamic level management: Levels don't just appear and disappear — they adapt. A target becoming a trigger, a level being hit, or a setup invalidating all produce specific visual feedback rather than simply removing information. This preserves market context as price develops.
Alert filtering depth: Alerts can be filtered by FTFC alignment, signal type, specific timeframes, or Domino conditions — and the consolidated alert can append trigger, magnitude, exhaustion, and stop prices plus the FTFC state to each message — allowing traders to specify exactly which conditions warrant notification without building complex alert logic manually.
Performance optimization: Multi-timeframe analysis can be computationally expensive. This implementation consolidates data requests and limits historical depth on intensive calculations to maintain fast load times without sacrificing real-time functionality.
HOW TO USE IT
Setup
Pick a timeframe preset — TheStrat Classic, Scalp, Day Trade, Futures/Crypto, Swing Trade, or Investing — or set Custom to configure all six timeframe slots manually. Enable or disable specific bar combinations you want to see (e.g., 2-1, 3-2, etc.). Configure your preferred hammer/shooter and Failed 2 detection methods. Toggle FTFC filtering on/off based on your strategy.
Reading the Display
Solid lines represent reference levels (prior high/low). Dashed lines represent actionable triggers. Stop loss levels sit on the opposite side of the trigger. Color indicates direction (configurable) and status (hit, failed, active). Labels show timeframe, level type, and price — in Strat notation (2d-1-2u HAM) or a plain-language Universal style (REVERSAL, CONTINUATION, INSIDE, OUTSIDE, EXPANSION, FAILING). The data table shows current combo, bar type, and FTFC status per timeframe, in a Full layout or a Compact color-coded row.
Alerts
Set your chart timeframe equal to or lower than your lowest configured indicator timeframe, and set the alert interval accordingly. One consolidated alert covers every enabled timeframe with per-timeframe filtering, or use the individual alert conditions. Use alert filters to specify which conditions trigger notifications.
DOES IT REPAINT?
No. Completed-bar signals are built from confirmed higher-timeframe data and do not change on reload. The forming candle updates in real time by design — that is the live trigger you are watching — and the engineering rules that enforce this are documented in the repository.
DEFINITIONS
Combo: Two or more numbers representing the relationship between consecutive candles (e.g., 2-1, 3-2, 2-1-2). Each number indicates the candle type in sequence.
Candle Types: 1 = Inside, 2 = Directional, 3 = Outside.
Directional Bias: u = price above open, d = price below open.
C1/C2: C1 is the most recent closed candle, C2 is two bars back.
Magnitude: The measured move target, typically the C2 high or low.
Exhaustion: Extended targets beyond magnitude, indicating potential reversal zones.
FTFC: Full Timeframe Continuity — all timeframes aligned in the same direction.
Domino: A setup where one signal triggering can cascade into triggering adjacent timeframe signals.
KNOWN LIMITATIONS
PulseWire cannot request data from timeframes lower than your chart. Set chart timeframe accordingly.
Bar replay performance is unreliable with small timeframes and can produce runtime errors with certain low-timeframe combinations (PulseWire limitation).
Exhaustion calculations are limited to recent bars for performance.
Label overlap at similar price levels is a PulseWire rendering limitation.
OPEN SOURCE
The complete source is published under the Mozilla Public License 2.0, together with the engineering documentation (the no-repaint contract, the multi-timeframe correctness rules), a full changelog, and a settings reference. The repository and setup-guide links are in my signature and on my profile. This publication open-sources my earlier invite-only listing of the same name; that listing stays up for its existing users, and updates continue here.
Trading involves risk. This is a charting tool, not financial advice. Past performance does not guarantee future results. Indicator

Pivot Points | Falcon AI Draws Classic and Camarilla pivot levels from the previous daily or weekly
session, on any intraday chart.
How it works: at the start of each new period the script reads the previous
period's high, low and close. The Classic central pivot P is the average of
those three. R1–R3 and S1–S3 are then projected above and below P using the
previous period's range — R1/S1 nearest, R3/S3 widest. Camarilla works from
the previous close instead, adding and subtracting fixed fractions of that
same range (the published 1.1/12, 1.1/6, 1.1/4 and 1.1/2 series) to give
H1–H4 above and L1–L4 below. Because Camarilla is range-scaled rather than
average-based, its levels sit tighter to price, which is why intraday
traders often use them for smaller moves while the Classic set frames the
wider session.
Levels are calculated only from data that has already closed, so they are
fixed for the whole session and do not repaint. An optional setting lets
you compute from the still-forming period instead, in which case the lines
update live by design.
Only the current period extends to the right and carries labels; previous
periods remain as short segments over the range they belong to, so history
stays readable. Choose Classic, Camarilla or both, how many R/S pairs to
draw, daily or weekly, plus colours, widths and label side. Indicator

Auto Fibo Multi-Channel Reversal Retest by WiselyWealthComprehensive Guide: Auto Fibo Multi-Channel Reversal Retest Indicator
Introduction: What is this script and its purpose?
The "Auto Fibo Multi-Channel Reversal Retest" script, developed by WiselyWealth, is a highly advanced, multi-layered technical analysis tool built using Pine Script v6. Its primary purpose is to identify high-probability market reversal zones by aggressively filtering out market noise and false breakouts.
Unlike traditional indicators that rely on a single mathematical concept, this system is engineered to demand confluence from four distinct technical dimensions before confirming a trade setup: volatility boundaries, momentum exhaustion, dynamic structural support/resistance, and an execution retest protocol. This script is specifically designed for analytical traders who prioritize setup quality over sheer quantity, aiming to catch precise pivot points in the market while optimizing the risk-to-reward ratio through delayed, confirmed entries.
Working Mechanism: How the Script Detects Signals
The core strength of this script lies in its rigorous, four-step filtering engine. A final "Buy" or "Sell" signal is only painted on the chart when price action satisfies all of the following technical criteria consecutively:
1. Multi-Channel Volatility Extremes (The Boundary Check):
The script features a dual-channel trigger system, allowing users to select a primary and secondary volatility band or price channel. The available options include Bollinger Bands, Keltner Channels, Donchian Channels, Envelopes, and Linear Regression. The algorithm calculates the mathematical upper and lower bounds of these selected systems. For a setup to even begin formulating, the asset's price must simultaneously pierce or touch the extreme outer boundaries of *both* selected channels (for example, the low of the candle must be equal to or lower than both the primary lower band and the secondary lower band). This ensures the market is severely overextended and deviating heavily from its historical mean.
2. Reversal Signatures and Momentum Exhaustion (The Trigger):
Once price reaches the extreme boundaries, the script scans for a reversal catalyst. It detects foundational candlestick patterns, specifically Bullish and Bearish Engulfing candles, as well as Pinbars like Hammers and Shooting Stars. Furthermore, it incorporates momentum oscillators by scanning for Relative Strength Index (RSI) crossovers from overbought or oversold territories, alongside Stochastic oscillator crosses (below 20 for buys, above 80 for sells). This ensures the structural overextension is accompanied by a genuine, measurable shift in buying or selling pressure.
3. Dynamic Auto-Fibonacci Proximity (The Structural Filter):
To prevent taking reversals in the middle of a chart with no structural backing, the script automatically calculates a macro range by identifying the highest high and lowest low over a user-defined lookback period (defaulting to 100 bars). It dynamically plots key Fibonacci retracement levels (0.000, 0.236, 0.382, 0.500, 0.618, 0.786, and 1.000). A raw reversal signal is only validated if the price action occurs within a strict, customizable percentage tolerance (defaulting to 0.5% of the range) of these specific Fibonacci levels. This mathematical check guarantees that trades are only considered at major, historically proven support or resistance zones.
4. The ATR-Based Retest Engine (The Execution Delay):
This is the script's most robust feature. Even if all prior conditions are perfectly met, the script does not immediately issue a final order. Instead, it enters a "pending trend" state and calculates a required "Retest Price" using the Average True Range (ATR).
For a Buy setup, it subtracts a user-defined ATR multiplier (default 1.0) from the close price.
The system then waits for up to a maximum number of candles (default 4 bars) for the price to pull back and touch this specific delayed level.
If the price successfully drops to the retest level within the time limit, the final Buy order is fired and painted on the chart. This engine prevents traders from buying the absolute top of a fake-out and secures a significantly safer entry price.
How to Use: Settings and Optimal Market Conditions
Recommended Configuration & Settings:
Channel Confluence: Pairing Bollinger Bands as System 1 and Keltner Channels as System 2 is highly recommended. Because Bollinger Bands measure standard deviation and Keltner Channels measure ATR, requiring price to break both ensures you are capturing true volatility anomalies (often referred to as a "Volatility Squeeze" reversal).
Retest Engine Tuning: The default ATR multiplier of 1.0 with a 4-bar max wait limit provides a balanced, conservative approach. If you find that valid signals are expiring before execution because the market runs away too quickly, you should either increase the "Max Candles to wait" to 6-8 bars or lower the "Retest Value" to 0.5 for shallower pullbacks.
Fibonacci Tolerance: Keep the "Fibo Level Tolerance" relatively tight (between 0.3% and 0.8%). Expanding it too much defeats the purpose of precision support and resistance filtering.
Suitable Markets and Timeframes:
This indicator thrives in mean-reverting and broadly ranging market conditions, making it exceptionally well-suited for high-liquidity Forex pairs (such as EUR/USD or GBP/JPY), major Cryptocurrencies, and Equity Indices.
Optimal Timeframes: It performs best on medium to higher timeframes, such as the 15-minute, 1-hour, or 4-hour charts. Lower timeframes (like 1-minute or 3-minute charts) contain too much micro-volatility, which may cause erratic Fibonacci plotting and premature retest triggers.
Trend Context: By default, the script takes both Buy and Sell signals ("Trade Direction: Both"). However, in a strong macro-trending market, users should actively utilize the Trade Direction setting to take only pullbacks in the direction of the dominant trend. For example, selecting "Buy Only" during a structural bull market will filter out dangerous counter-trend short positions. Indicator

Fractal ZigZag with Retest & Filters By WiselyWealthIndicator ; Fractal ZigZag with Retest & Filters
Introduction
Welcome to the comprehensive guide for the 'Fractal ZigZag with Retest & Filters' indicator. This custom-built Pine Script indicator is an advanced technical analysis tool designed explicitly for the PulseWire platform. At its core, the primary objective of this script is to provide traders with high-probability entry signals by systematically filtering out market noise, avoiding false breakouts, and ensuring alignment with the overarching macroeconomic trend.
Many retail traders fall into the trap of entering positions during sudden, volatile price spikes, only to suffer heavy drawdowns when the market naturally pulls back. This script mitigates that risk by enforcing a strict, rules-based approach: identifying structural shifts, confirming the initial breakout, and mathematically demanding a pullback (or "retest") before issuing a final trading signal. Additionally, it features built-in alert conditions, making it perfectly suited for algorithmic traders who wish to automate their strategies via Webhooks, Telegram bots, or MT5 API integrations.
Technical Mechanism
The mechanical operation of this script is multi-layered, relying on a confluence of structural mapping, trend filtering, and volatility-based retest calculations. Here is a detailed, step-by-step technical breakdown of how the script detects and generates its buy and sell signals:
Mapping Market Structure with Williams Fractals:The foundation of the script relies on identifying key swing highs and swing lows using Williams Fractals. By default, the indicator evaluates a 5-bar lookback and look-forward period to pinpoint these structural pivots. Once a valid upward or downward fractal is identified, the script connects them using a dynamic ZigZag line. This creates an unambiguous visual map of the market's underlying structure, cleanly displaying the sequence of higher highs or lower lows.
Initial Breakout Identification: The indicator actively monitors the current closing price in relation to the most recently confirmed fractal levels. A raw bullish breakout is registered the moment a candle closes definitively above the last established fractal high. Conversely, a raw bearish breakout is noted when the closing price drops below the most recent fractal low. To prevent redundant alerts, the script locks the current trend state upon a successful breakout.
The ATR-Based Retest Engine: This is the most sophisticated aspect of the indicator. When "Enable Retest Mode" is activated, the script refuses to issue an immediate entry signal at the exact moment of the breakout. Instead, it uses the Average True Range (ATR) over a 14-period lookback to measure current market volatility. For a bullish setup, it calculates a "Retest Target" by subtracting a user-defined ATR multiplier (default 1.0) from the breakout close price. It then starts a countdown timer, allowing a maximum number of candles (default 3) for the price to drop back down and touch this target. If the pullback is successful within the time limit, the raw buy signal is triggered. If the time expires without a retest, the setup is safely invalidated.
Macro Trend Filtering: Before finalizing any signal, the script consults a 200-period Exponential Moving Average (EMA). If the trend filter is enabled, a buy signal is entirely suppressed unless the closing price is strictly above the EMA200. Sell signals similarly require the price to remain below the EMA200. Users can also force the script into a "Buy Only" or "Sell Only" mode to align with their long-term directional bias.
How to Use and Best Practices
To extract maximum profitability and accuracy from this script, traders must apply the correct settings and deploy it in appropriate market environments.
Recommended Settings and Configuration:
Conservative Swing Trading: Ensure the EMA200 Trend Filter remains enabled to keep you on the side of institutional momentum. You may also want to increase the Fractal Periods from 5 to 7 or 9. This filters out minor price fluctuations and forces the script to base its breakouts on major structural swing points.
Retest Calibration for Volatility:** The default ATR multiplier is 1.0, and the wait limit is 3 candles. If you are trading on lower timeframes (e.g., 5-minute or 15-minute charts), breakouts can take slightly longer to retest. Consider increasing the "Max Candles to wait" to 5 or 6. For highly volatile assets, increasing the ATR Multiplier to 1.5 can help you secure a deeper, more favorable pullback entry.
Directional Lock: If higher timeframe analysis dictates a strong bull market, use the "Trade Direction" setting to restrict signals to "Buy Only," eliminating counter-trend noise during minor market corrections.
Suitable Markets and Timeframes:
Forex and Indices: This indicator performs exceptionally well on major Forex pairs (EUR/USD, GBP/JPY) and Global Indices (US30, NAS100) on the 1-Hour and 4-Hour timeframes. These assets heavily respect market structure, and liquidity grabs (retests) are highly common after structural breakouts.
Cryptocurrency: Bitcoin and Ethereum on the 15-minute to 1-Hour charts are excellent candidates, provided you adjust the ATR multiplier to account for crypto's volatile, whipsaw movements.
Markets to Avoid: Avoid using this script in heavily consolidated, range-bound, or sideways markets. Breakout and trend-continuation logic inherently struggles during prolonged periods of low volatility, where price chops indiscriminately around the 200 EMA without clear directional follow-through. Indicator

BBG Trap Score Indicator=================================================================
Trap Score - Institutional Liquidity & Trapped Trader Index
=================================================================
DESCRIPTION:
The Trap Score Index is a quantitative, non-repainting trading indicator designed to detect inducement, liquidity sweeps, trapped buyers, trapped sellers, absorption, and failed breakouts near key higher-timeframe (HTF) level locations.
Rather than relying on subjective pattern recognition, this tool translates order flow dynamics and price action into a deterministic 0 to 100 Trap Score computed at the close of every candle.
CORE CONCEPT:
Markets frequently generate fake breakouts beyond key swing highs and lows to trigger retail stop orders and attract aggressive breakout traders into illiquid positions. When institutional participants absorb these breakout orders, price fails to advance and reclaims the broken level, leaving retail traders trapped.
This indicator calculates two independent normalized metrics:
• 🟥 Bearish Trap Score: Measures trapped buyers at key resistance ➔ Short Setup
• 🟩 Bullish Trap Score: Measures trapped sellers at key support ➔ Long Setup
11 QUANTITATIVE SCORING FACTORS (100 Points Max):
Each candle evaluates 11 weighted mathematical conditions to build the 0–100 score:
1. Liquidity Sweep at Level (15 pts): Candle wicks past an N-bar swing level and closes back inside with wick ratio ≥ 35% and sweep distance ≤ 0.50 ATR.
2. Failed Breakout / Reclaim (15 pts): Price traded outside a key level and failed to hold outside within 3 bars.
3. Extreme Delta (10 pts): Intrabar volume delta ≥ 2.0× its 20-period average.
4. Volume Expansion (10 pts): Candle volume ≥ 1.5× its 20-period SMA.
5. Absorption (15 pts): Extreme volume/delta expansion accompanied by minimal price progress (≤ 0.15 ATR).
6. Delta-Price Divergence (10 pts): Volume delta achieves a new 5-bar extreme while price close fails to confirm.
7. Large-Trade Absorption (10 pts): Extreme volume spike (≥ 2.5× average) with a large wick (≥ 40%) and price progress ≤ 0.15 ATR.
8. HTF Location Proximity (10 pts): Current price within 0.15 × HTF ATR of HTF Swings, Previous Day High/Low (PDH/PDL), Previous Week High/Low (PWH/PWL), or Session VWAP.
9. VWAP / Value Area Rejection (5 pts): Rejection wick crossing Session VWAP or ± 1 stddev bands.
10. Confirmation Candle (5 pts): Candle close confirming directional momentum past the sweep range.
11. Exhaustion (5 pts): 3 consecutive bars of declining volume with narrow candle range (< 0.50 ATR).
HOW TO TRADE WITH TRAP SCORE:
1. Conviction Tiers & Signal Thresholds:
• Score < 50: Neutral / No Trade
• Score 50 – 64: Low Conviction (Observe)
• Score 65 – 79: Standard Setup (Default Alert Trigger)
• Score 80 – 89: High Conviction Setup
• Score ≥ 90: Exceptional Setup
2. Entry Rules:
• Enter on the open of the bar following a confirmed signal candle where Trap Score ≥ 65.
• Ensure market has not established acceptance outside the swept reference level.
3. Stop Loss Placement:
• Long Position: Sweep Low - (ATR × 0.10)
• Short Position: Sweep High + (ATR × 0.10)
4. Profit Targets (Partial Scale-Out):
• TP1 (50%): At 1.0R or Session VWAP (Move stop loss to Breakeven).
• TP2 (25%): At range midpoint or opposing value area.
• TP3 (25%): At opposing liquidity pool (PWH for longs, PWL for shorts) or 3.0R.
KEY SETTINGS & CUSTOMIZATION:
• HTF Resolution: Higher timeframe context resolution (Default: 240 / 4H).
• Swing Lookback: Number of bars to confirm reference highs and lows (Default: 20).
• Minimum Entry Score: Configurable signal score threshold (Default: 65).
• Dashboard Table: Toggleable top-right status summary panel displaying live scores, conviction levels, sweep states, and signals.
NON-REPAINTING GUARANTEE:
This indicator uses strict non-repainting Pine Script v6 syntax. Higher timeframe security requests fetch only closed completed bars (lookahead = barmerge.lookahead_off) to prevent lookahead bias or hindsight repainting.
Indicator

Confluence Trend and Fibo Reversal SystemAn In-Depth Overview of the "Confluence Trend and Fibo Reversal System"
Introduction: The Purpose and Core Architecture
The "Confluence Trend and Fibo Reversal System" is a sophisticated, highly adaptable Pine Script trading indicator designed to dynamically navigate fluctuating market conditions. The primary objective of this script is to solve a fundamental problem in technical analysis: the tendency of trend-following indicators to produce false signals during sideways markets, and the failure of mean-reversion oscillators during strong trends. To achieve this, the indicator operates as a dual-regime trading algorithm. It constantly analyzes price action to determine whether the current market environment is trending or ranging (sideways). Based on this real-time assessment, the script autonomously switches its internal logic, deploying either a momentum-based confluence engine for trends or a reversal-based engine strictly filtered by Fibonacci retracement levels for sideways markets.
Operating Mechanisms: How the Indicator Generates Signals
The technical architecture of this indicator is divided into four distinct analytical engines that work together to validate trading signals.
1. The Market Regime Filter (Range Detection)
Before any signal is generated, the system calculates a "Range Score" to determine the market state. It evaluates six specific technical conditions:
ADX (Average Directional Index): Checks if the ADX value is below 25, indicating weak trend strength.
Bollinger Bands Position: Verifies if the closing price is contained securely within the upper and lower bands.
Bollinger Bandwidth (BBW): Measures volatility by checking if the current bandwidth is narrower than its 20-period moving average.
RSI (Relative Strength Index): Checks if the RSI is hovering in a neutral zone between 40 and 60.
Stochastic Oscillator: Confirms that the Stochastic K-line is resting in a non-extreme zone between 20 and 80.
EMA Convergence:Measures the gap between the 20-period and 50-period Exponential Moving Averages, checking if they are tightly converged within half of the Average True Range (ATR).
If the total score meets a user-defined threshold (defaulting to 4 out of 6), the system classifies the market as "Ranging" and activates the Reversal engine; otherwise, it defaults to the Trend engine.
2. The Trend Engine (Confluence Scoring)
When the market is clearly trending, the script relies on a strict multi-indicator confluence system to prevent premature entries. It generates a bullish or bearish score out of five possible points:
Price positioning relative to the 50-period EMA.
Directional dominance using the ADX (+DI vs -DI).
Momentum confirmation via MACD baseline crossovers.
Trend alignment with the Supertrend indicator.
Price placement above or below the Ichimoku Kumo Cloud.
A final buy or sell signal in trend mode is only triggered if the accumulated score meets the "Minimum Confluence Score" threshold (defaulting to 4 out of 5).
3. The Reversal & Fibonacci Engine
If the market is ranging, the script hunts for mean-reversion opportunities by scanning for specific price action anomalies and oscillator extremes. It looks for Bullish/Bearish Engulfing candles, Pinbars (Hammers and Shooting Stars), RSI overbought/oversold crossovers, Stochastic extreme crossovers, and Bollinger Band boundary breakouts.
Crucially, these reversal patterns are deemed invalid unless they occur in close proximity to an automatically generated Fibonacci level. The script identifies the highest high and lowest low over a 100-bar lookback period to draw dynamic Fibonacci retracement lines (0.000 to 1.000). A reversal signal is only approved if the price action happens within a tight percentage tolerance zone around these key Fibonacci levels.
4. The Retest Engine
To drastically reduce false breakouts, the script features a built-in "Retest Mode". Instead of firing a buy or sell signal immediately when conditions are met, the script calculates a target "retest price" offset by an ATR multiplier. It will then hold the pending signal in memory for a maximum number of candles (defaulting to 4). The final execution signal is only printed on the chart if the price pulls back to successfully retest this calculated ATR level, proving the validity of the breakout.
Implementation and Usage Guidelines
Recommended Settings
Trade Direction: It is highly recommended to leave the trade direction set to "Both" to allow the dynamic regime filter to operate at its full potential. However, if trading against a higher timeframe macroeconomic trend, users can restrict the system to "Buy Only" or "Sell Only".
Retest Mode: Keep "Enable Retest Mode" activated. While it may cause you to miss trades that instantly aggressively rally, it will save you from substantial losses caused by "fake-out" signals.
Confluence Threshold: For aggressive traders, lowering the Trend Minimum Confluence Score to 3 will yield more signals. For conservative traders, leaving it at 4 or 5 ensures that only the highest probability momentum shifts are traded.
Visual Enhancements: Keep the "Highlight Range Market Background" enabled. This feature turns the chart background orange during sideways markets, providing excellent visual context as to why the indicator is currently ignoring standard trend breakouts.
Suitable Markets and Timeframes**
Because the "Confluence Trend and Fibo Reversal System" actively adapts to volatility and structural shifts rather than relying on static logic, it is exceptionally versatile. It is well-suited for high-liquidity markets such as major Forex pairs (EUR/USD, GBP/USD), large-cap Cryptocurrencies (Bitcoin, Ethereum), and major Equity indices. Due to its reliance on 100-period lookbacks for Fibonacci mapping and 50-period EMAs for trend detection, the indicator performs optimally on medium to higher timeframes—specifically the 1-Hour (H1), 4-Hour (H4), and Daily (D1) charts—where market noise is minimal, and true institutional support and resistance zones are respected. Indicator

MSnR Key Level [6 Types]MSnR Key Level
This script maps support and resistance the way market structure actually builds it: from the
close of one candle handing over to the next.
Every pair of consecutive candles leaves a level behind. Depending on the two candle colours
that level is an A Level, a V Level, a Bullish Gap or a Bearish Gap. From there the script
keeps watching. The moment price closes through a level, that level does not disappear, it
FLIPS: support that breaks downward becomes resistance (SBR), resistance that breaks upward
becomes support (RBS).
The result is a complete structural map of the scan window rather than a hand-picked list of
levels, with each of the six types drawn so it can be told apart at a glance.
WHAT MAKES THIS DIFFERENT
1. Complete coverage, not a filtered selection.
Most support and resistance tools try to guess which swing points matter and throw the rest
away. This one does the opposite: every candle pair inside the scan window produces a level,
and all of them are drawn. What separates the important levels from the ordinary ones is not
whether they are shown, but how they are drawn. A level that has already been broken and
flipped looks different from one that has never been touched.
2. Levels keep flipping, and the chart shows the CURRENT state.
A level is not classified once and left alone. It is re-checked against every candle that came
after it, and every close through it flips it again. A level that broke upward, then back down,
then upward again is reported as RBS, because that is what it is today. A tool that stops at
the first break would still be calling it by its original name.
3. Six types, six line signatures.
Line weight carries strength and line colour carries side, so a line still tells you what it is
even where labels crowd together.
4. The level price is the CLOSE, not the wick.
Every level sits at the close of the first candle in the pair. Closes are where the market
actually agreed on a price, which is why a close through a level counts as a break here while a
wick through it does not.
THE SIX LEVELS
A candle is Green when close is greater than open and Red when close is less than open. A Doji,
where close equals open, is neither and forms no level. Only fully closed candles are read; the
running candle is never used.
Created from a two candle pair, the level price being the close of the FIRST candle:
A Level
Green candle followed by a Red candle. Sits above as resistance.
V Level
Red candle followed by a Green candle. Sits below as support.
Bullish Gap
Green candle followed by another Green candle. Sits below as support.
Bearish Gap
Red candle followed by another Red candle. Sits above as resistance.
Created when an existing level is broken:
RBS - Resistance Become Support
An A Level or a Bearish Gap that a Green candle later CLOSED above. The old ceiling is now a
floor.
SBR - Support Become Resistance
A V Level or a Bullish Gap that a Red candle later CLOSED below. The old floor is now a ceiling.
HOW A LEVEL FLIPS
Think of every level as living on one of two sides.
Resistance side: A Level, Bearish Gap, SBR. Price has to CLOSE above it to break it, and doing
so turns it into RBS, which moves it to the support side.
Support side: V Level, Bullish Gap, RBS. Price has to CLOSE below it to break it, and doing so
turns it into SBR, which moves it to the resistance side.
Because SBR and RBS are themselves on one of those sides, the flipping never stops. The script
walks forward from the bar a level was born on, all the way to the present, applying every
break in order. Whatever side the level ends on is what you see.
READING THE CHART
Color tells you the side:
- Red: resistance side, price has to close above to break it. A Level, Bearish Gap, SBR.
- Green: support side, price has to close below to break it. V Level, Bullish Gap, RBS.
Line weight tells you the strength:
- Thick solid: SBR and RBS. These have already been broken once and changed hands, which makes
them the levels most worth watching.
- Thin solid: A Level and V Level. A clean turning point between two opposite candles.
- Dotted: Bullish Gap and Bearish Gap. The most common and the weakest, formed by two candles
of the same colour.
That gives all six types a unique signature. A thick red line is an SBR, a dotted green line is
a Bullish Gap, and so on, without reading a single label.
Each line starts at the candle that set its price and extends to the right, so you can see how
price has behaved around it since. Its label sits at that same candle, above the line for a
resistance level and below it for a support level, so the label never covers the line itself.
A summary table in the corner counts each of the six types inside the current scan window, with
the three resistance-side types grouped above the three support-side types.
SETTINGS
Scan
- Scan Length: how many closed candles are scanned backwards. Every level inside that window is
drawn.
Level Types
- An individual switch for each of the six types. Hiding Bullish and Bearish Gap is the quickest
way to thin out a busy chart, since those are always the most numerous.
Style
- Resistance Side Color and Support Side Color.
Labels
- Show Labels, Label Offset in ticks, and Label Size. The offset is measured in ticks, so a
value that looks right on one symbol may need adjusting on another.
Summary Table
- Show, position and size of the corner table.
ALERTS
Six alert conditions are available: A Level, V Level, Bullish Gap, Bearish Gap, SBR and RBS.
Each message carries the level type, the symbol, the timeframe and the closing price. The same
messages are also sent through the alert function, so the "Any alert() function call" alert type
can deliver everything through a single alert.
All alerts are evaluated only after a candle has fully closed.
One thing worth knowing before you set these up: A Level, V Level, Bullish Gap and Bearish Gap
are created by EVERY candle pair, so those four alerts will fire on almost every bar. They are
there for completeness and for anyone feeding the data somewhere else. SBR and RBS only fire
when a level is actually broken, which makes them the two selective alerts of the six.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts one bar behind the latest bar, so the
candle that is still forming is never part of any calculation.
- Alert signals can only become true once a candle has finished. Price moving inside an open
candle cannot make a signal appear and then disappear.
- Levels are rebuilt on the last bar from confirmed history. A level's price never moves. Its
type can change, but only forward and only when a candle CLOSES through it, which is the whole
point of SBR and RBS. Once drawn, nothing shifts backwards.
When you create an alert, PulseWire may show a caution banner saying the indicator can
repaint. That banner appears automatically for any script that uses the built in bar state
variables, no matter how they are used, because the platform cannot check the intent behind
them. This script uses them for the opposite purpose: one of them is what restricts every signal
to bar close, and the other is what redraws the levels efficiently on the final bar. Choosing
"Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- This chart is dense by design. Since every candle pair forms a level, a window of 25 candles
produces roughly 25 levels, and doubling the window doubles the lines. That is intentional,
because the point is a complete map rather than a shortlist. If you want fewer lines, lower
the Scan Length first, then switch off the Gap types.
- PulseWire caps drawings at 500 lines and 500 labels. A very long Scan Length will hit that
ceiling and the oldest drawings will be dropped. The default is chosen to stay well inside it.
- The label offset is measured in ticks, and a tick is worth a very different amount on a crypto
pair than on a forex pair. Expect to adjust it when you move between symbols.
- Level prices come from closes, so a level can sit in the middle of a long wick. That is
deliberate, not a bug.
- Detection is purely structural. It reports where levels are and which way they have flipped.
It does not rank them by how many times price reacted, measure what happened afterwards, or
produce entries, targets or stops.
HOW TO USE IT
Read the chart in layers. The thick lines are the levels that have already proven they matter,
because price closed through them and the market treated them differently afterwards. The thin
lines are clean turning points. The dotted lines are background structure.
Levels that sit close together often matter more than any single one of them, since several
candle pairs agreeing on roughly one price is what a real zone looks like.
These are reference areas, not entry signals. Use them alongside higher timeframe structure, and
apply your own confirmation and risk management.
DISCLAIMER
This indicator is a level detection tool. It is not financial advice and it makes no claim about
profitability. Trading involves risk. Always apply your own analysis and risk management. Indicator

Engulfing Overlap Zone [8 Types]Engulfing Overlap Zone
This script looks for the moment control changes hands.
An engulfing pattern forms and commits one side of the market. Later that pattern breaks. On or
around the same candle, an engulfing pattern in the OPPOSITE direction confirms. When the two
structures occupy the same price area, that shared area is where one side was trapped and the
other took over. This script finds those moments and draws only that area.
Nothing else is plotted. Ordinary engulfing patterns, and engulfing patterns that simply failed,
are used internally but never drawn, because on their own they are not what this tool is about.
WHAT MAKES THIS DIFFERENT
1. It reports a transfer of control, not a pattern.
Most pattern tools mark every occurrence they find. This one requires a three step sequence to
complete before anything appears: a pattern forms, that pattern breaks, and an opposing pattern
confirms in the same price area. Any of the three missing means nothing is drawn.
2. The zone is measured, not just marked.
Two zones can touch by a hair or sit almost perfectly on top of each other. Those are very
different situations, so the script measures how much of the zone is actually shared and states
it as a percentage. You can then hide everything below a threshold you choose.
3. Everything is sorted into eight types.
The zone carries the identity of the engulfing pattern that took over, including whether that
pattern grabbed liquidity before it confirmed. Each of the eight can be shown or hidden
independently and has its own alert.
4. The hard part is the pairing.
When a pattern breaks there is often more than one opposing pattern nearby that could be its
counterpart. Picking the right one, and rejecting the ones that only look related, is what this
script is really about. The rule used is simple to state and is described below, but it is the
piece that decides whether the output is meaningful or noise.
THE PATTERNS INVOLVED
A candle is Green when close is greater than open, Red when close is less than open, and a Doji
when close equals open. A Doji is neither. Only fully closed candles are read, and the running
candle is never used.
Regular engulfing, two candles
R Buy EG: Red Base candle, and the very next candle is Green and closes above the Base High.
R Sell EG: Green Base candle, and the very next candle is Red and closes below the Base Low.
E-Regular engulfing, three or more candles
ER Buy EG: Red Base candle followed by a run of consecutive Green candles. The run must contain
at least 2 Green candles, and confirmation happens when one of them closes above the Base High.
A single Red candle before confirmation cancels the run. Doji candles are skipped: they neither
count toward the run nor break it.
ER Sell EG: the mirror image, with a Green Base and a run of at least 2 Red candles, one of
which closes below the Base Low.
If the very first candle after the Base already closes through it, that is by definition a
Regular pattern, so E-Regular requires the second candle or later to break the level. One Base
candle can never produce both.
Type 1, the same four patterns plus a liquidity sweep
Type 1 adds one requirement: before the close breaks through one side of the Base candle, price
must have traded through the opposite side.
T1 R Buy EG: the Confirm candle's Low reaches at or below the Base Low.
T1 R Sell EG: the Confirm candle's High reaches at or above the Base High.
T1 ER Buy EG: at least one Green candle of the run reaches at or below the Base Low.
T1 ER Sell EG: at least one Red candle of the run reaches at or above the Base High.
Any candle of the run can satisfy the sweep, including the Confirm candle itself. The sweep is
always measured against the Base candle, never against another candle in the run.
HOW AN OVERLAP ZONE IS BUILT
Step 1. A pattern confirms and is tracked from then on.
Step 2. The pattern breaks. A Buy Engulfing breaks when a Red candle CLOSES below its Base Low.
A Sell Engulfing breaks when a Green candle CLOSES above its Base High. A wick through the level
is not enough; the close has to settle beyond it.
Step 3. The script looks for an engulfing pattern in the opposite direction whose confirmation
lands on the breaking candle, or as close before it as possible, and whose zone shares both time
and price with the broken one. Where several candidates exist, the one closest to the break is
taken, because that is the one that actually represents the handover.
When all three steps line up, one zone is drawn: the price range of the Base candle of the
pattern that took over, running from that Base candle to its Confirm candle.
The eight resulting types are R Buy EG Overlap, R Sell EG Overlap, ER Buy EG Overlap, ER Sell EG
Overlap and the four Type 1 versions of the same. The type always describes the pattern that
took over, because that is the zone on your chart.
OVERLAP STRENGTH
Strength is the share of the drawn zone that sits inside the price range of the broken zone.
100 percent means the whole zone is shared, which is the tightest possible confluence. A small
number means the two structures barely reach each other. The figure is appended to each label,
and Minimum Overlap Strength lets you discard anything below a level you set. That threshold
applies to the chart, the summary table and the alerts together, so what you see and what you
are notified about never disagree.
READING THE CHART
Each zone is filled in two tones, and the split is the whole point:
- The part that shares price with the broken zone is drawn in the direction colour, green for a
Buy Overlap and red for a Sell Overlap, with a solid border. This is the confluence.
- Whatever is left over is drawn in neutral yellow with no border.
So the colour split you see is the strength figure, shown rather than stated. A zone that is
almost entirely green is strong. A zone with a thin green sliver and a large yellow body is
weak, and the percentage will say so.
Each zone carries a label with its type and strength, placed below a Buy Overlap and above a
Sell Overlap so it points at its own zone.
A summary table in the corner counts what was found in the current scan window, split by Buy and
Sell. Types you have switched off are still counted, so the table always reflects what the market
printed rather than what is currently on screen. Zones rejected by the strength threshold are not
counted, because that threshold decides what qualifies as a zone at all.
SETTINGS
Scan
- Scan Length: how many closed candles are scanned backwards. The running candle is always
excluded.
- Minimum Overlap Strength: the percentage a zone must reach to qualify.
Pattern Types
- An individual switch for each of the eight types.
Zone Style
- Separate colours for the shared area and the remaining area, on both the Buy and Sell side.
Labels
- Show Labels, Show Strength in Label, Label Size, and Label Distance from Zone as a percentage
of the zone height. Increase the distance on noisy charts so labels clear the candles.
Summary Table
- Show, position and size of the corner table.
ALERTS
Eight alert conditions are available, one per type:
R Buy EG Overlap, R Sell EG Overlap, T1 R Buy EG Overlap, T1 R Sell EG Overlap, ER Buy EG
Overlap, ER Sell EG Overlap, T1 ER Buy EG Overlap, T1 ER Sell EG Overlap.
An alert fires on the candle that completes the handover. Each message carries the type, the
symbol, the timeframe and the closing price. The same messages are also sent through the alert
function, so the "Any alert() function call" alert type can deliver every zone through a single
alert.
All alerts are evaluated only after a candle has fully closed.
If you read the source, note that the chart and the alerts are two separate paths. The chart is
rebuilt by scanning history backwards on the last bar, while the alerts keep a running list of
confirmed patterns and test each closed candle against it. Two paths are used because rescanning
the whole history on every bar would be far too slow, and a running list cannot redraw the past.
Both apply exactly the same rules and the same strength threshold, so they always agree.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts one bar behind the latest bar, so the
candle that is still forming is never part of any calculation.
- Every alert signal is written so that it can only become true once a candle has finished. Price
moving inside an open candle cannot make a signal appear and then disappear.
- Zones are rebuilt on the last bar from confirmed history. A drawn zone does not move, change
colour, change type or change its strength figure afterwards. It only leaves the chart when it
falls outside the Scan Length window.
When you create an alert, PulseWire may show a caution banner saying the indicator can repaint.
That banner appears automatically for any script that uses the built in bar state variables, no
matter how they are used, because the platform cannot check the intent behind them. This script
uses them for the opposite purpose: one of them is what restricts every signal to bar close, and
the other is what redraws the zones efficiently on the final bar. Choosing "Once Per Bar Close"
when creating the alert is still recommended.
NOTES AND LIMITATIONS
- These zones are rare by design. Three separate conditions have to line up, so long stretches
with nothing on the chart are normal and expected. If you want to see more, lower the strength
threshold before raising the scan length.
- Scan Length is capped lower than in a plain pattern scanner. Every candidate pattern has to be
followed forward for a break and then matched against opposing patterns, which is far heavier
than simply detecting a pattern. The cap keeps the script responsive on slower machines.
- A zone whose Base candle falls outside the scan window will not appear even if the handover
itself was recent. If zones seem to be missing, raise the Scan Length before changing anything
else.
- For alerts the number of patterns tracked at once is capped and the oldest are released first.
In practice patterns break or age out long before this matters.
- Detection is purely structural. It reports where control changed hands and how much the two
structures shared. It does not rank zones beyond that, measure what happened afterwards, or
produce entries, targets or stops.
- Doji candles are treated as neutral by design. They never act as a Base candle and never break
an E-Regular run. On symbols and timeframes that print many Doji candles this makes runs
slightly more tolerant than a strict same colour rule would be.
HOW TO USE IT
A zone marks an area where one side committed, was proven wrong, and was immediately replaced by
the other side. Traders commonly watch these areas for reactions when price returns to them,
particularly the shared portion, since that is the part both structures agreed on.
The strength figure is there to let you be selective. Starting at zero shows everything so you
can see how the tool behaves on your symbol and timeframe, and raising it narrows the output to
the tighter confluences.
Type 1 zones are worth separating out. There the pattern that took over first grabbed liquidity
and only then confirmed, which is a different sequence from a clean takeover.
These are reference areas, not entry signals. Use them alongside higher timeframe structure, your
own support and resistance mapping, and proper risk management.
DISCLAIMER
This indicator is a pattern detection tool. It is not financial advice and it makes no claim
about profitability. Trading involves risk. Always apply your own analysis and risk management. Indicator
