Advanced Support and Resistance with Reversal [AlphaPine]Advanced Support and Resistance with Reversal | AlphaPine
I built this indicator for a simple reason: a breakout line on its own does not tell me enough. I also want to know whether price comes back, holds the level from the other side, and later loses it again.
The script starts with confirmed swing highs and lows. Those become resistance and support. It then follows each level through three possible events: breakout, retest, and failure. Nothing here predicts the next move. It is a way to keep market structure organised without redrawing the same levels by hand.
The image below shows the full level lifecycle in one view, including the symbols that appear at each stage:
How a level is created
A resistance level comes from a confirmed pivot high. A support level comes from a confirmed pivot low. If zones are enabled, the zone uses the wick range of the pivot candle rather than an arbitrary fixed width.
Pivot confirmation takes time. With Pivot Length set to 10, for example, the script needs ten bars on the right side of the pivot before the level exists. This delay is intentional.
Pivot Length controls how selective the swing detection is. A larger value usually gives fewer levels and confirms them later.
Lookback Period sets how long a level remains in the script's working history.
Maximum Levels per Type limits stored resistance and support records so the chart does not keep growing indefinitely.
Wick Dominance Filter keeps only pivot candles whose rejection wick is larger than the body and opposite wick.
Merge Nearby Active Levels removes clutter by skipping a new pivot when an active level of the same type is already nearby. Broken levels do not block a fresh one.
The merge distance uses ATR-14, so it adjusts to the instrument instead of relying on one fixed price interval.
Breakouts
The default breakout mode is Close . Resistance must close above its boundary, while support must close below it. This avoids counting every small wick through a level.
Wick mode reacts earlier. It triggers when the high or low crosses the boundary during the live candle. The recorded extreme cannot retract, but price can still close back inside the level, so Wick mode will naturally include more intrabar fakeouts.
Breakout Buffer adds an optional ATR-based distance beyond the level. Leave it at zero for the exact boundary, or raise it if very small breaks are not useful for your chart.
By default:
A resistance breakout prints an upward blue triangle below the candle.
A support breakout prints a downward orange triangle above the candle.
The marker colours are fully adjustable.
Retests and role reversals
After resistance breaks, the script waits to see whether price can retest it as support. After support breaks, it watches for the same level to act as resistance.
RS means old resistance has been confirmed as new support.
SR means old support has been confirmed as new resistance.
Reversal Confirmation controls what counts as a retest:
Close (default) requires the retest candle to touch the original zone and close back beyond the whole zone on the new-role side.
Touch accepts any later overlap with the zone. It is more sensitive and less strict.
Once confirmed, the new role stays fixed. An RS level remains tracked as support; it does not turn red merely because the latest candle happens to sit below it.
When a flip fails
A flipped level is removed when a confirmed candle closes through the far side of its zone. In other words, RS support fails below the zone and SR resistance fails above it.
If Show Reversal Failures is enabled, an ✕ marks the failure candle. The flipped line stops there, but the cross stays on the chart as a record of where the level died. That is why a failure cross can appear without a continuing line.
Breakout triangles and failure crosses use the original pivot as their Lookback anchor. This keeps their expiry on the same structural clock as the level they came from instead of giving every marker a new lifetime from its event candle.
Reading the chart
R1 is the nearest active resistance above price, followed by R2, R3, and so on.
S1 is the nearest active support below price, followed by S2, S3, and so on.
RS marks a confirmed resistance-to-support flip.
SR marks a confirmed support-to-resistance flip.
Triangles mark breakouts. Crosses mark failed flips.
A breakout marker is an event, not an entry instruction. I find the retest more useful than the first break, but how it is traded still depends on trend, execution, and risk rules outside this indicator.
Lines, zones, and historical placement
Historical Level Start decides where an original level begins:
Confirmation (default) starts it on the bar where the pivot became known in real time.
Pivot extends it back to the swing candle. This is useful for visual context, but the level was not available on that earlier candle.
Display as Zones replaces the single-price lines with the original pivot-wick range. If that level flips, the same price range is preserved; the zone is not moved to the opposite side of the price.
Colours
The Colors group separates colours by purpose, so changing a label does not force the matching line to use the same colour.
Resistance and support lines/zones.
RS and SR lines/zones.
Resistance, support, RS, and SR price labels.
Resistance and support breakout triangles.
Support and resistance failure crosses.
Zone fills and borders use transparent versions of the selected line colour so candles remain visible underneath.
Alerts
Seven alert conditions are included:
Resistance Breakout
Support Breakout
Resistance to Support Flip
Support to Resistance Flip
Flipped Support Failed
Flipped Resistance Failed
Any S/R Event
The combined alert is useful when one alert should cover every structural event. Separate conditions are available when different actions are needed for breaks, flips, or failures.
A sensible starting setup
The defaults use Close confirmation for both breakouts and retests. Start there if you prefer signals that wait for the candle to finish. Wick breakout and Touch retest are available when earlier, more sensitive reactions are more important.
If the chart feels crowded, try increasing Pivot Length, increasing Merge Distance, enabling the Wick Dominance Filter, or reducing Maximum Levels per Type. Settings should be adjusted for the instrument and timeframe rather than treated as universal values.
Important limitations
Confirmed pivots always arrive late by Pivot Length bars. That is how pivot confirmation works, not a hidden predictive signal.
Pivot historical placement back-draws a confirmed level for context. Use Confirmation placement when real-time availability matters.
Wick mode can mark a breakout that later closes back inside the level.
The current-bar drawings rebuild while the candle updates.
The script uses chart data only. It does not request higher-timeframe data or use lookahead.
It does not place orders, calculate position size, or guarantee that a level will hold.
Use it as a structure tool, then apply your own trade plan and risk management.
אינדיקטור

RSI Multi Levels Pro (JPT)🔹 OVERVIEW
RSI Multi Levels Pro (JPT) is an enhanced Relative Strength Index (RSI) indicator that expands the traditional 70/30 approach by introducing multiple configurable RSI levels to help traders observe momentum shifts and potential reversal areas.
Instead of relying on a single overbought or oversold threshold, the indicator displays several RSI zones, allowing users to monitor how momentum develops as price moves through different strength levels.
The indicator also highlights potential exhaustion areas using optional visual markers when RSI reaches user-defined extreme level
🔹 HOW IT WORKS
The indicator calculates the standard RSI using a configurable period and plots it against multiple horizontal reference levels.
As RSI moves through these levels, traders can observe changes in market momentum and identify areas where price may begin slowing, reversing, or continuing its current move.
Optional markers are displayed when RSI reaches predefined upper or lower threshold values, helping users quickly identify extreme momentum conditions.
🔹 MULTI-LEVEL RSI STRUCTURE
Unlike a traditional RSI with only two reference levels, RSI ML Pro provides multiple zones including:
// RSI Levels
lvl90 = input.int(90, "Level 90")
lvl80 = input.int(80, "Level 80")
lvl70 = input.int(70, "Level 70")
lvl60 = input.int(60, "Level 60")
lvl50 = input.int(50, "Level 50")
lvl40 = input.int(40, "Level 40")
lvl30 = input.int(30, "Level 30")
lvl20 = input.int(20, "Level 20")
lvl10 = input.int(10, "Level 10")
These levels can help distinguish between moderate momentum and more extreme market conditions.
🔹 VISUAL FEATURES
• Standard RSI Line
• Configurable Multi-Level Reference Lines
• Upper Momentum Markers
• Lower Momentum Markers
• Customizable Colors
• Adjustable RSI Length
• Clean and Lightweight Display
• Compatible with Dark and Light Chart Themes
🔹 INDICATOR INPUTS
The indicator includes several customization options:
RSI Length
Adjust the RSI calculation period.
Reference Levels
Configure upper and lower RSI levels to match your trading style.
Signal Markers
Enable or disable momentum markers.
Colors
Customize the appearance of the RSI line, levels, and markers.
🔹 HOW TO USE
A common workflow is:
Observe the overall RSI trend.
Monitor how RSI reacts around the configured reference levels.
Watch for momentum markers when RSI reaches extreme values.
Combine RSI observations with your own price action or market structure analysis before making trading decisions.
🔹 SUITABLE MARKETS
RSI ML Pro can be used on:
• Forex
• Cryptocurrency
• Stocks
• Indices
• Commodities
• Gold
The indicator is designed to work across multiple timeframes depending on the user's trading approach.
🔹 COMBINING WITH OTHER TOOLS
Many traders choose to combine RSI ML Pro with other forms of technical analysis such as:
• Trend Analysis
• Support and Resistance
• Moving Averages
• Market Structure
• Volume Analysis
• Supply and Demand Zones
Using multiple forms of analysis may provide additional market context.
🔹 NOTES
RSI measures momentum and should not be interpreted as a standalone buy or sell signal. Strong trends can remain in higher or lower RSI regions for extended periods.
This indicator is intended as a technical analysis tool and should be used alongside appropriate risk management and independent market analysis. אינדיקטור

אינדיקטור

אינדיקטור

Dynamic Gravity Attractor (DGA) [MarkitTick]💡 An advanced technical indicator designed to identify, weight, and visualize significant price zones using a physics-inspired gravitational model. By treating historical price pivots as physical masses that exert gravitational pull on the current price, this tool dynamically highlights levels of high structural importance. This offers traders a unique, quantitative perspective on support, resistance, and the overarching market equilibrium based on continuous volume and touch data.
✨ Originality and Utility
Unlike standard static support and resistance indicators that simply draw horizontal lines at arbitrary swing highs and lows, this system introduces a dynamic, weighted engine based on volume execution and touch frequency.
Traditional indicators often clutter the chart with dozens of obsolete lines. This tool resolves the issue by clustering proximate price levels using an Average True Range based spatial resolution. This synthesizes fragmented levels into cohesive, highly actionable Gravity Zones.
The core utility lies in its ability to quantify the relative strength of these zones using a gravitational constant. Instead of merely sorting by recency, it sorts by actual structural pull. This allows traders to cleanly distinguish between minor intraday speed bumps and major macroeconomic price attractors that have a high probability of influencing future price routing.
🔬 Methodology and Concepts
The script operates on a robust foundation of interconnected logical pillars, ensuring a precise reading of historical market structure:
• Pivot Detection and Clustering: The indicator identifies standard non-repainting pivot highs and lows using a defined lookback window. Instead of plotting each pivot individually and causing chart noise, it evaluates if a new pivot falls within an existing cluster radius. This radius is dynamically determined by a user-defined percentage of the 14-period Average True Range. If a match is found, the cluster aggregate price, volume, and touch count are updated using a volume-weighted average formula.
• Mass Calculation: Each clustered zone is assigned a quantitative mass. This mass is a blended metric derived from the total trading volume transacted at that specific level and the frequency of price touches it has endured. Users can dynamically adjust the weighting of these two components to favor volume-heavy execution levels or frequently tested psychological levels.
• Gravitational Pull: Applying a concept directly akin to classical physics, the indicator calculates the gravitational force of each active zone relative to the current closing price. The formula incorporates the zone calculated mass, a user-defined Gravitational Constant, and the inverse square of the absolute distance between the zone and the current price.
• Net Force and Equilibrium: By aggregating the gravitational pull of all active zones above the current price and subtracting the zones below, the script calculates a continuous Live Net Force. This net force dictates the overall directional bias of the underlying market structure.
🎨 Visual Guide
The tool provides a rich, multi-layered visual experience, utilizing dark-mode optimized palettes to allow traders to interpret complex market structures at a rapid glance:
• Gravity Zone Lines: Horizontal lines representing the clustered price levels. The strongest mathematical attractor is plotted with a solid line, while weaker zones use dashed line styles to indicate secondary importance. The thickness of the line directly correlates with its top-ranking status.
• Zone Colors: Levels situated above the current price are colored in a visual gradient from vibrant purple to deep violet, representing resistance or overhead gravity. Levels situated below are colored in a gradient from yellow to dark orange, representing support or underlying gravity. The color intensity and opacity scale dynamically with the calculated mass of each zone.
• Gravity Fields (Halos): Semi-transparent background boxes surrounding the strongest top-ranked gravity zones. The vertical height of the box represents the zone mathematical sphere of influence, calculated using the true range and the zone specific mass.
• Gravity Center: A distinct dotted cyan line plotting the weighted center-of-mass between the strongest overhead attractor and the strongest underlying attractor. This acts as the market current fulcrum.
• Dynamic Labels: Textual tags attached to the right of the gravity lines. These indicate the exact price level, an arrow denoting if the force is pushing up or down, and a percentage representing its gravitational strength relative to the maximum active zone.
• Heatmap Candles: The main chart candles are recolored based on the Live Net Force. A bullish bias paints the candles in a specific underlying color, while a bearish bias paints them in an overhead color. Border and wick colors adapt similarly to show micro-shifts in pressure.
• Gravity Dashboard: A comprehensive on-chart data table displaying the active number of tracked levels, the exact prices of the top upper and lower attractors, the Net Force bias, the current cluster size, and a visual block-bar representation of the highest active mass percentage.
📖 How to Use
• Trend Identification: Observe the Heatmap Candles and the Net Force metric on the Gravity Dashboard. A sustained bullish color bias suggests the price is being pulled upward by a stronger overhead attractor or violently pushed from a massive underlying support base. Traders should look to align their directional trades with this dominant net force.
• Targeting and Exits: Use the strongest Gravity Zone Lines as primary profit targets or areas to scale out of positions. Because these zones possess high mass, price tends to inevitably gravitate toward them over time.
• Entry Confirmation: Wait for the price to enter a Gravity Field. If price action demonstrates rejection patterns, long wicks, or volume anomalies within these specific halo zones, it provides a high-probability entry for mean-reversion trades.
• Equilibrium Trading: The Gravity Center line represents a literal point of balance between the primary opposing structural forces. Observing the price crossing, retesting, and holding this level can indicate a fundamental shift in structural control from sellers to buyers, or vice versa.
• Automated Alerts: The script includes built-in alert conditions for when the price comes within a tight proximity to the strongest above or below zones. It also fires alerts when the overall Net Force shifts direction. All alerts and webhooks are constructed as strictly formatted JSON strings designed for flawless third-party execution, dynamically calculating and including the Entry Price, the precise Take Profit target, and the exact Stop Loss invalidation price.
⚙️ Inputs and Settings
• History Depth (bars): Determines how far back in time the script looks to evaluate active pivots. A higher number tracks long-term macro zones, while a lower number focuses on immediate intraday structure.
• Number of Gravity Zones: Limits the maximum number of attractor lines drawn on the chart to prevent visual clutter.
• Level Cluster Resolution (ATR%): Controls how closely pivots must be to merge into a single, heavier zone. A higher value aggregates more historical levels together, creating fewer but stronger zones.
• Gravitational Constant G: A mathematical multiplier that scales the overall gravity calculations. Adjusting this tweaks the sensitivity of the Net Force output.
• Mass Components (Volume & Touch Weight): Fractional sliders allowing the user to adjust whether a zone mass is more heavily derived from transacted volume or the sheer number of times the price has historically tested the level.
• Minimum Touch Count: The baseline number of times a price level must be tested before it is officially registered as having enough mass to generate gravity.
• Visual Settings: Comprehensive toggles to independently turn lines, text labels, halo fields, the dashboard table, and center-of-gravity boxes on or off according to individual visual preference and chart cleanliness. All colors are fully user-configurable without hardcoding.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The tool borrows directly from classical mechanics, specifically the law of universal gravitation, to mathematically model financial market microstructure. In standard physics, the attractive force of gravity between two independent objects is directly proportional to the product of their masses and inversely proportional to the square of the distance between their centers.
In the context of this script, the current market closing price acts as a dynamic point mass navigating a static field of larger, stationary masses, representing the historical support and resistance clusters. The script operationalizes this concept by calculating Mass as a composite statistical index of cumulative trading volume and historical test frequency. Volume acts as the density of the price level, representing committed capital and trapped liquidity, while touch frequency represents the psychological reinforcement and memory of the level among market participants.
By rigidly utilizing the inverse square law of distance, the indicator mathematically guarantees that nearby price levels exert exponentially more influence on current price action than distant levels. This accurately reflects the highly localized nature of market liquidity, order book depth, and slippage. Furthermore, the clustering algorithm employs a dynamic threshold based on Average True Range, introducing a volatility-normalized spatial resolution. This specific mechanism ensures that the radius of a mass point expands in highly volatile environments and contracts in tight consolidations, strictly adhering to established principles of adaptive signal processing, robust statistical smoothing, and dynamic time warping.
⚠️ 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. אינדיקטור

Smart SR Zones [JOAT]SMART SR ZONES
Support / resistance done properly. Most public SR scripts paint a horizontal line at every pivot, which produces wallpaper, not analysis. Smart SR Zones does the opposite — pivots are first detected with a volatility-aware engine, then clustered into zones, then scored by volume and touches, then filtered by spacing and distance. What ends up on the chart is the small handful of levels that actually matter for the current market state.
Pivot detection — preset-driven
A single Strength Preset selects the personality of the pivot engine:
Scalp — 4 left / 2 right, 0.4× ATR clustering tolerance, 4-bar minimum spacing. For 1–5m charts.
Local — 6 / 4, 0.5×, 8-bar. Tight zones from recent structure.
Swing — 15 / 8, 0.9×, 20-bar. The balanced default.
Major — 35 / 15, 1.4×, 50-bar. Wide macro zones.
Custom — every parameter is exposed for manual tuning.
The preset abstraction means you do not need to refit anything across timeframes — pick the read you want and the engine does the rest.
Clustering, not stacking
When two pivots fall within Cluster Tolerance × ATR of each other they are merged into a single zone, with the box span widened to cover both extremes. This is the difference between a "level" and a "zone": a level pretends price is precise, a zone respects the fact that liquidity sits in a band. The cluster tolerance is ATR-relative so the same setting works across symbols.
Touch counting, properly gated
A pivot must contribute to a cluster from a minimum bar spacing (preset-driven). Without this filter a chop within a zone gets counted as ten separate touches and inflates the strength score. With it, a zone earns its touch count from genuinely independent visits.
Volume-weighted strength + star rating
Each cluster accumulates the bar volume at every contributing pivot. The aggregate is converted to a 1–3 star rating relative to the strongest zone currently on the chart, and is shown in the zone label alongside the touch count. Zones can optionally be coloured by volume share so the visually loudest box is the one carrying the most demonstrated activity.
Zone of Interest (ZOI) — the headline filter
A zone earns the ZOI badge when all of these are true at the same time:
It has met the minimum-touches threshold (so it is real structure).
Its volume share is above the ZOI volume threshold (so it is meaningfully active).
It has not been touched recently — at least ZOI Quiet bars since the most-recent touch.
In other words, a ZOI is a high-quality level that the market is conspicuously not testing — and these are usually the next levels that matter. The ZOI gets a bright burlywood border with an optional animated pulse so it visually separates from the rest of the SR stack.
Distance hiding
A "Hide zones farther than %" input drops anything whose centre price is too far from current — so when you scroll into history the chart does not get cluttered with macro zones from another era. Set to 0 to keep everything visible.
Broken zones and dropped zones
Two optional historical layers:
Broken — zones that were physically closed through. Renders in a desaturated palette so you can see where structure failed without confusing it for active level.
Dropped — zones that were removed not by a break but by reorganisation, because newer / stronger pivots reshuffled the cluster set.
Both are off by default so a working chart stays clean.
Optional signal layer
Three small markers (all off by default) for traders who want execution hints rather than just structure:
Successful test — circle on bars that touched an active zone and rejected.
Retest — diamond when price returns to a broken zone from the opposite side, inside a configurable window.
Zone reaction — small diamond on a touch-with-hold, plus a text label on physical break events.
A configurable cooldown prevents back-to-back markers from the same zone.
Dashboard
A compact diagnostic table, positionable to any of nine corners, monospaced. Shows nearest support / resistance with distance, current ZOI status, active zone count per side, and the preset in use. A compact mode hides descriptions for narrow layouts.
Alerts
A single high-signal alert is exposed: Zone of Interest activation — fires on the first bar a zone qualifies as a ZOI. The other layers are visual diagnostics, not alert-grade; this is intentional, because the ZOI rule is the strongest filter in the script and is what you actually want to be notified about.
How to read it
Look at the chart and ignore everything except the ZOI-tagged zones and the stars. The stars tell you which historical levels have the most demonstrated activity; the ZOI badge tells you which of those have been deliberately avoided recently. The intersection — a star-rated ZOI close to price — is the cleanest level read this script can produce. Use the volume score and the touch count as a tiebreaker when multiple ZOIs are in play.
Suggested settings
Default Swing preset works well from 1H through 1D on liquid futures, FX, and crypto. Drop to Local for intraday execution and Scalp for tape-reading on minute charts. Major is for weekly / monthly macro reads. The ZOI volume threshold (70%) is intentionally strict — drop it to 50–60% if you want more frequent ZOI candidates.
Originality / what's reused
The vocabulary (pivot, cluster, touch count, broken zone, retest) is public-domain market-structure language. The implementation — the preset-driven engine, the ATR-clustering, the volume-weighted star rating, the ZOI rule (touches + volume share + quiet-period), the dropped-zone reorganisation logic, and the volume-share intensity colouring — is JOAT-original and tuned together as a single system. No third-party code reused.
Open source
Published open-source under the default Mozilla Public License 2.0. The source is fully documented inline — every helper is sectioned, every input has a tooltip, and the structural layers are separable so you can learn from any specific piece. Forks welcome with credit.
Limitations
SR is structural context, not a signal generator. Smart SR Zones does not print buy / sell labels — it prints zones, ratings, and a single high-quality ZOI alert. On extremely illiquid instruments the volume-share rankings will be noisy and the ZOI rule will fire less often; that is the right behaviour. Zones beyond the Pivot Memory horizon are dropped to stay under TradingView's 500-object cap.
—
-made with passion by jackofalltrades
אינדיקטור

Exhaustion Zones (Momentum Episodes) [HermesCore]WHAT THIS INDICATOR DOES
Exhaustion Zones (Momentum Episodes) watches RSI, the Relative Strength Index, a standard momentum gauge that runs from 0 to 100. When it closes beyond a threshold (70 high, 30 low by default), a saturation episode begins. While the episode lasts I track two things: the most extreme price it prints, and the highest or lowest RSI it reaches. The moment RSI closes back inside, the episode is over and one event fires.
That event leaves a zone on the chart. Not an arbitrary band: the zone is the wick of the bar that printed the episode extreme. That wick is the exact range where the last buyers or sellers ran out. The question this script keeps asking is simple: where did price stand when the fuel ran out, and does that place get respected afterwards?
Every zone gets a 0 to 6 quality score at birth, and from then on the script counts what happens: held or broken, per grade, with sample sizes shown.
WHY IT IS DIFFERENT
Most overbought and oversold tools mark the moment and move on. An arrow prints at RSI 70 and nobody ever counts what happened next. My rules are:
- An episode is one event, not a stream of signals. RSI can sit above 70 for thirty bars; that is still one episode, one zone. The state machine needs no cooldown tricks because episodes are naturally separate: RSI has to leave and come back.
- The zone is price structure, not decoration. It spans the wick of the episode-extreme bar, padded to a minimum thickness when the wick is thin, rejected entirely when a single mega-candle would paint an unusable block (the dashboard counts those rejections too).
- The score never changes after birth. It is built only from facts known the moment the episode ends.
- Every zone resolves and every resolution is counted. Held versus broken, per grade, with n. If grade A zones hold no better than grade C zones on your chart, the dashboard will tell you so.
- Everything updates on confirmed bars only. An episode cannot start, peak or end within a forming candle. No intrabar flicker, no repainting events.
HOW TO READ THE CHART
- Zone box: red above price (exhaustion high, resistance), green below (exhaustion low, support). A label like "Exh High A S:5 RSI:77" reads: exhaustion high, grade A, score 5, the episode peaked at RSI 77.
- The saturated inner band at the extreme side is the core: the final half ATR (Average True Range, a standard volatility measure) of the wick, where the move was most exhausted. The fainter remainder is the rest of the wick.
- The vivid one-candle stripe inside the zone marks the exact bar that printed the extreme.
- Gold color with a soft glow: the grade is A or S. Those are the premium zones.
- Thicker border: the zone was touched, price came back to it at least once.
- Faint grey boxes without text: resolved history. A slightly stronger outline means the zone held, a weaker one means it broke. History whispers, it does not shout.
- Zones farther than 6 ATR from price render dimmed, so your eye goes to what is in play.
THE SCORE
- Saturation depth: peak RSI reached 80 or beyond (20 or below for lows), +2. Just past the threshold, +1.
- Climax volume: the extreme bar traded above its own volume average, +1.
- Fast fade: RSI closed back inside within 5 bars of its peak, a fast rejection, +1.
- Episode divergence: price printed a more extreme level than the previous episode while peak RSI stayed less extreme, +1. Compared episode to episode, and stated as such.
- Wick quality: the rejection wick of the extreme bar is at least 45 percent of its body, +1.
Grades: S (6), A (5), B (4), C (3), D (0 to 2). The strength filter is off by default: episodes are scarce enough to show them all and let the grade speak. Turn it on if you only want premium zones.
HELD VERSUS BROKEN
A zone is broken when price closes beyond its far edge. A zone is held when it survives to its maximum age (400 bars by default) without that happening. Every resolved zone lands in the per-grade statistics: "18% held 32 / 149 (n=181)" reads as 32 held, 149 broken, 181 judged in total.
Be aware what the definition means: held is a strict standard. Surviving 400 bars unbroken is a long time, so the absolute percentages run low by design. What matters is the ordering. On my charts S grades hold clearly better than A and B, which hold better than C. That ordering is the evidence that the score measures something real, and your own dashboard will show you whether it does on your market.
DASHBOARD
RSI now with its state. Episode now: when a saturation episode is live you see its running extreme and peak RSI update bar by bar, so you watch the zone being born. Active zone count per side. Five grade rows with held percentage, raw counts and n. Lifetime events per side plus total touches. Guard rejects, the oversized zones that were refused. Heat bars are proportional.
HOW I USE IT
This script is deliberately timeframe agnostic: an RSI episode means the same thing on every chart, only the rhythm changes.
- 4H is where I read regime. Episodes are scarce there and the zones land on swing highs and lows you would have marked by hand. An A or S exhaustion high on 4H is a place I expect sellers to defend.
- 1H is the middle ground: more events, still clean structure.
- 15m is the execution and evidence frame. Episodes are frequent, so the statistics build n fast, and I use the zones as intraday reaction levels. Expect more mediocre grades here; the dashboard shows you exactly how mediocre.
My core read is the combination of grade and first touch. A fresh A or S zone that gets its first touch is the highest quality moment this script produces: price returning to the exact range where the last push died, while the statistics tell me how often that place held in the past. A D zone breaking is not a surprise, it is the base rate.
SETTINGS THAT MATTER
- Saturation Level High and Low (70/30): the episode thresholds. Widen to 75/25 for fewer, heavier episodes.
- Deep Saturation Level (80): the line between +1 and +2 for depth.
- Zone Max Age (400 bars): the held standard. Lower it and held becomes easier to earn; the statistics will recalculate accordingly. Neither setting is the truth, they answer different questions.
- Min Zone Thickness (0.25 ATR) and Max Zone Height (3.0 ATR): the zone sanity guards.
- Broken Zones Become: greyed history or deleted. Your choice of how loud the past is.
- Show Exhaustion Core, Highlight Extreme Candle, Focus Fade: the visual layers, all styling only, all on by default.
ALERTS
New Exhaustion High Zone, New Exhaustion Low Zone, Exhaustion High First Touch, Exhaustion Low First Touch, Exhaustion Zone Broken, New A/S Exhaustion Zone. Touch alerts fire on the first touch only.
CALCULATION DETAILS
- All state changes happen on confirmed bars. Episodes start, extend and end on closes only.
- RSI length 14 on close by default. The episode tracks the running price extreme and RSI peak; both freeze the moment the episode ends.
- The zone spans from the episode extreme to the body edge of the extreme bar, padded to the minimum thickness, rejected above the height cap.
- Divergence needs a previous episode on the same side to compare against, so the first episode per side can never score that point.
- The statistics are computed from the bars your chart loads, so they differ per timeframe and per symbol. Neither is wrong, they measure different samples.
HONEST LIMITATIONS
- The statistics describe the past. They tell you how often these zones held on the loaded history, not what the next one will do.
- Held is defined as surviving the maximum age. That is a strict standard and it keeps the absolute percentages modest. Read the ordering between grades, not the raw numbers, and recalibrate the age to your own horizon.
- Scores on a fresh chart need history: volume averages and the previous episode for divergence take time to fill in.
- RSI is calculated on the chart's candles. On Heikin Ashi, Renko or other synthetic chart types the closes are not real prices and every result is distorted. Use standard candles.
- A zone is a place where exhaustion happened, not a guarantee of reversal. Strong trends break exhaustion zones routinely; that is exactly what the broken counts are there to show you.
ORIGINALITY
Overbought and oversold are as old as RSI itself. The episode state machine, the wick-anchored zone construction, the 0 to 6 scoring, the held versus broken accounting per grade and the visual language are my own work, built from scratch in Pine v6. Every number on the dashboard is recomputable from the rules in this description.
Questions and suggestions are welcome in the comments. Enjoy.
אינדיקטור

Liquidity Sweep Retracements [MarkitTick]💡An advanced analytical framework designed to decode market micro-structure by evaluating the depth, speed, and statistical probability of price pullbacks. Rather than relying solely on static Fibonacci levels, this tool dynamically tracks the historical characteristics of an asset's swing behavior, alerting the user to structural anomalies and shifts in momentum. By intersecting retracement analysis with liquidity sweep detection and a built-in heatmap, this framework offers a comprehensive lens into market behavior, isolating environments where trend continuation is highly probable versus areas prone to exhaustion.
✨ Originality and Utility
Standard market analysis often relies on rigid tools that do not adapt to changing volatility conditions. This script introduces a highly original dynamic evaluation method by actively saving the characteristics of recent price swings into an internal array and establishing a moving statistical baseline.
The primary utility of this script lies in its multidimensional analysis. It does not just measure how far price has pulled back; it calculates how fast the pullback occurred and compares this velocity to the asset's recent historical baseline. This enables the framework to categorize price action not merely as a "pullback," but as a statistically significant "Anomaly" or an "Aggressive" move. Furthermore, by weaving Higher Timeframe (HTF) trend alignments and localized liquidity sweep detections into a single, cohesive dashboard and visual charting environment, it reduces chart clutter while exponentially increasing the depth of available data.
🔬 Methodology and Concepts
● Swing Structuring and Pivot Detection
The foundational logic relies on identifying structural pivot highs and lows through a localized lookback and look-forward window. The algorithm requires a definitive peak or trough isolated by user-defined left and right bars, establishing the anchor points for all subsequent mathematical measurements.
● Dynamic Retracement Scoring
Once a swing structure is confirmed, the script calculates the exact percentage of the retracement relative to the preceding impulse. These percentages are continuously categorized into defined behavioral zones:
Impulse (Less than 23%)
Shallow (Less than 38%)
Healthy (Up to 61.8%)
Deep (Up to 78.6%)
Reversal (Beyond 78.6%)
● Retracement Momentum Velocity (RMV)
Time and price are merged to extract velocity. By dividing the total percentage of the retracement by the number of bars it took to form, the script generates a velocity reading. This reading is dynamically compared against an array of historical velocities to determine if the current counter-trend move is unusually aggressive.
● Statistical Anomaly Detection
The script manages historical arrays of past retracement data, calculating a rolling mean (average) and standard deviation. An anomaly is triggered when a live retracement deviates significantly from this moving baseline, determined by a user-defined standard deviation multiplier. This mathematically highlights structural shifts before they mature into full trend reversals.
● Liquidity Sweep Verification
The indicator actively monitors price interactions with localized structural extremes. A bullish sweep occurs when price pierces a recent significant low but closes decisively above it, creating a structural trap. Bearish sweeps apply the inverse logic to structural highs.
🎨 Visual Guide
● Heatmap Candles
The script overrides standard candle colors with a dynamic heatmap that visually translates the health and speed of the current retracement:
Green indicates a healthy, standard retracement zone.
Orange highlights a weak zone, suggesting the trend is losing foundational strength.
Red warns of a deep structural violation bordering on a reversal.
Purple explicitly signifies an aggressive Retracement Momentum Velocity (RMV), warning of high counter-trend momentum.
● Price Action Overlays and Labels
Pivot Highs and Lows are marked precisely with small red and green crosses. (Note: These appear retroactively once the defined right-side bars confirm the pivot).
Data Labels are plotted at swing extremes. These carry a dark blue-gray background with dynamic text colors. They display the exact retracement percentage alongside quality badges, anomaly alerts (orange for opportunity, red for danger), and RMV warnings.
● Liquidity Markers
When a sweep is detected, small distinct shapes appear. "LS" text markers are plotted in bright green below bullish sweeps and bright red above bearish sweeps, visually anchoring liquidity traps directly onto the price action.
● The Analytical Dashboard
Located in the top right corner, this panel serves as the central intelligence hub. It utilizes shaded backgrounds to organize critical data natively on the chart.
Retracement and Health bars utilize block characters (█/░) to visualize strength out of 100%.
HTF Alignment displays the macro bias via clear text and color codes (Green for Bullish, Red for Bearish).
The dashboard aggregates averages, velocities, and quality metrics into a readable, high-contrast matrix.
📌 Note : the best way to resolve visual overlap is to navigate to the Object Tree and drag the indicator above the main chart layer, or simply hide the native candles in your chart settings.
📖 How to Use
Traders should monitor the dynamic relationship between the visual candle heatmap and the dashboard metrics.
Trend Continuation: Look for retracements that remain within the "Healthy" or "Shallow" zones (highlighted by green candles and positive dashboard health scores) that align with a bullish HTF signal.
Anomaly Exploitation: If an anomaly label appears marking a shallow retracement (orange text warning), this historically suggests an unusually strong impulse where standard deep pullbacks may not materialize.
Exhaustion Warnings: If the candles shift to purple, indicating an RMV Aggressive state, the counter-trend velocity is statistically high. Traders may use this to delay entries until momentum normalizes, or to identify structural traps if this aggression ends in a marked Liquidity Sweep (LS marker).
⚙️ Inputs and Settings
• Swing Settings
Controls the sensitivity of pivot detection. Higher values filter out market noise for major swing structures, while lower values react quickly to micro-trends.
• Retracement and Anomaly Parameters
Dictates the maximum number of historical retracements held in the memory array. The Standard Deviation Threshold allows users to expand or contract the mathematical boundary for what qualifies as an anomaly.
• RMV (Velocity) Limits
Controls the aggression threshold. Adjusting the multiplier determines how much faster a retracement must be compared to the historical average to trigger the purple heatmap and aggressive warnings.
• Liquidity Sweeps
Defines the lookback length for identifying local highs and lows that act as liquidity pools.
• Alerts and Dashboard Configuration
Enables fully customizable JSON-formatted alerts based on statistical deviations, and allows users to toggle or completely restyle the visual dashboard and heatmap components.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
This indicator is heavily anchored in statistical mechanics and kinematics principles applied to financial time-series data.
• Gaussian Distribution and Variance
Instead of utilizing fixed geometric sequences (such as the Golden Ratio), the framework treats market swings as a dataset exhibiting normal distribution characteristics. By calculating the variance and extracting the standard deviation of historical swing depths, the script establishes mathematically sound confidence intervals. When price action breaches these standard deviation bands, it represents a statistically significant outlier, formally alerting the user to a fat-tail market event.
• Financial Kinematics
The integration of Retracement Momentum Velocity (RMV) introduces physics-based kinematic principles to price action. In traditional mechanics, velocity is the rate of change of position with respect to a frame of reference. The algorithm defines the frame of reference as the structural swing, calculating velocity as the percentage of displacement per unit of time (bars). By tracking the rolling average of this velocity, the script can algorithmically determine when kinetic energy in a counter-trend direction is statistically abnormal, independent of the actual price level reached.
⚠️ 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. אינדיקטור

Smart Money Renko Matrix [MarkitTick]💡 The Smart Money Renko Matrix is a comprehensive, multi-dimensional analytical tool designed to bridge the gap between noise-free price action and complex market microstructure. By stripping away time-based market noise using an Average True Range (ATR) based price framework, this script isolates pure directional movement and volume distribution. It synthesizes Multiple Time Frame (MTF) trend convergence, order flow dynamics, and quantitative statistical exhaustion models into a single, cohesive interface. This indicator constructs a dynamic environment where traders can objectively measure trend strength, identify structural shifts, and manage risk systematically.
✨ Originality and Utility
Traditional indicators often rely on time-based charts, which can introduce significant noise during periods of high volatility or sideways consolidation. This script departs from the norm by utilizing a volatility-adjusted mathematical matrix to construct its baseline. What makes this tool exceptionally useful is its ability to merge quantitative statistical models—such as Z-Score based trend exhaustion and rolling Volume Profile Point of Control (POC)—with modern structural market concepts. Instead of viewing trend, volume, and structure as isolated elements, this script computes a unified algorithmic score, presenting actionable setups without the clutter of traditional multi-indicator chart layouts.
🔬 Methodology and Concepts
● Volatility-Adjusted Baseline
The core of the script calculates synthetic open, close, and volume values using an underlying ATR resolution. This ensures that a new computational block is only formed when price moves beyond a dynamically adjusting volatility threshold, completely disregarding the passage of time.
● Multiple Time Frame (MTF) Convergence
The script evaluates trend momentum across three independent higher timeframes (e.g., 1H, 4H, Daily) by measuring price relative to a 50-period Exponential Moving Average (EMA). It assigns a logical integer score. A trend is only considered fully converged (Bullish or Bearish) if it achieves a score of 2 or higher across the matrix, filtering out lower-timeframe false breaks.
● Quantitative Z-Score Trend Exhaustion
To identify overextended movements, the script maintains a dynamic array of historical directional streaks. It calculates the rolling mean and standard deviation of these streaks. When a current directional run exceeds a Z-Score of 2.0 (meaning it is two standard deviations beyond the historical average), the trend is mathematically flagged as exhausted, warning of a high-probability mean reversion event.
● Rolling Volume Profile and Point of Control (POC)
A continuous volume profile is constructed by indexing the traded volume at specific price levels over a rolling 100-block window. The algorithmic engine identifies the price node with the maximum aggregated volume, establishing the dynamic Point of Control (POC), which serves as a highly reactive structural support or resistance level.
● Structural Sweeps and Order Blocks
The logic continuously scans for structural liquidity sweeps. A sweep occurs when price pierces a predefined historical high or low (based on user lookback) but fails to close beyond it, indicating trapped volume. Following a confirmed sweep and a change in directional momentum, the system algorithmically generates boundary boxes that represent significant structural order blocks.
🎨 Visual Guide
● Heatmap Candles
Bullish Streaks: Represented by a color gradient starting from Dark Green and transitioning to Bright Green as the directional streak matures.
Bearish Streaks: Represented by a color gradient starting from Dark Red and transitioning to Bright Orange.
Exhaustion State: If the Z-Score exhaustion threshold is breached, the candles become highly transparent or gray, visually warning of a fading trend.
● Core Matrix Lines
Renko Upper/Lower Bounds: Solid lines plotting the mathematical extremes of the current volatility block.
Renko Midline: A dotted line tracking the exact median of the active block structure.
Reversal Close: Prominent circular markers highlighting the exact pivot point where the directional streak changes state.
● Risk Management Visuals
Trailing Stop: A dashed line appearing below bullish price action or above bearish price action, dictating the dynamic trailing invalidation level.
Entry and Target Lines: When a setup triggers, a distinct set of dashed lines appear: Gold for the Entry price, Pink for the Stop Loss (SL), Cyan for Take Profit 1 (TP1), Blue for Take Profit 2 (TP2), and Orange for Take Profit 3 (TP3). Small textual labels accompany each line displaying the exact price.
● Order Flow and Structural Shapes
Sweep Labels: Small text labels reading "Liq" appear above or below the wicks when a structural sweep is confirmed.
Wick Rejections: Displayed as small cross shapes (`xcross`). Pink crosses above price denote clustered bearish rejections; Cyan crosses below denote clustered bullish rejections.
Volume Divergence: Small circular shapes appear above or below the bar when a directional push occurs without the support of a moving average volume breakout, signaling potential weakness.
● Heads-Up Dashboard
A specialized table located in the top right corner. It displays the current ticker, active timeframe, the MTF Convergence Tier score (color-coded green or orange), the dynamic block size in absolute price terms, the current Volume Profile POC level, and the calculated numerical values for the active Entry, SL, and TP targets.
📖 How to Use
● Identifying Trend Direction
Observe the primary color gradient of the main chart layout. Trade strictly in the direction of the bright, saturated colors. Ensure that the dashboard confirms the trend with a "Tier 2" or "Tier 3" MTF Convergence score before looking for entries.
● Spotting Reversals
Wait for the emergence of a Liquidity Sweep label ("Liq"). Once this prints, monitor the chart for a color transition (e.g., green shifting to red). A reversal is further validated if a structural Order Block box is painted immediately following the sweep, or if exhaustion logic visually grays out the prior trend.
● Executing and Managing Risk
When a directional change occurs that aligns with the higher timeframe score, utilize the auto-generated dashed risk lines. Place your entry at the Gold dashed line. Set your structural invalidation at the Pink dashed line. As price progresses, manually scale out of the position by targeting the Cyan, Blue, and Orange dashed lines. Utilize the dynamic trailing stop line to protect open profits as the trend matures.
⚙️ Inputs and Settings
• Volatility Settings
Adjust the base lookback period for the Average True Range calculation. Increasing the multiplier directly increases the price distance required to generate a new block, effectively filtering out more noise but delaying signal generation.
• Visual Gradients
Users can customize the starting and ending colors for both bullish and bearish streaks, as well as define the specific streak depth required to reach maximum color saturation.
• Risk Management Configurations
Allows traders to toggle between dynamic standard risk or structure-based stop losses. Users can input specific multiplier values to independently adjust the distance of the Stop Loss and all three Take Profit levels.
• MTF Tier Scoring
Select the three specific higher timeframes the algorithmic engine will use to calculate the baseline trend momentum. By default, these are structured as Intraday, Medium, and Macro.
• Structural Lookbacks
Define the historical bar count used to identify major swing points. A higher lookback period will result in fewer, but mathematically more significant, sweep identifications and order block generation.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Absolute Mean Deviation and ATR Computation
The foundational framework of this matrix relies on the Average True Range, a volatility metric introduced by J. Welles Wilder. The script calculates the greatest of the current high minus the current low, the absolute value of the current high minus the previous close, and the absolute value of the current low minus the previous close. By applying a smoothing function to this true range over a defined period, the script normalizes the non-stationary nature of financial time series into a standardized unit of volatility.
● Standard Score (Z-Score) Application on Serial Dependence
To model trend exhaustion quantitatively, the script measures the serial dependence of consecutive directional outcomes (streaks). By storing the historical lengths of these streaks in a dynamically updating array, the engine computes the population mean (μ) and standard deviation (σ). The current streak length (x) is evaluated using the standard Z-Score formula: z = (x - μ) / σ. A result greater than 2.0 indicates that the current movement lies beyond the 95th percentile of the normal distribution curve, mathematically classifying the trend as statistically anomalous and prone to immediate mean reversion.
● Volume Distribution Theory
The Point of Control (POC) logic is rooted in volume distribution profiling. It assumes that market participants execute trades at equilibrium prices. By segmenting the Y-axis into distinct price nodes and accumulating the corresponding traded volume over a rolling lookback window, the script identifies the mode of the distribution curve. This maximum volume node represents the price level with the highest historical consensus of value, naturally acting as a dense algorithmic barrier for future price action.
⚠️ 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. אינדיקטור

Smart Gap & Support and Resistance Breakout [MarkitTick]💡 This technical analysis script provides a highly sophisticated framework for market structure mapping, gap categorization, and breakout validation. By tracking structural pivot points and combining them with algorithmic gap analysis, the indicator systematically identifies areas of significant price imbalance and evaluates their impact on subsequent price action. The tool dynamically maps historical and developing support and resistance levels across multiple timeframes, integrating volume analysis and time-decay functions to ensure only the most relevant structural levels remain active. Designed for robust technical evaluation, it utilizes a strict non-repainting architecture for its multi-timeframe data retrieval, ensuring historical integrity during retrospective analysis.
✨ Originality and Utility
While many indicators plot basic support and resistance levels or highlight price gaps, this tool introduces a high degree of originality through its algorithmic synthesis and mashup methodology. The combination of structural pivot tracking and gap categorization is a deliberate and logical confluence. Gaps inherently represent sudden shifts in supply and demand, frequently acting as hidden support or resistance zones. By merging gap analysis with traditional pivot-based market structure, the script provides a unified view of market geometry.
Furthermore, the script distinguishes itself by categorizing gaps dynamically into three distinct types: Breakaway, Runaway, and Exhaustion. Rather than treating all price voids equally, it applies contextual logic—such as trend maturity and volume confirmation—to evaluate the probabilistic nature of the gap. The utility is further enhanced by an advanced multi-timeframe engine that overlays macro structural levels onto the active chart without introducing lookahead bias, providing traders with a pristine, top-down analytical perspective within a single pane.
🔬 Methodology and Concepts
● Structural Pivot Detection
The foundation of the script relies on identifying Swing Highs and Swing Lows.
A Pivot High is established when a specific high price is preceded and followed by a defined number of lower highs.
A Pivot Low is established when a specific low price is preceded and followed by a defined number of higher lows.
These points act as the empirical anchors for drawing support and resistance lines.
● Gap Categorization Engine
The script continuously scans for bullish and bearish price gaps (defined as a strict price void between the current low/high and the high/low of two bars prior, combined with directional candle confirmation). Once a gap exceeds the minimum size threshold, it is classified using the following methodology:
Breakaway Gaps (BW): Identified if the gap's occurrence coincides with the breaking of the most recently established structural pivot level. This signifies a forceful escape from a prior consolidation or trend phase.
Exhaustion Gaps (EX): Identified if the gap occurs after a prolonged trend duration (trend maturity) and is accompanied by a significant volume spike. This logic assumes that late-stage acceleration coupled with extreme volume often represents climatic buying or selling.
Runaway Gaps (RW): Any valid gap that does not meet the strict criteria for Breakaway or Exhaustion is classified as Runaway, representing standard trend continuation.
● Non-Repainting Multi-Timeframe Integration
To map higher timeframe (HTF) levels onto the lower timeframe (LTF) chart safely, the script employs a strict index-offset methodology. When fetching HTF pivot data, the script references the previous bar's calculated state while utilizing a lookahead parameter. This architectural design explicitly prevents future data leakage (lookahead bias), ensuring that historical backtesting and real-time execution behave identically.
● Breakout and Time-Decay Logic
Support and resistance lines are evaluated for breakouts based on closing prices. A breakout is only considered valid if the closing price decisively crosses the level and, if volume confirmation is enabled, the breakout bar's volume exceeds the defined moving average threshold. To maintain a clean visual workspace, levels can be subjected to a time-decay function, removing them from the chart after a user-defined number of bars.
🎨 Visual Guide
● Support and Resistance Lines
Green Lines: Represent active support levels derived from current timeframe pivot lows.
Red Lines: Represent active resistance levels derived from current timeframe pivot highs.
Thick Light Blue Lines: Highlight major support levels from the higher timeframe.
Thick Orange Lines: Highlight major resistance levels from the higher timeframe.
● Market Structure Labels
Red "HH" / "LH" Labels: Denote Higher Highs or Lower Highs at resistance pivots.
Blue/Green "LL" / "HL" Labels: Denote Lower Lows or Higher Lows at support pivots.
Purple "EH" / "EL" Labels: Indicate Equal Highs or Equal Lows.
● Gap Visualization Boxes
Blue Boxes: Highlight Breakaway Gaps (BW).
Orange Boxes: Highlight Runaway Gaps (RW).
Red Boxes: Highlight Exhaustion Gaps (EX).
Dotted Mid-Lines: Each gap box contains a dotted line calculating the exact mathematical midpoint of the gap, often acting as a highly reactive micro-level.
● Breakout Markers
Green Upward Triangles (▲): Plotted below the price to indicate a confirmed breakout of a resistance level. The number indicates how many distinct resistance levels were broken on that bar.
Red Downward Triangles (▼): Plotted above the price to indicate a confirmed breakdown of a support level.
Cyan/Orange Triangles: Represent breakouts of higher timeframe (HTF) levels.
📖 How to Use
● Interpreting Gap Signals
Breakaway Gaps: When a blue Breakaway gap forms, it suggests the initiation of a new directional phase. Traders typically monitor the borders of this gap to act as strong support or resistance upon any subsequent retests.
Runaway Gaps: The appearance of an orange Runaway gap confirms underlying trend strength. The midpoint of these gaps (the dotted line) is often used to gauge short-term trend health.
Exhaustion Gaps: A red Exhaustion gap serves as a cautionary signal. Because it indicates mature trend fatigue coupled with high volume, it suggests that the current directional momentum may be nearing a terminal phase or sharp retracement.
● Trading Support and Resistance Breakouts
Structural Mapping: Use the dynamically drawn S/R lines to identify the boundaries of the current market range.
Volume Confirmation: When the indicator plots a breakout triangle, ensure that it aligns with your broader directional bias. If the volume confirmation setting is active, the triangle inherently signifies that the breakout possessed above-average participation, increasing the mathematical probability of continuation.
Multi-Timeframe Confluence: Pay special attention when current timeframe price action interacts with the thicker HTF lines. A breakout that fractures both a LTF and HTF resistance level simultaneously carries significantly more structural weight.
⚙️ Inputs and Settings
● Swing Logic
Left Bars / Right Bars: Determines the number of bars required on either side of a candle to confirm a structural pivot. Higher values yield longer-term, more significant levels.
Max Stored Levels: Controls how many historical S/R lines remain active on the chart to prevent visual clutter.
Max Break Labels: Limits the number of historical breakout triangle markers displayed.
● Usability and Time Decay
Multi-Timeframe: Allows overriding the base timeframe for calculations.
Enable Time Decay: When activated, S/R levels that remain untested or unbroken will automatically expire and be removed from the chart.
Decay Period (Bars): The specific threshold of bars after which an untested level is deleted.
● Higher Timeframe (HTF) Levels
Enable HTF Levels: Toggles the calculation and plotting of macro S/R lines.
HTF Timeframe: The target timeframe for macro structural analysis (e.g., Daily, Weekly).
Hide Current TF When HTF Active: A visual filter to isolate only macro levels when desired.
● Algorithmic Filters and Analysis
Volume Confirmation: When true, breakouts are only validated if the bar's volume exceeds a moving average.
Min Gap Size (Points): Establishes a raw point threshold that a price void must exceed to be classified as a gap, filtering out negligible price skips.
Volume Spike Multiplier: The factor by which current volume must exceed the average to trigger Exhaustion gap logic.
Trend Maturity (Bars): The minimum number of bars a trend must have persisted from the last major pivot to allow for an Exhaustion gap classification.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Auction Market Theory and Liquidity Voids
The gap categorization matrix within this script is deeply rooted in Auction Market Theory (AMT). In AMT, price discovery is a continuous auction searching for liquidity. A gap represents a structural liquidity void—a pricing zone where no double-sided auction occurred due to extreme urgency from either buyers or sellers. The script's identification of Breakaway gaps mathematically isolates moments where this urgency successfully overcomes historical supply or demand nodes (the pivots). The dotted midpoint lines inside the gap boxes serve as theoretical "Fair Value" approximations for the void, representing the mean reversion target if the market attempts to repair the inefficient auction.
● Volume Spread Analysis (VSA) Integration
The Exhaustion gap classification heavily relies on principles derived from Volume Spread Analysis. In VSA, volume represents the effort of market participants, while price spread represents the result. The script mathematically quantifies an anomaly: when an extended trend (measured by the Trend Maturity parameter) produces a sudden gap on extreme volume (measured by the Volume Spike Multiplier), it implies climactic transfer of inventory from strong hands to weak hands. The algorithmic detection of these specific variables provides a quantifiable method for identifying trend exhaustion without relying on lagging, bounded oscillators.
● Fractal Market Geometry
By rendering both LTF and HTF structural pivots within the same visual plane, the script operationalizes the concept of fractal market geometry. Financial time series exhibit self-similarity across different scales. A pivot high on a 15-minute chart is formed by the same behavioral mechanics as a pivot high on a Daily chart, but they carry vastly different liquidity weights. The script's strict index-offset MTF architecture ensures that the geometric relationship between these distinct fractal layers is evaluated with absolute temporal accuracy, providing a mathematically sound representation of macro supply and demand overlaying micro price action.
⚠️ 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. I 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. אינדיקטור

Multi MA Framework [Gabremoku]Multi MA Framework is a flexible multi-moving-average overlay built for traders who want a clean and fully customizable MA workspace directly on the chart.
The indicator lets you plot up to four independent moving averages, each with its own:
visibility toggle
length
MA type
color
This makes it useful for traders who want to combine fast and slow averages, compare SMA vs EMA behavior, or build a personalized trend framework without loading multiple separate indicators.
What it shows
📈 Up to 4 Moving Averages — each line can be configured independently and displayed only when needed.
⚙️ SMA or EMA per line — choose the moving average type separately for each MA. SMA gives equal weight to all values in the period, while EMA gives more weight to recent prices and typically reacts faster to change.
🏷️ End Labels — optional right-side labels show each MA name, type, and length.
☁️ Cloud Fills — optional fills between:
MA 1 / MA 2
MA 3 / MA 4
These clouds help visualize alignment and separation between faster and slower averages.
Core idea
This script is designed as a moving average framework, not a rigid strategy.
Moving averages are commonly used to:
identify trend direction
smooth noisy price action
monitor dynamic support and resistance
compare short-term and long-term market structure
By allowing different lengths and SMA/EMA choices on every line, the script makes it easy to create your own structure, for example:
fast trend stack
swing trend map
long-term bias model
crossover-based workflow
How to use
A practical way to use the framework is to combine shorter and longer averages.
For example:
a shorter MA can track immediate momentum
a medium MA can define swing direction
a longer MA can define higher-level trend bias
When multiple moving averages align in the same direction, traders often interpret that as stronger trend structure. Crossovers between faster and slower averages are also widely used to monitor possible trend shifts, although they are lagging by nature.
Example setups
Here are some common ways this framework can be configured:
Trend stack: 10 EMA / 20 EMA / 50 EMA / 200 SMA
Swing trader view: 20 EMA / 50 SMA / 100 SMA / 200 SMA
Minimal structure: show only 2 lines and enable one cloud
Cross comparison: use SMA on one line and EMA on another with the same or similar length to compare responsiveness
Because EMA reacts faster and SMA is smoother, combining both can help balance responsiveness and stability.
Features
✅ Up to 4 fully independent moving averages
✅ SMA or EMA selection for each line
✅ Custom length for each MA
✅ Custom color for each MA
✅ Visibility toggle for every line
✅ Adjustable line width
✅ Optional right-side end labels
✅ Optional MA1/MA2 cloud fill
✅ Optional MA3/MA4 cloud fill
✅ Clean chart overlay design
Notes
This indicator is best used as a custom trend structure tool rather than a standalone signal engine. Moving averages are inherently lagging indicators, so they are most effective when used to define context and trend bias rather than predict reversals on their own.
Author: Gabremoku
Pine Script v6 אינדיקטור

Renko Heatmap Pro [MarkitTick]💡 Multi-faceted trend analysis and price action visualization system engineered to filter out time-based market noise and strictly highlight price momentum. By computing synthetic Renko bricks directly on your traditional time-based chart, this tool overlays a completely volatility-adjusted perspective of the market. It seamlessly integrates a streak-based momentum heatmap, dynamic support and resistance tracking, and a comprehensive risk-management dashboard into a single, cohesive interface. This allows analysts to visualize trend maturity, identify precise structural shifts, and monitor key risk metrics without relying on lagging, time-dependent oscillators.
✨ Originality and Utility
Standard charting relies on fixed time intervals, which often introduces "noise"—price fluctuations that occur simply because time is passing, not because structural momentum is shifting. The utility of this indicator lies in its ability to reconstruct the market using Average True Range (ATR) based Renko methodology natively over standard candlesticks.
What sets this script apart is its Streak Engine and Gradient Color framework. Instead of merely showing bullish or bearish states, the indicator quantifies trend depth. It tracks consecutive directional blocks and dynamically adjusts the visual weighting (heatmap) based on the longevity of the trend. This is further hybridized with an automated risk-management engine that calculates dynamic Stop Loss (SL) and Take Profit (TP) levels, alongside trailing stops and historical support/resistance levels that visually "fade" as they age. This creates an all-in-one suite for trend-following and structural analysis.
🔬 Methodology and Concepts
● Renko Ticker Construction
The script bypasses standard open, high, low, close (OHLC) bar data for its core signals, instead utilizing a secondary data request to construct ATR-based Renko blocks. A Renko brick is only formed when price moves a specified distance, completely disregarding the time it takes to make that move. In this system, the brick size is defined by the ATR, ensuring the threshold adapts to current market volatility.
● The Streak Engine
Every time a new Renko brick is formed in the same direction as the previous one, the internal streak counter increases. If a bullish brick follows a bullish brick, the count iterates upward. If a bearish brick prints, the bullish streak breaks, resetting the count and initiating a bearish streak. This creates a quantitative measure of trend duration and exhaustion.
● Dynamic Risk Management Engine
Using the confirmed close of the previous Renko block, the system calculates algorithmic risk parameters. Stop Loss and Take Profit levels are calculated as distinct ATR multiples extending outward from the confirmed entry price. A trailing stop is also maintained, dynamically tightening behind the trend (higher in a bull trend, lower in a bear trend) and only resetting when the Renko structure reverses.
● Historical S/R Decay Logic
When a reversal occurs, the open price of that reversal block is recorded as a structural pivot. The indicator logs this price point and tracks its age (in bars). As time progresses, the visual representation of this level fades out, acknowledging the market theory that older, untested levels gradually lose their structural relevance compared to fresh pivots.
🎨 Visual Guide
● Heatmap Candles
Trend Maturation (Gradients): The candlestick bodies are overridden with a heatmap gradient. A new bullish trend starts with a deep blue color and transitions toward a bright cyan as the streak extends. A bearish trend starts deep red and transitions to a bright orange/yellow as it matures.
Stagnation: If a bar does not generate a new Renko block, it is colored a muted gray, signaling a period of consolidation where the volatility threshold hasn't been met.
● Structural Plot Lines
OC Core Zone: A semi-transparent filled channel on the chart representing the upper and lower boundaries of the current active Renko block.
Renko Midline: A dotted line tracking the exact mathematical center of the active block.
Reversal Close Circles: Prominent circular plots that appear exclusively when a structural trend reversal is confirmed, marking a potential entry or exit node.
Trailing Stop: A dashed line trailing behind the current price action, colored dynamically based on the active trend (cyan for bullish support, orange for bearish resistance).
Support/Resistance (S/R) Lines: Dotted horizontal lines extending from past reversal points. Their opacity visually fades the longer they remain on the chart.
● On-Chart Shapes and Labels
Signal Triangles: Distinct ▲ BUY (below bar) and ▼ SELL (above bar) shapes accompanied by text, printed precisely when the Renko direction shifts.
Box Count Label: A small, dynamic text label appearing at reversals to indicate exactly how many consecutive boxes the previous structural leg lasted.
● The Dashboard Panel
Located in the top right corner, this heads-up display provides real-time quantitative metrics:
Trend Bias: Text readout of the current structural direction (Bull/Bear).
Streak Depth: A 10-block visual bar (e.g., ████░░░░░░) showing how far along the current trend is relative to the user-defined maximum gradient depth.
R:R Quality: A visual score rating the current Reward-to-Risk ratio based on the dynamic SL/TP levels.
Actionable Prices: Exact price readouts for Entry, Stop Loss, Take Profit, and the Trailing Stop.
📌 Important note : the best way to resolve visual overlap is to navigate to the Object Tree and drag the indicator above the main chart layer, or simply hide the native candles in your chart settings.
📖 How to Use
● Trend Identification and Exhaustion
Traders can monitor the Heatmap Candles to gauge both direction and maturity. When the candles transition from their starting colors (dark blue / deep red) to their terminal colors (bright cyan / bright orange), it indicates that the trend streak is becoming highly extended. An extended streak does not automatically imply a reversal, but it suggests momentum has been sustained for an extended period, which may precede a consolidation or pullback.
● Entry and Execution
A primary use case is waiting for a confirmed trend shift. When a reversal is validated, the indicator plots the Reversal Close Circle and the ▲ BUY / ▼ SELL shape. Traders can use the Dashboard Panel to immediately read the calculated Entry, SL, and TP prices.
● Managing Risk In-Trade
Once a position is active, the Trailing Stop dashed line provides a dynamic, structural level to trail a stop-loss. Additionally, traders can monitor price action as it approaches the historical dotted S/R lines. If price approaches a sharply colored (recent) S/R line, higher friction is expected. If it approaches a heavily faded (old) line, the level may carry less structural weight.
Note on Data Resolution: Because this tool queries secondary Renko data using the current chart's resolution and employs lookahead functionality on historical data, real-time current-bar fluctuations may briefly cross thresholds before closing. Decisions should strictly be made on confirmed bar closes, as indicated by the script's internal logic.
⚙️ Inputs and Settings
● ◈ Renko
ATR Length: The lookback period used to calculate the Average True Range, determining the size of the underlying Renko bricks.
ATR Resolution ×: A multiplier to scale the resolution up for higher-timeframe smoothing.
● ◈ Visuals
Bull/Bear Colors (Start & End): Customization for the heatmap gradients. You can define the exact color of a fresh trend and an exhausted trend.
Gradient Streak Depth: The number of consecutive bricks required to reach the "End" color. A higher number stretches the gradient over a longer trend.
● ◈ Risk Management
Dynamic SL/TP in Alerts: Toggles whether the SL and TP values are dynamically injected into the outgoing Webhook alert JSON.
SL / TP ATR Multiplier: Defines the distance (in ATR units) from the entry point to calculate the Stop Loss and Take Profit levels.
Show Trailing Stop Line: Toggles the visibility of the dynamic trailing stop boundary.
● ◈ Structure Analysis
Show S/R Levels & Max Levels: Toggles the historical reversal lines and sets a hard limit on how many previous levels are maintained on the chart to prevent clutter.
S/R Fade Age (bars): Determines how quickly the S/R lines lose their opacity as time passes.
● ◈ Webhook Actions
Configurable string inputs to match your specific execution bot commands (e.g., "long", "short", "closelong"). These are embedded into the JSON payload triggered by the indicator's alerts.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Market Noise and the Random Walk
In quantitative finance, high-frequency price data is often modeled with components of a Brownian motion or a Random Walk, where short-term movements contain significant "noise" (stochastic variation) independent of the underlying drift (trend). Standard time-based sampling captures all of this variance. By utilizing a Renko construction, this indicator applies a discrete filtration mechanism. It mathematically suppresses localized stochastic volatility by requiring price to traverse a minimum Euclidean distance (the ATR block size) before registering a state change.
● Volatility Clustering and Adaptive Thresholds
Mandelbrot and subsequent econometricians noted that market volatility clusters—periods of high variance are followed by high variance. Using a static brick size in Renko fails to account for leptokurtic market distributions. By anchoring the block size to the Average True Range, the indicator's filtration threshold becomes adaptive. During periods of volatility expansion, the required threshold widens, preventing the streak engine from being whipsawed by natural variance expansion.
● Momentum Decay and Mean Reversion Probability
The Gradient Streak Depth concept relies on the statistical premise of mean reversion following extended standard deviations from a mean. While trends can persist, the probability of a structural pullback increases as the streak count grows. The heatmap visually represents this probability density—translating a quantitative sequential count into a qualitative visual exhaustion metric, aiding in the assessment of asymmetric risk distribution.
⚠️ 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. I 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. אינדיקטור

SwingRegress Volatility Analytics [MarkitTick]💡 A comprehensive, multi-dimensional charting tool designed to fuse structural market analysis, statistically derived linear regression pathways, and volatility compression mechanics into a single, cohesive interface. By dynamically adapting its calculations to the latest shifts in market structure—specifically Change of Character (CHoCH) events—this script offers an adaptive mapping of price action, trend trajectory, and potential breakout zones directly on the primary chart.
● ✨ Originality and Utility
Traditional linear regression tools often require manual anchoring or rely on fixed lookback periods that fail to adapt to rapidly unfolding price dynamics. The distinct utility of this script lies in its self-adjusting structural anchoring mechanism. By automatically locking the regression baseline to the most recent significant pivot high or pivot low immediately following a structural break, the channel remains mathematically and contextually relevant to the current market regime.
Furthermore, this tool eliminates the need for separate sub-chart oscillators by integrating a sophisticated Smart Volatility Squeeze engine. This engine compares price variance against true range to identify periods of extreme price compression, overlaying these signals directly within the active regression pathway. The result is a unified, chart-centric view of both directional trend geometry and kinetic energy build-up, allowing for a more focused and uncluttered analytical process.
● 🔬 Methodology and Concepts
The underlying logic of this script is driven by three core mathematical engines operating in tandem:
• Pivot Discovery and Market Structure
The script continuously scans incoming price data to identify localized extremes, defined as Pivot Highs and Pivot Lows. A candidate bar is confirmed as a pivot only if it remains unbroken for a user-defined number of bars both prior to and following its occurrence. Once confirmed, these pivots establish the market structure. If the closing price breaks beyond the most recent opposing pivot, a Change of Character (CHoCH) is triggered, officially shifting the trend state.
• Anchored Linear Regression
Upon the confirmation of a new CHoCH, the script calculates a fresh Linear Regression Channel (LRC). The anchoring point is the origin pivot of the newly established trend. The script uses the Ordinary Least Squares (OLS) method to compute the slope and intercept of the best-fit line through the closing prices of the current regime. It then calculates the standard error of the estimate (standard deviation of the residuals) to project upper and lower variance bands parallel to the mid-line.
• Volatility Squeeze Mechanics
To identify volatility compression, the script employs a comparative analysis between standard deviation and Average True Range (ATR). It calculates a Bollinger Band (representing standard deviation) and a Keltner Channel (representing ATR) around a moving average baseline. A "squeeze" is structurally confirmed when the outer limits of the Bollinger Bands contract entirely within the boundaries of the Keltner Channels. This signifies that historical variance has dropped substantially below the average true range, often preceding a dynamic expansion in price movement.
● 🎨 Visual Guide
The visual interface is highly detailed and structurally color-coded to provide immediate contextual awareness without cluttering the chart.
• Current Anchored LRC
Mid Line: A solid Neon Cyan line representing the true mean of the current trend regime.
Band 1: A dashed Soft Cyan line mapping the first standard deviation threshold.
Band 2: A dotted Deep Azure line mapping the secondary, outer standard deviation extreme.
• Previous Anchored LRC
Mid Line: A solid Magenta line representing the historical mean of the preceding trend.
Band 1: A dashed Soft Magenta line for the historical inner variance.
Band 2: A dotted Blue-Violet line for the historical outer variance.
• Swing Point Zones
Swing High Boxes: Translucent red zones originating from a confirmed pivot high, drawing forward to act as dynamic resistance until broken by price action.
Swing Low Boxes: Translucent green zones originating from a confirmed pivot low, acting as dynamic support until structurally invalidated.
• Volatility Squeeze Candles
Cyber Gold Candles: When the market enters a state of extreme volatility compression (Bollinger Bands inside Keltner Channels) and is actively trading within the current or previous LRC pathway, the candles are painted a vibrant gold to highlight imminent kinetic release.
• Heads-Up Dashboard Display
Located in the top right corner, this self-updating data matrix provides critical real-time telemetry:
Structure Regime: Displays the active directional bias (Bullish, Bearish, or Neutral).
Last CHoCH: Indicates the direction and age (in bars) of the most recent structural shift.
Squeeze Intensity: A visual block-bar measuring the depth of the volatility compression.
ATR (14): The current absolute value of the Average True Range.
Dist to Swings: The percentage distance between the current price and the nearest Swing High/Low.
Risk/Reward Quality: A dynamic measurement of potential risk versus structural reward.
LRC Window Age: The duration of the current regression channel in bars.
LRC Position: Indicates whether price is currently trading inside the active regression channel, the previous channel, or is entirely unanchored.
● 📖 How to Use
The primary application of this tool is identifying high-probability continuation or mean-reversion setups following structural confirmation.
When a CHoCH event occurs, wait for the new Linear Regression Channel to populate. This channel defines your trading parameters. A high-probability setup manifests when price pulls back to the inner or mid-line of the active LRC, accompanied by the appearance of Cyber Gold squeeze candles. This visual confluence suggests that price is compressing directly at the statistical mean of the new trend, building energy for a move in the direction of the underlying structural regime.
Conversely, if price approaches the outer standard deviation bands (Deep Azure) without structural confirmation of a breakout, it suggests the market is statistically overextended, offering a potential mean-reversion opportunity back toward the Neon Cyan mid-line.
Note on Mechanics: Because the pivot discovery process requires a defined number of bars to confirm a swing high or low, there is an inherent lookback period. The swing zones will only appear after the pivot has been structurally verified. Furthermore, the linear regression channel recalculates its slope dynamically as new price data is added to the active regime, meaning the exact angle of the channel adapts in real-time until a new CHoCH locks it into history as the "Previous LRC."
● ⚙️ Inputs and Settings
The configuration panel is logically divided into primary analytical modules to allow for precise user calibration.
• Current Anchored CHoCH LRC
Adjust the sensitivity of the pivot discovery engine by modifying the Left and Right Pivot Bars. You can also customize the multipliers for the primary and secondary standard deviation bands, as well as toggle their visibility and modify line weights.
• Previous Anchored CHoCH LRC
Allows for the toggling of the historical channel, providing context on how the previous trend failed. Color and visibility settings are fully adjustable here.
• Swing Points & Zones Settings
Toggle the structural resistance and support boxes on or off, and customize their respective color opacities for a cleaner chart overlay.
• Smart Volatility Squeeze (BB vs KC)
Tune the underlying volatility engine. You can adjust the lookback length for the variance baseline, as well as the specific deviation multipliers for both the Bollinger Band boundaries and the Keltner Channel limits.
• Webhook Execution Configuration
Input exact JSON payload action names for algorithmic execution routing (Long, Short, Close Long, Close Short).
• Dashboard Settings
Customize the background and text colors of the heads-up data matrix to match your specific chart theme.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The mathematical foundation of this script is anchored heavily in econometrics and statistical probability theory.
At its core, the linear regression calculation utilizes the Ordinary Least Squares (OLS) estimator. This formula determines the line of best fit through a sequence of time-series data points by minimizing the sum of the squared differences (residuals) between the observed closing prices and the values predicted by the linear model. The slope of this line represents the average rate of change per unit of time, mathematically quantifying the drift of the active regime.
The parallel bands wrapping the regression line are derived by calculating the standard error of the estimate. Assuming the residuals are normally distributed (Gaussian distribution), one standard deviation captures approximately 68 percent of the price variance, while two standard deviations capture roughly 95 percent. When price moves beyond these outer bands, it represents a statistically significant deviation from the mean, inherently increasing the probabilistic likelihood of mean reversion.
The volatility squeeze mechanic operates on the principle of variance compression. Bollinger Bands are a derivative of standard deviation, making them highly reactive to short-term variance. Keltner Channels utilize the Average True Range (ATR), which measures absolute periodic volatility independent of a central mean. When the standard deviation of price contracts to such a degree that the Bollinger Bands fall entirely within the ATR-based Keltner Channels, it statistically confirms a state of anomalous energy compression. In financial academia, periods of artificially suppressed variance are overwhelmingly followed by periods of geometric expansion, providing the theoretical basis for breakout execution.
⚠️ 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. I 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. אינדיקטור

AlphaTrend Momentum Matrix [MarkitTick]💡 The AlphaTrend Momentum Matrix is an advanced, comprehensive trend-following architecture designed to dynamically track market momentum, manage dynamic trade states, and seamlessly bridge the gap between technical charting and automated execution. Far from a simple overlay, this script acts as a multi-layered analytical suite. It evaluates primary trend direction using volatility and volume-weighted money flow, filters out market noise with a custom state-matrix, and projects actionable higher-timeframe data onto the active chart. Furthermore, it incorporates an internal mathematical framework capable of dynamically calculating strict risk-to-reward targets and dispatching meticulously formatted JSON payloads for external webhook execution.
✨ Originality and Utility
● The Momentum Matrix Advantage
While traditional trend indicators rigidly lock onto moving averages or standard price bands, the AlphaTrend Momentum Matrix thrives on market dynamism. Its true utility lies in its multifaceted approach to trend validation. It introduces an exclusive "ATR Breakout Override" system—a custom logic module that forces a trend recalibration if an explosive price movement severely disrupts the standard deviation envelope, regardless of standard trailing conditions. This ensures the indicator remains highly responsive to sudden, high-impact market events without waiting for lagging conditions to catch up.
● Automated Payload and State Management
A standout feature of this tool is its embedded Trade State system. It does not merely paint a signal on the chart; it internalizes the exact entry price, computes a precise stop-loss based on the active AlphaTrend baseline, and mathematically projects a 1:2 risk-to-reward Take Profit target. This localized tracking seamlessly interfaces with the built-in Alert Engine, dynamically injecting these critical metrics into formatted JSON templates ready for third-party automated execution systems.
🔬 Methodology and Concepts
● AlphaTrend Core Engine
The primary directional engine relies on the interplay between the Average True Range (ATR) and the Money Flow Index (MFI). A trailing upper band (Support) and lower band (Resistance) are calculated using a user-defined ATR coefficient. The script interrogates the 14-period MFI; if the MFI reads above 50, indicating positive money flow momentum, the algorithm biases toward the Support band, updating it only when the price makes higher lows. Conversely, an MFI below 50 shifts the bias to the Resistance band.
● Breakout Override Protocol
To counteract the inherent lag of volume-weighted smoothing, the indicator employs a momentum breakout scanner. By measuring the absolute distance between the previous two closing prices and comparing it against the prior ATR multiplied by a sensitivity factor, the script can definitively detect volatility shocks. If a shock occurs concurrently with a directional price cross over the active AlphaTrend line, the system immediately forces a directional shift, bypassing the standard MFI requirements.
● Signal Filtering and Matrix Constraints
Raw signal crossovers are notoriously noisy during consolidation. To mitigate whipsaw trades, this script implements a continuous loop counter (the K and O matrices). It tracks the consecutive bars since the last primary buy or sell condition. A signal is only declared "valid" if it successfully breaks the historical sequence of the opposing trend counter, ensuring that localized micro-fluctuations do not trigger premature trade entries.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Volatility and the Average True Range
Developed by J. Welles Wilder Jr. in 1978, the Average True Range is a foundational pillar of this indicator. The ATR scientifically quantifies absolute market volatility by decomposing the entire range of an asset's periodic price action, factoring in gaps and limit moves. By applying a multiplier to the ATR, this script establishes a statistically significant standard deviation envelope, distinguishing between normal market "breathing" and definitive structural shifts.
● Volume-Weighted Momentum via Money Flow Index
The MFI, created by Gene Quigley and Colin Dysart, represents an evolution of the Relative Strength Index (RSI). From an academic standpoint, the MFI incorporates volume into its momentum calculation, producing a more robust metric of buying and selling pressure. It uses the Typical Price (High + Low + Close / 3) multiplied by volume to calculate raw money flow. The 50-level threshold serves as the equilibrium point; sustaining above this level empirically signifies net accumulation, providing the mathematical justification for the indicator's bullish bias.
● Algorithmic State Machines
The signal filtering mechanism and the internal Trade State tracker are practical applications of Finite State Machines (FSM) commonly used in quantitative algorithmic design. The script holds memory of its current operational state (Long, Short, Neutral) and refuses state transitions unless specifically validated mathematical conditions (boolean logic gates) are met, significantly reducing error rates inherent in purely reactive, memory-less indicators.
● Repainting and Lookahead Warning
This script utilizes the request component to pull Higher Timeframe (HTF) context into the primary chart. Crucially, it employs the barmerge.lookahead_on parameter. While this creates a visually perfect, non-lagging representation of higher timeframe trends when analyzing historical data, it introduces lookahead bias. Traders must understand that historical HTF visuals and signals may appear with perfect precision on past bars, but real-time execution will lack this future data context, potentially resulting in different localized behavior in live markets.
🎨 Visual Guide
● The AlphaTrend Trailing Line
Up Trend (Bullish): A bold, solid step-line tracking below the price, rendered in a distinctive golden-yellow (#F0D080).
Down Trend (Bearish): A bold, solid step-line tracking above the price, colored in a deep crimson (#7A2010).
● The Cloud Fill
Dynamic Channel: A semi-transparent shaded area connecting the active AlphaTrend line to a central Cloud Reference Line (a smoothing of the typical price). This cloud visually represents the buffer zone of the current trend.
Color Coding: The cloud dynamically changes color to match the dominant trend (Gold for bullish, Crimson for bearish), allowing for rapid peripheral analysis of market conditions.
● Price Action Overrides
Colored Candles: The bodies and wicks of the actual price candles are uniformly colored to reflect the AlphaTrend matrix state, instantly identifying periods of alignment or divergence.
● Execution Elements
Signal Labels: Distinct "BUY" and "SELL" textual shapes appear precisely on the chart at the moment the state matrix validates a trend shift.
HTF Stepline: When enabled, a secondary, smoothed step-line appears to show the overarching macro trend, colored accordingly to dictate the broader market regime.
📖 How to Use
● Trend Riding and Context
The most effective way to utilize this tool is to align the primary chart timeframe with the HTF AlphaTrend line. If the HTF line is Gold, you should strictly look for "BUY" signals generated by the primary indicator to trade in the direction of the macro trend, ignoring temporary bearish signals as minor pullbacks.
● Momentum Breakout Confirmation
When you observe a sudden color change accompanied by an unusually large price bar, this is often the Breakout Override triggering. These scenarios represent high-momentum events. Instead of waiting for a retest, aggressive traders may use these specific signals to capture immediate volatility expansions, placing their stop-loss strictly on the opposite side of the newly formed AlphaTrend line.
● Automating Your Strategy
For quantitative traders, the indicator handles the heavy lifting of trade logic. Ensure you configure the exact JSON payload strings required by your third-party execution platform (like 3Commas, PineConnector, etc.) in the settings. The indicator will autonomously calculate your risk/reward parameters upon every valid signal and fire a perfectly formatted JSON alert.
⚙️ Inputs and Settings
• ⚙️ Core Calculations
ATR Multiplier: Defines the sensitivity of the trailing line. Lower values (e.g., 0.5) track price closely for scalping; higher values (e.g., 2.0) provide wide breathing room for swing trades.
ATR & MFI Lookback Period: The standard window (default 14) for calculating both volatility and volume momentum.
Display Signals: Toggles the visibility of the "BUY" and "SELL" chart labels.
• 🛡️ Breakout Override
Enable ATR Breakout Override: Turns the momentum-shock detection system on or off.
Breakout Sensitivity: Determines how large a price jump must be (relative to the ATR) to force a trend change. Lower values trigger more aggressively.
• 🕐 Higher Timeframe
Show HTF AlphaTrend: Projects the higher timeframe data onto the current chart.
HTF Timeframe: The specific macro timeframe to monitor (e.g., Daily "D" when trading on the 1-Hour chart).
• ☁️ Cloud Fill
Show Cloud Fill: Toggles the visual buffer zone on the chart.
Cloud Reference Length: Adjusts the smoothing period of the central reference line.
Color Candles: Enables or disables the overriding of standard chart candle colors based on trend direction.
• 🔌 Webhook Execution Config
Payload Actions: Four distinct text fields where you can define the exact syntax your external bot requires for entering longs, entering shorts, closing longs, and closing shorts. These values are automatically injected into the dynamic JSON alert string.
⚠️ 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. I 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. אינדיקטור

Adaptive Support and Resistance Zones [BigBeluga]🔵 OVERVIEW
Adaptive Support and Resistance Zones is a high-performance technical analysis tool designed to identify, manage, and visualize key supply and demand areas. Unlike static pivot indicators that clutter the chart with every minor high and low, this script employs volatility-adjusted logic (ATR) to ensure only the most significant structural levels are maintained.
The indicator treats support and resistance not as thin lines, but as dynamic zones , accounting for market "noise" and providing a clearer picture of where institutional interest actually lies.
🔵 CONCEPT
Volatility-Aware Detection — Uses ATR-based filtering to qualify pivot points. A level is only created if the price rejection is strong enough relative to current market volatility.
Smart Level Merging — Automatically consolidates levels that are too close to one another, preventing "line spaghetti" and identifying high-confluence zones.
Dynamic Zone Rendering — Visualizes S/R as shaded boxes. The width of these zones adapts to market volatility, providing a realistic representation of supply and demand.
Real-Time Breakout Tracking — Monitors price action in real-time to detect when a level is definitively breached, switching its status from "Active" to "Broken."
Automatic Pruning — Cleans the chart by removing levels that have exceeded a maximum age, ensuring your focus remains on current market structure.
🔵 HOW IT WORKS (IN-DEPTH)
1️⃣ Advanced Swing Detection
The indicator scans for Pivot Highs and Lows based on a user-defined Pivot Length.
The Strength Filter: It applies a "Min ATR Strength" check. For a pivot to be valid, the distance between the pivot point and its immediate neighbors must exceed a mathematical threshold of volatility. This filters out "fake" pivots during low-volume consolidation.
2️⃣ Adaptive Level Management
Merge Logic: Before a new level is drawn, the script checks if an existing level already exists within the "Merge Threshold." If it does, the indicator skips the new level, effectively treating the existing zone as the dominant area of interest.
Active vs. Broken: Levels remain "Active" as solid lines/zones as long as price respects them. Once price closes beyond the level (controlled by Break Sensitivity), the level is moved to the "Broken" category.
Visual Transition: Broken levels can be kept on the chart as muted, dotted lines—a crucial feature for traders who look for "S/R Flip" opportunities (where old resistance becomes new support).
3️⃣ The S/R Dashboard
A dedicated on-screen table provides a birds-eye view of the current structural state.
Nearest Resistance/Support: Displays the exact price of the closest active levels.
Last Break: Identifies the direction of the most recent volatility-confirmed breakout.
Active Counter: Keeps track of how many structural levels are currently being monitored by the system.
🔵 KEY FEATURES
ATR-Based Zone Width: Zones expand and contract based on market volatility, ensuring your stop-loss or entry buffers are mathematically sound.
Price Labels: Optional labels at the end of active lines provide the exact price for quick order entry.
Customizable Break Sensitivity: Define how much "daylight" price needs to show above or below a level before a breakout is confirmed.
Historical Record: Retain a specific number of recently broken levels to identify long-term historical confluence.
Clean Visuals: High-contrast colors for Support (Cyan) and Resistance (Orange), with fully customizable transparency.
🔵 HOW TO USE
Trading the Rejection: Look for price to enter a shaded Support or Resistance Zone. Wait for a reversal candle within the zone for a high-probability entry back toward the mean.
Trading the Breakout: When the "< Break" label appears, it confirms that price has closed beyond the zone with enough momentum to overcome the "Break Sensitivity" threshold.
The S/R Flip: Monitor "Broken" (dotted) levels. If price returns to a dotted Resistance line and treats it as Support, it confirms a structural shift in the market.
Volatility Buffers: Use the vertical height of the Zone Boxes to determine your "No-Trade Zone" or to help place stop-losses outside of the immediate area of market noise.
🔵 CONCLUSION
Adaptive Support and Resistance Zones transforms raw price action into an organized, data-driven roadmap. By automating the detection and management of key levels—while accounting for the ever-changing nature of market volatility—it allows traders to focus on execution rather than manual charting. אינדיקטור

Statistical Zone Engine [JOAT]Statistical Zone Engine
Introduction
Statistical Zone Engine is an open-source overlay indicator that builds pivot-cluster support and resistance zones with walk-forward statistical scoring. Each zone is backed by a full expected value computation: the indicator counts historical touches and bounces from the zone's price range over a configurable lookback, computes a win rate, and derives an EV score in units of R. Zones are tiered into four strength categories — Weak, Moderate, Strong, and Institutional — based on their live touch count, with border thickness and fill opacity scaling proportionally to the EV and tier. Labels display R:R, win rate, EV, and touch count, all updated live each bar.
The core problem this indicator solves is that conventional support and resistance drawing tools are entirely qualitative — the trader decides what is significant by eye. The SZE replaces that subjective judgment with a quantitative framework: zone strength is computed from actual price behavior over the lookback window, not from the visual prominence of the swing. A zone that has been tested eight times with seven bounces carries an objectively different statistical weight from one that was tested twice with one bounce, and the SZE communicates that difference through its tier system, border rendering, and live EV label. Cluster merging prevents adjacent pivots at nearly the same price from spawning overlapping zones that would misrepresent true strength.
Core Concepts
1. Pivot Cluster Zones
The indicator uses ta.pivothigh and ta.pivotlow with a configurable swing length. When a new pivot high is confirmed and no existing resistance zone is within ATR * clusterTol of the pivot price, a new zone is created. The cluster merge check prevents nearby pivots from generating duplicate zones at the same structural level — if a zone already exists within the tolerance radius, no new zone is spawned. This means zones represent genuinely distinct price levels, not just the most recent pivot above an existing zone.
2. Walk-Forward Expected Value Computation
For each new zone, the indicator scans the prior lookback bars and counts every bar where the high-low range overlapped with the zone. For each touch, it checks whether the close exited the far side of the zone — if so, it counts as a bounce. Win rate = bounces / touches. EV = winRate * tpRR - (1 - winRate) * slRR. A positive EV means the zone has historically resolved in the bounce direction more often than not, weighted by the configured R:R ratio.
3. Four-Tier Strength System
Zone tier is determined by live touch count:
Weak: 1-2 touches — thin border (width 1), low opacity fill
Moderate: 3 touches — medium border (width 1), moderate opacity fill
Strong: 4-5 touches — thicker border (width 2), more opaque fill
Institutional: 6+ touches — widest border (width 3), most opaque fill
Both the border width and the border transparency scale with tier, producing a visual system where the most historically significant zones dominate the chart. The fill opacity also scales with EV — zones with positive EV are more opaque, zones with negative EV are more transparent.
4. Live Label Updates
Each zone carries a label at its right edge displaying: type (RES/SUP), tier name, touch count, win rate percentage, and EV in R units. The label is recalculated and updated every bar when price is inside the zone, ensuring the statistics reflect current behavior. The label text color also scales with tier — more significant zones use brighter text.
5. Sweep Detection
When price closes fully through a zone boundary — above the top for resistance, below the bottom for support — the zone is marked as mitigated. If volume exceeds 1.4x the SMA(20) at the mitigation bar, a BREAK label fires above or below the zone. The total sweep count accumulates in the dashboard. After a break, zone fill fades to near-transparent, clearly communicating that the level has been closed through.
Features
Pivot-Cluster Zone Detection: Swing-pivot based zone creation with ATR-cluster merge deduplication — nearby pivots do not spawn overlapping zones
Walk-Forward EV Computation: Historical touch/bounce counting over configurable lookback produces win rate and R-unit EV scores for each zone
Four-Tier Strength System: Weak / Moderate / Strong / Institutional tiers based on touch count — border width and opacity scale with tier
EV-Scaled Fill Opacity: Positive EV zones are more opaque, negative EV zones are more transparent — fill intensity communicates statistical quality
Live Label Updates: Type, tier, touch count, win rate %, and EV in R units update every bar when price is inside the zone
Sweep Detection with Volume Filter: BREAK label fires on zone close-through when volume exceeds 1.4x SMA(20)
Post-Break Zone Fade: Broken zones fade visually, clearly delineating active versus mitigated levels
Proximity Markers: Diamond plotchar fires when price first enters a zone neighborhood
Min Touches Filter: Only zones with at least the configured minimum historical touches are displayed, eliminating freshly-formed single-touch zones
Zone Trim Management: Oldest zones are removed when arrays exceed the maximum zone count, keeping memory bounded
9-Row Dashboard: Active resistance and support zone counts, near-zone states, total sweep count, TP and SL R:R ratios, ATR
4 Alertconditions: Zone entry for resistance and support, new zone creation for both sides
Input Parameters
Zone Detection:
Swing Length: Pivot confirmation lookback period — higher values detect fewer, more significant pivots (default 10)
Cluster ATR Tolerance: Pivots within ATR * this of an existing zone are merged rather than spawning a new zone (default 0.4)
Zone ATR Width: Half the zone height as an ATR multiple — controls vertical thickness (default 0.35)
Max Active Zones: Maximum concurrent zones per direction before oldest are trimmed (default 12)
Min Touches To Show: Minimum historical touches required to display a zone (default 2)
Statistics:
EV Lookback (bars): Historical bar window for touch/bounce counting (default 200)
TP R:R Ratio: Take-profit distance in R units used for EV calculation (default 2.0)
SL R:R Ratio: Stop-loss distance in R units used for EV calculation (default 1.0)
Visuals:
Toggles for zone labels, sweep labels, and dashboard
Resistance Color (default orange #f97316), Support Color (default sky blue #38bdf8)
How to Use This Indicator
Primary Setup — Statistical Zone Entry:
Look for Institutional or Strong zones with positive EV — these are the levels with the longest bounce history weighted by your R:R parameters. When price enters a zone, the live label shows the current win rate. Enter at the zone edge with a stop beyond the far edge and a target at your TP R:R ratio from entry.
EV as a Selection Filter:
Multiple zones may be on the chart simultaneously. Prioritize zones with positive EV labels (e.g., EV: 1.25R) over zones with negative EV. A zone with 4 touches and 75% win rate at 2R:1R produces an EV of +1.25R per trade — objectively worth trading. A zone with 3 touches and 33% win rate at the same R:R produces EV of -0.33R — not worth trading regardless of how prominent it looks.
Using the Sweep Count:
The total sweep count on the dashboard accumulates every time a zone break is detected with high-volume momentum. Rising sweep counts in one direction indicate the market is consistently breaking through levels on that side — a sign of trending pressure rather than range behavior. Adjust bias accordingly.
Cluster Merge and Fresh Zones:
When a new pivot forms near an existing zone and is merged rather than spawning a new zone, the existing zone's historical statistics remain unchanged. A fresh zone with no historical data will show EV close to 0 — treat these as unproven until more touches accumulate.
Indicator Limitations
EV computation scans up to the full lookback on every qualifying pivot — on very long lookback settings and active pivot instruments, this can increase calculation time
The walk-forward EV uses the same zone size (ATR * width at creation time) for historical counting. If ATR changes significantly between creation time and the historical scan, the touch count may include bars where the equivalent zone boundaries would have been different
Cluster merging uses the current ATR at detection time. In periods of sharply rising or falling ATR, two zones that appear to merge at one ATR level may have been distinct at a different level, potentially underrepresenting zone density
The touch count displayed on the label is the live count updated each bar. The historical bounce count used for EV is computed at creation time and is not re-scanned dynamically — the label win rate reflects creation-time statistics
The minimum touches filter removes zones with fewer historical touches than the threshold. On fresh instruments or small lookbacks, most zones may be filtered out, especially on less-traded timeframes
Originality Statement
This indicator is original in its walk-forward EV scoring framework, four-tier visual strength system driven by live touch counts, and the cluster merging deduplication approach. The publication is justified because:
Walk-forward EV computation in R units provides a quantitative quality signal not found in standard support/resistance tools — each zone is backed by a historically derived expected value, enabling objective zone selection
The four-tier visual system (border width and opacity scaling with tier and EV) embeds the statistical quality directly into the zone appearance, eliminating the need to read labels to gauge significance
ATR-cluster merge deduplication prevents pivot-dense markets from generating overlapping zones at the same structural level, producing a cleaner, more meaningful map than raw pivot-based zone tools
Live label updates during zone interaction show the evolving win rate and EV as each new touch is counted, providing real-time statistical feedback not present in static zone indicators
The post-break fade combined with the total sweep count dashboard provides a structural memory of how many levels have been invalidated, enabling a directional bias gauge derived from zone lifecycle data
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial advice or a recommendation to buy or sell any financial instrument. Past performance of any pattern or signal does not guarantee future results. All trading involves substantial risk. Always use proper risk management and conduct your own independent analysis.
— Made with passion by officialjackofalltrades
אינדיקטור

Resistance & Support Dynamic PRO [ChartWhizzperer]Resistance & Support Dynamic PRO | Algorithmic Zones by ChartWhizzperer
The revolution in chart hygiene.
Most support and resistance indicators share a massive flaw: they turn your chart into an unreadable mess of endless lines and boxes within hours. They possess no memory, no filters, and crucially – no logic for self-cleaning.
As a system architect, I developed the Resistance/Support Dynamic™ PRO to solve this problem mathematically. This open-source indicator does not merely draw zones. It evaluates them, ages them, and purges them when they become obsolete.
CORE FEATURES (Why this indicator is different):
Smart Mitigation Protocol (Purge Logic): Once a zone has been breached or chopped by the market too many times, it loses its institutional relevance. The algorithm detects these structural breaks (strikes) and permanently purges the dead zone from the chart. No more ghosting.
Alpha Decay Engine: Nothing lasts forever – especially not in trading. Zones fade over time (transparency scales mathematically with the zone's age). Current hotspots are highly visible, whilst older levels smoothly fade into the background.
Volume Validation: Not every pivot point represents genuine Smart Money. If this filter is active, an S/R zone is only drawn if the origin candle exhibits above-average volume (SMA-verified).
ATR-Based Sizing & Overlap Guard: The thickness of the zones dynamically adapts to market volatility (ATR). Furthermore, the overlap guard prevents new zones from being drawn over existing ones, preventing visual clutter.
Examine the source code: This is not spaghetti code. It is highly efficient, object-oriented Pine Script (v6) featuring clean array management and User-Defined Types (UDTs).
THE BITTER TRUTH OF TRADING (And the next logical step)
This indicator provides you with the ultimate map. It shows you with clinical precision exactly where Smart Money has left liquidity.
However, a map does not pull the trigger. Ask me for more!
Disclaimer
Signals and alerts are provided for informational purposes only and do not constitute financial advice or a recommendation to buy or sell.
Trading involves substantial risk and may result in the total loss of capital. Execution via third-party tools may differ from alerts. Past performance is not indicative of future results. אינדיקטור

Round Number Levels Pro v3 [Turza]Round Number Levels Pro v3 is an upgraded version of my previous version.
Its a powerful support and resistance indicator that automatically plots psychological price levels on your chart.
What's New in v3:
Auto-Rounding by Symbol — automatically detects your instrument (Forex, Crypto, Indices, Commodities) and applies the correct rounding value
8 customizable symbol presets — set your own rounding values for any symbol group
Default rounding fallback for unlisted symbols
What it does:
Displays major round number levels with prominent lines
Shows mid-level lines for additional reference points
All lines extend across the entire chart for maximum visibility
Automatically adjusts levels based on current price action
Key Features:
Auto Symbol Detection — no manual switching between instruments
Customizable Font Sizes — large text for main levels, smaller for mid-levels
Flexible Line Styles — solid, dashed, or dotted for main and mid lines
Adjustable Parameters — control number of levels, rounding increments, and label positioning
Full Chart Extension — lines extend both directions for complete price reference
Perfect for:
Day traders looking for key psychological support/resistance levels
Swing traders identifying major price zones
Multi-instrument traders who switch between Forex, Crypto, and Indices
How to use:
Add to your chart and the indicator will automatically detect your symbol and apply the correct rounding. Customize the presets in settings to match your instruments and trading style. אינדיקטור

Price Memory Heatmap [BullByte]Price Memory Heatmap - Dynamic Support & Resistance Through Market Memory
Price Memory Heatmap visualizes where markets remember. It identifies price levels where repeated reactions have occurred, measures their intensity through a proprietary heat system, and displays them as dynamic zones that strengthen with each new reaction and naturally fade when the market moves on.
This is not a combination of existing indicators. It is a unified analytical framework built around one original concept: price levels accumulate heat from confirmed reactions and lose heat through exponential decay when untouched. The result is a self-organizing, self-cleaning map of historically significant price zones that evolves with every bar.
---
WHAT THIS INDICATOR DOES
Price Memory Heatmap tracks price levels where significant market reactions have occurred. Each level is treated as a living entity with memory:
→ Gains heat when price reacts at it (confirmed pivots and wick rejections)
→ Loses heat over time when untouched (exponential decay)
→ Displays visual intensity proportional to accumulated reaction history
→ Gets removed automatically when its heat falls below a minimum threshold
→ Classifies real-time price behavior at each zone (Rejection, Sweep, Break, Retest, Absorption)
The indicator tracks up to 20 memory levels simultaneously and displays only the most significant ones based on heat intensity and reaction count. Zones are color-coded from cool (low activity) to hot (high activity), giving instant visual hierarchy of level importance.
Key outputs:
→ Heat-mapped zones showing historical reaction intensity
→ Classification labels (Developing, Active, Strong, Dominant)
→ Hit count showing total confirmed reactions at each level
→ Relative volume multiplier showing conviction behind reactions
→ Level age tracking (Fresh, Seasoned, Veteran)
→ Real-time behavior detection integrated into zone labels
→ Summary dashboard ranking all active levels by heat
---
WHY THIS INDICATOR EXISTS
Traditional support and resistance tools draw static lines. They cannot tell you whether a level was tested once or ten times, whether reactions were backed by strong volume or weak, whether the level was formed yesterday or months ago, or how price is currently interacting with that level.
Price Memory Heatmap addresses each of these gaps through a single cohesive system:
PROBLEM: "Is this level significant?"
→ SOLUTION: Heat intensity and classification tier tell you immediately. A Dominant zone with 8 hits is far more significant than a Developing zone with 2 hits.
PROBLEM: "Was there conviction behind reactions at this level?"
→ SOLUTION: Relative volume multiplier shows whether reactions attracted above-average volume (e.g., 2.3x means 2.3 times the average bar volume).
PROBLEM: "Is this level still relevant?"
→ SOLUTION: Exponential decay naturally fades untouched levels. If the market has forgotten a level, the indicator forgets it too.
PROBLEM: "How is price interacting with this level right now?"
→ SOLUTION: Real-time behavior detection classifies the current interaction as Rejection, Sweep, Break, Retest, or Absorption.
PROBLEM: "How old is this level?"
→ SOLUTION: Age tracking categorizes each level as Fresh (recently formed), Seasoned (survived multiple decay cycles), or Veteran (persistent structural significance).
---
HOW PRICE MEMORY WORKS
The lifecycle of a memory level:
BIRTH - A confirmed pivot swing (high or low) creates a new memory level, or merges into a nearby existing level if one exists within the merge distance.
REINFORCEMENT - Each subsequent reaction at the level adds heat. Reactions with above-average volume add proportionally more heat. The level's price adjusts as a weighted average of all reactions.
DECAY - Every bar without a reaction, the level's heat is multiplied by the decay rate (default 0.992). This creates a natural half-life where untouched levels gradually lose prominence.
DEATH - When heat falls below the death threshold (default 0.08), the level is permanently removed. This keeps the chart clean and focused on relevant levels.
The heat value drives everything:
→ Zone color intensity (hotter = more prominent visual)
→ Classification tier (Dominant, Strong, Active, Developing)
→ Dashboard ranking (sorted by heat, hottest first)
→ Glow effect intensity (stronger glow on high-heat zones near price)
Additionally, wick rejections are detected as secondary reaction sources. When a candle wicks into an existing level and rejects (closes away), it adds heat at half the rate of a confirmed pivot, preventing over-weighting of intrabar noise while still capturing meaningful reactions.
---
WHY THIS IS NOT A MASHUP
This indicator uses pivot detection, ATR, and volume data internally, but it does not combine or display existing indicators. The distinction is fundamental:
A mashup displays independent indicators together on one chart.
This indicator uses standard calculations as INPUT MECHANISMS feeding a completely original processing engine whose output cannot be replicated by any combination of existing tools.
→ Pivots = Detection mechanism only (identifies where reactions occur)
→ ATR = Scaling parameter only (normalizes distances across any asset)
→ Volume = Weighting modifier only (amplifies high-conviction reactions)
→ Heat Accumulation + Decay = ORIGINAL (no existing indicator does this)
→ Dynamic Level Lifecycle = ORIGINAL (birth, reinforce, decay, death)
→ Behavior Detection at Levels = ORIGINAL (classifies interaction patterns)
No component is displayed independently. Everything feeds the central price memory concept.
---
HOW TO READ THE ZONES
ZONE COLORS (Dark Theme - default):
→ Purple/Blue tones = Low heat, Developing level (fewer reactions)
→ Red tones = Medium heat, Active or Strong level
→ Orange/Yellow/Gold tones = High heat, Dominant level (many confirmed reactions)
ZONE COLORS (Light Theme):
→ Gray/Steel tones = Low heat
→ Red/Dark Red tones = Medium to high heat
ZONE COLORS (Classic S/R Theme):
→ Green = Level currently acting as support (price above the zone)
→ Red = Level currently acting as resistance (price below the zone)
ZONE THICKNESS:
Zones expand slightly as heat increases and pulse larger when price approaches (proximity effect). The glow effect adds a soft outer halo that intensifies on high-heat levels near current price, providing immediate visual emphasis on the most important nearby zones.
ZONE LIFESPAN:
Each zone extends from its birth bar to a configurable number of bars into the future (default 15). This visual extension is purely for display - it helps identify where zones project ahead of price. Older zones with maintained heat indicate structural levels where the market has shown persistent memory.
---
HOW TO READ THE LABELS
Each visible zone displays a label with key information. The label format depends on the selected Label Mode. When behavior is detected, it is appended to the end of the label.
MINIMAL MODE EXAMPLE:
"STR 5 2.3x SEA REJ↑"
→ STR = Classification (Strong)
→ 5 = Hit count (5 confirmed reactions)
→ 2.3x = Relative volume (2.3 times average per reaction)
→ SEA = Age (Seasoned - 50 to 200 bars old)
→ REJ↑ = Current behavior (Bullish Rejection detected)
STANDARD MODE EXAMPLE:
"Strong | 5 hits | 2.3x | SEA | Rejection ↑"
→ Full classification name
→ Hit count with label
→ Relative volume multiplier
→ Age abbreviation
→ Full behavior name with direction
DETAILED MODE EXAMPLE:
"Strong | Resistance | 5 | 2.3x | 1.2345 | Seasoned | Sweep ↓"
→ Classification
→ Current support/resistance status
→ Hit count
→ Relative volume
→ Exact price
→ Full age name
→ Full behavior name
LARGE MODE:
Same information as Standard but rendered in larger text for visibility.
When no behavior is currently detected, the behavior portion is simply omitted from the label.
CLASSIFICATION TIERS:
→ Developing = Heat below 40% of max OR fewer than 3 hits
→ Active = Heat above 40% AND 3 or more hits
→ Strong = Heat above 60% AND 4 or more hits
→ Dominant = Heat above 80% AND 5 or more hits
AGE CATEGORIES:
→ Fresh (NEW) = Less than 50 bars since first detection
→ Seasoned (SEA) = Between 50 and 200 bars old
→ Veteran (VET) = More than 200 bars old
A Veteran level with high heat indicates deep structural significance - a price where the market has reacted repeatedly over an extended period and continues to hold relevance.
RELATIVE VOLUME EXPLAINED:
The volume shown is NOT raw volume. It is a normalized multiplier showing how much volume reactions attracted compared to the average bar:
→ 1.0x = Average volume at reactions
→ 2.0x or higher = Above-average conviction behind reactions
→ Below 0.5x = Below-average conviction
→ "-" = Volume data unavailable for this asset
Volume is calculated using attributed notional value: only the fraction of bar volume proportional to the zone width is counted, preventing large-range bars from inflating readings.
---
HOW TO READ THE DASHBOARD
The dashboard provides a ranked summary of all active memory levels. It appears as a table overlay on the chart (position configurable).
COLUMN-BY-COLUMN:
# → Rank by heat intensity. An asterisk (*) marks the highest-heat level. Numbers rank the rest.
PRICE → The exact price of the memory level, formatted to the asset's tick precision. This is the weighted-average price across all reactions at this level.
CLASS → Classification tier (Developing, Active, Strong, Dominant). In Classic S/R theme, a suffix "S" (Support) or "R" (Resistance) is appended based on whether price is above or below the level.
HEAT → Visual heat bar using 8 segments.
→ "||||||||" = Maximum heat (hottest level)
→ "||||...." = Moderate heat
→ "|......." = Low heat (may decay out soon)
HITS → Total number of confirmed reactions at this level. This includes both pivot-confirmed reactions and qualified wick rejections.
RVOL → Relative volume multiplier averaged across all reactions at this level. Higher values indicate stronger volume conviction behind the reactions that built this level.
STATUS → A dynamic field showing one of three things:
→ Behavior pattern name if currently detected (e.g., "REJ↑", "SWP↓", "BRK↑")
→ "At level" if price is within 0.15% of the zone (highlighted in green)
→ Distance as percentage if price is away (e.g., "1.25% above")
AGE → How long the level has existed (NEW, SEA, VET).
FOOTER → Shows total memory levels being tracked, how many are currently visible, and the current decay rate setting.
---
BEHAVIOR DETECTION
When price approaches a memory zone, the indicator analyzes real-time price action to classify how the market is interacting with that level. The detected behavior is displayed as part of the zone label and in the dashboard STATUS column.
Behaviors are checked in priority order. Only the highest-priority match is displayed.
BREAK (Highest Priority):
→ Price opens on one side of the zone and closes decisively on the other
→ Requires strong body (more than 50% of candle range)
→ Close direction must match candle direction (bullish close for Break ↑)
→ Indicates the level has failed and may flip from support to resistance or vice versa
→ Once a Break is detected, the level is marked internally so future Retest detection becomes possible
SWEEP:
→ Price extends significantly beyond the zone (1.5x zone height past the edge) then reverses
→ The extended wick must be larger than the body and more than 35% of total range
→ Close must be back near or inside the zone
→ This pattern often represents a liquidity grab - price pushes through to trigger stops then reverses
REJECTION:
→ A prominent wick touches or enters the zone, and the body closes away
→ Wick must exceed 45% of the candle's total range
→ Body must have meaningful size (more than 25% of range) confirming conviction
→ Indicates the level is actively defending - buyers or sellers are stepping in
RETEST:
→ Price returns to a level that was previously broken
→ Requires all lookback bars to have been on one side (away from zone)
→ Current bar must touch the zone
→ This is the classic "support becomes resistance" or "resistance becomes support" confirmation
ABSORPTION (Lowest Priority):
→ Multiple consecutive bars with bodies inside the zone
→ Average body size is small relative to average range (less than 45%)
→ Indicates accumulation or distribution is occurring within the zone
→ Often precedes significant directional moves
Behaviors persist in the label until a new behavior is detected. When price moves away from the zone, the last detected behavior remains visible, giving context about the most recent significant interaction.
---
RECOMMENDED TIMEFRAMES AND SETTINGS
SCALPING (1-minute to 15-minute charts):
→ Pivot Sensitivity: 2 to 4
→ Decay Rate: 0.980 to 0.985 (faster fade for fast markets)
→ Min Hits: 2
→ Focus on Fresh and Seasoned levels
DAY TRADING (15-minute to 1-hour charts):
→ Pivot Sensitivity: 5 to 8
→ Decay Rate: 0.990 to 0.992 (default range)
→ Min Hits: 2 to 3
→ Balanced mix of age categories
SWING TRADING (4-hour to daily charts):
→ Pivot Sensitivity: 10 to 15
→ Decay Rate: 0.994 to 0.996 (slower fade)
→ Min Hits: 3
→ Focus on Seasoned and Veteran levels
POSITION TRADING (daily to weekly charts):
→ Pivot Sensitivity: 15 to 25
→ Decay Rate: 0.997 to 0.999 (very slow fade)
→ Min Hits: 3 to 4
→ Focus on Veteran levels with high heat
GENERAL TIPS:
→ Higher timeframes benefit from increased Pivot Sensitivity
→ Volatile assets benefit from increased Merge Distance
→ For cleaner charts, increase Min Hits to Display
→ For more context, increase Max Memory Slots and Show Top N Levels
---
PRACTICAL EXAMPLES
EXAMPLE 1 - IDENTIFYING HIGH-PROBABILITY REACTION ZONES:
A Dominant-classified zone (gold/yellow) showing 7 or more hits with Veteran age tells you this is a deeply embedded structural level. The market has reacted here many times over hundreds of bars and the level continues to maintain high heat. When price approaches this zone, the probability of a meaningful reaction is elevated compared to a Developing zone with 2 hits.
EXAMPLE 2 - CONFIRMING A BREAKOUT:
Price approaches a Strong resistance zone. The label updates to show "Break ↑" as price closes decisively above. The dashboard STATUS column changes from "0.5% below" to "BRK↑". If price later returns to this zone and the label shows "Retest ↑", this confirms the classic resistance-to-support flip pattern. The zone's wasBroken flag ensures Retest detection only activates after a confirmed Break.
EXAMPLE 3 - SPOTTING LIQUIDITY SWEEPS:
A high-heat zone sits above price. Price spikes through the zone with a long upper wick but closes back inside or below. The label displays "Sweep ↓" indicating a potential stop-hunt pattern. The wick exceeded 1.5 times the zone height beyond its edge and the upper wick dominated the candle's body - both requirements for Sweep classification.
EXAMPLE 4 - READING VOLUME CONVICTION:
Two zones appear near current price. Zone A shows "2.8x" relative volume while Zone B shows "0.6x". The reactions that built Zone A attracted nearly 3 times the average bar volume, suggesting strong institutional interest. Zone B's reactions occurred on below-average volume, suggesting less conviction. This context helps prioritize which zone is more likely to produce a meaningful reaction.
EXAMPLE 5 - USING LEVEL AGE FOR CONTEXT:
A Veteran level (more than 200 bars old) that still maintains high heat has survived hundreds of decay cycles. Each cycle multiplies its heat by 0.992 (default). After 200 bars of decay without any new reactions, heat would fall to roughly 20% of its peak. For a Veteran level to remain Dominant, it must have received consistent reinforcement over time - indicating genuine structural significance rather than a one-time event.
---
Chart Example
1. Price on the S&P 500 E-mini Futures 15-minute chart is consolidating within a tight range between two heavily-tested Veteran zones, with the gold Dominant level acting as a persistent floor and an orange 22-hit Veteran zone overhead cycling through live behaviors as price repeatedly tests it from below. A structured ladder of purple Developing and red Active zones extends well below current price, with a Retest ↓ pattern visible at a mid-range level indicating a previously broken area is now being revisited from above. The dashboard confirms 17 memory levels tracked with 8 visible, the top-ranked Dominant zone holding a full heat bar and Break ↑ in its STATUS column throughout the session.
2. Price on the Nifty 50 Index 5-minute chart surged strongly through a cluster of high-heat gold zones during the session, reaching a peak at a thin Developing resistance level before pulling back sharply into a contested area between a Dominant zone and a Strong zone sitting just below it. The upper region shows two gold/yellow zones in close proximity - a Dominant and a Strong, both with Sweep behaviors active in their labels, indicating a liquidity grab above followed by a sharp reversal back into the zone cluster. The dashboard shows two Dominant-classified levels in the top two ranks, with a rich mix of Veteran and Seasoned ages confirming this price area carries deep structural memory.
---
SETTINGS REFERENCE
CORE SETTINGS:
→ Pivot Sensitivity - Bars on each side to confirm a swing. Lower = more sensitive, more levels.
→ Merge Distance - How close two reactions must be (in ATR multiples) to merge into one level.
→ ATR Period - Period for volatility normalization (default 14).
MEMORY SETTINGS:
→ Decay Rate - Per-bar multiplier for heat decay. 0.992 = balanced default.
→ Heat Per Reaction - Base heat added per confirmed reaction. Modified by volume weighting.
→ Death Threshold - Minimum heat to survive. Below this, the level is removed.
→ Max Memory Slots - Maximum simultaneous levels tracked (default 20).
→ Min Hits to Display - Reactions required before a zone becomes visible (default 2).
→ Show Top N Levels - Maximum zones rendered on chart (default 8).
DETECTION SETTINGS:
→ Wick Rejections - Enable wick-based reaction detection (adds heat at half rate of pivots).
→ Min Wick Ratio - Required wick percentage for wick reactions (default 55%).
→ Volume-Weighted Heat - Weight reactions by relative volume.
→ Behavior Detection - Enable real-time pattern classification at zones.
→ Behavior Lookback - Bars analyzed for behavior patterns (default 3).
APPEARANCE SETTINGS:
→ Color Theme - Dark (purple to gold gradient), Light (gray to red), Classic S/R (green/red).
→ Zone Thickness - Visual height of zones as ATR fraction.
→ Glow Effect - Soft outer halo that intensifies near price.
→ Proximity Radius - Distance at which proximity effects activate.
LABEL SETTINGS:
→ Show Zone Labels - Toggle zone information labels.
→ Label Mode - Information density (Minimal, Standard, Detailed, Large).
→ Show Hit Count - Include reaction count in labels.
→ Show Relative Volume - Include volume multiplier in labels.
→ Reaction Dots - Show dots at exact reaction prices (off by default for chart clarity).
DASHBOARD SETTINGS:
→ Show Dashboard - Toggle the summary table.
→ Position - Screen position (8 options).
→ Text Size - Font size (Tiny, Small, Normal).
→ Rows - Number of levels shown in dashboard (default 5).
---
ALERTS
Three alert conditions are available:
"Price entered hot zone" - Triggers when price enters a high-heat zone with 3 or more hits and heat above 50% of maximum. Useful for monitoring approaches to significant levels.
"New behavior detected" - Triggers when a new behavior pattern (Rejection, Sweep, Break, Retest, Absorption) is classified at any visible level. Useful for real-time event notification.
"New reaction" - Triggers when a new pivot is confirmed. Useful for tracking all reaction events across all levels.
All alerts describe observed events. They do not predict future price movement or generate buy/sell signals.
---
IMPORTANT NOTES
RETROACTIVE ANCHORING:
Pivot-based levels are confirmed after the Pivot Sensitivity number of bars have passed. The level is drawn at the true swing bar but only becomes known after confirmation. This is standard pivot behavior used across all pivot-based indicators and does not constitute future data usage.
VOLUME DATA AVAILABILITY:
Some assets, particularly certain forex pairs, may not report volume data. When volume is unavailable, relative volume displays show "-" and volume weighting is automatically disabled. The indicator functions fully without volume data.
EARLY CHART BEHAVIOR:
Zones and behavior labels may be sparse early in chart history. The indicator needs sufficient bars to detect pivots, accumulate heat, and meet the minimum hit count. Allow at least 100 bars for the system to populate meaningfully.
PERFORMANCE:
Reaction dots (when enabled) are only rendered within the most recent 500 bars to maintain chart performance. All memory calculations remain unaffected regardless of dot visibility.
---
DISCLAIMER
This indicator is provided for educational and analytical purposes only. It visualizes historical price reaction zones and does not predict future price movement, generate buy/sell signals, or constitute financial advice.
Past reactions at specific price levels do not guarantee future behavior. Market conditions change and levels that held previously may fail in the future. Always conduct your own analysis, use proper risk management, and never risk more than you can afford to lose.
The author assumes no liability for any trading decisions made using this tool. Trading involves significant risk of loss. Use this indicator as one component of a comprehensive trading approach, not as a standalone decision-making system.
---
BullByte אינדיקטור

אינדיקטור

אינדיקטור

אינדיקטור

ORB (x2) by jaXn# ORB (x2) Professional Suite
## 🚀 Unleash the Power of Precision Range Trading
**ORB (x2)** isn't just another breakout indicator—it is a complete **Opening Range Breakout workspace** designed for professional traders who demand flexibility, precision, and chart cleanliness.
Whether you are trading Indices, Forex, or Commodities, the Opening Range is often the most critical level of the day. This suite allows you to master these levels by tracking **two independent ranges** simultaneously, giving you a distinctive edge.
## 🔥 Why choose ORB (x2)?
Most indicators force you to choose one specific time. **ORB (x2)** breaks these limits.
### 🌎 1. Multi-Session Mastery (London & New York)
Trade the world's biggest liquidity pools. Set **ORB 1** for the **London Open** (e.g., 03:00–03:05 EST) and **ORB 2** for the **New York Open** (09:30–09:35 EST). Watch how price reacts to London levels later in the New York session.
### ⏱️ 2. Multi-Strategy Stacking (The "Fractal" Approach)
This is a game-changer for intraday setups. Instead of two different times, track **two different durations** for the *same* open.
* **Setup:** Configure **ORB 1** as the classic **5-minute range** (09:30–09:35).
* **Setup:** Configure **ORB 2** as the statistically significant **15-minute or 30-minute range** (09:30–10:00).
* **Result:** You now see immediate scalping levels *and* major trend reversals levels on the same chart, automatically.
### 🎯 3. "Plot Until" Tech: Keep Your Chart Clean
Sick of lines extending infinitely into the void?
Our exclusive **"Plot Until"** feature separates the signal from the noise. You define exactly when the trade idea invalidates.
* *Example:* Plot the 09:30 levels only until 12:00 (Lunch).
* The script intelligently cuts the lines off at your exact minute, ensuring your chart is ready for the afternoon session without morning clutter.
### ⚡ Precision Engine
We use a dedicated "Precision Timeframe" input. Even if you are viewing a 1-hour or 4-hour chart to see the big picture, ORB (x2) can fetch data from the **1-minute** timeframe to calculate the *exact* high and low of the opening range. No more "repainting" or guessing where the wick was.
## 🛠 Feature Breakdown
* **Dual Independent Engines:** Fully separate Color, Style, Time, and Cutoff settings for both ORB 1 and ORB 2.
* **Absolute Time Cutoff:** Lines obey day boundaries perfectly. A cutoff at 16:00 means 16:00, not "whenever the next bar closes".
* **Style Control:** Visually distinguish between your "Scalp" ORB (e.g., Dotted Lines) and your "Trend" ORB (e.g., Solid Thick Lines).
* **Performance Mode:** Adjustable "Lookback Days" limits history to keep your chart lightning fast.
## 💡 Configuration Examples
**The "Double Barrel" (Standard Stock + Futures)**
* *ORB 1:* `0930-0935` (5 min) - The immediate reaction.
* *ORB 2:* `0930-1000` (30 min) - The institutional trend setter.
**The "Transatlantic" (Forex/Indices)**
* *ORB 1:* `0800-0805` (London Open) - European liquidity.
* *ORB 2:* `1330-1335` (NY Open) - US liquidity injection.
## ⚠️ Disclaimer
Trading involves substantial risk. This tool helps visualize critical price levels but does not guarantee profits. Always combine with proper risk management and your own analysis.
אינדיקטור
