Auto Range Detector [QuantAlgo]🟢 Overview
The Auto Range Detector is a structural analysis tool built for traders who work around consolidation. It automatically scans every bar across multiple window sizes, tests each candidate against a set of independent structure filters, and draws a box where price rotated between two boundaries and stayed contained by them. Every stage is volatility normalized against the symbol's own history, so one configuration behaves consistently on a five minute crypto chart and a daily equity chart alike. Whether you fade the edges, trade the resolution, or simply want the ranges on your chart drawn the way you would draw them by hand, the indicator turns raw price into confirmed structures, marked breakouts, and a definition of "range" that you have complete control over on any asset and any interval.
🟢 How It Works
The indicator tests up to three window sizes on every bar: the base scan length, double it, and triple it. Each window places two boundaries using the method you choose, measures the band height, and ranks that height against its own history on the symbol and interval, so the volatility gate reads as a percentile of what the market normally produces. The window then has to pass four independent structure tests: enough midline crossings per bar to establish two sided rotation, enough bars reaching each boundary, a regression slope flat enough to show a stable mean, and enough closes held between the boundaries. The longest window that clears every test defines the range.
Once a structure qualifies, the left edge walks backwards through earlier history for as long as price stayed inside the band, and lands only on a bar held within the boundaries wick and all, so a box begins on a candle that belonged to the structure. The range stays provisional until it has spanned a minimum number of bars, and a provisional structure that breaks is cleared without a marker, leaving only structures that held on the chart. A break is confirmed on a close or a wick beyond the boundary, with an ATR buffer that filters marginal clears.
🟢 Key Features
▶ Multi-Scale Detection
The scan tests up to three window sizes on every bar: the base length, double it, and triple it, with the longest qualifying window defining the range. Boundary Basis then decides where the two edges sit and how range height is measured. Percentile band trims outlying wicks so no single spike defines the box, with the percentile itself adjustable. Absolute extremes places the edges on the extreme wicks and measures peak to trough. Body extremes works from opens and closes only, which suits instruments with erratic wicks such as thin crypto pairs. Signal Timing governs whether everything waits for the bar to close or evaluates the forming bar, and ATR Length sets the volatility unit every distance in the script is expressed in.
▶ Structure Filters
Five settings decide whether a candidate window is a range. Compression Percentile is the volatility gate, ranking band height against the symbol's own history so the threshold means the same thing on any instrument. Min Rotation Rate requires midline crossings per bar, which is what separates a genuine range from a reversal that happens to span the same distance. Min Boundary Touches requires both sides to be visited more than once, so a single spike high paired with a single spike low does not qualify, with Touch Definition and Touch Tolerance controlling what registers as a visit. Max Drift limits how far the mean of the window may tilt. Min Containment requires a share of closes to sit between the boundaries, rejecting structures where price only passed through the zone. Every test has its own control, so the definition can be set to tightly held rectangles or to looser rotational structures.
▶ Range Behavior
Range Anchoring decides where the left edge lands once a structure qualifies. Scan window only draws the box across the window the filters evaluated. Extend to containment walks the edge backwards through earlier bars that stayed inside the band, up to an adjustable ceiling, so the box covers the full consolidation. Minimum Range Bars holds a new structure provisional until it has run long enough, and a provisional structure that breaks is cleared without a marker. Absorb Overshoot lets a boundary take in a marginal wick rather than closing the box on it. Break Confirmation and Breakout Buffer decide what ends the range, on a close or a wick, and how far past the boundary price must clear. Cooldown Bars and Max Range Age govern what happens after a range resolves.
▶ Deviation Merging
Optional handling for a break that closes back inside the range. With this enabled, the broken structure is held open briefly and a close back between the boundaries revives it: the box resumes from its original left edge, the breakout marker is withdrawn, and the excursion is marked at its extreme, leaving one continuous structure with a failed break inside it rather than a breakout followed by a fresh box over the same price. Left disabled, every break is final.
▶ Range Visualization
Each structure is drawn as a gradient shaded box that fades from the boundaries toward equilibrium, with an optional midpoint line and quartile levels marking where a rotation is already extended. A live tag reports whether the structure is forming or confirmed, how many bars it has held, and its height as a percentage of price. Breakout markers print below the bar on an upside break and above it on a downside break.
▶ Built-in Alerts
Ready-made alert conditions fire when a new range is detected, when one breaks to the upside or downside, on any range break, and when a failed break returns price inside the structure.
▶ Color Presets
Six presets (Classic, Aqua, Cosmic, Cyber, Neon, Custom) drive the bullish and bearish pair, with the range color held separate so a live structure always reads as neutral against whichever pair is active. Custom mode exposes individual color pickers. Every border, line, fill, and label is contrast corrected against the chart background automatically, so a color close to your background lifts far enough to read while shading stays light enough to keep price action visible.
Indicateur

Consolidation Ranges [ITA]🟠 OVERVIEW
Consolidation Ranges finds the places where price stopped trending and went sideways, draws the range while it forms, marks the bar that closes outside it, and then keeps watching to see whether that breakout actually held.
Finding a sideways range is the easy half. Every tool in this category draws the box and marks the breakout, and then stops, which is where the trader's real problem starts. The most common complaint about trading ranges is that the breakout fails and price comes straight back in, and almost nothing measures how often that happens.
So this one waits. After a breakout it gives price a set number of bars to stay outside. Close back inside within that window and the breakout is marked Failed. Stay out and it is marked Held. The running count of both sits in the corner.
🟠 CONCEPTS
* Consolidation - A stretch of bars whose full high to low span stays inside a chosen multiple of ATR. Measuring the range in ATR rather than in points means the same setting behaves the same way on a quiet symbol and a volatile one.
* Range Widening - While price stays inside, the box grows to contain each new bar, but only while the result is still narrow enough to count as a range. Without that limit a slow drift never breaks out, it just drags the box along with it.
* Breakout - The first close outside the box. The close matters rather than the wick, because a wick outside a range is the thing that most often reverses.
* Confirmation Window - The number of bars a breakout is given to prove itself.
* Held and Failed - What actually happened. Held means price stayed outside for the whole window. Failed means it closed back inside the range it had just left.
🟠 FEATURES
🔹 Range width measured in ATR, so one setting works across symbols and timeframes rather than needing to be retuned for each
🔹 The box builds live as the range develops and locks on the bar that breaks it
🔹 Breakouts marked in both directions at the price where the close happened
🔹 Every breakout followed to an outcome and labelled Held or Failed
🔹 A running count of held against failed breakouts, with the rate, for the symbol and timeframe on screen
🔹 Separate alerts for a break up, a break down, a failed breakout and a held breakout
🔹 If the settings are strict enough that nothing is found, the chart says so and names the two inputs to change, rather than leaving you looking at an empty chart unable to tell a quiet symbol from a bad setting
🟠 HOW TO USE
Set Range Length first. It decides how significant a consolidation has to be before it is drawn at all. Twenty bars is a reasonable starting point on any timeframe. Raise it for fewer and larger ranges.
Max Width is the second control. If nothing is being found on a volatile symbol, raise it. If the whole chart is boxes, lower it.
Then read the count in the corner before anything else. It is telling you whether breakouts on this symbol and timeframe have been worth taking. A symbol where most breakouts failed is not a symbol to trade breakouts on, and that is worth knowing before the next one rather than after it.
Bars To Confirm decides how patient the measurement is. A short window counts quick reversals as failures. A longer one only counts a breakout as failed if price genuinely came back.
🟠 CONCLUSION
Drawing the range is the part every tool does. The part that decides whether the range was worth trading is what happened after the break, and that is what this one records. Indicateur

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

Green & Red Triple Overlap CandleGreen & Red Triple Overlap Candle
Three candles of the same colour that go nowhere.
One side spends three candles in a row pushing, and at the end of it price is still sitting in the
same band it started in. The candles do not step away from each other, they fold back over each other. That is the whole pattern, and it is the opposite of what three same-coloured candles are usually assumed to mean.
The middle candle is the reference. The first and the third clamp its body from opposite ends, and the band they clamp is what gets drawn.
THE TWO PATTERNS
A candle is Green when close is greater than open, and Red when close is less than open. A Doji,
where close equals open, is neither and takes no part. Only fully closed candles are read; the
candle still forming is never used.
Green Triple Overlap
Candle 1, Candle 2 and Candle 3 are all Green
Candle 1 HIGH is at or above Candle 2 CLOSE it already reached the top of the middle body
Candle 3 LOW is at or below Candle 2 OPEN it came back down to the bottom of it
Red Triple Overlap
Candle 1, Candle 2 and Candle 3 are all Red
Candle 1 LOW is at or below Candle 2 CLOSE it already reached the bottom of the middle body
Candle 3 HIGH is at or above Candle 2 OPEN it came back up to the top of it
That is the whole definition. Three colours and two reaches, all on the same group of candles.
WHAT IT ACTUALLY SAYS
Three green candles in a row is normally read as strength. Here it is not, and the two reaches are what change the reading.
Candle 1's high already being at Candle 2's close means the second candle finished the whole of
its work inside ground the first one had already covered. It closed where the previous candle had merely traded. No new territory.
Candle 3's low coming back to Candle 2's open means the third candle handed back the entire middle body before doing whatever it did. Everything the second candle gained was given up and bought again.
Put together: three candles of buying pressure, and the group is still standing on the same band. Buyers keep arriving and something keeps meeting them. The pattern marks absorption, not thrust.
The red side is the same story with the roles swapped.
WHAT MAKES THIS DIFFERENT
1. It is not Three White Soldiers, and reading it as such inverts the meaning.
Three White Soldiers is a staircase: each candle opens inside the previous body and closes beyond it, so the group walks upward. This is the opposite construction. Each candle folds back over the middle one, so the group stands still. Both are three same-coloured candles, and that is where the similarity ends.
2. The comparison is against the BODY, not the range.
Both reaches are measured against Candle 2's open and close, not its high and low. Wicks on the
middle candle change nothing. That keeps the test on where price actually settled rather than on how far it briefly poked, which is what makes the pattern uncommon instead of everywhere.
3. The middle candle is a fixed reference, not just the one in between.
Candle 1 is checked against one edge of it and Candle 3 against the other. The two conditions
point in opposite directions on purpose - that opposition is what clamps the band.
4. Two candles doing this is not the pattern.
Any two adjacent candles overlap to some degree. It takes a third, reaching back the other way, before the group can be said to have gone nowhere. Nothing is reported until all three are closed and all three conditions hold.
5. Same colour throughout is mandatory.
A mixed group is a reversal story and is already well covered by engulfing and pin bar tools. Here every candle belongs to the same side, which is what makes the lack of progress worth noticing at all.
READING THE CHART
Each detected pattern draws a solid box over the MIDDLE candle's body - the band that was clamped - stretched across all three candles.
Green Triple Overlap drawn in the bullish colour, label below the group
Red Triple Overlap drawn in the bearish colour, label above the group
Labels are parked outside the whole three-candle group rather than on the box, so the text always clears the price action. The box itself is often thin, because the middle body is the thing being measured, and a thin box is information: it means the three candles were argued out in a very narrow band.
An optional outline draws the full high-to-low range of the three candles around that band. Turn it on to see how much room the group used in total against how little it kept. It is off by default so the clamped band stays the focus, but on a chart zoomed far out it is also the easiest way to spot where the patterns are, because the band on its own is only as tall as one candle body.
The band can also be run out to the right edge, which turns it from a marker of what happened into a level you can watch price return to. That is off by default as well. The range outline is never extended - it describes three particular candles, not a price that is still live.
A summary table in the corner counts how many of each type were found inside the current scan window. It counts every pattern found, including a type that is currently switched off, so the table always reflects what the market actually printed rather than what is on screen.
SETTINGS
Scan
- Scan Length: how many closed candles are scanned backwards from the latest bar. The running candle is always excluded.
Pattern Types
- A switch for Green Triple Overlap and one for Red Triple Overlap.
- Show Full Candle Range: outlines the whole height of the three candles around the clamped band.
Zone Style
- Bullish and Bearish colours, and the fill transparency of the band. The full range outline is
always drawn lighter than the band it surrounds.
- Extend Zones Right: runs the clamped band out to the right edge so you can see where price sits against it now. Only the band is extended, never the range outline.
Labels
- Show Labels, Label Size, and Label Distance from Candles as a percentage of the group's full
height. Increase the distance on noisy charts so labels clear the candles.
Summary Table
- Show, position and size of the corner table.
ALERTS
Two alert conditions: Green Triple Overlap and Red Triple Overlap.
Each message carries the pattern name, the symbol, the timeframe and the closing price. The same messages are also sent through the alert function, so the "Any alert() function call" alert type can deliver both through a single alert.
All alerts are evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts far enough behind the latest bar that
the candle still forming is never part of any group.
- Every alert signal is written so that it can only become true once a candle has finished. Price
moving inside an open candle cannot make a signal appear and then disappear.
- Boxes are rebuilt on the last bar using confirmed history. A box that has been drawn does not
move or change afterwards. It only leaves the chart when it falls outside the Scan Length
window.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses them for the opposite purpose: one of them is what restricts every signal to bar close, and the other is what redraws the boxes efficiently on the final bar. Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- The pattern is uncommon by design. Three candles have to share a colour and then reach back
across each other in opposite directions. Stretches with nothing on the chart are normal. If you
want to see more of them, look at a faster timeframe rather than loosening anything.
- Doji candles take no part. A group containing one is never reported, because a Doji has no
direction to share.
- Increasing Scan Length raises the number of drawing objects, and switching the full range outline on doubles the boxes. TradingView caps these at 500 boxes and 500 labels, and the oldest are dropped once a cap is reached. The default is chosen to stay well inside those limits.
- Overlapping groups are possible. Three candles can belong to one pattern while the next three, shifted by one, form another, so boxes may sit next to or inside each other.
- Detection is purely structural. It reports where the shape occurred and nothing more. It does not rank patterns by quality, measure follow through, or produce entries, targets or stops.
HOW TO USE IT
The box marks a band that one side defended for three candles running. Traders commonly watch these areas for:
- A reaction when price returns to the band later, since it was contested once already
- Continuation once price finally leaves the band, because the side that was absorbed has spent
three candles worth of effort with nothing to show for it
- Context alongside higher timeframe structure, where absorption against the larger trend reads differently from absorption with it
The edges of the box - the middle candle's open and close - are the two prices the group kept
returning to, and they are usually the more interesting part of it.
These are reference areas, not entry signals on their own. Use them alongside your own support and resistance mapping, your own entry method and proper risk management.
DISCLAIMER
This indicator is a pattern detection tool. It is not financial advice and it makes no claim about
profitability. Trading involves risk. Always apply your own analysis and risk management. Indicateur

Stockbee Anticipation SetupSTOCKBEE ANTICIPATION SETUP
Finds stocks that have already run, then gone quiet — tight range, drying volume, holding near the highs of a small base. It marks the coil BEFORE the breakout, while the stop is still small.
THE IDEA
Pradeep Bonde (Stockbee) trades short, violent moves: a stock breaks out and delivers most of its gain in three to five days. His Momentum Burst entry takes that breakout on the day it happens, typically a 4% up-day on expanding volume.
Anticipation is the same trade entered earlier. Instead of paying for the breakout day, you buy during the dull consolidation that precedes it, while the range is tight and volume has dried up. You give up confirmation; in exchange your stop sits just underneath a very tight base, so the position risks a fraction of what a breakout-day entry risks.
That trade-off only works if the base is genuinely tight. A wide, sloppy consolidation forces a distant stop, and then anticipating buys you nothing over simply waiting. The indicator is built around that constraint.
The pattern in one line: a real prior advance, then a short narrow base, volume drying up, price holding in the upper half of that base, and a stop you can place within a few percent.
HOW IT DECIDES
Nine conditions are evaluated on every bar. ALL must pass. There is no partial credit — one failure and the bar is not a setup, no matter how good the rest look.
1. Prior advance >= 15% over 40 bars
Anticipation continues a move. Without a prior thrust you are just buying a quiet stock.
2. Base width <= 10%
High to low of the last 10 bars. The best single proxy for whether the coil is real.
3. Average daily range <= 5%
Individual bars must be small, not just the envelope. Catches wide bars inside a narrow box.
4. Volume dry-up <= 0.85 x baseline
Base volume against the 50-day average. Supply exhausting is the tell.
5. Close location >= 50% of base
Price holding the upper half. A tight base sagging to its lows is a failed base.
6. Risk to stop <= 5%
The whole premise. If the stop cannot be placed tight, the setup is rejected outright.
7. Trend close > MA20 and MA50
Keeps you on the right side. Optional, can be switched off.
8. Not already fired day gain < 4%
A 4% day IS the Momentum Burst trigger. Past that you are no longer anticipating.
9. Liquidity >= $5 and 100k shares
Standard floor. Tight stops are unusable in illiquid names.
Why the risk gate is a rejection and not a penalty: every other quality can be traded off against the rest through the score. Stop distance cannot. A 12% stop on an anticipation entry is a different trade with a different expectancy, not a slightly worse version of the same one.
THE SCORE
Bars that clear all nine gates are graded 0-100. The score ranks candidates against each other; it never overrides a gate.
20 Base tightness — narrower than the cap scores higher
15 Close location within the base
15 Volume dry-up depth
15 Size of the prior advance
15 Risk distance — tighter stop, more points
10 Range contraction — last 3 bars vs the base
10 Trend alignment above both MAs
Grades:
85-100 A Everything lines up. Chart-review candidate.
75-84 A- Strong, usually one soft component.
65-74 B Playable smaller, or watch for improvement.
55-64 Watch Valid but unremarkable. Watchlist only.
under 55 — Not flagged. Nothing is drawn.
The 55 floor is an input, so you can raise it to see only the best coils.
READING THE CHART
Nothing is drawn unless a bar clears every gate and meets the score floor. A clean chart means no setup — that is the normal state.
Triangle below bar First bar of a new setup. Marks the transition into the
state, so one coil produces one triangle, not a cluster.
Shaded zone Every bar where the setup remains valid. Its width shows
how long the coil has held.
Solid teal line Base high — where the Momentum Burst would trigger.
Anchored to the base that produced the signal and
spanning its full length.
Dotted line Base low. Reference only, this is NOT the stop.
Solid red line The actual stop, from the selected stop mode. Usually
well inside the base low.
Metrics table (values are for the most recent bar; each gate metric turns red when it fails, so a glance tells you what is blocking the setup):
Anticipation Rating and score. Grey header means no setup on this bar.
Base width % High to low of the base, as a percentage of the low.
Avg range % Mean daily high-low range across the base.
Vol ratio Base volume / 50-day baseline. Below 1.0 means drying up.
Prior advance % Rise from the pre-base low up to the base high.
Close loc % Where the close sits in the base. 100 = at the high.
Entry (close) The anticipation entry — you buy inside the base.
Stop Stop price per the selected mode.
Risk % Entry to stop. Red above the max-risk input.
Breakout lvl Base high plus one tick — the Momentum Burst trigger.
R to breakout Distance from entry to that trigger, in units of risk.
R to breakout is the number that justifies the trade. It answers: how much do I make, in R, just getting to the point where a breakout trader would enter? At 1.5R or more, anticipating is genuinely paying you for the earlier entry. Below 0.5R you are taking extra uncertainty for very little head start, and waiting for the breakout is the better trade.
INPUTS
BASE / CONSOLIDATION
Base lookback (bars) 10 Length of the consolidation window. 10 is about two
weeks. Bonde's bases run one to three weeks, so 5-15
is the useful band.
Max base width % 10.0 Rejects bases wider than this. The main tightness
control — lower finds fewer, better coils.
Max avg daily range % in base 5.0 Rejects bases built from wide individual bars. Raise
for high-ADR small caps, lower for large caps.
Min close location in base % 50.0 How high in the base price must close. 70+ demands
price pinned near the highs.
PRIOR ADVANCE
Prior-advance lookback (bars) 40 Window searched for the pre-base low. Longer accepts
older, slower advances.
Min prior advance % 15.0 Required thrust into the base. Raise to demand real
momentum; set to 0 to disable.
VOLUME
Volume baseline length 50 Averaging period the base volume is compared against.
Max base/baseline vol ratio 0.85 Dry-up threshold. 0.85 is mild; 0.6 demands a
pronounced volume collapse.
RISK / STOP
Stop reference Recent low Recent low = under the last N bars, the tight
Stockbee-style stop. Base low = under the whole base,
safest but widest. ATR multiple = volatility-scaled.
Fixed % = a flat percentage.
Recent-low lookback 3 Bars used by Recent low mode. 2-3 is tight, 5+
approaches the base low.
ATR length / ATR multiple 14/1.5 Used only in ATR mode.
Fixed stop % 4.0 Used only in Fixed % mode.
Max risk to stop % 5.0 HARD REJECTION. Setups needing a wider stop are
discarded. The most consequential input here.
FILTERS
Min price 5.0 Excludes low-priced names.
Min avg volume 100000 Liquidity floor on the volume baseline.
Require close above 20 & 50MA on Trend filter. Turn off to find bases forming under
the averages — a different, lower-probability trade.
Exclude if today gain % >= 4.0 Keeps anticipation separate from the breakout it
precedes.
OUTPUT
Min score to flag 55 Score floor. Raise to 70+ for high-grade coils only.
Show base high / low lines on Base boundary lines.
Show stop line on The red stop level.
Shade anticipation zone on Background tint over valid bars.
Extend levels right (bars) 0 Projects the lines forward N bars. Useful when
planning an entry.
TABLE
Show metrics table on Toggles the table.
Position Top right Any of the nine chart corners and edges.
Text size Normal Tiny through Huge. Raise it on large monitors.
TUNING
The defaults are a starting point, not settled numbers. Bonde does not publish exact thresholds, so these were chosen to match the described behaviour and should be adjusted to your universe.
Too few setups:
- Raise Max base width % to 12-14. This is the most common blocker.
- Raise Max risk to stop % to 6-7, accepting looser trades knowingly.
- Lower Min prior advance % to 10 for slower, larger names.
- Lower Min score to flag to 45 to see marginal coils.
Too many setups:
- Lower Max base width % to 7-8.
- Lower Max base/baseline vol ratio to 0.65 for real volume collapse.
- Raise Min close location % to 65-70.
- Raise Min score to flag to 70.
Volatility: high-ADR small caps need Max avg daily range % around 7-8 and a wider Max risk to stop %, or nothing will ever qualify. Large caps can run tighter than the defaults on both. Switching Stop reference to ATR multiple makes stop distance self-adjusting across a mixed watchlist.
These thresholds have not been backtested. Changing them changes which trades you take, and the only way to know whether a change helps is to test it against outcomes over a meaningful sample.
ALERTS
One alert condition is exposed, "Stockbee Anticipation", firing on the first bar of a new setup rather than on every bar it stays valid.
Right-click the chart, Add alert, choose Stockbee Anticipation Setup as the condition, and set it to Once Per Bar Close. On daily bars you are notified after the close, which is when the signal is final. Firing intrabar produces alerts that vanish by the close.
WHAT IT CANNOT DO
- It is not a signal service. It flags a chart state. Every candidate still
needs a look at the chart before it becomes a trade.
- It has no view on news or fundamentals. A tight base ahead of an earnings
date is a very different proposition and the script cannot see the date.
- It does not size positions or track exposure. It gives you entry, stop and
risk %; converting that into share count is your job.
- It does not know the market regime. Anticipation setups fail in bulk when
the broad market is under distribution. Check the market first.
- It has not been backtested. The thresholds are reasoned from the method as
described, not fitted to outcomes.
- One symbol at a time. Pine indicators evaluate the chart's symbol only.
Scanning a universe requires a screener.
Implements the Anticipation setup as taught by Pradeep Bonde (Stockbee). Not affiliated with or endorsed by him. Nothing here is financial advice — the indicator describes chart geometry, and decisions about risk remain entirely yours. Indicateur

Consolidation Ranges & Breakout Map [MQLSoftware]Consolidation Ranges & Breakout Map reads the market's sideways regime as a measurable object. It detects compression with an authored Range Compression Index, fixes the consolidation box only after enough confirmed evidence, tracks how the box resolves — breakout, measured-move projection reached, false break, or expiry — and reports the measured base rates of those outcomes counted on the chart's own history.
This is a visual analytical tool for chart study. It does not execute trades and does not provide financial advice.
Key Features
Consolidation boxes fixed on confirmed evidence only: a candidate must hold the compression threshold for a minimum number of confirmed bars before it becomes a live range — borders never move backwards once fixed
Amber forming frame while compression is still building, so you see the candidate before it commits
Breakouts by confirmed CLOSE beyond the border plus an ATR buffer — wicks and gaps alone never trigger a breakout
Measured-move projections (1× and 1.618× the range height by default) drawn from the broken border — a geometric reference derived from the range's own size
Outcome tracking on confirmed bars: ✓ printed when the 1× projection is reached, ✕ false break when price closes back inside within the fakeout window, quiet expiry when the resolution window runs out
Range invalidation discipline: a box that "breathes" beyond its edge-update budget or outgrows the maximum width is annulled and excluded from the statistics, so pseudo-ranges never contaminate the base rates
Measured base rates in the panel: share of upside breakouts, share that reached the 1× projection, share of false breaks, median bars to 1×, median range length — each with its sample size
Higher-timeframe context band (rolling HTF high/low), optional volume-expansion quality gate, four panel modes, five confirmed-bar alerts plus one dynamic JSON alert
Core Concept — what is original here
TradingView has many box-drawing and Darvas-style tools; most fix a rectangle from a simple highest/lowest lookback and leave the interpretation to the reader. This script makes the detector itself measurable and then closes the loop by counting what actually happened. Three specific algorithmic elements:
1. The Range Compression Index (RCI). A 0–100 composite authored for this script: RCI = 100 · (0.40 · ineff + 0.35 · vc + 0.25 · cont), where ineff = 1 − min(ER, 1) is movement inefficiency (the inverse Kaufman efficiency ratio — net displacement over the evaluation window divided by the bar-to-bar path traveled), vc is volatility compression (short ATR against a 4× longer ATR window, rescaled to 0..1), and cont is containment — the share of closes inside the central 90% of the candidate box. Each component measures a different facet of "sideways": no net progress, contracting volatility, clustering closes. A candidate also has to pass a geometry gate — its width may not exceed a configurable multiple of ATR. The sensitivity presets set the RCI threshold (Low 70, Normal 62, High 55).
2. The consolidation → breakout state machine. SEEKING → FORMING → LIVE → BREAK UP / BREAK DOWN → RESOLVED / FALSE BREAK / EXPIRED, with every transition on confirmed bars only. The box is fixed only after the minimum number of confirmed compression bars. A fixed border may be widened by a wick within the edge tolerance a limited number of times — each update on a confirmed bar and counted; beyond the budget the box is invalidated and never enters the statistics. A breakout requires a confirmed close beyond the border plus the ATR buffer; a bar that pierces both borders resolves by its close; a close back inside within the fakeout window is classified as a false break (checked before the projection within the same bar, deliberately conservative). The resolution window defaults to three times the range's own duration, capped at 200 bars.
3. Measured base rates. The panel reports observed frequencies counted on this chart's loaded history: how often ranges broke upward, how often the breakout reached the 1× measured-move projection, how often the break turned out false, the median bars to 1× and the median range length — each with its sample size. Below a minimum sample the panel prints the sample gate instead of a percentage, so small-sample noise is never dressed up as a statistic. Observed frequencies, not assumptions, and no claims attached to them.
Anatomy of the Display
Live range box — steel border with a faint fill, header with the range's duration and height in ATR; midline optional
Amber dashed frame — a FORMING candidate: compression is building but the box is not yet committed
▲ / ▼ breakout markers on the confirmed breakout bar (Descriptive or Compact style)
Dashed projection lines from the broken border with 1× and 1.618× labels at the right edge
✓ 1× printed where the projection is reached, ✕ false break where price closed back inside
Translucent higher-timeframe band with the rolling HTF high/low and a timeframe tag
Panel (Off / Minimal / Normal / Large): state in plain words (SEEKING / COMPRESSING n/m / RANGE LIVE / BROKE UP / BROKE DOWN / FALSE BREAK), the live Range Compression Index with a five-block meter, range height and duration, position inside the range, and in Large mode the measured base-rate section
Notes on Repainting
All state transitions, breakout/outcome markers, statistics counters and alerts fire on confirmed bars only and never move once printed
Box borders are fixed on the confirming bar and never move backwards; the only permitted change is a forward widening within the edge tolerance, on a confirmed bar, a limited number of times
The live box's right edge, the FORMING candidate frame and the panel's live rows update intrabar — visual context, not signals
The higher-timeframe band uses one request.security call with lookahead off and reads the previous confirmed HTF value — no future data anywhere
Display inputs only gate drawing; they never change the state machine, the counters or the alerts
Typical Analysis Workflow
Watch the panel's Compression row: a rising RCI with an amber forming frame means a candidate is building
When RANGE LIVE prints, read the box header — a 40-bar range 1.2 ATR tall is a different regime than an 8-bar pause
Treat the breakout marker as a measured event, not an invitation: the base rates tell you how often breakouts on this chart reached the projection versus failed back into the box
Use the false-break share as regime context — some markets punish breakout chasing far more often than others, and the panel will say so with a sample size
Check the higher-timeframe band: a local range at the edge of the senior range is a different situation than one in the middle of it
Configuration
Range Detection — compression sensitivity preset (RCI threshold), evaluation window, minimum confirmed bars to fix a box, maximum width in ATR, containment threshold, edge tolerance and the edge-update budget
Breakout — ATR buffer for the confirmed close, fakeout window, both projection multiples, resolution window (auto = 3× range duration), optional volume-expansion gate with its multiple
Higher-Timeframe Context — band on/off, HTF (empty = auto: 4× chart timeframe capped at 1W), HTF range length
Statistics — base-rate section on/off, minimum sample to display a percentage
Visual — panel size and position, marker style (Descriptive / Compact), projections, midline, how many past ranges to keep, and the four identity colors (all inputs; dark-theme defaults)
Markets and Timeframes
Any symbol and timeframe. All thresholds are expressed in ATR and percentiles of the chart's own behavior, so the detector self-calibrates per instrument. On symbols without volume data the volume gate is ignored automatically and the panel says so. On slow timeframes (1D/1W) the sample gate will hide the percentages until enough ranges have resolved — that is the honesty rule, not a defect.
Alerts
Range confirmed · Range breakout up · Range breakout down · False break · 1× projection reached — all evaluated on confirmed bars from the same event flags that draw the markers, plus one dynamic alert() with a JSON payload (event, symbol, timeframe, box borders, break level, height in ATR). Indicateur

Multi-Timeframe Trend & Consolidation Table### Overview
The **Multi-Timeframe Trend & Consolidation Table** is a lightweight dashboard indicator designed to give traders a quick, multi-timeframe overview of the market trend and consolidation status directly on their chart.
Instead of switching between multiple timeframes or cluttering your chart with dozens of moving averages, this tool consolidates trend data across 10 different timeframes into a clean, customizable table.
---
### Key Features
* **Multi-Timeframe Analysis:** Monitors **1m, 3m, 5m, 10m, 15m, 1h, 4h, 1D, 1W, and 1M** timeframes simultaneously.
* **Customizable EMA Periods:** Set unique Exponential Moving Average (EMA) lengths for every individual timeframe (e.g., EMA 10 for 1m, EMA 50 for 1h, EMA 200 for 1D).
* **Consolidation Detection:** Built-in threshold logic identifies when price is hovering extremely close to the EMA line, signaling potential range-bound/chop market conditions.
* **Dynamic Table UI:** Displays the specific EMA length assigned to each timeframe directly inside the table for clear tracking. Fully customizable position (Top Right, Bottom Left, etc.) and text sizes.
---
### How It Works
The indicator compares the price of each timeframe against its assigned EMA line:
1. **BULLISH 🟢:** Current close price is above the timeframe's EMA (outside the consolidation zone).
2. **BEARISH 🔴:** Current close price is below the timeframe's EMA (outside the consolidation zone).
3. **RANGE 🟡:** Price percentage difference from the EMA is smaller than the set threshold (e.g., within 0.15%), indicating market consolidation or flat movement.
---
### How to Use
1. **Trend Alignment:** Look for timeframes aligning in the same direction (e.g., 1h, 4h, and 1D all green) to trade with the macro trend.
2. **Avoiding Chop:** When lower timeframes show `RANGE 🟡`, it indicates low volatility or moving average compression, warning you to avoid breakout trades or wait for confirmation.
3. **Execution Timeframes:** Tune lower timeframes (1m, 3m, 5m) to fast EMAs for scalp setups, while keeping higher timeframes (1D, 1W) on key levels like the 200 EMA.
---
### Settings & Inputs
* **EMA Lengths per Timeframe:** Set custom EMA periods for all 10 available timeframes.
* **Enable Consolidation Detection:** Toggle range detection on or off based on your strategy preference.
* **Consolidation Threshold (%):** Adjust the distance percentage between close price and EMA to define a range zone (default is 0.15%).
* **Table Display:** Adjust table placement on your screen and text font size. Indicateur

STRX - Balance RangeSTRX - Balance Range is a price-structure indicator designed to identify and track balanced trading ranges directly on the chart.
It detects periods of compression by comparing the recent price box width to ATR-based volatility, then validates the structure using persistence, edge interaction, and price position inside the range.
The script draws historical range boxes, can optionally connect consecutive ranges, and includes a compact statistics table showing the last closed range, the average of the last 10 ranges, and the average of the last 100 ranges.
This makes it useful for traders who want to study how current balance conditions compare with recent and broader market structure.
How it works:
A reference range is built from the highest high and lowest low of the previous lookback window.
The range is accepted only when its width remains compressed relative to ATR and the current price continues to behave inside that structure.
Additional filters help reduce random consolidations by requiring repeated interaction with the range boundaries and a minimum confirmation period.
How to use it:
Use the boxes to locate areas where price is rotating in balance rather than expanding directionally.
Compare the latest closed range with the 10-range and 100-range averages to judge whether current balance conditions are relatively small, typical, or expanded.
The tool is designed for structure reading and contextual analysis, not as a standalone buy/sell signal generator.
Inputs overview:
Range Length controls how many bars are used to define the reference box.
ATR Length and ATR Multiplier control how strict the volatility compression filter is.
Center Distance, Edge Touches, and Confirmation Bars refine the quality of detected ranges.
Visual options allow you to show or hide historical boxes, range markers, connection lines, and the statistics table.
Notes:
The statistics table uses closed historical ranges, so the values remain stable and easier to compare.
This indicator is intended for standard chart types and discretionary structure analysis.
It does not guarantee future performance and should be used together with your own risk management and market context reading.
Indicateur

Zone Radar [DefinedEdge]Price spends most of its time going nowhere. Zone Radar finds those stretches automatically, draws the range while it's still forming, and tells you the moment it breaks and how hard.
🎯 What it does
Zone Radar watches for price coiling inside a bounded range. When a genuine consolidation forms, it marks the zone with its support and resistance, then tracks it live. The instant price closes decisively outside the range, it flags the break and scores its strength from 0 to 100. Strong breaks get a bold label and a projected target.
It is a context and breakout tool, not a signal service. It shows you where the market is compressed and when that compression releases. What you do with that read is yours.
🧭 How a zone is found
A range only qualifies when two things are true at once:
Price stays inside an ATR normalised band for a minimum number of bars, so the width adapts to any symbol or timeframe on its own.
Price does not drift across that band from one side to the other, which filters out slow trends pretending to be ranges.
Once a zone is confirmed the box breathes to hug the real range, but it is capped at the width it formed with. That cap is what makes a breakout meaningful: a close beyond it is a true expansion out of compression, not just another bar inside the noise.
💥 Break strength (0 to 100)
Every break is graded on four things that separate a real breakout from a fake one:
Displacement how far beyond the edge it closed, in ATR
Range expansion the break bar's range against its recent average
Volume surge participation on the break (auto adjusted on symbols with no volume data, like spot FX)
Coil quality how long and tight the range was, since a longer coil breaks harder
Breaks at or above your Strong threshold get the bold badge plus a measured move target: the height of the range projected from the breakout point. Broken edges stay on the chart as polarity support and resistance for the retest.
⚙️ Under The Hood
Signals fire on the close of the breakout bar. No repainting, ever.
Fully adjustable: range length, width, break sensitivity, strength threshold, and how much history stays on the chart.
Works on any market and any timeframe. Tuned nicely for intraday out of the box.
🔔 Alerts
Zone formed, break up, break down, strong break up, strong break down. Wire any of them into your workflow.
📝 Notes
Lower timeframes produce far more zones than higher ones, so only the most recent are kept drawn to stay within platform limits. Raise the zone cap if you want more history, or drop to a higher timeframe for a cleaner chart. The ATR based settings are a starting point, not gospel. Tune them to how your instrument actually moves. Indicateur

TL Space Concept Pro - Three Finger Spread Breakout EngineSPACE CONCEPT PRO - THE THREE-FINGER SPREAD ENGINE
Some of the most consistent discretionary traders never look at a chart without two moving averages on it: the 20 SMA and the 200 SMA. Add price itself and you have THREE ITEMS - three "fingers". The distance between them is called SPACE, and space tells you when a market is about to explode and when a move is about to die. This indicator turns that entire concept into a fully mechanical engine with signals, trade management and webhook automation.
=== THE CONCEPT ===
THE THREE ITEMS
1. Price
2. The 20 period simple moving average
3. The 200 period simple moving average
NARROW STATE - all three items clustered together. The market has reset itself. An explosive move is loading, direction unknown. You do not need to predict it: you simply wait for the biggest bar to emerge.
SPACE ZONE 1 - the space between the 20 SMA and the 200 SMA.
SPACE ZONE 2 - price accelerating away from the 20 SMA. Sometimes the underlying moves faster than the moving average can keep up, creating a second layer of space.
DUAL SPACE / THREE-FINGER SPREAD - both zones open at the same time, all three fingers clearly separated and stacked in order. This is where moves get exhausted.
THE RAILROAD RULE - if price runs parallel to the 20 SMA like railroad tracks, that is NOT a spread. Price has to ACCELERATE away from the moving average. The engine checks this automatically.
THE WIDEST SPREAD - the widest three-finger spread of the lookback window finds you the temporary top or bottom 8 to 9 times out of 10. When it prints, the reversal watch arms and the extreme that must hold is marked on the chart.
NARROW TO NARROW - when the spread collapses from the widest state back to narrow WITHOUT breaking the extreme, the next direction is the reversal. Confirmed by a power bar: a three-finger spread reversing with a power bar is the creme de la creme of this method.
=== THE SIGNALS ===
1. BREAKOUT - power bar (biggest bar of the window) exploding out of a narrow state. Entry inside the bar, stop beyond the bar.
2. SPREAD REVERSAL - widest spread found the extreme, spread collapsed back toward narrow without breaking it, power bar confirms. Target follows the 50 percent rule.
3. EARLY REVERSAL - first strong color change directly at the widest spread (the bottoming tail bar play). Stop beyond the extreme.
4. TAIL BAR - optional: bottoming/topping tail bars near narrow states as early entries (markers by default).
Every signal prints as a two-line pill with the setup name, and every pill carries a WHY tooltip that explains the exact chain of logic behind the trade - plus entry, stop, target and R:R.
=== TRADE MANAGEMENT (AS TAUGHT) ===
- ADD on the first color change after entry ("always adding on the first color change")
- TP at the 50 percent mark of the move - the pros are satisfied with the halfway mark, do not get greedy
- After the partial: bar-by-bar trailing stop until the market takes you out
- Hard stop beyond the power bar / spread extreme with an ATR buffer
- Full position box and live status in the cockpit panel
=== THE COCKPIT ===
An animated terminal-style panel shows everything at a glance:
- Animated 3D gold pixel logo with a moving light sweep (live ticks)
- State chip: NARROW STATE / 3-FINGER SPREAD / WIDEST SPREAD / REVERSAL WATCH
- Spread rank 0-100 plus live ZONE 1 / ZONE 2 meter bars in ATR
- 7-step SPACE CHECKLIST mirroring the method: items stacked, zone 1, zone 2, acceleration (railroad filter), widest-spread watch, power bar, management
- Position box, big signal line, spread/reset/signal counters
On the chart: shaded zone 1 and zone 2 fills, narrow-state boxes, MARKET RESET tags, 3-FINGER SPREAD labels, gold WIDEST SPREAD stars with vertical measuring lines (exactly how it is drawn when taught), the must-hold extreme line, TAIL tags and lightning power-bar markers. Everything is explained on the chart - hover any label for the reasoning.
=== AUTOMATION / WEBHOOK ===
Create ONE alert with condition "Any alert() function call" and paste your webhook URL. The indicator sends ready-to-use JSON for every event:
{"id":"TL-SPACE-CONCEPT","symbol":"BTCUSD","action":"BUY","setup":"BREAKOUT","price":64100.5,"sl":63900.0,"tp":64500.0,"tf":"15","time":"2026-07-18 16:30"}
Actions: BUY, SELL, ADD, TP_50, TRAIL_EXIT, SL_HIT, NARROW_STATE, WIDEST_SPREAD. Classic alertconditions for BUY / SELL / Narrow State / Widest Spread are included as well.
=== SELF-CALIBRATING ===
The spread is ranked against its own history (percentile engine) and all distances are measured in ATR - so the indicator works out of the box on any market (crypto, forex, gold, indices, stocks, futures) and any timeframe from 1 minute to weekly. Practice finding three-finger spreads everywhere - that is the homework.
=== SETTINGS ===
Every input is documented with a tooltip quoting the original rule it implements. Adjust the narrow/wide percentiles, power-bar size, dual-space minimum, acceleration window, 50 percent rule targets and the SL buffer to fit your market and style.
=== DISCLAIMER ===
Educational tool, not financial advice. No indicator wins every trade - prepare for the 1-2 times out of 10 the concept is wrong: keep your risk unit small compared to your profit unit. That is how you stay in business.
Indicateur

Indicateur

Friction Map [NovaLens]Friction Map reads price structure the way a floor trader reads a room: it finds the price shelves where the market actually spent time, marks which ones are still live versus which the market has abandoned, and measures how much clear air you have to the nearest live shelf in each direction. It is a map of where structure is, how alive it is, and where the open space sits - not a buy or sell signal.
Most support/resistance tools draw static lines and leave them there forever, so the chart fills with levels that stopped mattering 300 bars ago. Friction Map keeps the same structure honest over time: every shelf carries a freshness that decays once the market stops trading at it, so the orange (live) shelves are the ones price has interacted with recently and the gray (fading) ones visibly age out.
═════════════════════════════════════════
◈ HOW TO READ IT
Friction Map draws directly on the price chart. There are two views of the same structure.
The shelves.
Orange = LIVE - price traded here recently; this is the current structure context.
Gray = FADING - price has not returned in a while; the market has moved on and the shelf dims the longer it stays untouched.
Faint dotted = BROKEN - price closed through it; an x-cross marks the exact bar it failed, and the dotted tail is kept so you can still see it existed.
KEY LEVEL - the strongest live shelf on the map (boldest line, brightest tag). The eye's anchor.
The room boxes. On the right edge, a box runs from current price to the nearest LIVE shelf above and below, with a label that reads the distance as a near-to-far range in ATR, for example "1 to 2.1 ATR" - meaning roughly 1 ATR of clear air, then the shelf running out to 2.1 ATR. ATR units make the read comparable on any symbol and timeframe. Teal means clear room; orange means a live shelf sits within about 1 ATR. When there is no live shelf in a direction the label reads "open air".
The breakout badge. On a confirmed close that breaks the recent range, and only at the extremes, the map prints a one-word context badge: CLEAR RUNWAY when there is no live shelf within the runway band ahead, or WALLED (with the distance) when a live shelf stands within about 1 ATR of the path. Only one CLEAR RUNWAY prints per clear-air leg - no repeats while price keeps running in the same open space, and it resets once price pulls back into a shelf. It is breakout context, never a direction call.
The info panel. A compact info panel compiles the read: the structure memory in bars; Room above and Room below as ATR ranges; Price now (open air, on a live shelf, or on a fading shelf); Last breakout (the most recent badge and how many bars ago); Shelves (how many live versus fading); and a one-line Reading takeaway.
The two views (Level view).
Anchored (default): each shelf line starts at its origin diamond, shows its current live (orange) / fading (gray) state from that origin, and marks the x-cross where it broke. An anchored structure story - where structure formed, how it reads now, and where it broke if broken - not a full per-era ledger.
Zones : every live shelf drawn as a clean full-width band straight across the chart, like a supply/demand map. Instant "where are my levels right now". No origin/break markers; broken shelves drop off.
═════════════════════════════════════════
◉ HOW IT WORKS
The density field. Across the lookback window, the indicator measures how often each price level sat inside the high-low range of the lookback bars - a time-at-price-style structure read. For every bar it asks which price levels the bar's high-low range covered, and accumulates that into a density field using a difference-array method (O(L+bins) per bar) so the script stays fast even on long charts and heavy lookbacks. Price levels where many bars overlapped are dense; levels price passed through quickly are thin.
Where shelves are born. A shelf forms at a density peak whose strength clears a RELATIVE floor - it must be at least a set fraction of the strongest peak currently on the map. That relative test is self-calibrating: it adapts to each asset and regime instead of relying on a fixed tick count, so the same indicator is designed to read BTC, SPY, EURUSD and gold without constant retuning. A small absolute floor screens out noise on near-empty windows.
Data-driven width. Each shelf's band is not a fixed width. It expands outward from the peak for as long as the neighbouring density holds at least half the peak value, then is capped to a readable range in ATR units. A wide consolidation earns a wide shelf; a tight one stays thin.
Aliveness (freshness). Every shelf carries a freshness equal to an exponential decay of the bars since the band was last traded (2^(-barsSinceTouch / halfLife)). Freshness is 1 while price is in the band and halves every half-life once price leaves. Above the live threshold a shelf renders LIVE (orange); below it the shelf renders FADING (gray) and dims further until it drops off the map.
Causal lifecycle. Shelves are born on confirmed bars and never re-placed. A shelf becomes BROKEN only when price, after arming on one side with real separation, closes through to the other side - the break bar is frozen and the line continues as a faint dotted tail. The ORIGIN anchor (the earliest bar within the lookback where price actually traded that level) and the BREAK anchor are both set once and never rewritten. That frozen history is the trust element: the map cannot quietly redraw the past to look right.
═════════════════════════════════════════
✦ HOW WE USE IT
A common read on a liquid crypto or index chart, default memory: price is pushing toward the top of its recent range. The panel Room above reads "0.4 to 1.6 ATR" in orange - there is a live shelf close overhead, so the map reads the upside as walled in the near term. Room below reads "open air" - nothing live underneath. Price is sitting in open air between an overhead live shelf and abandoned structure far below.
Now price closes through the recent high. Because the nearest live shelf overhead was inside the runway band, the map prints WALLED with the distance, not CLEAR RUNWAY - the break is into immediate structure, not open space. The badge does not say the break fails; it says there is a live shelf standing in the path, which is the context a discretionary trader wants before deciding whether the move has room.
Flip the situation: a confirmed break with Room ahead reading "open air" prints CLEAR RUNWAY . In our testing, clear-runway breakouts travelled further on average than walled ones (the effect was modest and weakest on rates). That is an observation about context, not a guarantee about the next bar.
The point of the map is the same in every case: see where the live structure is, see how much clear air you have to it in ATR, and read the breakout against that structure instead of against a static line.
═════════════════════════════════════════
❖ OTHER APPLICATIONS
Trade-location context : read entries against the nearest live shelf rather than a static S/R line - the orange shelves are the structure price has interacted with most recently.
Breakout context : CLEAR RUNWAY versus WALLED on a confirmed break, as a read on whether there is open space ahead or a live shelf in the path.
Stop and target context : the room ranges in ATR give a structure-aware sense of where the nearest live shelves sit above and below, for evaluating whether planned stops or targets sit near recent structure or out in open air, instead of at round numbers.
Chop filter : many overlapping live shelves with price standing on one ("on a live shelf" in the panel) is a congested read; sustained open air is cleaner trend space.
Structure classifier : use the Shelves row (live versus fading) and Room rows as a top-down structure filter for any external trade plan, independent of the badges.
Alert-driven workflow : subscribe to the clear-runway and walled breakout alerts and check the chart only when a confirmed breakout actually changes the structural picture.
═════════════════════════════════════════
⚙ GETTING STARTED
Friction Map ships with pre-tuned memory profiles plus a Custom override. Pick a memory and start reading the map - the default Auto setting matches the chart timeframe for you.
Structure memory:
Auto (match timeframe) (default): reads the chart - 30-minute and faster get Short, everything slower gets Medium.
Short (60 bars) : about one trading day on 5m, a week on 1H. Faster-moving map.
Medium (120 bars) : about a month on 1H, six months on 1D. Balanced.
Long (240 bars) : slow, full-cycle structure.
Custom : unlocks the Advanced group for full manual control.
Core display:
Level view : Anchored (causal story, default) or Zones (clean full-width bands).
Structure shelves : master toggle for the shelf lines. On by default. Under it, three per-state toggles let you choose which states draw:
Live shelves (orange) , Fading shelves (gray) , Broken shelves (dotted) - all on by default. Turn Broken off to declutter when a level has rebuilt live on top of old broken tails.
Room boxes + labels : the price-to-nearest-live-shelf boxes and ATR range labels. On by default.
Breakout badge : CLEAR RUNWAY / WALLED context badges on confirmed breakouts. On by default.
Shelf state tags : a small LIVE / FADING / KEY LEVEL tag at the right end of each shelf. On by default; turn off for a cleaner chart once the colours are familiar.
Show real shelf width : off by default (live shelves get a thin subtle halo). On draws each live shelf at its true data-driven width as a wider transparent band.
Info panel : pick where the summary panel anchors - Top Right (default), Top Left, Bottom Right, Bottom Left, Middle Right, or Off to hide it.
Dark theme panel : panel colours for dark charts; turn off on a light background.
Level reach (bars) : how far back the shelf lines and halos draw, so old structure does not stretch across the whole chart.
Appearance / Colours (4 pickers):
Live shelf, Fading shelf, Clear air, Broken shelf - each on its own line. The shelf lines, halos, room boxes, tags and badges all reference these inputs, so the palette adapts for colour-blind, light-mode or brand themes without forking the script.
Advanced (Memory = Custom only): Custom opens on the same defaults as the Medium profile (not a live copy of whichever profile you are currently on), so coming from Medium the switch is seamless; coming from Short or Long the map steps to that baseline first. Then every dial below is yours.
Lookback (bars) : structure memory in bars. Larger = more history considered, slower-moving map.
Freshness half-life : how fast a shelf fades once the market stops trading at it. After this many bars untouched a shelf is at half freshness.
Breakout lookback : a breakout is a confirmed close that newly breaks beyond the prior N-bar high or low (a fresh cross, so a sustained trend does not re-fire it every bar).
Min strength (vs strongest) : a shelf is born only if its density is at least this fraction of the strongest peak on the map. Raise for fewer, stronger shelves.
Merge distance (ATR) : shelf candidates closer than this to an existing shelf refresh it instead of spawning a duplicate.
Max shelves : cap on simultaneously tracked (non-broken) shelves; the weakest is pruned when a stronger one is born.
Live threshold : freshness above this renders a shelf LIVE (orange).
Runway band (ATR) : how far ahead of a breakout to scan for live shelves when deciding CLEAR RUNWAY versus WALLED.
═════════════════════════════════════════
△ LIMITATIONS
Descriptive, not predictive : Friction Map shows where price spent time and how alive that structure is. It makes no claim that a shelf will hold or that a breakout will follow through. There is no buy or sell signal anywhere in the tool.
Time-at-price, not volume : the density field is built from how much of the traded range sat at each level, not from volume. That keeps the read universally stable across every asset and data feed (crypto volume is fractured by exchange, FX volume is a tick proxy), but it does not weight a busy bar more than a quiet one.
Backward-looking by construction : in fast moves and gaps, room can jump to "open air" quickly as price leaps into untraded territory. That is accurate but may not persist.
Room measures to LIVE shelves only : the room ranges and the badge ignore fading shelves on purpose - the room read focuses on the current (orange) structure. A fading shelf still shows on the chart as a gray line; it just is not counted as room.
The breakout effect is context, not edge : in testing, clear-runway breakouts travelled further than walled ones on average, but the difference was modest and weakest on rates. Treat the badge as context to read alongside your own plan, not as a validated signal.
Recency fade : a structurally important level that has not been traded in a long time will fade from the map even if you still consider it important. Lengthen the memory or half-life if you want older structure to persist.
═════════════════════════════════════════
🔔 ALERTS
Two alert conditions are built in so you can monitor structure without watching every bar:
Clear-runway breakout : a confirmed breakout into clear air (no live shelf within the runway band ahead).
Walled breakout : a confirmed breakout into nearby live structure (a live shelf within about 1 ATR of the path).
Both fire on bar close (gated on `barstate.isconfirmed`) - no intrabar repaint. The indicator also emits a richer alert with a pure-JSON payload for routing to your own automation or webhook stack. The payload carries the brand, the indicator name, the event, the direction, the up and down clearance in ATR, the current price, the ticker, the timeframe and the bar time (the clearance fields are sent as text and read "open" when there is no live shelf that way). Pick ONE mechanism per event - the dropdown alert condition for a simple notification, or the JSON alert for a webhook - so you do not get duplicate notifications. Badges and alerts fire even when the on-chart badge is toggled off; alerts should not require chart clutter.
═════════════════════════════════════════
⌁ NOTES
Built on a containment-count density field (time-at-price), with data-driven band width, exponential freshness decay, and a causal frozen lifecycle (origin and break anchors set once and never moved).
Method lineage: the density field is a time-at-price construction, in the tradition of Market Profile (J. Peter Steidlmayer, popularised at the CBOT in the 1980s), which reads structure from where the market spent time rather than from volume. Friction Map adds the freshness decay and the causal live/fading/broken lifecycle on top of that classical time-at-price idea.
Repaint: non-repainting on confirmed bars. Births, breaks, clearance, badges and alerts are computed on bar close; the current bar updates in real time. Live/fading colour reflects current state, so a re-traded faded shelf can re-colour live - no past origin or break anchor is ever changed.
Original construction. The engine is built from first principles for this tool; there is no external reference implementation, so no validation-correlation claim is made.
Open-source under MPL 2.0. Free to use, fork, study.
NovaLens Indicateur

EV Edge | AnonycryptousEV Edge | Anonycryptous
Description & user manual
Why this indicator is different;
Most breakout indicators stop at the entry. A box compresses, price breaks out, an arrow appears, and the indicator's job is considered done. What happens next - whether that breakout actually develops into a sustained move or stalls and reverses within a few bars - is left entirely to the trader to monitor manually.
EV Edge treats the moment of entry as the beginning of the analysis, not the end of it.
At its core is a consolidation detection engine that identifies tight, compressed ranges using an ATR-based threshold. When price breaks out of one of these ranges in the direction of the move that led into it - a continuation pattern sometimes described as the right side of a V - a signal fires. This part is familiar territory for breakout-based tools.
What happens afterward is not. Every signal starts with an EV score, a value between 0 and 100 that represents the expected value of the trade as it currently stands. The rule is simple: higher is better, lower is worse - for both long and short trades. A score climbing toward 100 means the trade is developing in your favor. A score falling toward 0 means price is moving against you. This holds regardless of direction. A short trade with an EV score of 85 is developing well. A long trade with an EV score of 12 is going the wrong way.
This score is not fixed at entry. It evolves on every subsequent bar based on how price actually behaves - how far it has moved in the trade's favor relative to ATR, and whether it has retraced back into the consolidation zone it broke from. A trade that continues cleanly in its intended direction sees its EV score climb toward 100. A trade that stalls or reverses back into the consolidation sees its score fall toward 0, with the penalty scaling proportionally to how deep the retracement goes.
The trade is then managed automatically by its own EV score. If the score reaches a configurable extreme - high or low - the trade closes out and the indicator becomes ready for the next signal. If neither extreme is reached within a maximum bar count, the trade times out. Every closed trade is recorded with its entry score, exit score, exit reason, and duration in an optional trade log table, turning the chart into a running record of how setups actually played out rather than a static history of where arrows appeared.
This is the central idea behind EV Edge: a signal is not a single judgment made once. It is a starting hypothesis that is continuously re-evaluated against what price does next.
A note on the colors
EV Edge uses two independent color systems that represent different things, and reading them correctly is essential.
The entry label color - the small triangle marker and its background - reflects trade direction. A long entry uses the bull color. A short entry uses the bear color. This is fixed at the moment of entry and never changes.
The trade zone box uses a separate, monochrome system that reflects how strongly the trade is currently developing, independent of direction. The box is a single configurable color throughout - by default a neutral steel grey - and only its intensity changes. Near the middle of the EV range the box is barely visible. As the EV score moves toward either extreme, the box becomes more opaque. The box answers one question only: how strong is the current reading, regardless of which way it points.
The EV score itself - shown as a number, a ten-segment meter, and a zone label in the dashboard - uses a four-zone color system based purely on score value, with no reference to trade direction:
90 to 100 : amber - the score is approaching the high exit threshold
60 to 90 : green (bull color) - the trade is developing favorably
40 to 60 : gold - neutral territory, no strong reading in either direction
10 to 40 : red (bear color) - the trade is developing poorly
0 to 10 : amber - the score is approaching the low exit threshold
This color system is direction-independent. A short trade with EV 85 shows green because the short is working well. A long trade with EV 14 shows red because the long is working against you. The amber zones at both extremes serve as a visual warning that an automatic exit is approaching, regardless of whether the trade is succeeding or failing. When no trade is active, the EV display is grey.
The text inside entry labels and EV shift labels is rendered in the measurement/brand color, against a background in the bull or bear color matching the trade direction. This keeps the label readable against either background while keeping the directional color as the dominant visual cue.
Important notice
EV Edge generates signals based on price action, volume behavior, and momentum confirmation.
These signals are not financial advice.
They do not predict future price movement.
They do not guarantee profitability.
All trading decisions are made entirely by the user.
Always manage your own risk. Always apply your own judgment.
1. Overview
EV Edge is a consolidation breakout indicator with a self-updating expected value score that tracks every trade from entry to close. It combines breakout detection, dynamic trade evaluation, optional momentum confirmation, multi-timeframe trend context, and a trade outcome log in a single lightweight indicator.
What it includes:
- Consolidation detection using ATR-based range compression
- Breakout signal with optional right-side-of-V continuation filter
- EV score from 0 to 100 that evolves bar by bar based on price drift and retracement depth
- Optional volume component blended into the EV score
- Four-zone color system on the EV score display: amber at the extremes, green in the favorable zone, gold at neutral, red in the unfavorable zone
- Automatic early exit when EV reaches a configurable extreme, with a hard bar-count cap as fallback
- Trade zone box that grows with the active trade and increases in opacity as EV moves away from neutral
- Extreme EV shift labels that appear only on significant single-bar changes or zone crossovers
- Optional VW RSI and MFI confirmation filter for entries, with an independent mini panel showing live values regardless of filter state
- Configurable divergence sensitivity for VW RSI divergence detection (High / Medium / Low)
- Multi-timeframe trend bar across six timeframes with a bull count
- Four independently toggleable EMA lines for visual confluence, with no effect on signals
- Trade log table recording direction, entry EV, exit EV, exit reason, and duration for recent trades
- Fully configurable bull, bear, and measurement colors applied consistently across labels, dashboards, and the trend bar
2. Core calculation
2.1 Consolidation detection
A consolidation range is measured over a configurable lookback period using the highest high and lowest low in that window. This range is compared against an ATR-based average range. When the actual range falls below the average range multiplied by a compression factor, the range is considered compressed. A consolidation is only confirmed once a minimum number of consecutive compressed bars has occurred - this is the V forming.
Lower compression factors demand tighter ranges before a consolidation is recognized. Higher minimum bar counts demand more mature consolidations. Both settings directly affect how often signals occur.
2.2 Breakout signal and the right side of the V
A breakout fires when price closes beyond the consolidation high or low by a configurable buffer, expressed as a multiple of ATR. With the right-side-of-V filter enabled, the breakout must also continue in the same direction as the move that occurred before the consolidation began. A consolidation that formed after an upward move and then breaks upward is a continuation. A consolidation that formed after an upward move and then breaks downward is not, and is ignored with this filter on.
Only one trade is tracked at a time. While a trade is active, new breakout signals are not evaluated. This keeps the chart from filling with overlapping signals and trade zone boxes during volatile, choppy conditions.
2.3 The EV score
Every new signal starts with an EV score of 60. From that point, the score updates on every bar based on two components.
The price component measures drift - how far price has moved in the trade's favor since entry, normalized by ATR - and retracement - whether price has moved back into or past the consolidation zone it broke from. Favorable drift increases the score. A retracement decreases it, and the size of the decrease scales with how deep the retracement goes. A shallow retracement back to the edge of the consolidation costs less than a retracement that pushes well past the original zone.
The optional volume component compares current volume to its moving average. Volume expanding in the direction of the trade supports the price component. Volume that is elevated while price is not moving - an effort without result condition - works against the score even if price has not yet retraced.
Both components are combined using configurable weights, and the result is applied to the running score each bar, clamped between 0 and 100.
2.4 Exits
A trade closes in one of two ways. If the EV score reaches a configurable extreme - high or low - after a minimum number of bars have passed, the trade closes immediately and the result is logged as an EV High or EV Low exit. The minimum bar requirement prevents the first bar or two after entry from closing the trade before it has had a chance to develop.
If neither extreme is reached within a maximum bar count, the trade closes as a Timeout. Either way, the indicator becomes ready to evaluate the next consolidation and breakout immediately.
3. Optional VW RSI and MFI confirmation
EV Edge includes an inline volume weighted RSI and Money Flow Index, calculated independently of any other indicator. The volume weighted RSI multiplies each bar's price change by its relative volume before the RSI calculation, so high-volume bars carry more weight than low-volume bars. The MFI is calculated from typical price multiplied by volume.
The master toggle enables or disables the confirmation filter entirely. When the master is on, the sub-toggles beneath it determine which meters are used: VW RSI, MFI, or both together with AND logic. When the master is off, signals fire without any momentum requirement regardless of the sub-toggle states.
When the confirmation filter is enabled, a long signal requires the selected meter or meters to be above their respective midlines, and a short signal requires them to be below. The filter is disabled by default so that signal frequency with and without confirmation can be compared directly.
VW RSI and MFI will sometimes point in different directions. This is not a fault - they measure related but distinct things. VW RSI weights price change by relative volume and responds quickly to momentum shifts. MFI incorporates the full money flow through typical price and volume and tends to reflect sustained buying or selling pressure. When they agree, the confirmation is stronger. When they disagree, the dashboard shows exactly where each stands so the trader can weigh them independently.
An optional mini panel on the dashboard shows the current VW RSI and MFI values with their percentage meters, zone state, and a Confirms row showing which direction - or directions - they currently support, regardless of whether the filter itself is active. This makes it possible to observe what the filter would do before committing to it.
Divergence detection is built into the VW RSI engine. When a bullish divergence is detected - price making a lower low while VW RSI makes a higher low - a line is drawn on the chart connecting the two pivot points in the bull color. The same applies in reverse for bearish divergences. The pivot window used for detection is configurable through the Divergence Sensitivity setting: High uses a 3-bar window for more frequent signals, Medium uses 5 bars as the default, and Low uses 10 bars for major pivots only. Divergence lines are purely visual and have no effect on signals or the EV score.
An important distinction: the Confirms row and the EV score answer different questions. Confirms reflects what VW RSI and MFI are doing right now - whether the current momentum supports the trade direction. The EV score reflects what price actually did after the signal fired - whether the breakout followed through. These two readings can point in opposite directions and both be correct. A short trade can show Confirms: Short because momentum is currently bearish, while the EV score sits at 15 because price bounced sharply after entry and never moved in the intended direction. The Confirms row describes the current environment. The EV score describes the trade's history since entry.
4. Multi-timeframe trend bar
A separate small panel shows trend direction across six timeframes - 1 minute, 5 minutes, 15 minutes, 1 hour, 4 hours, and daily - based on whether the 9-period EMA is above or below the 21-period EMA on each timeframe. A bull count from 0 to 6 summarizes how many of those timeframes currently agree on an upward trend.
This panel is independent of the signal logic. It provides context for whether a breakout on the current chart is aligned with or against the broader trend structure, without enforcing that alignment as a requirement.
5. EMA visual confluence
Four EMAs - 9, 21, 50, and 200 - can each be toggled on independently, with their own color and line width settings. These are plotted purely for visual reference. They do not feed into the consolidation detection, the EV score, the confirmation filter, or any other calculation. They exist so that price action can be viewed against common moving average levels without affecting how the indicator behaves.
6. Trade log
When enabled, a table records the most recently closed trades - direction, entry EV score, exit EV score, exit reason, and number of bars held. The table holds a configurable number of recent trades, with the newest entry at the top and older entries pushed out once the limit is reached.
Because entry EV is fixed at 60 for every trade, the exit EV and exit reason are what differentiate one trade from another in the log. A trade that exits at EV High after a small number of bars represents a fast, clean continuation. A trade that exits at EV Low after a small number of bars represents a fast failure. A trade that times out without reaching either extreme represents a setup that drifted without committing strongly in either direction.
The trade log does not persist across chart reloads. It reflects the trades that occurred since the indicator was applied to the current chart session.
7. Dashboard
The main dashboard shows the current trade status - long active, short active, or no signal - the live EV score as both a number and a ten-segment meter, the current EV zone, and the number of bars tracked relative to the maximum. The EV score number, meter, and zone text all use the four-zone color system described in the colors section above. When the VW RSI and MFI mini panel is enabled, it appears as additional rows in the same table.
A small blinking indicator - alternating between a filled and hollow dot - appears next to the Status row whenever a trade is active, and disappears when no trade is active. The indicator updates on a bar-by-bar basis, including the live, currently forming bar, so on lower timeframes it provides a continuously refreshing visual cue that the EV engine is actively tracking a trade.
Dashboard position and text size are independently configurable, with tiny, small, and normal size options to suit different chart layouts.
8. Settings reference
8.1 Consolidation detection
- Consolidation lookback: bars used to measure the consolidation range. Default 12.
- Compression factor: how tight the range must be relative to the ATR-based average to qualify as consolidation. Default 0.65.
- ATR length: lookback for the Average True Range used throughout the indicator. Default 14.
- Min bars in consolidation: minimum consecutive compressed bars required. Default 4.
8.2 Breakout signal
- Breakout buffer: extra distance beyond the consolidation edge, as a multiple of ATR, required to confirm a breakout. Default 0.1.
- Require right-side-of-V alignment: breakout must continue in the direction of the pre-consolidation move. Default on.
- Impulse lookback: bars before the consolidation compared to determine the prior move direction. Default 8.
8.3 EV score engine
- Include volume component: blend volume behavior into the EV score. Default on.
- Price action weight and volume weight: relative weighting of the two components. Defaults 0.7 / 0.3.
- Volume MA length: lookback for the volume moving average used in the volume ratio. Default 20.
- EV improving threshold: score at or above this value is classified as Improving. Default 70.
- EV decaying threshold: score at or below this value is classified as Decaying. Default 30.
- Max bars to track: hard cap on how long a trade is tracked before timing out. Default 30.
- Early exit EV high: score at or above this value triggers an immediate EV High close. Default 90.
- Early exit EV low: score at or below this value triggers an immediate EV Low close. Default 5.
- Min bars before early exit: bars that must pass before an extreme score can close the trade. Default 3.
8.4 VW RSI / MFI confirmation filter
- Require confirmation for entries: master toggle for the entire filter. Default off.
- VW RSI length and volume smoothing: lookback periods for the volume weighted RSI calculation. Default 14 each.
- VW RSI confirmation midline: threshold for long versus short confirmation. Default 50.
- Use VW RSI for confirmation: sub-toggle. Default on.
- MFI length: lookback for the Money Flow Index. Default 14.
- MFI confirmation midline: threshold for long versus short confirmation. Default 50.
- Use MFI for confirmation: sub-toggle. Default on.
- Show VW RSI / MFI mini panel: adds informational rows to the dashboard regardless of filter state. Default on.
- VW RSI overbought / oversold levels: visual zone thresholds shown in the dashboard. Defaults 75 / 25.
- Show divergence lines: draws diagonal lines on the chart where VW RSI divergences are detected. Default on.
- Show bullish / bearish divergence: independent toggles per divergence direction. Default on.
- Divergence line width: stroke width for divergence lines. Default 1.
- Divergence sensitivity: pivot window for divergence detection. High = 3 bars, Medium = 5 bars (default), Low = 10 bars.
8.5 Multi-timeframe dashboard
- Show multi-timeframe trend bar: toggle. Default on.
- MTF panel location: corner placement on the chart. Default bottom left.
8.6 EMA visual confluence
- Show EMA 9, 21, 50, 200: independent toggles, all default on.
- Color and width: configurable per EMA.
8.7 Bull / bear colors
- Bull color and bear color: applied to entry label backgrounds, plotted signal markers, dashboard status, VW RSI/MFI confirmations, and the multi-timeframe trend bar.
- Measurement / brand color: applied to the EV score meter when no trade is active, the brand row in both dashboards, and the text inside entry and EV shift labels.
- Signal label transparency: background transparency for entry and EV shift labels. Default 50.
8.8 EV quality colors
- Trade zone box color: single monochrome color for the trade zone box. Default steel grey.
- Scale box intensity with EV extremity: when on, the box becomes more opaque as EV approaches 0 or 100, and more transparent near 50. Default on.
- EV improving / decaying / neutral text colors: used for the Exit EV value in the trade log. Separate from the four-zone dashboard colors.
8.9 Trade log
- Show trade log table: toggle. Default on.
- Number of trades to show: how many recent trades are displayed. Default 5.
- Trade log location: corner placement on the chart.
8.10 Visuals
- Show dashboard, dashboard location, and dashboard size.
- Show consolidation box.
- Show signal labels.
- Show trade zone box.
- Extreme EV shift threshold: minimum single-bar EV change, or a zone crossover, required to display a shift label. Default 15.
9. How to use
9.1 Reading the EV score
The EV score has one rule: higher is better, lower is worse - for both long and short trades. When a long signal fires and the score climbs, the long is working. When a short signal fires and the score drops, the short is not working - price is moving up against the position. The score is direction-independent. It measures how well the trade is developing relative to what was expected at the moment of the breakout, nothing more.
The score is most informative as a trajectory, not a single value. A score climbing steadily from 60 toward 70 and beyond suggests a clean continuation. A score that drops sharply within the first few bars after entry, particularly if it crosses below the decaying threshold, suggests the breakout lacked follow-through. The minimum bars before early exit setting exists so that this initial period can be observed rather than immediately closing the trade on the first adverse tick.
9.2 Reading the four-zone color system
The EV score number, the ten-segment meter, and the EV Zone text all use the same four-zone color logic. When a trade is active, the colors read as follows: green means the trade is progressing well, gold means the score is sitting in neutral territory without a strong signal in either direction, red means the trade is going poorly and the breakout likely lacked follow-through, and amber at either extreme means an automatic exit is approaching. No active trade is grey.
These colors are consistent across both long and short trades. A short showing green is performing correctly. A long showing red is not.
9.3 Reading the trade zone box
The trade zone box appears once a signal fires and grows with the trade's price range on every subsequent bar. Its intensity reflects how far the EV score currently sits from the neutral midpoint - faint near 50, increasingly opaque as the score approaches either 0 or 100. A box that has become noticeably more opaque indicates the EV score has moved decisively toward one of its extremes. The EV Zone text in the dashboard and the four-zone color together tell you which extreme and whether that is favorable or not.
9.4 Using the trade log to evaluate settings
Because every closed trade is recorded with its exit reason and duration, the trade log can be used to assess whether the current settings are producing the expected distribution of outcomes. A log dominated by EV Low exits at short durations may indicate that the breakout filter is too permissive, allowing weak setups through. A log with many Timeout entries may indicate that the early exit thresholds are too extreme to be reached under current market conditions, or that the EV score's sensitivity needs adjustment. Reviewing the log periodically - particularly when testing on a single instrument and timeframe over a consistent period - is the intended way to calibrate the EV score engine to a specific market.
9.5 Using the VW RSI / MFI mini panel before enabling the filter
Because the mini panel shows what the confirmation filter would do without requiring it to be active, it can be left on while running the indicator without the filter enabled. This allows direct observation of how often VW RSI and MFI would have confirmed or rejected the signals that fired, before committing to the filter and reducing signal frequency.
9.6 Using the multi-timeframe bar as context, not as a gate
The multi-timeframe trend bar does not block or filter signals. A breakout signal can fire even when the bull count is low or when the immediate timeframe disagrees with higher timeframes. The intended use is to provide situational awareness - a breakout that aligns with a high bull count carries different context than one that fires while higher timeframes are pointing the other way, even though both will generate the same signal and the same starting EV score.
9.7 Illustrative bull scenario
Educational example only. Not a trading recommendation.
Price consolidates in a tight range for several bars after an upward move. The range compresses below the ATR-based threshold and the minimum bar count is reached. Price closes above the consolidation high by more than the breakout buffer, and the move continues in the same direction as the prior upward impulse - the right side of the V. A long signal fires with an EV score of 60, shown with a bull-colored label. The dashboard switches to LONG ACTIVE with a blinking dot. Over the following bars, price continues higher without returning to the consolidation zone. The EV score climbs past 70, the dashboard color shifts to green, and the trade zone box becomes noticeably more opaque as the score moves away from neutral. The EV Zone text switches to Improving. Within several bars the score reaches 90, the amber warning zone, and the trade closes as an EV High exit, recorded in the trade log.
9.8 Illustrative bear scenario
Educational example only. Not a trading recommendation.
A consolidation forms after a downward move and breaks lower, aligned with the prior impulse. A short signal fires with an EV score of 60, shown with a bear-colored label. On the next bar, price reverses and closes back above the lower boundary of the consolidation it broke from. The retracement penalty is applied, scaled by how far price has moved back into the zone. The EV score drops sharply. The dashboard color shifts to red and the EV Zone text switches to Decaying. The Confirms row in the VW RSI panel may still show Short if momentum meters remain bearish - this is not a contradiction. Confirms reflects current momentum; the EV score reflects what price did since entry. After the minimum bar count has passed, the score drops below 10, entering the lower amber zone, and the trade closes as an EV Low exit, recorded in the trade log as a fast failure.
10. Tested instruments and timeframes
EV Edge has been tested across a range of futures and spot crypto markets, including MNQ, MES, MGC, MCL, MBT, M2K, and SIL futures, as well as BTCUSDT, SOLUSDT, and ETHUSDT on Binance, across the 1 minute, 5 minute, 15 minute, 1 hour, and 4 hour timeframes.
Results by timeframe:
- 1m and 5m: recommended primary timeframes. EV High and EV Low exits fire frequently and the score evolves quickly enough to be actionable for scalping.
- 15m: works well. Max bars setting of 15 to 20 recommended.
- 1H: functional, but overnight and weekend gaps on futures affect the score behavior. Max bars of 10 to 15 recommended. Best used for directional context rather than as the primary trading timeframe.
- 4H: not recommended. The bar count required for meaningful EV evolution exceeds practical limits and most trades time out before the score develops.
EV Edge is designed primarily as a 1m to 15m scalp and intraday tool, with 1H usable for higher-timeframe bias.
11. Tips
The default EV score formula has not been calibrated to any specific instrument or timeframe. The early exit thresholds, the retracement penalty, and the volume weighting are starting points. The trade log exists so that these can be evaluated against real outcomes on the instrument and timeframe actually being traded, rather than assumed to be correct.
Testing on a single instrument and a single timeframe for a sustained period produces a more useful trade log than switching between instruments or timeframes during the test. Mixing conditions makes it difficult to separate the effect of the EV score formula from the effect of changing market behavior.
The right-side-of-V filter and the VW RSI/MFI confirmation filter both attempt to address the same underlying concern - whether a breakout has genuine momentum behind it. Running both at maximum strictness simultaneously may reduce signal frequency more than either filter alone would suggest. Testing each independently before combining them clarifies which filter is contributing more to signal quality.
On futures markets, overnight and weekend gaps can cause single-bar EV score jumps that do not reflect genuine price movement during the session. On the 1H timeframe in particular, a gap open can spike or collapse the drift component in ways that would not occur on a continuous chart. This is expected behavior, not a fault. Keeping the max bars setting lower on higher timeframes reduces the window during which a gap can distort the score history.
The Confirms row and the EV score are not the same measure and should not be read as one. Confirms reflects whether VW RSI and MFI currently support the trade direction. The EV score reflects how price actually moved since the signal fired. They can disagree and both be correct. A trade showing Confirms: Short alongside EV 12 is not contradictory: it means momentum currently supports the short direction, but the price movement since entry has not followed through. Understanding the difference between these two readings is one of the most useful things you can take from the dashboard.
12. Disclaimer
This indicator is provided for educational and informational purposes only. Nothing in this document or in the indicator output constitutes financial advice or any form of recommendation. Trading financial instruments involves substantial risk of loss. Past performance is not indicative of future results. You may lose all of your invested capital.
Anonycryptous accepts no responsibility or liability for any losses incurred as a result of using this indicator.
Indicateur

Volatility Contraction Pattern [AGPro Series]Volatility Contraction Pattern
🧠 Core Idea
Is volatility contracting into a tighter and tighter base that is coiling toward a breakout pivot, and how high-quality is that setup?
This script is built to answer that one question with structure instead of guesswork.
📌 Overview / What It Does
Volatility Contraction Pattern is a breakout-readiness decision engine built around the classic VCP structure: a base where price pulls back in successive, progressively shallower contractions, coiling into a breakout pivot. It reads the swing structure as a zigzag, measures each contraction leg, and counts how many recent legs are tightening into the present.
From that it builds a single 0-100 readiness score by weighing four things: how many successive contractions are present, how tight the latest contraction is relative to ATR, whether the base sits inside a constructive trend, and whether volume is drying up into the base. It then marks the pivot breakout level at the most recent swing high, a tight invalidation at the latest contraction low, a measured-move target projected from the base height, and a clear next-action state.
It does NOT predict price, generate buy or sell signals, or automate trades. It organizes the base-and-breakout picture into a structured, scored read so a contraction setup is easier to recognize and plan around. Every output is analytical context, not a recommendation.
🎯 Purpose & Design Philosophy
Most breakout tools react to a single breakout bar after it prints, or they mark a generic low-volatility squeeze and leave the rest to interpretation. Far fewer frame the multi-contraction base as a staged, scored readiness with a defined pivot and a tight, structural risk reference.
This engine was built to fill that gap. It is for the patient trader who prefers to wait for a proper base to form rather than chasing every move, and who values a tight, well-defined risk reference. It supports a base-and-breakout mindset: let the contraction sequence develop, read how ready and how tight it is, mark the pivot and the invalidation, and let broader market context confirm or deny the idea. The aim is structured patience, not a shortcut around it.
⚡ Why This Script Is Different
Most tools mark a single squeeze state or fire the instant a breakout bar appears.
This script does NOT call the breakout, does NOT fire trade signals, and does NOT treat one tight bar as a setup.
Instead, it stages the whole contraction sequence. It counts successive tightening legs, measures current tightness in ATR, and resolves the base into a 0-100 readiness score with a pivot breakout level, a tight invalidation at the latest contraction low, and a measured-move target. The result is a calm, structured base read with a defined risk reference, rather than a backward-looking alert or a single-bar trigger.
⚙️ Methodology
1. Context Detection
An ATR baseline and an EMA trend backbone with a slope check describe the current environment.
2. Structure Mapping
Swing highs and lows are tracked as an alternating zigzag. The amplitude of each recent leg is measured to describe the contraction sequence.
3. Contraction Evaluation
The engine counts how many successive legs are tightening into the present, measures the latest contraction tightness against ATR, checks trend context, and reads volume dry-up. These combine into a single 0-100 quality score, and the base resolves into a state.
4. Visual Output
The base zone, pivot breakout level, tight invalidation, measured-move target, a centered readiness badge, and moderate state labels are rendered cleanly on the chart and in the panel.
🗺️ How to Read the Chart
- Base zone: a shaded box spanning the contraction base from its low to its high, tinted by the current state.
- Pivot line and tag: the breakout level at the most recent swing high, the trigger reference.
- Invalidation line and tag: the latest contraction low, the tight structural risk reference.
- Target line and tag: the measured-move objective projected from the base height above the pivot.
- Readiness badge: centered inside the base zone, showing the state and its 0-100 score.
- State labels: compact markers when the pattern enters Pivot Ready, Breakout, or Reset.
- Panel: a fixed readout of state, quality score, pivot, target, contractions and tightness, invalidation, and action.
🚦 Signals & States
- No Base: not enough structure to define a contraction base.
- Base Forming: a base is developing but not yet tight or built enough.
- Coiling: successive contractions are tightening and readiness is building.
- Pivot Ready: the base is tight and near the pivot, with a qualifying score.
- Breakout: price has moved beyond the pivot level.
- Reset: the base was invalidated below its risk reference.
These are interpretive states, not instructions. Pivot Ready does not mean buy; it means the base is tight and near its trigger in the current context.
🔔 Alerts Logic
Three optional alerts are available:
- Pivot Ready: triggers when the base becomes pivot-ready.
- Breakout: triggers when price moves beyond the pivot.
- Pattern Reset: triggers when the base is invalidated.
Alerts are attention markers that point you back to the chart for context. They are not trade instructions and carry no guarantee of any outcome.
🧩 Confluence Logic
The score is itself a confluence read. When the contraction count, the latest-leg tightness, the trend context, and the volume dry-up all agree, the score is higher and the base is more pronounced. When they disagree, the score stays moderate and the state often remains Base Forming, which is information in itself: the base is not yet a clean contraction.
📊 When to Use
- After a strong move, when price begins to base and contract rather than trend.
- In constructive consolidations where pullbacks are getting shallower.
- As a continuation-base overlay alongside your own structure and risk framework.
- On liquid symbols with enough swing history for the structure to form.
⚠️ When NOT to Use
- In choppy markets with no clear base structure.
- In very low-liquidity symbols or sessions, where swings are unreliable.
- In extremely noisy conditions, where levels are violated erratically.
- As a standalone entry trigger, or in isolation from market context and risk.
🎛️ Key Inputs
- Swing Strength and Swing Memory: how swings are detected and how many are retained.
- Base Swing Window: how many recent swings define the active base.
- Trend Backbone EMA and Slope Bars: the trend-context weighting.
- Use Volume Dry-Up and its windows: whether and how decreasing volume contributes.
- Tightness Scale: the ATR reference for scoring contraction tightness.
- Pivot-Ready Score, Pivot Proximity, Ready Tightness: thresholds that define a pivot-ready base.
- Visual, label, and panel controls: base zone, pivot, target and invalidation lines and tags, label density, panel location, theme, and font size.
🖥️ Interface & Visual Design
The panel is the primary readout, leading with the state and 0-100 score, then pivot, target, contractions and tightness, invalidation, and a concise action line. On the chart, the base zone anchors the structure, the pivot and invalidation give the trigger and the tight risk, and the measured-move target frames the objective. The readiness badge sits centered inside the base so the read is tied to the structure. Labels are kept moderate and fire only on state transitions so the chart stays clean. Panel location, theme, and font size are adjustable; the panel is shown by default for readability.
🧪 Practical Usage Workflow
1. Read the panel: note the state and the quality score.
2. Check contractions and tightness: how many tightening legs, and how tight now.
3. Watch the pivot: the breakout reference at the top of the base.
4. Note the invalidation and target: the tight risk reference and the measured objective.
5. Confirm with your own market structure, higher-timeframe context, and risk framework before any decision.
🔍 Interpretation Guidelines
Think of the read as a staged base readiness, not a forecast. A higher score means more successive contractions, tighter current price action, and better trend and volume context. A moderate score or a Base Forming state means the base is not yet clean and patience is warranted. The invalidation is a structural reference, not a hard line. Always interpret the base inside the broader market context rather than in isolation.
🚫 What This Script Is NOT
- It is NOT a prediction engine and does not forecast price direction.
- It is NOT financial advice or a recommendation to buy or sell.
- It is NOT an automated trading system.
- It does NOT produce guaranteed signals or outcomes.
⚠️ Limitations & Transparency
Outputs depend on detected swing structure and may differ across timeframes and symbols. Volatility, liquidity, and changing market conditions affect how bases form and how they resolve. A base can break out, fail, or simply drift; the engine describes current structure and cannot know the future. Any pivot can be exceeded or fail to be reached, and any base can be invalidated.
🧠 Market Context Notes
Bases tend to form after directional moves, as participants pause and pullbacks get shallower. Classic contraction structure pairs successively tighter pullbacks with drying volume, often inside a constructive trend. This engine encodes that logic into a single staged read, but broader market context always has the final word, and a tight base is a condition, not a promise.
🧾 Use Case Examples
- After a strong advance, price bases with two or three progressively tighter pullbacks: the engine moves from Base Forming to Coiling and may reach Pivot Ready near the pivot.
- Volume dries up into a tight base inside an uptrend: the quality score rises as contraction, tightness, trend, and volume align.
- Price breaks below the latest contraction low: the engine reports Reset, signaling the contraction structure has invalidated.
🧱 System Philosophy
This tool reflects the AGPro Series approach: convert a familiar but messy concept into a calm, structured, decision-support read. A contraction base is easy to misjudge by eye; the value is in staging it into an honest, scored read with a defined risk reference, while respecting the trader's own judgment rather than replacing it.
🔐 Non-Promise Statement
This script makes no promise of profit, accuracy, or any specific result. It is an analytical and organizational tool. No certainty is offered or implied.
📉 Risk Disclosure
Trading involves substantial risk, and most participants can lose money. This script is provided for educational and analytical purposes only and does not constitute financial advice. All decisions, positions, and outcomes remain entirely your own responsibility. Always manage risk and trade within your own plan.
📚 Educational Note
Used as intended, the engine can sharpen how you think about contraction bases: how many tightening legs are present, how tight the base has become, where the pivot and the risk sit, and what would invalidate the structure. Treat it as a lens for structured analysis, and keep building your own market understanding alongside it.
Indicateur

Auto Range / Lateral Consolidation Box DetectorAuto Range / Lateral Consolidation Box Detector
Overview
The Auto Range / Lateral Consolidation Box Detector is designed to automatically identify and draw price ranges where a stock is moving sideways after a prior advance.
Instead of manually drawing rectangle boxes around consolidation areas, this indicator detects them objectively using price containment, range width, prior trend movement, ADR, moving-average structure, and optional volume/RSI filters.
The purpose is to help traders identify:
lateral consolidations
tight launch shelves
continuation bases
range breakouts
failed ranges
breakout/retest zones
early momentum continuation structures
This tool is especially useful for traders who look for stocks that have already shown strength, pause in a controlled range, and then attempt to continue higher.
Core Concept
Many strong momentum moves do not happen randomly. They often follow a repeatable structure:
Prior advance → sideways range → breakout → continuation
This indicator attempts to locate that sideways range automatically.
The blue dashed boxes show detected consolidation zones. When price breaks above a completed range, the indicator can mark the breakout and preserve the prior box so the trader can review the structure historically.
The goal is not to predict breakouts blindly. The goal is to make range structure easier to detect, measure, and trade with defined risk.
What the Indicator Detects
The indicator identifies two main types of structures:
1. Standard Rectangle Range
This is a broader lateral consolidation that usually forms over a larger number of candles.
It is useful for detecting:
multi-week consolidations
continuation bases
sideways digestion after an advance
breakout/retest setups
controlled pullbacks above moving averages
A standard rectangle is best used when price has already advanced and then begins moving sideways in a defined box.
2. Tight Launch Shelf
This is a shorter, tighter range that often forms just before a momentum expansion.
It is useful for detecting:
short pauses near highs
high-tight continuation shelves
pre-breakout compression
momentum names that do not build long bases
stocks that pause briefly before expanding again
This feature was added because some of the strongest stocks do not consolidate for weeks. They may only pause for several sessions before breaking out.
How the Boxes Work
The indicator measures the range using completed prior candles only.
This is important because the breakout candle itself should not distort the range.
For example, if a stock breaks out above a tight rectangle, the breakout candle may be much larger than the range. If the script included that candle in the box calculation, it would make the range look wider than it actually was.
This script avoids that issue by asking:
“Before the current breakout candle, was there a valid sideways range?”
That allows the indicator to draw the actual consolidation area more accurately.
Visual Guide
Visual ElementMeaningBlue dashed boxDetected standard rectangle rangePurple dashed boxDetected tight launch shelfUpper box lineRange resistance / breakout levelLower box lineRange support / invalidation referenceMidlineInternal range midpointBO markerBreakout above range with volumeBO? markerPrice breakout without volume confirmationFAIL markerBreakdown below rangeScore labelShows range quality, width, ADR, prior move, and containment
How I Use It in My Strategy
This indicator fits into a continuation-style trading strategy built around strength, structure, and timing.
The process is:
1. Find a stock with prior strength
I want to see that the stock has already proven demand.
That may include:
strong prior advance
relative strength versus the market
rising moving averages
reclaim or hold above the 200 SMA
improving volume profile
strong sector or theme participation
recent earnings, catalyst, or institutional attention
The indicator is not used to find random sideways stocks. It is used to find sideways ranges after strength has already appeared.
2. Let the stock build a range
Once a stock has moved, I want to see whether it can hold gains.
A clean range tells me:
buyers are defending higher prices
sellers are not fully taking control
price is digesting instead of collapsing
moving averages may be catching up
risk can be defined around the box
This is where the auto box becomes useful.
Instead of manually drawing every range, the indicator highlights areas where price is compressing or consolidating.
3. Use the box for trade planning
The box gives me three major trade locations:
Trade LocationUse CaseRange lowSupport-defense entryRange highBreakout triggerBreakout retestPreferred continuation entry
I generally do not want to enter randomly in the middle of the box unless I have another strong reason.
The best trades usually come from:
range-low defense,
breakout through range high,
or breakout followed by a retest that holds.
4. Confirm with other tools
This indicator identifies structure, but it is not a standalone buy signal.
Before taking a trade, I still want confirmation from:
relative strength
catalyst/news/earnings context
sector/theme strength
ADR/movement potential
volume expansion
VWAP/AVWAP location
volume profile levels
option-chain liquidity if using options
broader market regime
The box tells me where the trade may be forming.
The rest of the process tells me whether it deserves capital.
How Other Traders Can Use It
This indicator can be adapted to several trading styles.
Momentum Traders
Momentum traders can use it to identify stocks that are pausing after a strong move and preparing for another push.
Best use:
breakout above range high
breakout with volume
tight launch shelf breakouts
high-relative-volume names
strong sector/theme participation
Swing Traders
Swing traders can use it to locate multi-day or multi-week continuation bases.
Best use:
buy breakout/retest
enter near range support with defined risk
use the box low as invalidation
use the box height for measured-move targets
combine with daily/weekly trend structure
Breakout Traders
Breakout traders can use the box high as an objective breakout level.
Best use:
price closes above the range high
volume expands above average
range is not too wide
stock is above key moving averages
market regime supports continuation
Mean-Reversion Traders
Mean-reversion traders can use the range boundaries in the opposite way.
Best use:
fade weak breakouts back into the range
buy range low if buyers defend
sell/avoid failed range highs
use the midpoint as a decision level
Position Traders
Position traders can use detected boxes as add zones during a larger trend.
Best use:
add after a valid base forms above rising moving averages
trail risk below higher base lows
identify where trend continuation is being accepted
avoid adding after emotional vertical moves without digestion
Input Settings Explained
Standard Rectangle Bars
Controls how many prior candles are used to detect a normal consolidation box.
Higher values detect longer bases.
Lower values detect shorter ranges.
Suggested use:
StyleSettingFast momentum8–12Swing trading12–20Longer bases20–40
Tight Launch Shelf Bars
Controls how many prior candles are used to detect short, tight shelves near highs.
This is designed for stocks that pause briefly before breaking out.
Suggested use:
StyleSettingVery fast momentum4–6Normal launch shelf6–10Slower swing shelf10–15
Prior Move Lookback Bars
Determines how far back the script looks to measure whether the stock had a prior advance before the range.
Higher values allow the script to detect bases after larger, older moves.
Suggested use:
StyleSettingShort-term momentum20–35Swing continuation35–60Longer trend bases60–100
Minimum Prior Advance %
Defines how much price must have advanced before the range qualifies.
This helps prevent the script from highlighting random sideways chop.
Suggested use:
Market TypeSettingLarge caps8%–15%Mid caps15%–25%Small caps / high ADR20%–40%
A higher setting makes the script more selective.
Minimum Close Containment %
Controls how many closes must remain inside the box.
A higher value requires cleaner sideways behavior.
Suggested use:
Range QualitySettingLoose ranges60%–70%Normal ranges70%–80%Very tight clean bases80%–90%
Max Standard Range Width x ADR
Controls how wide a normal range can be compared with the stock’s average daily range.
Lower values require tighter bases.
Higher values allow wider, looser consolidations.
Suggested use:
PreferenceSettingTight clean bases only1.5–2.25Balanced2.5–3.0Loose momentum names3.0–4.0
Max Tight Shelf Width x ADR
Controls how wide a tight launch shelf can be.
Because launch shelves should be tighter than standard ranges, this number is usually lower.
Suggested use:
PreferenceSettingVery tight shelves1.0–1.3Balanced1.4–1.8Volatile small caps1.8–2.5
ADR Length
Controls the lookback period for average daily range.
Default is 20, which approximates one trading month.
Suggested use:
PurposeSettingShort-term sensitivity10Standard20Smoother ADR30–50
Volume Average Length
Controls the average volume lookback used for breakout and volume comparison.
Suggested use:
StyleSettingFast momentum10Standard swing20Smoother volume filter30–50
Max Range Volume vs Avg
This controls how much volume is allowed during the range if the volume filter is enabled.
Lower values require quieter consolidation.
Higher values allow more active ranges.
Suggested use:
Range TypeSettingQuiet base0.8–1.0Normal base1.0–1.25Active momentum range1.25–1.75
RSI Settings
RSI filters can be used to avoid ranges that are either too weak or too extended.
Suggested use:
PurposeSettingAvoid weak rangesMinimum RSI 40Allow momentum leadersMaximum RSI 80–85Stricter resetMax RSI 70–75
For strong momentum stocks, I prefer leaving RSI control flexible because strong names can remain elevated before breaking out.
Require Price Above 200 SMA
When enabled, the script only accepts ranges where price is above the 200 SMA.
This is useful for trend-following and continuation strategies.
Turn this off if you want to scan:
bottoming structures
early reversals
200 SMA reclaim attempts
accumulation ranges below the 200 SMA
Require Prior Advance
When enabled, the script requires price to have moved up before forming the range.
This is best for continuation traders.
Turn this off if you want to study:
accumulation bases
bottoming ranges
reversal setups
sideways structures before a first move
Require Volume Control
When enabled, the range must have controlled volume relative to average volume.
This helps filter out chaotic ranges.
However, for volatile small caps or active momentum names, I often leave this off because strong stocks can consolidate with active volume.
Require RSI Control
When enabled, RSI must remain within the selected range.
This can help avoid weak or overextended setups.
However, momentum leaders can remain strong for longer than expected, so this setting is optional depending on the strategy.
Setup Score
The label displays an Auto Range Score out of 10.
The score considers:
prior move
price above 200 SMA
containment inside the range
range width versus ADR
volume behavior
OBV behavior
RSI condition
ADR level
The score is not a buy signal. It is a structure-quality score.
General interpretation:
ScoreInterpretation9–10Very clean structure7–8Good watchlist candidate5–6Needs more confirmationBelow 5Low-quality or incomplete structure
Trading Notes
A detected box is only a location tool.
It does not replace:
market regime analysis
risk management
catalyst research
relative strength checks
liquidity checks
options-chain review
trade planning
The highest-quality setups usually combine:
strong prior move + clean box + range containment + volume expansion on breakout + supportive market conditions.
Risk Management
The box can help define risk.
Common invalidation methods:
stop below range low
stop below breakout candle low
stop below retest low
stop below rising 20 EMA or 50 SMA
exit if breakout fails back into range
avoid if price breaks below the box with volume
The cleanest setups are usually those where the box gives a tight, logical invalidation level.
Important Disclaimer
This indicator is for educational and research purposes only.
It does not provide financial advice, investment advice, or guaranteed trade signals. All trading involves risk. Traders should use their own research, risk management, and judgment before entering any position. Indicateur

Range Zones ATR Range Zones ATR
Range Zones ATR is an open-source indicator designed to detect, validate, score, and maintain sideways price zones using ATR-normalized structure analysis.
The script is built for one specific purpose: identifying areas where price is behaving like a genuine horizontal range rather than a brief pause inside an ongoing trend. Instead of marking every local consolidation, it evaluates whether price is compressed relative to current volatility, whether directional pressure remains limited, whether the market is interacting with both sides of the structure, and whether internal movement stays balanced enough to justify treating the area as a meaningful zone of acceptance.
In practical terms, this indicator highlights parts of the chart where price is rotating within a contained area instead of moving cleanly in one direction. That makes it useful for studying balance, consolidation, containment, and possible expansion after compression.
What this indicator is
This indicator is a volatility-adjusted range structure detector.
Its main task is to answer a structural question:
Is price actually trading inside a valid sideways regime, or is the apparent consolidation too directional, too unstable, or too impulsive to be treated as a real range?
To answer that, the script does not rely on a single condition. It combines multiple filters and measurements into one process. A visible zone is only created after the candidate structure survives tests related to compression, trend pressure, slope behavior, duration, touch activity, oscillation, drift, and local expansion.
What this indicator shows
The script draws zones directly on the chart as horizontal boxes representing areas where price is being accepted inside a relatively contained environment.
The indicator can classify zones in three different ways:
Base Range
A confirmed sideways zone that passed the core validation logic.
Prime Range
A higher-quality confirmed zone with a stronger final score. These zones generally show cleaner balance, stronger containment, and better internal structure than a standard range.
HTF Confluence
A confirmed local zone that also overlaps with a valid higher-timeframe range context when the optional multi-timeframe feature is enabled.
These labels are structural descriptions, not trade commands. They are intended to help the user understand the character and quality of the detected range.
What the script measures
The indicator is built around the idea that a valid range should appear compressed, balanced, and relatively non-directional. To evaluate that, it measures several parts of market behavior.
Range width relative to ATR
The script compares the width of recent price envelopes to ATR. This allows the indicator to interpret range width relative to current volatility instead of using a fixed distance. A narrow range on one symbol may be wide on another, and a usable range on one timeframe may be insignificant on another. ATR normalization helps the script stay adaptive across different chart conditions.
Multiple internal envelopes
The script builds short-, medium-, and long-lookback envelopes from recent highs and lows. It then compares those candidates and selects the one that provides the best structural fit. This makes the detection process more flexible than relying on only one fixed lookback.
ADX trend pressure
A stable range normally should not exist in a strongly directional environment. The script uses ADX as part of its filter and scoring process to reduce the chance of classifying strong directional movement as sideways structure.
EMA slope and linear regression slope
A market can appear flat while still drifting directionally. To reduce that problem, the script checks both EMA slope and linear regression slope. This helps filter out sloped price action that does not behave like a clean horizontal range.
Minimum persistence
A valid range should remain stable for a meaningful number of bars before it is trusted. The script therefore includes minimum-bar confirmation logic so that very brief pauses do not become fully confirmed zones too early.
Touch behavior
A healthy range usually shows repeated interaction with its boundaries. The script tracks touches near the upper and lower edges of the candidate zone to confirm that price is actually rotating through the structure rather than clustering on one side.
Internal oscillation
A sideways regime should contain some back-and-forth movement. The script evaluates oscillatory behavior within the candidate zone to avoid treating a slow directional drift as balanced consolidation.
Drift and efficiency
The script checks how directly price is moving from one point to another. If movement becomes too efficient or too directional, that is less consistent with a true range. If movement is choppier and more rotational, the structure is more likely to qualify.
Impulsive movement
Strong impulsive candles can weaken or invalidate the idea of a stable range. The script uses expansion and impulse-related checks to reject candidates that are behaving too aggressively.
Higher-timeframe overlap
When the optional MTF context feature is enabled, the script checks whether the local zone overlaps a confirmed higher-timeframe range area. If the overlap is meaningful, the zone can receive a score boost and be classified with higher structural context.
How the detection process works
At a high level, the script follows this workflow:
First, it builds recent envelopes from highs and lows using several internal lookbacks.
Second, it measures whether those envelopes are sufficiently compressed relative to ATR.
Third, it combines that compression with trend and slope conditions such as ADX, EMA slope, and linear regression slope.
Fourth, if the environment looks suitable, it starts tracking a candidate zone instead of drawing a confirmed zone immediately.
Fifth, while the candidate is active, it evaluates persistence, touch count, oscillation, drift, path efficiency, and impulsive behavior.
Sixth, if the candidate survives enough structural tests, it becomes a visible zone on the chart.
Seventh, once a zone is active, it can continue, refine, merge with a nearby compatible zone, or terminate if price no longer behaves like the same sideways regime.
Finally, if breakout alerts are enabled, the script only considers a breakout confirmed after price closes beyond the zone edge plus an ATR-based buffer.
This process is important because the indicator is not designed to draw every small pause. It is designed to identify consolidations that behave like actual balance.
How to read the zones
A visible zone should be interpreted as an area where the script sees containment, acceptance, and relatively balanced price behavior.
That can help the user evaluate:
whether the market is still consolidating rather than trending,
whether price is continuing to rotate inside the same area,
whether one side of the structure is weakening,
whether the range remains healthy,
or whether the market may be transitioning from compression into expansion.
A Base Range means the structure passed the standard confirmation requirements.
A Prime Range means the same structure passed with a stronger overall score.
An HTF Confluence zone means the local structure also aligns with a broader higher-timeframe range area.
These classifications describe current market structure. They do not guarantee that price will remain inside the zone or that the next movement will occur in a particular direction.
How to use this indicator
This indicator is best used as a market-structure and chart-context tool.
One practical use is to study where price is being accepted inside a contained area. When price remains inside a confirmed zone and continues to interact with both edges, the market may still be operating in a balanced regime.
Another use is to monitor edge behavior. The upper and lower zone boundaries can serve as structural reference areas. Repeated rejection near one side, repeated return toward the middle, or clean acceptance outside the zone may help the user judge whether the range is still functioning or beginning to fail.
The breakout logic can also be used for structure monitoring. Because the script requires price to move beyond the zone edge with an ATR-based buffer, it is more selective than a simple boundary touch. This helps reduce reactions to small wick-only violations and shallow overshoots.
The optional higher-timeframe context can be used to compare local balance with broader structure. A local range that overlaps a confirmed higher-timeframe range may be more relevant than an isolated local pause.
The script can also be used to filter low-quality consolidation. Many apparent ranges are only temporary slowdowns inside a directional move. This indicator tries to reject many of those cases by requiring better balance, persistence, touch behavior, and non-directional structure before a zone is confirmed.
What makes this indicator different
This script differs from simpler range tools in several ways.
ATR-normalized detection
The indicator evaluates range width relative to ATR instead of using fixed-width boxes. This helps the same logic adapt to different volatility conditions, symbols, and timeframes.
Multi-factor validation
The script does not rely on a single trigger. It combines compression, trend pressure, slope analysis, persistence, touch activity, oscillation, drift, and efficiency into one structural decision process.
Candidate-to-confirmation workflow
Many range tools mark a zone as soon as price becomes temporarily narrow. This script first tracks a candidate, then confirms it only if the structure continues to behave like a true sideways regime.
Quality classification
The script separates normal confirmed ranges from stronger confirmed ranges. This helps distinguish ordinary structure from zones that achieve better internal scores.
Zone merge logic
Nearby zones that belong to the same horizontal regime can be merged. This is useful because real consolidations are often fragmented by minor interruptions or short empty gaps that still belong to the same broader balance area.
Higher-timeframe confluence
The optional MTF feature is used as structural context rather than as a separate signal engine. This allows local zones to be strengthened when they align with a broader confirmed range.
Active zone maintenance
Once confirmed, a zone is not simply frozen in place. The script can continue refining and extending the zone while price remains compatible with the same range logic.
Input overview
Mode
Conservative, Balanced, and Aggressive modes control how selective the detection process is. Conservative mode generally favors fewer and stricter zones. Aggressive mode allows broader coverage.
Preset
Scalping, Intraday, and Swing presets adjust internal lookbacks and structural behavior for different trading horizons.
Price Series
The script can use close, hl2, hlc3, or ohlc4 as its selected price source in parts of the scoring and filtering process, while envelopes remain based on highs and lows.
Sensitivity
Sensitivity changes how tightly or loosely candidate structures are interpreted.
Min Bars and Min Score
These settings define how much persistence and quality a candidate needs before it can qualify as a visible zone.
Trend Filter
This filter reduces the chance of labeling strong directional movement as sideways structure.
Merge controls
Merge Zones, Merge Threshold, Merge Gap Bars, and Bridge Merge control whether nearby compatible zones should be combined into one broader regime.
MTF controls
MTF Context, Higher TF, and MTF Boost allow local structure to be compared against confirmed higher-timeframe range structure.
Visual controls
The script includes settings for fill, borders, labels, theme handling, and score visibility.
Alerts
Optional alerts are available for newly confirmed zones and for breakout events beyond an active zone.
Best use cases
This indicator is designed for users who want to study consolidation structure rather than only directional trend behavior.
It can be useful for identifying balanced price areas, monitoring acceptance inside a horizontal regime, watching for continuation or breakdown of an existing range, studying compression before expansion, and comparing local structure with higher-timeframe context.
Important limitations
This script is an indicator, not a strategy. It does not execute trades and it does not provide backtest results.
Like any range-based method, it can become less effective in environments dominated by persistent directional expansion, abrupt trend transitions, or sudden volatility shocks. A detected zone is the script’s structural interpretation of current price behavior, not a guarantee that price will remain contained.
Open-source note
This script is published as open-source so users can inspect the logic, understand how the methodology works, and build on the idea in accordance with TradingView’s publication and reuse rules.
Indicateur

Compression Pressure Map [AGPro Series]Compression Pressure Map
⚡ Overview
────────────────────────────────────────
Compression Pressure Map is a structural context tool that measures how tightly price is compressing against the nearest pivot-based level, and evaluates two behavioral scenarios in parallel: breakout anticipation and reversal watch. The output is a visual map of where pressure is accumulating — rendered as an evolving pressure zone that moves through BUILDING, ARMED and READY states.
This is not a signal engine, not a forecast, and not a trading strategy. It is a visualization layer that answers a single question: where is compression building around the active level, and in which direction is that pressure leaning.
🧭 Unique Edge
────────────────────────────────────────
Most compression indicators reduce behavior to a single direction. CPM separates compression into two parallel scoring engines that run on the same structural core:
🔹 Breakout Anticipation — pressure building for a directional break through the level
🔹 Reversal Watch — pressure building for a rejection at the level
In Auto mode the dominant scenario is rendered on the chart (cleaner visual), while the panel shows both scores side by side for transparency. Power users can lock the engine to a single mode. The active level is stabilized with a clustered pivot refinement and a drift-control lock, so the displayed level stays consistent instead of jumping on every new pivot. A compression gate keeps the pressure score aligned with the compression core: when compression is weak, pressure cannot escalate into high states.
🧪 Methodology
────────────────────────────────────────
The pressure score is a weighted composite of six structural components, measured on the active scenario:
🔹 Range compression (short-window range vs long-window range)
🔹 ATR compression (short-window ATR vs long-window ATR)
🔹 Body tightness (average body size relative to average range)
🔹 Quiet-bar persistence (how many recent bars qualify as calm)
🔹 Proximity to the active level (normalized by ATR)
🔹 Directional posture (slope, close position in bar)
Reversal scoring adds wick-rejection weight at the active level (average lower-wick size for bull reversals, upper-wick size for bear reversals). Breakout scoring adds approach slope weight toward the active level. A shared EMA smoothing step produces calmer state transitions. A dominance margin and cooldown prevent rapid scenario flipping. The final score is driven through a BUILDING → ARMED → READY state machine with hysteresis on the zone visibility to avoid flicker.
🎯 Signals & Alerts
────────────────────────────────────────
The state machine produces four transition alerts plus two pace alerts:
🔹 Pressure Armed Near Level — score crosses the armed threshold with an active scenario
🔹 Ready Zone Reached — score crosses the ready threshold with an active scenario
🔹 Armed Bullish / Bearish Scenario — directional armed transitions
🔹 Ready Bullish / Bearish Scenario — directional ready transitions
🔹 Pressure Rising — score is climbing while the zone is live
🔹 Pressure Released — the active scenario resolves (through the level or by decay)
On the chart, state transitions are marked with discrete A and R markers on the active side. A score label near price always shows the current pressure value, bias and state for quick reading without opening the panel.
⚙️ Key Inputs
────────────────────────────────────────
🔹 Engine Mode — Auto, Breakout Anticipation, or Reversal Watch
🔹 Compression Length — main lookback for range, ATR and body tightening
🔹 Trigger Distance (ATR) — how close price must be to a level to start evaluating
🔹 Hold Distance (ATR) — how far price can drift before the active context is cleared
🔹 Pivot Left/Right and Cluster Tolerance — pivot strength and blending behavior
🔹 Compression Gate and Gate Threshold — compression-first discipline control
🔹 Armed / Ready / Zone On / Zone Off Thresholds — state machine calibration
🔹 Full visual controls — zone width, band extend, line width, label size, panel position and font
All defaults are tuned for mid-volatility crypto pairs on 1H and 4H timeframes, but the engine adapts across symbols and timeframes through its ATR-normalized distance logic.
📘 How to Use
────────────────────────────────────────
🔹 Open the indicator in Auto mode and observe which scenario the panel highlights
🔹 Wait for the pressure zone to appear on the chart (BUILD → LIVE transition)
🔹 Read the state: BUILDING means the setup is forming, ARMED means the setup is mature, READY means compression and proximity are both at peak
🔹 Cross-reference with your own structural read — CPM describes the compression landscape, the decision is yours
🔹 If you prefer one behavioral lens only, lock the engine to Breakout Anticipation or Reversal Watch
🔹 Use the Compression Gate to enforce compression-first discipline — when compression is weak, the pressure score stays in WATCH
🔹 The tool is timeframe-agnostic; try it on 15m, 1H, 4H and 1D to see how compression contexts nest
CPM is designed to sit alongside your strategy, not replace it. It maps the compression field; you read the context.
⚠️ Limitations & Transparency
────────────────────────────────────────
🔹 CPM is a context visualization tool, not a signal generator — it does not issue buy or sell calls
🔹 The pressure score is a structural measurement, not a probability estimate
🔹 State transitions describe the compression field at the moment they print; they do not imply what happens next
🔹 Active level refinement is intentionally conservative — the level may feel slower to update than raw pivots, by design
🔹 Very high volatility regimes may keep the compression score low for extended periods, which is the intended behavior
🔹 The tool is deterministic on closed bars; intrabar values are provisional until bar close
CPM is released as Public, Open-source under MPL 2.0. The source is fully readable and auditable.
🛡️ Risk Disclosure
────────────────────────────────────────
This indicator is published for educational and analytical purposes only. It is not financial advice, not a trading strategy, and not a recommendation to buy or sell any asset. Past behavior of any level or pressure state does not predict future behavior. Markets carry risk of loss; users are solely responsible for their own decisions and risk management. Always do your own research and consider consulting a qualified professional before making trading or investment decisions. Indicateur

Fixed Range Control Box [AGPro Series]Fixed Range Control Box
🔹 Overview
Fixed Range Control Box isolates a single high-conviction price range on your chart and classifies who is in control inside it. The tool draws one clean hero box around the most recent structural range, places a volume-weighted Control Line inside it, and tracks state transitions in real time: Inside, Upper, Lower, or Failed. When price structurally breaks the box, the range freezes, locking the reference so you can study the aftermath without visual drift.
Four range-definition modes are available — Pivot, Lookback, Compression, and Manual-Date — so the tool adapts to discretionary range traders, systematic rotation traders, and anyone who wants a fixed reference zone for backtesting or journaling.
🔸 Unique Edge
Most range tools on TradingView draw many boxes and leave the user to guess which one matters. Fixed Range Control Box is built around a different philosophy: one range, one story, one decision. The hero box is the visual focus; historical ranges fade into the background; the Control Line tells you which side of the range is winning the statistical argument.
Three design choices separate this from standard range-box scripts:
- Volume-weighted Control Line. Rather than dropping a midpoint line, the Control Line is computed from the volume-weighted typical price across the life of the range, with an edge-fallback to midpoint if the line drifts too close to either boundary. This produces a structurally meaningful reference instead of a geometric one.
- Retrospective fill on range rebuild. When a new range is committed, the script walks back through the range window and retroactively computes touch count, hold quality, and the Control Line. You see a fully-formed box with accurate statistics the moment it appears, not an empty box that slowly populates.
- Freeze-on-failure. When price closes beyond the range and the state transitions to Failed, the box locks at the break bar. No more drifting endpoints on broken structures — the reference stays where the story ended.
🔷 Methodology
The script cycles through four stages on every bar:
1. Range detection. Depending on the selected mode, the script looks for a qualifying range: confirmed swing pivots (Pivot), rolling highest/lowest (Lookback), short-ATR over long-ATR compression (Compression), or a user-defined date window (Manual). Gating rules — minimum lifespan, minimum width percentage, and a failed-state cooldown — prevent rapid re-triggers on noisy conditions.
2. Commit and retrospective fill. Once a range qualifies, the script snapshots the old range into history, installs the new one, and walks back through the window to compute the Control Line, touch count, and hold quality in a single pass. No warm-up period.
3. State machine. Each confirmed bar feeds the state machine. Strict logic requires bar closes on one side of the Control Line for the configured number of bars before switching to Upper or Lower; a close beyond either range boundary transitions to Failed.
4. Rendering. On the last bar, the hero box, Control Line, origin marker, and state badge are rebuilt from scratch. Historical ranges persist as muted boxes up to a configurable cap.
🔶 Signals & Alerts
Three alert conditions cover the full range lifecycle:
- New Control Box. Fires once per bar close when a new range is committed.
- Line Reclaimed (Bull or Bear). Fires when state transitions into Upper or Lower control, confirming directional bias inside the range.
- Control Failed. Fires once when price closes beyond the range and the box is frozen.
All alerts use alert() calls with once-per-bar-close frequency.
🔹 Key Inputs
- Range Mode — Auto-Pivot, Auto-Lookback, Auto-Compression, or Manual-Date.
- Pivot Length / Lookback Bars / Compression Window — window controls for each detection mode.
- Min Range Lifespan / Min Range Width % — structural filters to suppress micro-ranges.
- Failed Cooldown — bars to wait after a broken range before searching for a new one.
- Strict Control Logic + Reclaim Confirmation — governs how the Control Line state machine transitions.
- Visual controls — fade old boxes, max boxes kept, show state badge, show range origin, future projection bars, panel and label font sizes.
🔸 How to Use
1. Start on your primary timeframe and select the Range Mode that matches your style: Pivot for discretionary swing structures, Lookback for mechanical windows, Compression for auto-locking onto consolidations, Manual-Date for backtesting a specific episode.
2. Tune Min Range Width % and Min Range Lifespan so only structurally meaningful ranges appear.
3. Read the panel top-down: Mode confirms what you are tracking, Control tells you which side of the Control Line is winning, Range Age and Touches describe maturity and confluence, Hold Quality summarizes how cleanly price has respected the range, and State shows the live classification.
4. Use alerts to monitor the range lifecycle without staring at the chart.
🔻 Limitations & Transparency
- This is an analytical tool, not a strategy. It does not generate buy or sell recommendations and does not compute entries, stops, or targets.
- Past range behavior does not forecast future range behavior. Structural breaks can occur at any time.
- In very thin or illiquid markets, the volume-weighted Control Line can drift toward a boundary; the edge-fallback defaults to midpoint to protect against degenerate cases.
- Auto-Compression mode requires sufficient ATR history; expect a warm-up period on very recent symbols.
- The script is overlay-only and does not access other timeframes.
🔶 Risk Disclosure
Nothing in this script constitutes financial advice. Trading involves substantial risk of loss and is not suitable for every investor. Always do your own research and manage risk appropriately. Indicateur

ES Breakout Toolkit Consolidation Range Detector Free=== PART OF THE ES BREAKOUT TOOLKIT ===
This is one of several free, standalone indicators that make up the ES Breakout Toolkit series. Each indicator isolates a single component used in the full ES London Breakout Pro strategy. They are designed to be useful on their own and educational for traders studying consolidation and breakout mechanics on ES futures.
=== WHAT THIS INDICATOR DOES ===
The Consolidation Range Detector identifies periods where price is compressing into a defined range that meets specific quality criteria. It draws a box around the consolidation zone when the range is tight relative to its recent average and falls within acceptable ATR bounds — not too small to be noise, not too large to be a trend already in motion.
When price exits a valid consolidation range, the indicator marks the breakout direction with an arrow. A label at the end of each range shows the range size in points and as a multiple of ATR, giving you context on the quality of the setup.
=== HOW TO USE IT ===
Apply this to an ES futures chart on a 5-minute timeframe. The indicator will automatically detect and draw consolidation boxes when conditions are met. You can adjust the range lookback period, tightness filter, and ATR bounds in the inputs to match your preference.
The key readings to watch are the Range/ATR ratio and the Range vs Average ratio in the dashboard. A range that is small relative to ATR and below its own recent average is a higher-quality consolidation — it means price is compressing more than usual, which often precedes a directional move.
An optional session filter limits detection to the London session (12AM-6AM PT) if you only want to see consolidations during that window.
=== KEY FEATURES ===
- Automatic consolidation zone detection with visual boxes
- Tightness filter comparing current range to rolling average
- ATR-based minimum and maximum range bounds
- Breakout direction arrows when price exits a valid range
- Range size labels in points and ATR multiples
- Optional London session filter
- Dashboard with real-time range quality metrics
- Alerts for consolidation detection and breakout events
=== ABOUT THE ES BREAKOUT TOOLKIT ===
This indicator is part of a free series that breaks down the building blocks of a London session ES futures breakout strategy. Other free indicators in the series cover session highlighting, ADX regime filtering, breakout candle scanning, and momentum close analysis. Each is published separately on my profile.
The full ES London Breakout Pro indicator combines all of these components into a unified strategy with additional proprietary features including advanced risk management, trade qualification, and data tracking. It is available as an invite-only script on my profile. Use the access request instructions on that script's page if you are interested.
=== DISCLAIMER ===
This indicator is provided for educational and informational purposes only. It is NOT financial advice. It does not constitute a recommendation to buy, sell, or hold any financial instrument. Trading futures involves substantial risk of loss and is not suitable for all investors. Past performance of any indicator or strategy is not indicative of future results. Always conduct your own research and consult a qualified financial advisor before making any trading decisions. You are solely responsible for your own trading activity. Indicateur

AG Pro Consolidation Breakout Quality [AGPro Series]AG Pro Consolidation Breakout Quality
Overview / What it does
AG Pro Consolidation Breakout Quality is an overlay tool designed to detect compression zones and evaluate the quality of the breakout that emerges from them. Instead of marking every simple range expansion, the script first looks for a valid consolidation structure, then measures how convincing the breakout is once price closes outside the box.
The core idea is straightforward: not every breakout from a tight range carries the same informational value. Some breaks occur with weak commitment, low participation, and immediate failure. Others show stronger intent through better candle structure, stronger relative volume, longer pre-break compression, and cleaner continuation behavior. This script is built to separate those conditions visually and systematically.
The indicator automatically identifies consolidation zones using a narrow-range logic relative to ATR. When a valid box forms, the structure is drawn on the chart. If price closes beyond the upper or lower edge of that box, the script registers a breakout or breakdown and assigns a quality score. A throwback event can also be tracked after the break, helping users distinguish cleaner expansions from breaks that immediately revisit the zone.
This makes the script useful for traders who want to monitor compression-to-expansion behavior in a structured way. It can be used to review developing ranges, compare breakout quality across instruments, and filter visual attention toward stronger or weaker breakout events without turning the chart into a cluttered signal feed.
Unique Edge
The differentiating idea behind this tool is that it does not treat consolidation and breakout as two unrelated events. It treats them as one sequence: compression, release, validation, and possible throwback. That sequence is then scored.
Many breakout tools only draw a box or mark the first candle that moves outside a recent range. This script adds a second layer by evaluating the break itself. Volume participation, the strength of the closing position, the duration of the consolidation, and the efficiency of the breakout candle all contribute to the final quality read. If price quickly throws back into the prior box, that weakness is also reflected.
This makes the script a natural sibling to AG Pro Break-Retest Quality, but it is not a duplicate. Break-Retest Quality focuses on retest behavior after a level break. Consolidation Breakout Quality begins one step earlier by focusing on the compression box itself, the first breakout from that structure, and the immediate integrity of that release. The emphasis here is the quality of expansion from consolidation, not the later retest workflow.
Methodology
1) Consolidation detection
The script scans for a sequence of relatively narrow bars. Narrowness is measured against ATR, so the detection logic adapts to the volatility environment of the symbol rather than relying on a fixed tick or percentage threshold. Once the required number of bars is reached, a consolidation box is formed from the local high-low range of that sequence.
2) Breakout / breakdown detection
A bullish breakout is registered when price closes above the upper boundary of the active consolidation box. A bearish breakdown is registered when price closes below the lower boundary. The breakout level is then projected forward visually so the user can continue tracking the structure after the event.
3) Quality scoring
The script assigns a 1 to 5 quality score using a weighted ruleset built around the breakout event:
- Base breakout occurrence
- Relative volume expansion compared with a volume moving average
- Strength of the close beyond the box boundary
- Duration of the consolidation before release
- Body efficiency of the breakout candle
4) Throwback context
After the breakout, the script can monitor whether price returns back into the broken consolidation box within a user-defined lookback window. This is treated as a sign of weaker follow-through and can be displayed directly on the chart for fast context reading.
5) Visual workflow
The chart uses a structured visual hierarchy:
- Consolidation box
- Breakout or breakdown label
- Throwback warning label
- Quality score card
- Breakout level projection
- Compact info panel
The goal is to keep the workflow readable while preserving enough structure for live chart use.
Signals & Alerts
The script can generate alerts for:
- Bullish breakout
- Bearish breakdown
- High-quality breakout conditions
- Elite-quality breakout conditions
- Throwback warning
- Any breakout event
This allows the tool to be used either as a visual chart companion or as part of a broader alert-driven workflow. Users who prefer stricter confirmation logic should configure alerts in a way that matches their execution style.
Key Inputs
Consolidation Settings
- Consolidation Length: number of bars required to form a valid consolidation
- ATR Multiplier: sensitivity threshold for narrow-range detection
- ATR Length: volatility lookback
- Max Zones to Display: keeps chart objects under control
Quality Scoring
- Volume Spike toggle
- Volume MA Length
- Volume Spike Multiplier
- Close Position scoring toggle
- Throwback monitoring toggle
- Throwback lookback length
Visual Settings
- Box color
- Bullish breakout color
- Bearish breakdown color
- Throwback color
- Box, level, score, arrow, and panel visibility
- Label size controls
Alerts
- Minimum score threshold for alert relevance
Limitations & Transparency
This script is a market-structure visualization and event-quality tool. It is not a prediction engine, and it does not claim that every high score will lead to continuation or that every low score will fail. The score is a structured summary of selected breakout characteristics, not a guarantee of outcome.
Consolidation detection depends on the selected ATR settings and bar count. Different symbols, sessions, and timeframes may require different parameter values. Users should expect the frequency and strictness of the boxes to change when those settings are adjusted.
Volume-based logic may be more informative on instruments and venues where reported volume is meaningful. On some markets, volume behavior can be less consistent, which may reduce the usefulness of the volume component.
Throwback detection is intended as context, not as a complete post-break trade management model. A throwback can represent weakness, but in some workflows it may also represent a later confirmation opportunity. The script leaves that interpretation to the user.
Risk Disclosure
This indicator is for chart analysis, structure review, and breakout context evaluation only. It does not provide financial advice, investment recommendations, or guaranteed trade outcomes. All trading and investing involve risk, including the risk of loss. Users should evaluate the tool on their own symbols, timeframes, and execution rules before relying on it in live decision-making.
Indicateur

Scalper Pro 3 Min GoldDesigned specifically for low-timeframe scalping (ideal for 1m and 3m charts, especially on XAUUSD/Gold), the Scalper Pro 3 Min Gold is an advanced market structure breakout indicator that filters out market noise to catch explosive momentum.
Instead of giving a signal at every minor high/low cross, this script uses strict logic to ensure you only enter high-probability setups. It automatically calculates your risk and visualizes the exact Entry, Stop Loss, and Take Profit zones directly on your chart.
Key Features:
Smart Structure Breakouts: Uses internal Pivot High/Low calculations to identify true Market Structure Shifts (MSS). Stop losses are dynamically placed at the most recent logical swing low/high, not just the previous candle wick.
Consolidation Filter (Anti-Chop): The indicator analyzes the recent ATR. It requires the price to be in a tight accumulation/consolidation zone before a breakout occurs. This keeps you out of choppy, sideways markets and fakeouts.
Cooldown System: Prevents overtrading. After a valid signal is fired, the indicator enters a customizable "cooldown" period where it ignores erratic back-to-back signals.
Auto Risk:Reward Projection: Instantly draws professional Stop Loss (Red) and Target (Teal) boxes with clean labels based on your selected R:R multiplier (Default is 1:2).
How to Use:
Apply to a 1-minute or 3-minute chart (Highly optimized for Gold).
Wait for the indicator to draw the Entry/Target boxes.
The Stop Loss is automatically placed at the safest structural pivot. Execute your trade and let the price run to the projected Teal target zone.
Fully customizable inputs allow you to adjust the R:R ratio, consolidation strictness, and cooldown length to fit your personal scalping strategy. Indicateur

ROC Regime Filter [HYPR-run]DESCRIPTION:
A reliable universal regime filter across all assets, all timeframes. Rate of change filter that classifies price action into regime states. A suite of smoothed EMAs feeds a layered ROC engine that detects when fast momentum aligns with, or diverges from, slow structure. The filter measures; it doesn't predict. When all ROC layers stack in the same direction (parallel alignment), the trend is confirmed by arithmetic. When fast ROC diverges from slow, the regime shifts. The lag is the cost of certainty. Sweet spot is 1hr to 1D; lower timeframes get noisy.
DISCOVERING EDGE
In order to gain a persistent, mechanical edge in which trades are permitted and which are filtered out, we explored a more meaningful expression of regime classification using layered multiple ROC periods to detect when fast momentum aligns with or diverges from slow structure. This resilient regime filter has been the backbone for our automated strategies since 2021.
LAYERED ROC vs SINGLE-INDICATOR REGIME
A single RSI or ADX reading flattens the market into binary (trending/not trending). Layered ROC alignment separates six distinct states, each with different permissible trade types, so the filter matches the complexity of what the market is actually doing. Six regime states gate every decision; the combination of regime color + ROC slope is the trade filter, not either one alone. Phase transitions (green to yellow, orange to green) are the actionable signals; static states just confirm what's already happening. Webhook alerts fire on macro pivots (accumulation/distribution inflections) at the regime transition, not after the move has run.
FEATURES
- Six regime states from layered ROC alignment (see color legend below)
- Early trend detection when all layers accelerate in parallel
- ROC 200 line with regime-colored gradient fill
- Macro pivot detection: strong trend exhausting into sideways, scored by where ROC 200 sits relative to its all-time range
- Accumulation/distribution context in dashboard
- ROC 200 pivot high/low divergence markers on main chart
- Consolidation markers with conviction scoring (normal vs extreme)
- Gradient candle overlay (ROC Sticks; toggle on/off)
- Two-row dashboard: row 1 = macro context (accumulation/distribution), row 2 = current regime state with directional qualifier and slope
- Dashboard dark/light theme toggle for any chart background
- Full ROC stack in data window for manual analysis
- Webhook alerts on macro pivots (accumulation/distribution)
HOW IT WORKS
ROC alignment is the core signal. When all layers stack in the same direction, that's strong trend territory (green). When fast ROC diverges from the slower layers while slow structure still holds, the engine reclassifies from strong trend to sideways (yellow), flagging a pullback rather than trend failure. Deeper corrections where intermediate layers fall below the structural anchor fire orange, indicating a correction within the primary trend. Macro pivots fire at the inflection: strong trend exhausting into sideways for the first time. The consolidation score layers this with where ROC 200 sits in its all-time range. Consolidation at extreme ROC readings (bright green/red dots) is the highest-conviction signal for reversal.
HOW TO USE
Read the regime color, not the price. Green = strong trend long, red = strong trend short, orange = deeper correction, yellow = short pullback, white = directionless. Use regimes as a directional gate: longs during green, shorts during red. Yellow flags a pullback within trend; wait for resolution back to green/red before re-entering. Orange is a deeper correction; patience or fade with confirmation from other tools. The highest-edge signals come from regime transitions, not static states. Watch for: green breaking into yellow (macro pivot, potential reversal), extended yellow resolving back to green (continuation re-entry), and the ROC slope within a regime (slope rising in orange = trend about to resume). The data window shows the full ROC stack across all layers. When fast ROC diverges from slow, that signals continuation or reversion.
MACRO CONTEXT (Dashboard Row 1)
REGIME COLOR LEGEND (Dashboard Row 2)
ALERTS
Macro pivot long fires when accumulation is detected (bull inflection). Macro pivot short fires when distribution is detected (bear inflection). Create alert: condition = this indicator, "Any alert() function call". Paste your webhook URL, set Open-ended, create. Alert payload is built into the script; works with any webhook receiver.
CREDITS
Advance/Decline gradient function: LucF Indicateur

AlphaX Consolidation Engine Squeeze Detection Breakout SignalsAlphaX Consolidation Engine — Squeeze Detection, Breakout Signals & Range Intelligence
AlphaX Consolidation Engine is a professional-grade volatility and range analysis system built on a proprietary 5-Factor Consolidation Scoring engine. It identifies low-volatility compression zones, tracks range boundaries in real-time, and delivers high-probability breakout signals governed by institutional-grade confluence filters. Designed for traders who want to capture explosive moves after periods of market calm on instruments like XAUUSD, indices, and forex majors.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📸 Visual Overview
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Consolidation Engine — How It Works
At the core of AlphaX Consolidation Engine is the 5-Factor Consolidation Score — a proprietary composite metric calculated on every bar to determine if the market is truly compressing or just moving sideways. It evaluates five independent volatility and trend factors:
ATR Percentile — Measures if current volatility is historically low compared to recent price action
Bollinger Band Width — Detects price compression via narrowing band width percentiles
TTM Squeeze — Confirms energy building when Bollinger Bands sit inside Keltner Channels
Linear Regression Slope — Mathematically confirms flat price movement (lack of directional bias)
ADX Filter — Validates the absence of a strong trend (ranging market confirmation)
Each factor contributes to a score from 0 to 100. When the score exceeds the threshold (default 50), the market is marked as Consolidating .
The system then tracks the Active Range — the high and low boundaries established during the consolidation period. This range is visually displayed as a shaded box with dotted boundary lines.
Consolidation Zone expanding as price compresses — darker shading indicates higher confidence
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Four Signal Layers
AlphaX Consolidation Engine produces four distinct types of signals, each with a specific role in the trade lifecycle:
1 ─ Consolidation Zones (Shaded Boxes)
Shaded boxes with dashed borders marking confirmed consolidation areas
These are not entry signals but context markers . When a box appears, it tells you the market is building energy. The box expands dynamically as the range widens during compression. When the box border changes color (Green for Bull, Red for Bear), it indicates a breakout has occurred.
Green Box — Bullish consolidation context
Red Box — Bearish consolidation context
Gray/Neutral — Forming or weak consolidation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2 ─ Breakout Labels ( ▲ / ▼ )
www.tradingview.com
Primary breakout labels appearing when price escapes the consolidation range with confidence
These are the primary entry signals . A label appears when price closes beyond the range boundary with sufficient momentum and volume.
How the breakout is detected:
Price closes beyond Range High/Low + ATR Threshold
Candle body is strong (no weak wicks)
Volume confirms the move (optional filter)
Confidence Score meets minimum threshold
Once a breakout label fires, it sets the directional bias . The system then switches from "Range Tracking" mode to "Trend Follow" mode for that specific setup.
▲ Green Label (Bull Breakout) — Dark text on bright green background for maximum readability
▼ Red Label (Bear Breakout) — White text on deep red background for maximum readability
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3 ─ Retest Entries ( ▲ RETEST / ▼ RETEST )
Secondary entry signals appearing when price pulls back to the breakout level and holds
Breakouts often fake out before continuing. The Retest Engine monitors for price returning to the breakout level (old range high/low) within a configurable window.
▲ RETEST (Teal) — Price pulled back to bull breakout level, held support, and confirmed with bullish candle
▼ RETEST (Light Red) — Price rallied back to bear breakout level, rejected resistance, and confirmed with bearish candle
Retest signals often offer better risk-to-reward than the initial breakout because the stop loss can be placed tighter around the retest candle.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4 ─ Exit Markers ( ✕ )
Small X marks indicating where the system detects trend exhaustion or reversal — time to consider taking profit
Exit signals appear as small marks and fire only after an entry has occurred. This prevents premature exit markers from cluttering the chart during strong trends.
TRAIL — Price hit the dynamic ATR trailing stop
FAILED — Price re-entered the original consolidation range (failed breakout)
FLIP — Opposite breakout signal fired (trend reversal)
Exit markers indicate that the trade thesis is no longer valid . Use them to close positions or tighten stops manually.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 Multi-Confluence Confidence Scoring
Every breakout signal is scored by a real-time confidence engine that evaluates multiple independent factors and produces a score from 0 to 100. Only signals meeting your configured Min Breakout Confidence % threshold are displayed.
The scoring factors include:
Squeeze Quality (up to 20 points)
Was the TTM Squeeze active immediately before breakout?
Higher scores for breaks occurring after prolonged squeeze conditions
Consolidation Quality (up to 15 points)
How high was the 5-Factor Consolidation Score during the range?
Scores higher for "Extreme" or "Strong" consolidation zones vs "Weak" ones
Duration Bonus (up to 10 points)
Longer consolidation periods typically yield stronger breakouts
Scores increase for ranges lasting >15 bars
Volume Confirmation (up to 15 points)
Volume on the breakout bar relative to the 20-bar average
Volume bias during consolidation (Accumulation vs Distribution) adds/subtracts points
Momentum Alignment (up to 17 points)
MACD Histogram direction and strength
EMA Alignment (Fast vs Slow)
RSI position (not overextended)
Candle Quality (up to 5 points)
Body-to-range ratio of the breakout candle
Strong bodies score higher than wicky candles
Penalty Deductions
RSI overextension (already too high/low) — up to -8 points
Contradicting Volume Bias — up to -12 points
EMA against trend — up to -5 points
The default minimum confidence is set to 35% — optimized to filter noise while capturing valid setups. Increase to 50–60% for higher probability but fewer signals.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 Range Intelligence & Volume Bias
Understanding what happened inside the range is key to predicting the breakout direction. AlphaX Consolidation Engine tracks volume flow during consolidation:
Accumulation — More bullish volume during consolidation suggests upward breakout probability
Distribution — More bearish volume during consolidation suggests downward breakout probability
Neutral — Balanced volume suggests a wait-and-see approach
This bias is factored into the Confidence Score. A bullish breakout with bearish accumulation bias receives a penalty, reducing the likelihood of a false signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Choppy / Ranging Markets — When NOT to Trade
Knowing when to stay out is just as important as knowing when to enter. AlphaX Consolidation Engine is designed to help you identify the chop so you can trade the break.
How to identify low-probability conditions:
No Consolidation Box — If the 5-Factor Score never reaches threshold, the market is too noisy. No box = no edge.
Low Confidence Scores — If breakout labels rarely appear, the market lacks directional conviction.
Frequent "FAILED" Exits — If multiple breakouts immediately re-enter the range, the market is still ranging despite brief spikes.
Dashboard Shows "NEUTRAL" — If Vol Bias and Momentum are conflicting, wait for clarity.
What to do during low-confidence periods:
Do not force entries — wait for the Consolidation Score to rise
Wait for the Confidence Score on the breakout label to exceed 50%
Look for the Retest signal instead of the initial breakout for better confirmation
Consider switching to a higher timeframe to find the broader range structure
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Dashboard Intelligence
A comprehensive dashboard provides real-time metrics at a glance:
Consol Score — Current 5-Factor score (0-100) and intensity (Weak/Mod/Strong/Extreme)
State — Active, Forming, or None
TTM Squeeze — Status and bar count
Range Info — High/Low levels, Width in ATR, Price Position %
Vol Bias — Accumulation vs Distribution percentage
Momentum — RSI, MACD, EMA Trend status
Breakout Conf — Current Bull/Bear confidence scores and tiers (S/A/B)
Trade Status — Position direction and Open P&L
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX Consolidation Engine — Step by Step
Step 1 — Identify Consolidation
Wait for a shaded Consolidation Box to appear
Check the Dashboard: Is Consol Score > 50? Is Squeeze ON?
If no box → do not trade. Wait for compression.
Step 2 — Wait for Breakout Label
A Green ▲ or Red ▼ label appears when price escapes the box
Check the Confidence % on the label (e.g., "A 65%")
If confidence is below your minimum → wait.
www.tradingview.com
Complete trade flow: Consolidation Box → Breakout Label → Retest → Exit
Step 3 — Enter on Breakout or Retest
Aggressive: Enter on the Breakout Label close
Conservative: Wait for the RETEST label after the breakout
Place stop loss below the breakout candle or opposite side of the range
Step 4 — Manage with Trailing Stop
The system plots a dynamic trailing stop line (stepped line)
Stay in the trade as long as price does not cross the line
Add to position on additional Retest signals if trend is strong
Step 5 — Exit on Signal
When a ✕ mark appears, the system detects exhaustion or reversal
Close position or tighten stop manually
Wait for the next Consolidation Box to form for the next cycle
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🔬 Proprietary 5-Factor Consolidation Scoring (ATR, BB, KC, LR, ADX)
☁ Dynamic shaded consolidation zones with auto-expanding boundaries
🏷 Confidence-scored breakout labels (S/A/B Tier) with readable text colors
▲▼ High-probability retest entries after breakout confirmation
✕ Smart exit markers (Trail/Failed/Flip) to protect profits
🧠 Multi-factor confidence scoring — squeeze, volume, momentum, candle quality
📊 Volume Bias Analysis — tracks accumulation vs distribution inside ranges
📈 Comprehensive Dashboard — real-time range, momentum, and trade stats
🎨 Cohesive dual-tone color theme — Green for bull, Red for bear, Gray for neutral
🔔 15+ alert conditions — consolidation, squeeze, breakouts, retests, and exits
⚙ Fully configurable — all scoring weights, thresholds, and visuals adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Consolidation Detection
ATR / BB / KC Periods — Core volatility calculation lengths
Squeeze Percentile — Threshold for defining "low volatility"
Min Consolidation Bars — Minimum bars required to confirm a range
LR Slope Threshold — Sensitivity for detecting flat price action
Breakout Settings
Breakout ATR Threshold — How far price must close beyond range
Breakout Volume Ratio — Minimum volume required on breakout bar
Min Breakout Confidence % — Filter for signal quality (Default 35%)
Require Close Beyond Range — Prevents wick fake-outs
Momentum Confirmation
RSI / MACD / EMA Periods — Used for confidence scoring
RSI Levels — Overbought/Oversold thresholds for scoring penalties
Exits
Trailing Stop ATR Multiple — Distance for dynamic stop loss
Exit on Re-Enter Range — Close trade if price falls back into consolidation
Exit on Opposite Breakout — Close trade if reverse breakout occurs
Appearance & Dashboard
Show Consolidation Zones / Lines / Dots — Toggle visual elements
Label Size / Dashboard Text — Adjust readability
Colors — Fully customizable bull/bear/neutral palette
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
Consolidation Detected — Fires when a new range is confirmed
Squeeze Activated / Released — TTM Squeeze state changes
Extreme Squeeze — Consolidation Score > 80
S/A/B-Tier Bull/Bear Breakout — Confidence-based breakout alerts
Bull/Bear Retest Entry — Pullback entry signals
Any Exit — Trail, Failed, or Flip exit signals
All alert messages include {{ticker}} and {{interval}} placeholders for clean webhook integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Default Settings — Optimized For
The default configuration is specifically tuned for XAUUSD (Gold) and Major Indices on the 5-minute timeframe :
Confidence threshold at 35% filters out low-quality noise while keeping valid setups
ATR and BB periods calibrated for intraday volatility profiles
Volume filters enabled to prevent low-liquidity fakeouts
Trailing stop set to 2.0 ATR for breathable trend following
For other instruments or timeframes, adjust:
Higher timeframes (1H, 4H) — Increase Min Confidence to 45–55%, increase ATR periods
Forex majors — Reduce Min Confidence to 25–30%, enable Strict Volume Filters
Crypto — Increase ATR Thresholds (higher volatility), increase Trailing Stop multiple
Less noise — Increase Min Confidence %, Increase Min Consolidation Bars
More signals — Decrease Min Confidence %, Disable Volume Filters
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🥇 Breakout Traders — Specifically designed to capture volatility expansions after compression
📉 Range Traders — Visual boxes help identify support/resistance boundaries clearly
📊 Index & Gold Traders — Tuned for assets with distinct consolidation/expansion cycles
🧠 Systematic Traders — Confidence scoring provides a quantitative framework for entry selection
📈 Traders who value clean charts — No indicator soup. Boxes, labels, and a dashboard.
⚠ Traders who struggle with choppy markets — The 5-Factor Score physically prevents signals during low-quality ranges
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All calculations are non-repainting — signals are confirmed on bar close
Dashboard updates on the last bar only for performance optimization
Maximum 500 labels and 500 bars lookback are used — on very low timeframes, oldest labels may be automatically removed by TradingView's rendering limits
Volume Bias requires volume data — may be less accurate on forex pairs without tick volume
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who demand clarity, confidence, and precision from their charts. Indicateur
