Reversal Probability Profile [AlgoAlpha]🟠 OVERVIEW
Reversal Probability Profile maps where confirmed price reversals have historically concentrated. Instead of treating every support or resistance level equally, it builds a price-based profile from confirmed pivot highs and lows and shows which areas have produced the greatest concentration of reversals.
The profile combines pivot-based support and resistance, reversal density, price clustering, and a maximum reversal zone. This gives traders a structured view of where price has repeatedly changed direction and how the density at one level compares with the strongest reversal area in the current calculation range.
Active support and resistance levels also display a normalized Reversal Probability. This value represents the reversal density at that level relative to the highest-density profile bin. It is a relative density measure, not a statistical forecast of the probability that price will reverse.
🟠 CONCEPTS
Pivot High — A confirmed local high where price is higher than the surrounding bars defined by the Pivot Left Bars and Pivot Right Bars settings. These pivots represent historical bearish reversal points.
Pivot Low — A confirmed local low using the same left and right confirmation structure. These pivots represent historical bullish reversal points.
Reversal Probability Profile — A price profile built from confirmed pivot highs and lows. Each pivot contributes to its corresponding price bin and nearby bins according to the Bin Smoothing Radius.
Reversal Probability — The density of a price bin divided by the density of the tallest profile bin. The tallest bin is therefore 100%, while other levels are expressed relative to it. This measures relative historical reversal density rather than a statistical probability of a future reversal.
Max Reversal Zone — The price bin containing the highest smoothed pivot count. It forms the profile's point of maximum reversal density.
Pivot Clusters — Groups of historical pivot prices with similar price locations. The script groups these prices into clusters and uses separate colors to make recurring reversal regions easier to distinguish.
Support and Resistance Levels — Horizontal levels created from confirmed pivot lows and highs. Nearby levels can be filtered using an ATR-based overlap distance so that similar pivots do not produce excessive duplicate levels.
🟠 FEATURES
Reversal Probability Profile — Displays historical reversal density across the visible calculation range, with wider bins representing greater density relative to the maximum reversal zone.
Probability-Labeled Support and Resistance — Displays active pivot levels together with their price and normalized Reversal Probability, while broken levels can remain as faint historical references.
Max Reversal Zone — Highlights the profile bin with the greatest concentration of confirmed reversals and marks its corresponding price level.
Cluster Visualization — Color-codes pivot regions and can display cluster levels and historical pivot markers to show where reversal prices have grouped.
Reversal Alerts — Provides alerts for new support and resistance pivots, level breaks, maximum or high-density zone touches, and bullish or bearish reversal-zone touches.
🟠 HOW TO USE
Start with the profile — Look for the widest sections. These show price regions where confirmed reversals have concentrated more heavily than surrounding areas.
Use the Max Reversal Zone as a reference — It represents the strongest reversal-density bin in the current calculation window and provides the 100% reference used by the other probability values.
Compare active levels by Reversal Probability — A level closer to 100% sits in a region with reversal density closer to the profile maximum. Treat this as relative historical density rather than a forecast of future reversal odds.
Distinguish support from resistance — Green support levels originate from pivot lows, while red resistance levels originate from pivot highs. Watch how price behaves when it returns to these areas.
Read clusters as broader areas of interest — Repeated pivots near similar prices form clusters. These can help identify reversal regions that are supported by several historical turning points instead of one isolated pivot.
Use broken levels for context — When enabled, previously broken support and resistance remain visible as faint dotted references. This helps separate active levels from historical structure.
Adjust Pivot Left Bars and Pivot Right Bars to control sensitivity — Lower values identify smaller local turns. Higher values require broader price structure before a pivot is confirmed.
Adjust the Calculation Lookback and Pivot Memory to control how much historical reversal structure contributes to the current profile.
Use the profile together with current price action — A high-density zone identifies where reversals occurred historically. It does not by itself confirm that price will reverse on the next test.
🟠 CONCLUSION
Reversal Probability Profile combines confirmed pivots, support and resistance, reversal-density profiling, and price clustering in one chart view. It gives traders a relative measure of where reversals have historically concentrated and a way to compare current price levels against the strongest reversal zone.
Gösterge

CCI Divergence Volume Breakout [josseliani]CCI Divergence Volume Breakout combines confirmed CCI divergence with a relative-volume candle level. It waits for a confirmed close beyond that candle's high or low before displaying a BUY or SELL signal, and it can optionally map Entry, a volume-candle-based stop, 1R, and historical R-reach statistics.
The default settings are tuned for XAUUSD on the 7-minute chart, but the indicator can be adapted to other instruments and timeframes. The statistics dashboard updates for the current symbol, timeframe, loaded chart history, and selected inputs, making it easy to see how different settings affect the sample size and historical R-reach rates.
→ HOW I USE IT
The default settings are the configuration I currently use for XAUUSD on the 7-minute chart.
Seven minutes is the favorite timeframe of my wonderful wave-analysis teacher. I built this version around the way he studies the market: first CCI divergence, then a meaningful volume spike. After that, he moves on to his own wave-analysis methods, including trendlines, wave count, structure, and broader market context. This indicator does not reproduce or replace his complete method. I use it as a supporting tool within my own wave analysis.
With the default settings, the script first searches for a confirmed CCI divergence. It then selects a qualifying volume candle connected to that divergence. The first search covers the divergence span; if necessary, it checks the area around the second pivot and then watches the post-confirmation candidate window. A qualifying candle must have volume of at least 1.5 times its 20-bar average.
For a bullish divergence, the high of the selected volume candle becomes the confirmation level. A BUY signal appears only after a candle closes above that high within the permitted breakout window.
For a bearish divergence, the low of the selected volume candle becomes the confirmation level. A SELL signal appears only after a candle closes below that low within the permitted breakout window.
The optional trade map starts from the open of the candle after the signal. It displays an Entry line, a stop behind the opposite edge of the exact volume candle plus the selected ATR delta, and a 1R reference target.
I use the dashboard to compare configurations rather than to treat one historical percentage as a promise. For example, changing the minimum volume multiple, pivot-matching radius, maximum distance between pivots, candidate-search window, or breakout window changes how often historical observations reached 0.5R, 1R, 2R, and 3R. This helps me see the trade-off between signal selectivity and historical excursion.
→ HOW THE INDICATOR WORKS
→ 1. Automatic CCI pivot scan
The script evaluates confirmed CCI pivots using strengths 3, 5, 7, and 9. The first pivot must be beyond the selected extreme threshold. The second pivot may form closer to the center of the oscillator.
A bullish divergence requires price to form a lower low while CCI forms a higher low. A bearish divergence requires price to form a higher high while CCI forms a lower high.
CCI pivots require bars on the right to become confirmed. For that reason, divergence lines are anchored to their historical pivot candles only after confirmation. They do not represent information that was available on the original pivot candle. BUY and SELL signals are evaluated only on confirmed closes after the divergence has been confirmed.
→ 2. Price-pivot matching
CCI and price do not always turn on exactly the same candle. Price Pivot Match Radius searches on both sides of each CCI endpoint for the corresponding price high or low.
Maximum Price/CCI Span Difference then checks that the two price pivots and the two CCI pivots describe approximately the same market swing. Lower values require tighter alignment; higher values allow more flexibility.
→ 3. Relative-volume candle selection
When a divergence becomes confirmed, the script first searches its pivot-to-pivot span for qualifying volume candles and selects the qualifying candle with the greatest reported volume. If that search finds none, it also checks the area around the second pivot. Search After Divergence then defines how many new bars after confirmation may supply a qualifying candidate. Volume is measured relative to its moving average:
Relative volume = candle volume / average volume
The default requirement is 1.5 times the 20-bar average. Candle direction is not used. For a bullish setup, the selected candle's high becomes the level. For a bearish setup, its low becomes the level.
Maximum Candidates controls how many qualifying volume levels one divergence may create. You can use up to three qualifying volume-candle candidates for each confirmed divergence. The default is one to keep the chart and signal source unambiguous. With this default, an already selected historical candidate fills the single slot; otherwise, the first qualifying post-confirmation candidate can fill it.
→ 4. Breakout confirmation and signal window
The volume level begins as gray. It changes to the bullish or bearish color only when price closes beyond it on a confirmed candle:
Bullish divergence: confirmed close above the selected volume candle's high.
Bearish divergence: confirmed close below the selected volume candle's low.
Breakout Signal Window defines how many bars that exact volume level is permitted to produce a BUY or SELL signal. The count begins when the level is created. Once the window expires, the level cannot trigger a late signal and cannot add a late observation to the statistics.
→ 5. Expired levels
Keep Expired Levels Visible separates signal validity from visual analysis.
When it is enabled, an unbroken level continues as a gray reference after its signal window expires. The expired line is visual only: it cannot produce a BUY or SELL signal and is not reactivated by a new calendar day, exchange day, or session. It remains visible until a newer qualifying volume level replaces it.
When Keep Expired Levels Visible is disabled, the gray line ends when its breakout signal window expires.
This indicator does not carry or re-arm levels according to a calendar boundary or timezone.
→ OPTIONAL TRADE MAP
The trade map is a visual measurement tool, not an automated order-placement system.
Entry: open of the candle following the confirmed BUY or SELL signal.
Stop: opposite edge of the exact volume candle that produced the signal, plus the selected ATR delta.
1R: one initial-risk unit from Entry.
The map helps compare the signal with the user's own execution, market structure, and risk plan. It is not financial advice and does not account for spread, slippage, commissions, or individual position sizing.
→ STATISTICS DASHBOARD
The dashboard reports historical reach rates for the current symbol, timeframe, loaded chart history, and selected inputs. It is designed for configuration comparison.
Completed: observations that reached the stop, reached 3R, or reached the maximum evaluation window.
Reached >=0.5R: completed observations whose maximum favorable excursion reached at least half of the initial risk.
Win Rate >=1R: completed observations that reached at least 1R before the stop.
Reached >=2R / >=3R: completed observations that reached those excursion levels before the stop.
Average MFE: average maximum favorable excursion, expressed in R, across completed observations.
Active / Invalid: observations still being evaluated and observations rejected because a valid positive risk distance could not be constructed.
Only breakouts confirmed while their volume level is inside its active signal window create statistical observations. An expired gray reference does not create a trade in the dashboard.
If the stop and a target fall inside the same historical candle, the script gives the stop priority because OHLC data cannot reveal the intrabar sequence. This is intentionally conservative.
These figures are descriptive historical measurements, not a backtest equity curve, not a profit factor, and not a forecast of future results. They can change with the data provider, symbol, timeframe, available history, and settings.
→ DEFAULT XAUUSD 7-MINUTE PRESET
CCI Length: 20
CCI Source: Typical Price (HLC3)
First Pivot Extreme Level: +/-150
Maximum Bars Between Pivots: 60
Price Pivot Match Radius: 7
Maximum Price/CCI Span Difference: 35%
Volume Average Length: 20
Minimum Volume x Average: 1.5
Search After Divergence: 15 bars
Maximum Candidates per Divergence: 1
Breakout Signal Window: 40 bars
Keep Expired Levels Visible: On
Show Entry / SL / 1R Markup: On
→ ALERTS
Bullish CCI Divergence: fires when a bullish divergence becomes confirmed.
Bearish CCI Divergence: fires when a bearish divergence becomes confirmed.
CCI Volume Long Signal: fires after a confirmed close above an active bullish volume level.
CCI Volume Short Signal: fires after a confirmed close below an active bearish volume level.
→ ORIGINALITY
This script is not a standard CCI divergence plot and not a generic volume-spike marker. Its purpose is to connect four separate stages in one workflow: multi-strength confirmed CCI divergence, price-pivot alignment, relative-volume candle mapping, and close-confirmed breakout authorization.
Candidate search, signal lifetime, visual reference lifetime, trade measurement, and historical R-reach analysis are kept separate. This makes it possible to change one part of the workflow and see how it affects signal frequency and the historical statistics without confusing an expired visual level with an active signal source.
→ LIMITATIONS
CCI, volume, and divergence are analytical tools, not guarantees of reversal or continuation. Pivot confirmation introduces an intentional delay. Historical volume and results can differ between data providers. Signals should be evaluated with market structure, liquidity, volatility, wave context, and personal risk management. The default preset was developed for how I analyze XAUUSD on 7 minutes; other markets and timeframes require independent testing.
Gösterge

Multi EMA SMA Pro - 5/13/20/50/100/200 - MTFMULTI EMA/SMA PRO — 5/13/20/50/100/200 + MTF
Nine independent moving averages in one indicator, each with its own length,
type, timeframe, color and width. Defaults give you the classic 20 / 50 / 100 /
200 on your chart timeframe, with 5 and 13 a click away.
EVERY LINE IS LABELLED
No more guessing which line is which. Each average is tagged at the right edge
with its length — and optionally its type, its timeframe, its current value, and
how far price sits from it in percent. You read "200 D +18.06%" straight off the
chart instead of hovering over lines to find out.
DAILY / WEEKLY / MONTHLY AVERAGES ON ANY CHART
Every slot has a Chart / Daily / Weekly / Monthly / Custom selector, so you can
sit on a 5-minute chart and still see exactly where the daily 200 and the weekly
200 are — the levels that actually decide intraday reversals. Slots 7, 8 and 9
come pre-set to 200 D, 30 W and 200 W. Each higher-timeframe line is tagged with
D, W or M so there is never any ambiguity about what you are looking at. Ask for
a timeframe below your chart and the slot quietly falls back to chart data rather
than returning misleading values.
INFO TABLE
An on-chart panel lists every enabled average, its current value, and how far
price is above or below it in percent, color-coded green and red. It is the
fastest way to tell whether price is extended and due a snap back, or resting on
support. Decimal precision is adjustable.
GOLDEN CROSS / DEATH CROSS, DONE PROPERLY
GC/DC detection is on by default and measured on the DAILY 50 vs 200 no matter
what timeframe you are viewing — so an intraday chart shows the real cross, not a
5-minute imitation of one. Markers carry their own context: "GC 50/200 D".
Lengths, timeframe and MA type are all configurable, or you can point the cross
logic at any two of your plotted lines instead.
EVERYTHING ELSE
- EMA / SMA / WMA / HMA / RMA / VWMA globally, or overridden per line
- Custom source, plot offset, transparency, per-line width and color
- Line / step-line / circles / cross plot styles
- Slope-based coloring (green rising, red falling)
- Ribbon fill between any two averages
- Alerts for price crossing each average, plus golden and death cross
- Palette chosen to stay readable on both light and dark chart backgrounds
A NOTE ON HIGHER-TIMEFRAME DATA
Leave "wait for bar close" off and the daily and weekly lines update live inside
the forming candle, which is usually what you want when trading. The trade-off is
that an intraday cross can appear and then disappear before the session closes.
Turn it on for confirmed, non-repainting values that step one bar late.
If you find this useful, a boost is appreciated. Suggestions and feedback welcome in the comments.
Open-source — feel free to study, fork, and adapt. Gösterge

NASDAQ Pre-Market Range Sweep [josseliani]NASDAQ Pre-Market Range Sweep is an intraday trading assistant built around a familiar pre-market range sweep-and-reclaim setup. It automatically maps the NASDAQ range formed between 08:00 and 09:00 New York time, then monitors price behavior as activity increases ahead of the 09:30 cash-session open. The main idea is simple: after price sweeps liquidity beyond one side of the pre-market range, it may either continue moving away or return inside the range and move toward its midpoint or opposite boundary. Instead of requiring users to draw these levels manually and monitor every candle, the indicator plots the range, qualifies the sweep, waits for one of two entry confirmations, marks Entry and TP1, and collects historical statistics for the same setup.
This is an indicator, not a TradingView strategy. It does not place orders or manage positions.
WHY THIS RANGE
By default, the range is built from M1 candles between 08:00 and 09:00 in the America/New_York time zone.
This hour captures a defined part of the NASDAQ pre-market before the transition into the more active New York morning and the 09:30 cash-session open. Once this period is complete, the indicator fixes: → Range High → Range Low → the 50% midpoint
With the default one-minute delay, sweep monitoring begins at 09:01 New York time.
The range levels can remain visible for a fixed number of minutes or extend until the next daily range begins.
QUALIFIED LIQUIDITY SWEEP
A small wick through Range High or Range Low is not enough to qualify as a sweep.
The entire M1 candle must be outside the range: → for an upper sweep, the candle’s low must be above Range High → for a lower sweep, the candle’s high must be below Range Low
By default, the outside candle must also take the nearest previously confirmed pivot on the same side. This optional structural filter helps distinguish a more substantial liquidity event from a minor extension beyond the range.
A qualified sweep is not an immediate entry. The indicator then waits for one of two confirmations: Range Reclaim or Pivot Entry.
RANGE RECLAIM
Range Reclaim is used when price returns inside the pre-market range after the sweep.
For a BUY after a lower sweep, the indicator waits for a closed M1 candle that: → closes inside the range → has at least 70% of its body inside the range under the default settings
Once that candle has closed, its high becomes the confirmation level. BUY is displayed when price subsequently breaks that high.
For a SELL after an upper sweep, the logic is reversed: the acceptance candle closes inside the range, and SELL is confirmed when price subsequently breaks its low.
For Range Reclaim: → Entry is the high or low whose break confirmed the signal → TP1 · Partial close is placed at the 50% midpoint of the range
The midpoint is used as the first structural objective because price has returned inside the range but is not guaranteed to reach the opposite boundary.
PIVOT ENTRY
Pivot Entry is designed for cases where price continues significantly beyond the swept range boundary.
The search for this entry is activated only after price has moved at least one complete range width beyond that boundary.
The indicator then waits for a new confirmed pivot to form outside the range: → after a lower sweep, it looks for a confirmed pivot high below Range Low and a subsequent break above it → after an upper sweep, it looks for a confirmed pivot low above Range High and a subsequent break below it
For Pivot Entry: → Entry is placed at the broken pivot level → TP1 · Partial close is placed at the nearest boundary of the original range
If Range Reclaim and Pivot Entry are confirmed on the same M1 candle, only one signal is recorded.
SIGNAL CONTROL
The same acceptance candle or confirmed pivot cannot generate repeated signals.
After a BUY, another BUY requires a genuinely new low beyond the extreme of the previous outside movement. After a SELL, another SELL requires a genuinely new high. The number of signals per range is also limited by the Maximum signals per range setting.
Once price reaches the opposite boundary of the range, the current range cycle is considered complete, and no additional signals are generated until the next range.
CHART DISPLAY
The indicator can display: → Range High and Range Low → the 50% midpoint → confirmed BUY and SELL arrows → Entry → TP1 · Partial close → the statistics table
BUY and SELL arrows show that one of the two confirmation models has been completed. Entry marks the level whose break confirmed the setup. TP1 · Partial close marks the first structural reference: → the range midpoint for Range Reclaim → the nearest range boundary for Pivot Entry
The trade markup is an analytical reference. It does not represent an automatically executed order or a guaranteed target.
TIMEFRAMES
All signal calculations are performed using M1 data.
On M1, the indicator displays the original signals together with the Entry and TP1 markup. On M5 and M15, it displays markers cloned from the original M1 events. It does not recalculate the setup using M5 or M15 candles. This allows the same M1 signals to be viewed within a wider market context.
Timeframes above M15 are not supported.
STATISTICS TABLE
The statistics table provides a historical view of how price behaved after a qualified sweep. For each completed range, the table evaluates the first qualified sweep found within the observation window.
Return depth is normalized according to the width of each individual range: → 0% = the swept boundary → 50% = the range midpoint → 100% = the opposite boundary
OVERVIEW
Completed ranges — the number of completed observations. An observation ends when price reaches the opposite boundary or when the statistics look-forward window expires.
Qualified sweeps — the number of completed ranges in which a qualified sweep occurred. The percentage is calculated from all completed ranges.
Returned into range — the number and percentage of qualified sweeps followed by at least some movement back inside the range.
Full opposite edge — the number and percentage of qualified sweeps that eventually reached the opposite range boundary.
RETURN DEPTH
Average return (>0) — the average maximum return depth among sweeps that produced a positive return. A complete return is capped at 100%.
Minimum return (>0) — the smallest positive return recorded in the sample.
0–25%, 25–50%, 50–75%, 75–90%, and 90–99% — the distribution of incomplete returns that did not reach the opposite boundary.
These rows show how far price most often returned. They are useful because waiting for the opposite boundary in every case may not be realistic.
RISK & TIME
Average adverse excursion — the average maximum distance that price continued moving away from the range after the qualified sweep. It is expressed as a percentage of that range’s width.
Maximum adverse excursion — the largest such movement recorded in the available sample.
For example, a maximum adverse excursion of 600% means that, in the most extreme historical case, price continued approximately six range widths farther away before the observation ended.
Average time to 20% — the average number of minutes from the sweep until price completed a 20% return.
Average time to 50% — the average number of minutes from the sweep until price reached the range midpoint.
Average time to full — the average number of minutes from the sweep until price reached the opposite boundary.
These values help estimate how long the historical return process usually took rather than assuming that it should happen immediately.
BREAK-EVEN SIMULATION
BE armed / stopped / later full is a statistical simulation only.
It shows: → how many events reached the selected return depth and activated the hypothetical protection level → how many subsequently returned to that simulated protection level → how many of those stopped cases later reached the opposite boundary anyway
The simulation does not move a real stop, alter the signals, or manage a trade.
EXAMPLE OF READING THE TABLE
The table shown in this example contains:
→ Completed ranges: 18
→ Qualified sweeps: 18 | 100%
→ Returned into range: 16 | 88.89%
→ Full opposite edge: 5 | 27.78%
Completed ranges: 18
The indicator completed 18 statistical observations on the available chart history.
An observation is considered complete when either:
→ price reaches the opposite boundary of the range
→ the Statistics look-forward window expires
This number does not represent 18 trades. It represents 18 completed range observations.
Qualified sweeps: 18 | 100%
A qualified sweep was found in all 18 completed observations.
The 100% is calculated as:
→ 18 qualified sweeps ÷ 18 completed ranges
For the statistics, only the first qualified sweep found within each range observation is evaluated.
Returned into range: 16 | 88.89%
After 16 of the 18 qualified sweeps, price made at least some positive movement back inside the range.
The percentage is calculated as:
→ 16 returns ÷ 18 qualified sweeps = 88.89%
This does not mean that all 16 events reached the midpoint or the opposite boundary. It means only that price moved back inside the range by more than 0%.
Full opposite edge: 5 | 27.78%
In 5 of the 18 qualified sweep events, price moved through the entire range and reached its opposite boundary.
The percentage is calculated as:
→ 5 full returns ÷ 18 qualified sweeps = 27.78%
This is an important distinction. In this sample, price returned inside the range in 88.89% of the events, but it completed the full journey to the opposite boundary in only 27.78%.
The table therefore helps avoid the assumption that every successful return should be held all the way to the other side of the range.
RETURN DEPTH
The same example shows:
→ Average return (>0): 66.2%
→ Minimum return (>0): 3.33%
Average return (>0): 66.2%
Among the 16 events that produced a positive return, the average maximum return depth was 66.2% of the corresponding range width.
The calculation includes partial returns and full returns. A return that reaches the opposite boundary is capped at 100%.
This does not mean that every event returned 66.2%. It means that 66.2% was the average maximum depth across the positive-return sample.
Minimum return (>0): 3.33%
The smallest positive return in the sample was only 3.33% of the range width.
Events with no positive return are not included in this minimum calculation. This row shows the weakest recorded return that was still greater than zero.
INCOMPLETE RETURN DISTRIBUTION
The example contains:
→ 0–25%: 4 | 30.77%
→ 25–50%: 2 | 15.38%
→ 50–75%: 5 | 38.46%
→ 75–90%: 2 | 15.38%
→ 90–99%: 0 | 0%
Five events reached the full opposite boundary and are therefore excluded from these incomplete-return groups.
That leaves:
→ 18 qualified sweeps − 5 full returns = 13 incomplete returns
The percentages in this section are calculated from these 13 incomplete events, not from all 18 qualified sweeps.
0–25%: 4 | 30.77%
Four of the 13 incomplete observations returned by less than 25% of the range width.
This group also includes events with a 0% return. Therefore, not every event in the 0–25% group necessarily moved back inside the range.
25–50%: 2 | 15.38%
Two incomplete observations returned through at least 25% of the range but did not reach its midpoint.
50–75%: 5 | 38.46%
Five incomplete observations reached the midpoint and continued beyond it, but did not reach 75% of the range.
This was the largest incomplete-return group in the example.
75–90%: 2 | 15.38%
Two observations returned through at least 75% of the range but stopped before reaching 90%.
90–99%: 0 | 0%
None of the incomplete observations stopped between 90% and 99%.
Events that reached 100% are counted separately under Full opposite edge.
ADVERSE EXCURSION
The example shows:
→ Average adverse excursion: 189.34%
→ Maximum adverse excursion: 665.07%
Adverse excursion measures how far price continued moving away from the swept boundary after the qualified sweep.
It is also normalized according to the width of the corresponding range.
Average adverse excursion: 189.34%
On average, price traveled approximately 1.89 range widths farther away from the swept boundary during the observed events.
This number shows why a liquidity sweep should not automatically be treated as an immediate reversal or as an entry without confirmation.
Maximum adverse excursion: 665.07%
In the most extreme observation, price continued approximately 6.65 range widths beyond the swept boundary.
This does not mean that every setup requires such a large stop. It shows the largest historical extension found in the available sample and demonstrates that price can continue significantly farther after a sweep.
TIME STATISTICS
The example shows:
→ Average time to 20%: 14.86 min
→ Average time to 50%: 23.75 min
→ Average time to full: 30 min
These values are measured from the qualified sweep.
Average time to 20%: 14.86 min
Among the observations that reached a 20% return, the average time required was 14.86 minutes.
Events that never reached 20% are not included in this average.
Average time to 50%: 23.75 min
Among the observations that reached the range midpoint, the average time required was 23.75 minutes.
Events that never reached 50% are not included.
Average time to full: 30 min
Among the five observations that reached the opposite boundary, the average time required to complete the full return was 30 minutes.
This does not mean that a full return should always occur within 30 minutes. It describes only the average of the completed full-return cases in this sample.
BREAK-EVEN SIMULATION
The example shows:
→ BE armed / stopped / later full: 14 / 10 / 4
With the default 20% activation setting, this means:
→ 14 events reached at least a 20% return and activated the hypothetical protection level
→ 10 of those events subsequently returned to the simulated protection level
→ 4 of those 10 events later reached the opposite boundary anyway
This row helps examine whether protecting a position after the first part of the return might remove exposure from some events that would later continue to the full target.
It is a statistical simulation only. It does not place a stop, move a stop, change the signals, or manage a real position.
WHAT THE TABLE TELLS ME
In this particular sample, the table shows that a return inside the range occurred much more frequently than a complete move to the opposite boundary.
It also shows:
→ how deep the average return was
→ how shallow the weakest positive return was
→ where incomplete returns most often stopped
→ how long different stages of the return usually took
→ how far price sometimes continued away from the range before returning or before the observation ended
The purpose of the table is not to prove that the setup will work in the future. It provides a structured statistical view of the price behavior visible on the current chart, symbol, data feed, and settings.
HOW I USE IT
I use the indicator on a NASDAQ M1 chart and first wait for the pre-market range to be completed.
After 09:00 New York time, I watch for a qualified sweep of one of the boundaries. The sweep itself is not my entry.
I then wait for either: → a confirmed return inside the range through Range Reclaim → a confirmed pivot break after a deeper movement outside the range
The arrow shows that one of these confirmation conditions has been completed. Entry marks the confirmation level and the potential trade-entry level. TP1 · Partial close marks the first structural area where a partial exit or closer observation of the price reaction may be considered.
The default settings and presets are built for the NASDAQ sweep-and-reclaim strategy around the New York pre-market open. The same logic can also be used on other instruments, including FX pairs and gold. On gold, you can keep the same New York pre-market range; the market will simply produce its own statistics. On EURUSD, for example, you can build a London session window by adjusting Range start hour / minute and Range length (still entered in New York time).
Use the statistics table to judge how clean the setup looks on that symbol and those settings, and build the variation that fits you: → try different instruments and currency pairs → try different chart timeframes → choose your own pre-market hour and range length → decide from the table whether the setup is worth trading there
MAIN SETTINGS
Range start hour / minute — sets the beginning of the range in New York time.
Range length — sets the duration of the range.
Start watching after range end — sets the delay before sweep monitoring begins. The default value of one minute starts monitoring at 09:01.
Statistics look-forward window — sets how long each sweep is observed for the statistics table.
Signal window mode — limits signal generation to a fixed period or allows it to continue until the next range.
Signal window — sets the duration of the fixed signal-search period.
Maximum signals per range — limits the number of confirmed signals for one range.
Minimum reclaim body inside range — sets how much of the closed acceptance candle’s body must be inside the range.
Require nearest confirmed pivot sweep — requires the outside candle to take the nearest confirmed pivot.
Pivot strength — controls the size and confirmation delay of local pivots.
Level extension — extends the range levels for a fixed period or until the next range.
Trade markup length — controls the length of the Entry and TP1 lines.
ORIGINALITY
Pre-market ranges, liquidity sweeps, and confirmed pivots are established market concepts. The originality of this implementation lies in how these elements are combined and managed as one complete process.
The script: → requires the entire M1 candle to move outside the range → can require the nearest confirmed pivot to be swept → separates the liquidity event from the entry confirmation → provides two distinct confirmation models: Range Reclaim and Pivot Entry → activates Pivot Entry only after a one-range-width excursion → prevents the same candle or pivot from producing repeated signals → requires a new external extreme before another same-direction signal can occur → terminates the cycle after price reaches the opposite boundary → includes a normalized statistics table designed specifically to evaluate this range-sweep setup
The table is not intended to present a strategy win rate. It provides a statistical view of the underlying idea: how often qualified sweeps occurred, how often price returned inside the range, how frequently it reached the opposite boundary, the average and minimum return depth, the time required for different stages of the return, and the adverse distance price sometimes traveled before returning or before the observation ended.
This helps users evaluate the historical behavior of the setup instead of assuming that every sweep must produce a complete return or that every return should take the same amount of time.
The indicator is published free and open-source so that users can inspect the calculations and verify how the signals and statistics are produced.
LIMITATIONS
Results can differ between NASDAQ symbols, exchanges, and data feeds because the calculations depend on M1 OHLC data.
Confirmed pivots require bars on their right side and therefore become available only after a structural confirmation delay.
M5 and M15 display cloned M1 events, not independently calculated higher-timeframe signals.
The statistics describe only the available historical sample under the current settings. They are not a strategy report and do not guarantee future results.
The indicator does not account for commissions, slippage, position size, or individual stop-loss placement. Entry, TP1, and the break-even simulation are analytical references, not automated trade-management instructions. Gösterge

Sattam | option-scalpVolatility Projection Zones
Every 52 bars the indicator takes a reading of the market and projects where
price could travel next, based on how volatile the market actually is right now.
WORKS ON EVERY MARKET — AND HOLDS UP ON OPTIONS
There is not a single fixed value anywhere in this script: no pip counts, no
point targets, no price assumptions. Every distance it draws is derived from the
instrument's own volatility, so it behaves the same way on futures, forex,
indices, crypto, stocks — and on options contracts, which is where most
ATR-based tools quietly fall apart.
Options are a hostile case: premiums move in cents, a contract can lose half its
value in three bars, sessions are full of gaps, and plenty of bars print with no
trade at all. A pure ATR projection lags badly through moves like that and draws
targets far too tight. This script handles it by taking the LARGER of two
measures — the ATR projection, or the range of the anchor window itself. On
liquid futures the ATR is always the larger one and the floor never shows; on an
option, when a window holds a collapse, the window wins and the projection stays
honest.
HOW IT WORKS
At each cycle the script looks at the last 3 bars and finds the extreme that
price has moved furthest away from — if price is sitting near the top of that
little range, the low becomes the anchor, and vice versa. From that anchor it
projects a distance equal to 3 x ATR(14), or the range of those 3 bars when that
is wider.
Four lines are drawn per cycle:
- Two thick lines — the anchor and the full projection target
- Two thin lines — the 50% and 61.8% marks in between
Each set extends 49 bars, stopping just before the next cycle begins, and the
last 8 sets stay on the chart.
HOW TO READ IT
The direction of the projection is the cycle's bias. A set projecting upward
means the anchor sits below price as support, with the levels above as upside
reference. The two thin lines are the natural partial targets; the far thick
line is the full measured move.
Because the projection scales with volatility, the levels widen in fast
conditions and tighten in quiet ones automatically.
SETTINGS
Cycle length - bars between projections (default 52)
Anchor window - bars used to pick the anchor (default 3)
ATR length/mult - the projection distance (default 14 / 3.0)
Inner ratios - the two intermediate levels (0.5 / 0.618)
Cycle anchor - where the cycle starts counting: Session, Week, or a
manual phase
Display - colors, widths, line length, sets kept
NOTES
This is a levels framework, not a signal system. It draws on every cycle
regardless of trend or range conditions, and it has no entry filter of its own —
combine it with your own read of structure and context.
Not financial advice. Test on your own instruments and timeframes before relying
on it.
خطوط الهدف حسب حركة السوق
المؤشر كل ٥٢ شمعة يوقف ويقيس لك السوق، وبعدين يمد أربعة خطوط تقول لك
وين ممكن يوصل السعر. والمسافة مو رقم كتبته أنا، هي من حركة السوق نفسه
في ذيك اللحظة — سوق هايج يعطيك خطوط بعيدة، وسوق هادي يعطيك خطوط قريبة.
يشتغل على كل الأسواق — وأقوى شي على الاوبشن
ما فيه في المؤشر ولا رقم ثابت. لا نقاط ولا بيبس ولا أهداف محفوظة. كل
مسافة يرسمها يطلعها من حركة الأداة اللي أنت فيها. عشان كذا نفس الشغل
يمشي على الذهب والفوركس والمؤشرات والعملات الرقمية والأسهم، ويمشي على
عقود الاوبشن كمان — وهذي بالذات وين أغلب المؤشرات تخرب وأنت ما تدري.
ليش الاوبشن صعب؟ لأن سعر العقد يتحرك بالسنتات، وممكن العقد يطيح نص
قيمته في ثلاث شموع بس، والجلسات فيها فجوات كثيرة، وشموع تعدي بدون ولا
صفقة. مقياس ATR لحاله يتأخر على حركة زي كذا، فيرسم لك أهداف قريبة ما
تسوى شي.
الحل اللي فيه: يقارن بين شيئين وياخذ الأكبر — إما مسافة ATR، وإما مدى
الشموع الثلاث اللي طلعت منها نقطة البداية. في الأسواق العادية ATR يطلع
أكبر دايماً وما تحس بهالشي أصلاً؛ وفي الاوبشن لما تصير طيحة قوية، مدى
الشموع يطلع أكبر وياخذه المؤشر — فتطلع الخطوط واقعية مو مضحكة.
كيف يشتغل بالضبط
كل دورة يشوف آخر ٣ شموع، ويشوف السعر حالياً قريب من فوق ولا من تحت:
- السعر قريب من فوق؟ ياخذ القاع نقطة بداية ويمد الخطوط طالعة
- السعر قريب من تحت؟ ياخذ القمة نقطة بداية ويمد الخطوط نازلة
يعني دايماً يبدأ من الطرف الأبعد عن السعر.
ومن نقطة البداية هذي يقيس المسافة (٣ أضعاف ATR أو مدى الشموع الثلاث،
أيهم أكبر) ويرسم:
- خطين سميكين: واحد عند نقطة البداية، وواحد عند الهدف الكامل
- خطين رفيعين بينهم: عند ٥٠٪ و ٦١.٨٪ من المسافة
كل مجموعة خطوط تمشي ٤٩ شمعة وتوقف قبل ما تبدأ المجموعة الجديدة، ويبقى
لك على الشارت آخر ٨ مجموعات.
كيف تقراه
- الخطوط طالعة فوق؟ الدورة ميولها صعود، ونقطة البداية تحت تصير دعم
- الخطوط نازلة تحت؟ الدورة ميولها هبوط، ونقطة البداية فوق تصير مقاومة
- الخطين الرفيعين: أهداف أولى وثانية، مكان طبيعي تجني فيه جزء
- الخط السميك البعيد: الهدف الكامل للحركة
الإعدادات
Cycle length - كل كم شمعة يرسم مجموعة جديدة (الافتراضي ٥٢)
Anchor window - كم شمعة ياخذ منها نقطة البداية (٣)
ATR length/mult - مقياس المسافة (١٤ و ٣ أضعاف)
Inner ratios - الخطين الرفيعين (٠.٥ و ٠.٦١٨)
Cycle anchor - من وين تبدأ الدورة: مع الجلسة، مع الأسبوع، أو يدوي
Display - ألوان وسماكات وطول الخطوط وعدد المجموعات
كلام لازم يتقال
المؤشر يعطيك مستويات، مو إشارات دخول وخروج. يرسم كل دورة سواء السوق
ترند أو عرضي، وما فيه فلتر يقول لك ادخل الحين. استخدمه مع قراءتك أنت
للسوق.
وهذا مو توصية شراء ولا بيع. جربه على أدواتك وفريماتك قبل لا تعتمد عليه بصفقاتك. Gösterge

Auto Fibonacci AI - Level Respect Statistics [Dots3Red]📐 AUTO FIBONACCI AI - LEVEL RESPECT STATISTICS
Fibonacci retracement is one of the most widely used tools in trading. It is also one of the least verified. "The 0.618 is the golden pocket" gets repeated everywhere and tested nowhere. This script keeps score — not universally, but specifically for the chart you are actually looking at.
✨ WHY THIS IS DIFFERENT
Every other Fibonacci tool draws the levels and stops there. Whether those levels actually work on this instrument, this timeframe, this market condition is left entirely to assumption. This script treats that as a question worth answering. Every touch of every level is graded: did price reject cleanly, or push through? The results accumulate directly in each level's label:
📊 0.618 | 71% bounced (n=24)
That means: on this chart, at this timeframe, price has touched the 0.618 level 24 times across all the swings this script has processed. 71% of those touches resulted in a genuine rejection. 29% broke through. That is a real measurement, not a theoretical assumption.
⚙️ HOW IT WORKS
📐 Auto swing detection — the script identifies the most recent confirmed pivot high and pivot low using a configurable lookback. A minimum swing size filter (in ATR units) rejects small, noisy movements — only swings that represent genuine market structure anchor the Fibonacci grid. Swings are confirmed only on closed bars, so the anchor never changes retroactively.
📏 Retracement levels — the standard five levels are drawn from the detected swing: 0.236, 0.382, 0.500, 0.618, and 0.786. The 0.618 is highlighted in amber since it receives the most attention from traders and institutions. Each level accumulates its own separate statistics.
🎯 Touch grading — every time price approaches a level within a configurable tolerance, a touch is recorded and enters a pending state. Within the outcome window (configurable bars), it resolves as one of three outcomes:
• Bounce — price moved cleanly away from the level without breaking it
• Break — price closed convincingly through the level
• Timeout — neither happened clearly enough to call; counted as a touch but not a bounce or break
Each resolved touch feeds into that level's cumulative percentage — and the labels update to show the live result.
🟢 Extension targets — when price breaks past the swing's extreme (not just retracing to it but genuinely continuing through), the script activates two extension targets: 1.272 and 1.618. These are the levels most commonly used as continuation targets after a structural break. Each is tracked in its own way: did price actually reach 1.272 after the break? 1.618? Over time, the extension labels show:
📊 1.272 | hit 64% (n=11)
📊 1.618 | hit 41% (n=11)
That's a concrete answer to "how far does price usually go when it breaks the swing?" — specific to this chart, not assumed from theory.
🔒 Non-repainting — pivots only confirm after the required bars on each side have closed. The swing anchor only updates when a new qualifying pivot is confirmed. Grading only happens on confirmed bars. The levels and statistics reflect what actually happened, not what the current bar is doing in real time.
🧭 HOW TO USE
1️⃣ Let the sample size build before trusting the percentages. A level that shows "0% bounced (n=2)" is meaningless — two touches is noise. The labels deliberately show the N= count so you can judge reliability yourself. A consistent reading across 15+ touches is worth paying attention to; 3-5 touches is still developing.
2️⃣ Compare across levels. If 0.382 shows 40% bounced on this chart while 0.618 shows 74% bounced, that's telling you something specific about which pullback depth this market tends to respect. That difference is invisible to a plain Fibonacci tool.
3️⃣ Use extension hit rates for target selection. If 1.272 has been reached in 64% of breakout cases but 1.618 only in 41%, the first extension is the more realistic target on this chart — and the second, while possible, has historically been hit less than half the time. This is not a rule; it is an observation about past behavior on this specific chart.
4️⃣ Adjust settings to the timeframe. The defaults (pivot leg 8, minimum swing 3× ATR) are calibrated for mid-range timeframes — 15-minute through 4-hour — where Fibonacci retracement is most actively watched by swing traders and where enough swings complete regularly to build meaningful sample counts. On faster timeframes, reduce both settings so smaller swings qualify. On slower ones, increase them to filter noise.
5️⃣ The statistics describe the past, not the future. A high bounce rate at 0.618 means price has historically respected this level on this chart. It is not a promise that the current touch will also bounce. Use the percentages as context — one input among many — not as an automatic signal.
🛠️ SETTINGS
📐 Swing Detection
• Pivot Leg — bars required on each side to confirm a swing pivot
• Min Swing Size — smallest qualifying swing in ATR units; filters out noise
🎯 Level Grading
• Touch Tolerance — how close price must come to a level to count as a touch
• Break Buffer — how far past a level close must clear to grade as a break
• Bounce Distance — how far price must move away, cleanly, to grade as a bounce
• Outcome Window — bars allowed for a touch to resolve
• Extension Window — bars allowed for an extension target to be reached after a break
🎨 Visualization
• Show Extension Targets — toggle the 1.272 / 1.618 green lines
• Per-Level Stat Labels — toggle the bounce-rate text on each level
🖥️ Dashboard
• Show / hide, position — swing direction and per-level bounce rates in a compact table
📝 NOTES
The script tracks one active Fibonacci grid at a time — the most recent qualifying swing. When a new swing confirms, the grid shifts and per-level statistics carry forward from all previous swings on the chart. The statistics are global across all swings processed since the indicator was added to the chart, not per-swing.
Statistics are most meaningful on timeframes where Fibonacci retracement is genuinely watched and defended by real market participants — typically 15-minute through 4-hour. Very short timeframes will accumulate sample counts quickly but the measurements may reflect microstructure noise rather than true level respect. Very long timeframes will take extended real-world time to build enough data to be informative.
⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical bounce and hit rates do not guarantee how price will behave at any specific future level touch. Gösterge

Fibonacci Trend Continuation Signals [AlgoAlpha]🟠 OVERVIEW
Fibonacci Trend Continuation Signals maps Fibonacci retracement levels inside an adaptive trend structure. It combines a smoothed price midline, volatility-based outer bands, and Fibonacci ratios to show where price is trading within the current bullish or bearish trend range.
The trend changes only when price moves beyond a volatility-adjusted outer band. Once a direction is active, the script projects 0.236, 0.382, 0.500, 0.618, and 0.786 levels between the active outer band and the midline. This creates a moving Fibonacci framework that adjusts as price and volatility change.
Continuation signals appear when price closes back through an enabled Fibonacci level in the direction of the active trend. This lets traders use retracements within an established trend instead of treating each Fibonacci level as a fixed reversal point.
🟠 CONCEPTS
Trend Midline — An exponential moving average of closing price. It forms the central reference for the trend structure and the endpoint of the Fibonacci range.
Volatility Bands — Outer boundaries placed above and below the midline using a smoothed measure of the high-to-low price range. Price crossing an outer band changes the active trend direction.
Fibonacci Trend Range — The distance between the active outer band and the midline. In bullish trends, levels are measured upward from the lower band. In bearish trends, they are measured downward from the upper band.
Fibonacci Levels — The 0.236, 0.382, 0.500, 0.618, and 0.786 ratios divide the active trend range into retracement zones that move with the underlying trend structure.
Continuation Signal — A bullish signal occurs when price closes upward through an enabled Fibonacci level during a bullish trend. A bearish signal occurs when price closes downward through an enabled Fibonacci level during a bearish trend.
🟠 FEATURES
Adaptive Fibonacci Profile — Displays five configurable Fibonacci levels between the active volatility band and trend midline.
Trend Continuation Signals — Shows bullish and bearish markers when price closes through an enabled Fibonacci level in the direction of the active trend.
Current Level Labels — Shows the current price value of each enabled Fibonacci level at the latest bar.
Trend Change Markers — Marks the Fibonacci structure when a new bullish or bearish trend begins.
🟠 HOW TO USE
Identify the active trend structure — A bullish structure projects Fibonacci levels from the lower band toward the midline, while a bearish structure projects them from the upper band toward the midline.
Watch price during a retracement — Use the displayed Fibonacci zones to see how far price has moved through the active trend range.
Look for continuation signals — An upward triangle shows that price crossed above an enabled Fibonacci level during a bullish trend. A downward triangle shows the equivalent bearish close below a level.
Compare signals with price structure — Use nearby swing points, support, resistance, or your existing confirmation method before acting on a continuation signal.
Adjust Midline Length, Pivot Length, and Band Width to control how quickly the trend framework responds to price and how wide its outer boundaries are.
Enable or disable individual Fibonacci levels to keep only the retracement levels relevant to your method.
🟠 CONCLUSION
Fibonacci Trend Continuation Signals combines volatility-based trend detection with adaptive Fibonacci retracement levels and directional continuation signals. It gives traders a moving reference for measuring pullbacks and identifying closes that resume movement in the active trend direction. Gösterge

ADX/DI Profile & Volume Footprint🔶Overview
This script merges two powerful analytical frameworks—"Algorithmic ADX/DI Price Profile" and "High-Precision Volume Footprint"—into a single chart overlay. By moving Directional Movement data from the time axis (X-axis) to the price axis (Y-axis) and scanning lower timeframe (LTF) tick arrays, it accurately visualizes where trend energy is concentrated and how buyers and sellers interact at discrete price levels. This allows you to objectively verify market structure before committing capital.
🔶System Modules and Execution Flow
Volume Footprint Engine: Utilizes request.security_lower_tf() to scan up to 50 historical bars on a lower timeframe (down to 1-second for Premium users) to reconstruct intra-bar order flow. : Toggle between "Individual Bars" mode for per-candle footprints, and "Composite (N Bars)" mode to aggregate order flow over a specified range into a single comprehensive structure.
ADX/DI Profile Matrix: Computes standard 14-period DMI components, scalable via a Multi-Timeframe (MTF) engine. Generates fixed bounding boxes over historical sessions to project +DI, -DI, and ADX intensity as horizontal histograms. : Profiles are visually separated (Left, Right, Center aligned). A real-time heatmap shader shifts from "Cold" to "Hot" based on energy concentration, instantly identifying trend exhaustion or accumulation zones.
Local VWAP & Fibonacci Controller: Using the dynamically calculated profile range as an anchor, it draws a local Volume Weighted Average Price (VWAP) and customizable Fibonacci extensions, providing highly logical stop-loss and take-profit targets.
Analytical HUD (Default OFF): A fixed 50-column matrix table dynamically tracks Delta, Total Volume, Total Buy, and Total Sell orders, eliminating the need to manually decipher individual numbers inside the boxes.
🔶Configuration and Filtering Options
Resolution & Boundaries: Defines profile row counts (10 to 50 tiers; max 40 recommended for perfect stability, though this does not apply to line rendering) and width multipliers. When trading highly volatile assets like crypto or indices, reducing this to 30 thickens the price buckets and improves visibility.
Algorithmic Noise Filter: A critical threshold gate (0.0 to 1.0). Price tiers failing to meet this relative intensity ratio are visually muted. Increasing the default 0.08 to 0.15 (15%) mathematically erases low-impact price zones, leaving only institutional-level support/resistance clusters.
Volume Weight Toggle: An option to fuse volume data into DMI calculations. Prioritizes directional moves backed by real capital over empty price spikes.
Premium Seconds-Timeframe Guard: An automated downgrade protocol to ensure script stability. If a non-Premium plan is detected, it automatically converts 1-second (1S) requests to a 1-minute timeframe to prevent fatal array compilation errors.
🔶Trading Strategy and Practical Applications
"Wait & See" Filter (Avoiding Chop): The system's color shader acts as your first gate of discipline. If the ADX profile (center) shows "Cold" colors (e.g., dark orange/amber), it means trend energy is low. Do not trade; remain in a no-position state until the ADX blocks turn "Hot" (bright yellow), confirming massive algorithmic participation.
Absorption and Exhaustion Setups: Watch the Footprint engine boxes drawn over the candles closely. If a massive spike of aggressive buying (high positive delta, green text) occurs, yet the candle fails to break out and is immediately capped by a dense -DI profile block (right side, Hot Red), this is "Absorption." Buyers are trapped. Enter short right below this Point of Control (POC) with a tight stop-loss just above the profile box.
VWAP / Fibonacci Targeting: Once an entry is validated by Footprint delta, use the dynamically plotted VWAP as a baseline. For longs, target the upper Fibonacci bands (0.618 or 1.000). The beauty of this system is that these bands are derived strictly from the profiled session's "volume", reacting mathematically to the current market environment rather than arbitrary historical swings.
🔶Architecture and Quantitative Logic (Code Breakdown)
This script relies on multiple mathematical matrices to transform time-based indicators into price-based structures.
1. Footprint Volume Distribution (Tick Estimation)
ticks_1s = math.round((c_h - c_l) / syminfo.mintick) + 1
v_tick = c_v / ticks_1s
Why this calculation is performed: TradingView cannot provide sub-second Bid/Ask data. To measure aggressive market participation at specific price levels and objectively distinguish local buying absorption from selling pressure, the engine mathematically divides the lower timeframe bar's spread (High - Low) and distributes volume evenly across each tick to synthesize aggressive trading behavior.
Actual Output Value: A raw Float representing estimated volume at a single price tick. For example, if a 1-second volume (c_v) is 100 contracts and the spread covers 5 ticks, the output (v_tick) is exactly 20.0 per tick. Absolute volumes are formatted as strings (e.g., "1.5K") for the UI, while net delta is output to the HUD summary table as raw positive/negative floats.
2. DMI Profile Allocation and Normalization
net_di_ratio = math.abs(raw_p_plus - raw_p_minus) / (raw_p_plus + raw_p_minus)
p_plus = raw_p_plus * c_vol * (1 + net_di_ratio)
Why this calculation is performed: To pinpoint the exact price nodes where trend strength (ADX) and direction (+DI/-DI) physically occurred, filtering out empty volatility. Standard DMI ignores volume; this script multiplies DI intensity by trading volume (c_vol) and scales it via net_di_ratio to highlight zones where one side completely overwhelmed the other.
Actual Output Value: A large integer/float representing the local energy assigned to that price tier. If raw +DI is 30, raw -DI is 10, and volume is 1,000, the net_di_ratio is 20 / 40 = 0.5. The final p_plus output assigned to that tier is 30 * 1000 * 1.5 = 45,000 energy points.
3. Box Scaling and Noise Filter
ratio_plus = val_plus / max_plus
// If ratio_plus >= noise_filter, render the box
Why this calculation is performed: To eliminate market noise. max_plus is the Point of Control (POC)—the price tier with the absolute maximum energy. All other tiers are divided by this maximum to output a percentage (0.0 to 1.0). The noise filter (default 0.08, or 8%) culls tiers holding less than 8% of the POC's intensity.
Actual Output Value: A Float ratio between 0.0 and 1.0. A tier with 22,500 energy against a POC of 45,000 outputs 0.5. This 0.5 is passed directly to the f_get_heatmap_color function, outputting an RGBA hex color code that dynamically blends "Cold" and "Hot" variables based on intensity.
4. VWAP and Geometric Fibonacci Derivation
Why this calculation is performed: To establish a baseline fair value and logical standard deviation bands derived directly from the profiled session's volume distribution.
Actual Output Value: Exact absolute price coordinates (Y-axis floats). The Local VWAP is calculated by dividing the sum of (Typical Price * Volume) by Total Volume within the profile window. Fibonacci levels are output as the absolute distance from the VWAP to the session high/low multiplied by standard ratios (0.382, 0.618, 1.000). These are mapped as solid, dashed, or dotted lines across the X-axis bounds of the profile box.
🔶Capabilities and Limitations
Capabilities: Synthesizes massive LTF data arrays into clean, readable UI boxes without repainting. Modular layout prevents candlesticks from being obscured.
Limitations: TradingView imposes strict limits of 500 boxes, 500 lines, and 500 labels per script. On highly volatile assets with deep tick resolution, maximizing row_count or setting footprint lookbacks to 50 bars may cause older UI elements to clip (disappear) due to platform-level garbage collection constraints.
Gösterge

3x MTF MA Zones [josseliani]3x MTF MA Zones is a clean multi-timeframe moving average overlay designed for dynamic support/resistance, trend structure and higher-timeframe context.
The indicator combines up to three independently configurable moving averages in one chart overlay. Each MA can use its own type, length, source and timeframe, allowing higher-timeframe moving average structure to be displayed directly on a lower-timeframe chart.
In addition to the three MAs, the indicator can identify the directional relationship between the two longer moving averages and visually highlight changes in that structure.
Three Independent Moving Averages
Each MA can be configured separately.
Available settings include:
MA type: EMA, SMA, WMA or SMMA
Source
Length
Timeframe
Color
Line width
Visibility
The default configuration uses SMMA 50 / 100 / 200.
If the timeframe field is left empty, the MA is calculated using the current chart timeframe.
A different timeframe can be selected independently for each MA. For example, a trader working on a 1-minute chart can display moving averages calculated from the 5-minute or 15-minute timeframe without changing charts.
Confirmed Higher-Timeframe Values
The optional Use Confirmed HTF Values setting controls how higher-timeframe moving averages are displayed.
When enabled, the indicator uses the last completed higher-timeframe MA value. This keeps the higher-timeframe structure stable while the current higher-timeframe candle is still developing.
When disabled, the currently developing higher-timeframe MA value can be displayed instead.
MA Zones
Optional fills can be displayed between:
MA 1 and MA 2
MA 2 and MA 3
This allows nearby moving averages to be viewed as broader dynamic structure zones rather than only as individual lines.
These areas can be useful for observing pullbacks, price reactions and confluence between several moving averages.
MA Cross and Trend Context
The indicator also monitors the relationship between the displayed moving averages.
When all three MAs are visible, the two MAs with the longest selected periods are used for the cross analysis.
If only two MAs are visible, those two are used instead.
A confirmed crossover between the selected pair changes the current directional state:
Green background — bullish MA structure
Red background — bearish MA structure
The background remains active until an opposite crossover changes the directional state.
The crossover itself can also be marked with a small diamond and an optional vertical divider through the chart.
These elements are intended to make changes in the broader MA structure easy to identify without adding separate indicators to the chart.
How I Use It
I mainly use 3x MTF MA Zones to keep higher-timeframe structure visible while trading lower timeframes.
One configuration I use for intraday gold scalping is 5-minute SMMA 50 / 100 / 200 displayed on a 1-minute chart.
I use the moving averages and the areas around them as possible:
trend-structure zones
dynamic support and resistance
reaction areas
pullback areas
continuation levels
higher-timeframe confluence
The background gives an additional visual reference for the current relationship between the longer moving averages.
This is only an example of my own configuration. The MA types, periods and timeframes can be adapted to different markets and trading styles.
Alerts
The indicator includes two types of alerts.
MA Touch Alerts
Each of the three moving averages has an independent touch alert.
A touch is detected when price reaches the corresponding MA. Each MA also has its own cooldown setting to help prevent repeated notifications while price is consolidating around the same level.
MA Cross Alerts
Separate bullish and bearish alerts are available when the selected MA pair crosses and the directional state changes.
This makes it possible to receive notifications both when price reaches an MA area and when the broader moving-average structure changes.
What Makes 3x MTF MA Zones Different
The purpose of 3x MTF MA Zones is to combine several related parts of moving-average analysis in one compact overlay.
Instead of using several separate MA indicators, each moving average can be configured independently with its own type, source, period and timeframe.
The indicator then combines these MAs with optional structure zones, confirmed higher-timeframe values, automatic cross analysis of the relevant longer-period MAs, visual trend-state highlighting and independent touch and crossover alerts.
The result is a simple multi-timeframe structure map that can remain on the trading chart without requiring constant switching between timeframes.
Notes
3x MTF MA Zones does not generate automatic buy or sell signals.
The green and red background represents the directional relationship between the selected moving averages after a confirmed crossover. It should not be interpreted as an automatic instruction to enter a trade.
Moving averages are based on historical price data, and interaction with an MA or MA zone does not guarantee support, resistance, continuation or reversal.
The indicator is intended as a visual market-structure and planning tool and should be combined with the user's own analysis and risk-management process. Gösterge

Support and Resistance Zones, Key Levels & Hold Rate [LunqFX]Support and resistance indicators all draw the same picture: a set of key levels and SR zones detected from swing pivots, every one of them looking as important as the next. Five price levels on the chart and no way to tell which one the market actually respects — so you place the order at whichever support or resistance price bounced off last, and call it analysis.
This support and resistance indicator keeps score. Each auto-detected SR zone carries the number of times it has been tested and how many of those tests it held, printed on the level itself:
1.15370 · 71% · 5 of 7 1.14344 · 50% · 1 of 2 1.13763 · 67% · 2 of 3
A key level that has held five of seven tests and one that has held one of six are not the same object, and until that number is on the chart you are trading them as if they were.
Included: automatic support and resistance zone detection from confirmed pivots, a hold-rate record on every level, strength-weighted drawing, a dashboard showing the nearest support and resistance either side of price, and optional buy and sell signals with a trend filter and alerts.
❶ HOW THE SUPPORT AND RESISTANCE ZONES ARE BUILT
Swing points come from confirmed pivots, so a level only exists once the bars on both sides of it have closed — nothing appears and then vanishes. Pivots that land close to each other are merged into a single zone rather than stacked as near-duplicate lines, with the merge distance measured in ATR so it adapts to the instrument.
A zone widens as new pivots join it, but only up to a ceiling. Past that it re-centres on the pivot that just touched it. Without that rule a level slowly swallows everything around it and turns into a band, and the count then measures touches of a band instead of touches of a price.
❷ THE HOLD RATE — what no other support and resistance tool shows
A test opens when price trades into the zone. It resolves on a CLOSED bar, one of two ways:
▸ HELD — price closed back out the side it came from, clear of the zone by a fraction of ATR. The margin matters: without it, a close one tick beyond the edge counts as a rejection, which is how level indicators manufacture events out of noise. ▸ BROKEN — price closed through to the other side.
Nothing is counted while a test is still open. And a fresh test cannot begin until the previous one has had room to breathe, because price chopping inside a zone for a week is one consolidation, not twenty separate tests of the level.
Samples of fewer than four tests are marked with a tilde. Two tests producing "100%" is noise, and the chart says so rather than letting the number stand.
❸ LEVEL STRENGTH YOU CAN SEE
Fill density, border thickness and the halo behind each zone all scale with how often the level has been tested, and levels holding above 60% are drawn in a brighter shade. The chart ranks its own levels — the strongest one is the one that looks strongest, with no arithmetic required from you.
❹ THE DASHBOARD — nearest support and resistance
The nearest level above and the nearest level below, each with its price and its record. When there is no tracked level on one side the panel says exactly that, rather than printing a dash that reads like a fault.
❺ BUY AND SELL SIGNALS — built in, switched off
The indicator includes buy and sell signals: a buy label when a support test holds, a sell label when resistance holds. Turn them on in the Signals section — the switch is the first setting in the group, and every alert works from them.
They ship switched OFF, and the reason is worth stating plainly. A rejection at a support or resistance level is a fact. What price does afterwards is not. A level also tends to weaken with each test as the orders behind it are consumed, so "this level held four times" is not evidence that it will hold a fifth — if anything the reverse. Any indicator that hands you an arrow on every bounce is selling you that assumption without saying so.
When switched on, a signal has to clear six filters before it prints: the level must have been tested enough times to have a record, it must hold more often than it breaks, the rejection must close clear of the zone by a fraction of ATR, price must still be near the level, the trend must agree with the direction, and both the chart as a whole and that particular level must have been quiet since the last one. Set that way they are rare. Treat them as a prompt to look, not as a call to act.
HOW TO USE IT
1 — Choose where to place a resting order. Between two levels the same distance away, the one with the better record is the better limit.
2 — Choose where to expect a break. A level holding one test in six is telling you something too: price is likely to go through it, which makes it a poor place to fade and a reasonable place to trade a breakout.
3 — Place stops behind proven levels. A stop tucked behind a level that has held five of seven has a structural reason to be there.
4 — Read the whole set at once. This is the reading most traders never get. If every level on the chart is showing 30–40%, the market is not respecting levels at all right now — it is trending or reacting to news, and level trading is the wrong approach for the session. When most levels sit at 70%+, the market is rotating and levels are worth trading. That judgement usually takes weeks of screen time; here it is on the chart.
HOW IT WORKS
Pivots of your chosen length define candidate levels. Each new pivot either joins the nearest existing zone within the merge distance or opens a new one; zones are capped in width and the oldest is dropped once the limit is reached. Every zone tracks four numbers: tests, holds, the bar its last test resolved on, and the bar it last signalled on. Tests resolve on closed bars only, with a rejection margin in ATR and a minimum gap between tests. The hold rate is simply holds divided by tests, and the drawing weight is derived from the test count.
Works on any symbol and timeframe. On daily charts and above, leave the minimum test count at one — a level there rarely gets a second test before it matters. On fast intraday charts raise it, since levels are tested often.
SETTINGS
▸ Levels — pivot length, how many levels are kept, how far back they draw, merge distance, zone thickness, maximum width, minimum tests to draw, and the gap between tests. ▸ Signals — off by default; prior holds required, minimum tests before a level may speak, minimum hold rate, cooldowns, distance from price and rejection strength. ▸ Trend Filter — direction requires both price position and the slope of the average, so a range satisfies neither side. ▸ Visuals — extension, labels, candle colouring, dashboard position.
ALERTS — buy signal, sell signal, and any signal. All fire on closed bars only.
NON-REPAINTING — levels are built from confirmed pivots and every test resolves on a closed bar. A record that has printed never changes retroactively, and a level that has appeared never disappears from history.
WHY THESE PARTS ARE ONE SCRIPT
The levels, the record and the visual weight describe one object. Detection alone gives you lines with no way to rank them. The record alone has nothing to attach itself to. The weighting exists only so the record can be read at a glance instead of counted. Take any one away and the other two stop being useful, which is why they ship together rather than as three indicators.
This indicator is an educational market-analysis tool, not financial advice. The hold rate describes what has already happened at a level on the loaded chart; it does not predict what will happen next. Always confirm with your own analysis and manage your risk. Gösterge

Sattam Supply | DemandSATTAM Supply | Demand Zones (Multi-Timeframe)
OVERVIEW
This indicator maps supply and demand zones from a timeframe you choose and draws them on your current chart. Instead of marking every swing point, it only accepts a swing that is followed by a genuine displacement move away from that level, measured against volatility (ATR). The goal is a chart with a small number of meaningful zones rather than dozens of overlapping boxes. Zones are drawn as boxes with a 50% midline, extended to the right until price invalidates them.
HOW A ZONE IS CREATED
A zone is created in two stages.
1) Pivot detection
The script looks for a pivot high (for supply) or a pivot low (for demand) on the selected timeframe. A pivot needs "Pivot Length" bars on each side to confirm, so the swing is a completed structural turning point and not a temporary extreme.
2) Displacement confirmation
A confirmed pivot is not enough on its own. After the pivot confirms, the script watches the next few bars ("Displacement Window") for a decisive close away from the level:
- Supply: a close below the pivot candle's low by more than ATR(14) x displacement factor
- Demand: a close above the pivot candle's high by more than ATR(14) x displacement factor
The ATR value used is the one captured at the pivot bar itself, so the confirmation threshold reflects the volatility that existed when the level formed, not the volatility at the moment of the breakout. If no qualifying close appears inside the window, the pivot is discarded and no zone is drawn.
The displacement factor is derived from the "Sensitivity" input: max(0.10, 1.15 - Sensitivity x 0.10). Higher sensitivity means a smaller required move, which produces more zones. Lower sensitivity demands a stronger reaction and produces fewer, more selective zones.
ZONE BOUNDARIES
Each zone is anchored at the pivot candle's own time, so the box starts where the level actually formed.
- Supply: the top is the pivot high, the bottom is the pivot candle's body top, min(open, close).
- Demand: the bottom is the pivot low, the top is the pivot candle's body bottom, max(open, close).
If that body-to-wick distance is unusually thin, the height is expanded to a volatility-based minimum (ATR at the pivot x width factor) so the zone stays usable on quiet candles. The "Width" input scales that minimum.
ZONE MANAGEMENT
Overlap filter: a new zone is rejected if it overlaps an existing zone by more than 45% of the smaller zone's height, or if it forms close in time with a nearly identical midpoint. This prevents clusters of near-duplicate boxes around the same level.
Zone limit: "Max Zones Per Side" caps how many supply and demand zones stay on the chart. When the limit is reached, the oldest zone is removed.
Invalidation: with "Hide Invalidated Zones" enabled, a supply zone is deleted after a close above its top and a demand zone after a close below its bottom. Disable it to keep broken zones visible for context.
Extension: active zones extend to the right by "Zones Offset" bars of the current chart so they stay visible ahead of price.
REPAINTING
Zones are committed only from closed bars of the selected timeframe. When a new higher-timeframe bar opens, the script reads the signal produced by the bar that just closed, and request.security is called with lookahead_off. A zone that has been drawn will not move or disappear on a later refresh, and no zone appears from a still-forming higher-timeframe bar.
Because of this, a zone always appears with a delay of at least "Pivot Length" bars plus the displacement bars on the selected timeframe. That delay is inherent to pivot-based confirmation.
SETTINGS
Source
- Timeframe: the timeframe the zones are calculated from (default 4H). Leave empty to use the chart timeframe.
- Pivot Length: bars required on each side of a swing for it to count as a pivot.
- Sensitivity: 1 to 10. Higher values loosen the displacement filter and allow more zones.
- Displacement Window: how many bars after a pivot confirms the script keeps waiting for a displacement close before discarding the pivot.
Zones
- Width: scales the volatility-based minimum zone thickness.
- Zones Offset: how far zones extend to the right.
- Max Zones Per Side: maximum simultaneous supply and demand zones.
- Hide Invalidated Zones: remove zones after price closes through them.
Style : fill and border colors for supply and demand, plus midline style (dashed, dotted, solid).
Timeframe Label : an on-chart label showing which timeframe the zones come from, with position, size and color options.
HOW TO USE IT
Set the Timeframe higher than your chart timeframe, for example 4H zones on a 15m chart, so you keep a structural reference while working on a lower timeframe. Zones mark areas where an imbalance formed and price left the level quickly. They are areas of interest for observing price behaviour, not signals in themselves.
Reduce Sensitivity and raise Pivot Length on noisy or lower timeframes if too many zones appear. Raise Sensitivity on higher timeframes or slow instruments if too few appear.
ALERTS
Two alert conditions are available: New Supply Zone and New Demand Zone. Both fire when a zone is confirmed from a closed higher-timeframe bar.
NOTES AND LIMITATIONS
- The indicator describes structure that has already formed. It does not predict direction and produces no buy or sell signals.
- Zone quality depends on the selected timeframe and instrument. Settings that work on one market will not automatically suit another.
- Very illiquid symbols or timeframes with wide gaps may produce fewer valid displacement confirmations.
This script is published for educational and analytical purposes only. It is not financial advice and does not guarantee any result. Always test any tool on your own instruments and timeframes before relying on it.
مؤشر مناطق العرض والطلب - متعدد الفريمات
نظرة عامة
يرسم المؤشر مناطق العرض والطلب من فريم تختاره أنت ويعرضها على الشارت الحالي. بدلاً من تعليم كل قمة وقاع، لا يقبل المؤشر السوينق إلا إذا تبعته حركة اندفاع حقيقية بعيداً عن المستوى، تُقاس نسبةً إلى تذبذب السوق عبر ATR. الهدف شارت فيه عدد قليل من المناطق المهمة بدل عشرات الصناديق المتداخلة. تُرسم المنطقة على شكل صندوق مع خط منتصف عند 50% ويمتد لليمين حتى يُبطله السعر.
كيف تتكوّن المنطقة
المرحلة الأولى: البحث عن قمة بيفوت للعرض أو قاع بيفوت للطلب على الفريم المختار. يحتاج البيفوت إلى عدد الشموع المحدد في Pivot Length على كل جانب حتى يتأكد، حتى يكون نقطة انعكاس بنيوية مكتملة لا مجرد طرف مؤقت.
المرحلة الثانية: البيفوت وحده لا يكفي. بعد تأكده يراقب المؤشر الشموع التالية خلال Displacement Window بحثاً عن إغلاق حاسم بعيداً عن المستوى:
- العرض: إغلاق أسفل قاع شمعة البيفوت بمسافة أكبر من ATR(14) مضروباً في معامل الاندفاع.
- الطلب: إغلاق أعلى قمة شمعة البيفوت بمسافة أكبر من ATR(14) مضروباً في معامل الاندفاع.
قيمة ATR المستخدمة هي القيمة المسجّلة عند شمعة البيفوت نفسها، أي أن حد التأكيد يعكس التذبذب الذي كان قائماً وقت تكوّن المستوى لا وقت الاختراق. وإذا لم يظهر إغلاق مؤهّل داخل النافذة يُلغى البيفوت ولا تُرسم منطقة.
معامل الاندفاع مشتق من إدخال Sensitivity بالمعادلة: max(0.10, 1.15 - Sensitivity x 0.10). كلما ارتفعت الحساسية قلّت المسافة المطلوبة وزاد عدد المناطق، وكلما انخفضت تطلّب المؤشر رد فعل أقوى وأعطى مناطق أقل وأكثر انتقائية.
حدود المنطقة
المنطقة مثبّتة على وقت شمعة البيفوت نفسها، فيبدأ الصندوق من حيث تكوّن المستوى فعلاً.
- العرض: القمة هي قمة البيفوت، والقاع هو أعلى جسم الشمعة أي min(open, close).
- الطلب: القاع هو قاع البيفوت، والقمة هي أسفل جسم الشمعة أي max(open, close).
وإذا كانت هذه المسافة رفيعة بشكل غير معتاد يُوسَّع الارتفاع إلى حد أدنى مبني على ATR عند البيفوت مضروباً في معامل العرض، حتى تبقى المنطقة قابلة للاستخدام على الشموع الهادئة. ويتحكم إدخال Width في هذا الحد الأدنى.
إدارة المناطق
فلتر التداخل: تُرفض أي منطقة جديدة تتداخل مع منطقة قائمة بأكثر من 45% من ارتفاع الأصغر بينهما، أو تتكوّن قريباً منها زمنياً بمنتصف شبه مطابق. هذا يمنع تراكم صناديق شبه مكررة حول المستوى نفسه.
حد المناطق: يحدّد Max Zones Per Side أقصى عدد للمناطق على كل جهة، وتُحذف الأقدم عند تجاوز الحد.
الإبطال: مع تفعيل Hide Invalidated Zones تُحذف منطقة العرض بعد إغلاق فوق قمتها، ومنطقة الطلب بعد إغلاق تحت قاعها. ويمكن تعطيله للإبقاء على المناطق المكسورة كسياق.
الامتداد: تمتد المناطق النشطة لليمين بمقدار Zones Offset من شموع الشارت الحالي لتبقى ظاهرة أمام السعر.
إعادة الرسم
تُعتمد المناطق من الشموع المغلقة فقط على الفريم المختار. عند فتح شمعة جديدة على الفريم الأعلى يقرأ المؤشر الإشارة الناتجة عن الشمعة التي أُغلقت للتو، وتُستدعى request.security بخيار lookahead_off. لذلك المنطقة بعد ظهورها لا تتحرك ولا تختفي عند التحديث، ولا تظهر أي منطقة من شمعة لم تُغلق بعد.
ونتيجة لذلك تظهر المنطقة متأخرة بمقدار شموع البيفوت زائد شموع الاندفاع على الفريم المختار، وهو تأخير ملازم لأي تأكيد مبني على البيفوت.
الإعدادات
المصدر
- Timeframe: الفريم الذي تُحسب منه المناطق، والافتراضي 4 ساعات. اتركه فارغاً لاستخدام فريم الشارت.
- Pivot Length: عدد الشموع المطلوبة على كل جانب لاعتماد البيفوت.
- Sensitivity: من 1 إلى 10، والقيم الأعلى تخفف فلتر الاندفاع وتسمح بمناطق أكثر.
- Displacement Window: عدد الشموع التي يواصل المؤشر خلالها انتظار إغلاق الاندفاع بعد تأكد البيفوت قبل إلغائه.
المناطق
- Width: يتحكم في الحد الأدنى لسماكة المنطقة المبني على التذبذب.
- Zones Offset: مدى امتداد المناطق لليمين.
- Max Zones Per Side: أقصى عدد متزامن لمناطق العرض والطلب.
- Hide Invalidated Zones: حذف المناطق بعد إغلاق السعر خلالها.
الستايل: ألوان التعبئة والحدود للعرض والطلب، ونمط خط المنتصف متقطع أو منقّط أو متصل.
مؤشر الفريم: لوحة صغيرة على الشارت تبيّن الفريم الذي جاءت منه المناطق، مع خيارات الموضع والحجم واللون.
طريقة الاستخدام
اجعل الفريم في الإعدادات أعلى من فريم الشارت، مثل مناطق 4 ساعات على شارت 15 دقيقة، لتحتفظ بمرجع بنيوي وأنت تعمل على فريم أصغر. المناطق تعلّم أماكن تكوّن اختلال في التوازن غادر السعر مستواها بسرعة، وهي مناطق اهتمام لمراقبة سلوك السعر لا إشارات بحد ذاتها.
خفّض Sensitivity وارفع Pivot Length على الفريمات الصغيرة أو الأسواق المزعجة إذا ظهرت مناطق كثيرة، وارفع Sensitivity على الفريمات الكبيرة أو الأدوات البطيئة إذا كانت المناطق قليلة.
التنبيهات
تنبيهان متاحان: منطقة عرض جديدة، ومنطقة طلب جديدة، ويُطلقان عند تأكيد المنطقة من شمعة مغلقة على الفريم الأعلى.
ملاحظات وحدود
- المؤشر يصف بنية سعرية تكوّنت بالفعل، ولا يتنبأ بالاتجاه ولا يعطي إشارات شراء أو بيع.
- جودة المناطق تعتمد على الفريم والأداة المختارة، والإعدادات التي تناسب سوقاً لا تناسب غيره تلقائياً.
- الرموز ضعيفة السيولة أو الفريمات ذات الفجوات الواسعة قد تعطي تأكيدات اندفاع أقل.
يُنشر هذا المؤشر لأغراض تعليمية وتحليلية فقط، وليس نصيحة مالية ولا يضمن أي نتيجة. اختبر أي أداة على أدواتك وفريماتك قبل الاعتماد عليها. Gösterge

Auto Trendlines - Support Resistance Touch-Graded [Dots3Red]📐 AUTO TRENDLINES - Support Resistance Touch-Graded
Most auto-trendline tools do one thing: draw a line and stop. This one keeps score. Every time price touches a detected trendline, the touch is graded on confirmed bars — did price genuinely bounce away, or push through? The result is a running, honest record instead of a static line you're left to interpret on your own.
🎯 WHY THIS MATTERS
A trendline by itself is just a guess about where price might react. This script turns that guess into a measurement. Instead of assuming "trendlines work," it tracks — on this specific chart, in real time — how often they actually have. If a line has been touched four times and bounced three, you see exactly that: "4 touches · 3 bounced." No line gets the benefit of the doubt it hasn't earned.
⚙️ HOW IT WORKS
📍 Detection — the script tracks one active resistance line (built from the two most recent confirmed pivot highs) and one active support line (from the two most recent pivot lows). A slope filter rejects near-horizontal lines, since those are levels, not trendlines — different tool, different job.
🎯 Touch grading — when price reaches close enough to a line (configurable tolerance), that touch enters a pending state. Within a set number of bars, it resolves one of three ways:
• Bounce — price moved away cleanly without breaking
• Break — price closed convincingly through the line; it retires and the line's story ends there
• Timeout — neither happened clearly enough to call
📊 Two layers of scoring — each individual line carries its own tally (shown right on the chart), and the dashboard separately tracks a global bounce rate across every line the script has drawn on that chart, so far. That global number is the honest headline: it's what trendline touches have actually done here, not a theoretical average.
✨ Trendline glow — each active line gets a soft fade extending away from it, independently. This isn't a channel — resistance and support aren't matched pairs here, so the two glows are deliberately unrelated, each hugging only its own line.
🔒 Non-repainting — lines are built only from confirmed pivots and never quietly redrawn to fit later price. Touch grading happens only on confirmed bars. What you see historically is what happened, not a retrofit.
🧭 HOW TO USE
1️⃣ Read the label, not just the line. "3 touches · 1 bounced" and "3 touches · 3 bounced" look identical as a plain line, but tell very different stories about how much to trust the next touch.
2️⃣ Check the dashboard's global Bounce Rate before leaning on any single line. If the aggregate rate on this chart is sitting at 35%, that's useful context — it means trendlines haven't been particularly reliable here lately, regardless of how convincing any one line looks in isolation.
3️⃣ Watch for the retirement. Once a line breaks, it's either removed immediately or kept as a dashed reference (your choice, see settings) — either way, a broken line stops being "live" and stops collecting new touches. Don't keep treating a dashed line as active support/resistance.
4️⃣ Tune the tolerance and outcome window to the instrument. A fast-moving crypto pair and a slow index behave very differently — the default settings are a reasonable starting point, not a universal fit.
🛠️ SETTINGS
📐 Detection
• Pivot Leg — bars required each side to confirm a pivot; larger = fewer, more significant pivots
• Require Meaningful Slope + Min Slope — filters out near-horizontal lines
• Max Line Age — retires lines that have simply gotten too old
🎯 Touch Grading
• Touch Tolerance — how close price must come to count as a touch
• Break Buffer — how far past the line close must clear to count as a break
• Bounce Distance — how far price must move away, cleanly, to count as a bounce
• Outcome Window — bars allowed for a touch to resolve
🎨 Visualization
• Line Stat Labels, Touch Markers — toggle each independently
• Show Broken Lines — keep retired lines visible (dashed) or clear them immediately
• Trendline Glow + Glow Fade Distance — soft fade extending from each active line
EXAMPLE ( with Broken Trend Lines )
🖥️ Dashboard
• Show/hide, position — current resistance/support status, global bounce rate, break count, active pivot leg
📝 NOTES
Because only one resistance and one support line are actively tracked at a time, older structure isn't shown once a fresher pivot pair replaces it (unless "Show Broken Lines" is enabled). This script measures how trendlines have behaved on this chart — it does not predict how any specific future touch will resolve.
⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical bounce/break rates do not guarantee future performance. Gösterge

HTF Swing Highs & LowsAn open-source multi-timeframe market structure indicator that automatically identifies and projects confirmed swing highs and swing lows from the Weekly, Daily, and 4-Hour timeframes onto any lower timeframe chart.
The indicator is designed to provide clean, non-repainting support and resistance levels based on confirmed market structure rather than developing pivots.
Features
- Weekly, Daily and 4H swing highs and lows
- Non-repainting confirmed pivots
- Automatic higher timeframe detection using request.security()
- Horizontal levels extended until invalidated
- Independent visibility controls for each timeframe
- Hierarchical timeframe filtering
- Custom colours and line widths for every timeframe
- Adjustable pivot strength
- Wick, Close or Never invalidation options
- Stop or Delete broken levels
- Automatic level management to prevent exceeding TradingView object limits
How it works
The script uses confirmed pivot highs and lows from higher timeframes.
Unlike developing pivots, a swing is only confirmed after the selected number of candles has formed on both sides of the pivot. Once confirmed, a horizontal level is created at the swing price and extended to the right.
Because only confirmed pivots are used, historical levels do not repaint.
Pivot Strength
Pivot Strength controls how significant a swing must be before it becomes a level.
A strength of 3 means the pivot candle must have:
- three lower highs (or higher lows) before it
- three lower highs (or higher lows) after it
Higher values filter market noise and identify more significant market structure.
They also produce fewer levels and require longer confirmation.
Lower values detect smaller swings, produce more levels, react faster.
Level Invalidation
Choose how a level is treated once price trades through it.
Wick - Invalidates when price wicks beyond the level.
Close - Invalidates only after a candle closes beyond the level.
Never - Levels remain permanently.
Broken levels can either:
- Stop extending while remaining visible
- Be deleted completely
Hierarchical Visibility
The indicator can automatically display only relevant higher timeframe levels.
For example:
- Weekly levels appear on Weekly and all lower timeframes.
- Daily levels appear on Daily and all lower timeframes.
- 4H levels appear on 4H and lower charts.
This helps reduce clutter when analysing higher timeframe charts.
Notes
- Uses confirmed higher timeframe pivots only.
- Levels are anchored to the original swing candle.
- Designed for support and resistance, market structure, liquidity analysis, and confluence with other tools.
- Works on all symbols and asset classes supported by TradingView. Gösterge

Navyraid FVANavyraid FVA (Fair Value Area)
Description:
Overview
The Navyraid Fair Value Area (FVA) is a specialized analytical tool built upon the principles of Auction Market Theory (AMT). According to AMT, financial markets exist to facilitate trade, constantly moving between states of balance and imbalance. The market tends to travel from one established Value Area to another.
This indicator maps out these crucial areas by analyzing where the market spends the most time and how frequently specific price levels are visited throughout the trading day. By identifying these zones of high historical acceptance, the indicator projects key levels from previous sessions that act as strong magnets and significant support/resistance zones for current and future market action.
How It Works (Core Logic)
The indicator evaluates price action by breaking down the high-to-low range of each candle into specific discrete price bins (ticks). It then tallies how often the price trades through each bin over a defined period (daily basis).
Value Area Calculation: It accumulates these price interactions to find the area where a specified percentage of trading activity occurred (default is 68%, representing one standard deviation of the mean).
Key Level Extraction: It isolates the single price levels with the highest concentration of activity for both the Mayor and Minor FVA.
Main Features
Mayor FVA: This represents the Point of Control (POC) or the price level with the highest time accumulation strictly within the 68% Value Area. This zone acts as the primary focal point of market balance and a high-probability price magnet.
Minor FVA: This marks the most significant high-time node located strictly outside the established Value Area. These peripheral nodes frequently serve as crucial turning points, rejection zones, or targets when the market breaks out of its primary balance.
Smart Mitigation (Freeze Logic): To keep the chart clean and relevant, FVA zones are projected forward as boxes. By default, once the current price touches or "mitigates" an extended box, the box stops extending (freezes).
Force Extend: A toggle that overrides the mitigation logic, forcing the FVA boxes to continuously project forward regardless of price interaction, useful for long-term level tracking.
Auto Tick Size: The script automatically scales the bin sizes based on the asset's specific price range and minimum tick, making it universally applicable across Forex, Indices, Crypto, and Equities without manual adjustment.
How to Use in Trading
Traders can utilize the Navyraid FVA to understand the broader market context based on AMT.
Targets: If the price is moving directionally, previous Mayor FVAs serve as logical take-profit zones, as the market seeks historical balance.
Reactions: Minor FVAs can be observed for potential pullbacks or continuation setups when the market tests extreme areas outside of the previous day's accepted value.
Disclaimer: This indicator is designed for educational and analytical purposes to visualize Auction Market Theory concepts. It does not constitute financial advice. Gösterge

ICT Smart Money Execution Engine PROICT Smart Money Execution Engine PRO
ICT Smart Money Execution Engine PRO is an advanced, high precision technical analysis tool designed for traders practicing Inner Circle Trader and Smart Money Concepts methodologies. It automatically maps structural context, liquidity sweeps, macro price extremes, and key session windows while keeping your charting environment ultra clean.
Key Features Overview
1. Intermediate Term Highs and Lows Badge Labels
Identifies major market turning points with distinct solid badge style labels. Intermediate Term Highs are clearly displayed with red ITH badges above swing points, and Intermediate Term Lows are displayed with green ITL badges below swing points.
2. Auto Mitigating Previous Day High and Low
Projects active daily boundaries on your chart. To prevent visual clutter, Previous Day High and Previous Day Low lines automatically delete as soon as price touches or mitigates them.
3. Red Line Termination Liquidity Sweeps
Tracks high probability liquidity pools sitting above swing highs and below swing lows. When price sweeps liquidity, a solid 2x width red line connects the original swing point directly to the sweeping candle wick, terminating instantly with a clear Liquidity Swept label.
4. Dynamic Auto Mitigating Fair Value Gaps
Automatically identifies bullish and bearish price imbalances across all timeframes. Unmitigated FVG boxes dynamically clean up and vanish as soon as price returns to fill them.
5. Volume Validated Order Blocks
Detects key institutional order block zones using a customizable 50 bar lookback by default. Zones remain active until price firmly closes beyond their boundaries.
6. Clean New York Session Highlight
Provides a single, ultra light background overlay specifically for the New York Session window, eliminating the distraction of multiple overlapping global sessions.
7. Market Structure Shift Detection
Tracks momentum reversals in real time by drawing clean dashed structure lines and MSS labels when key structural pivots are broken by candle closes.
How to Use
Step 1: Determine Macro Bias
Use the red ITH and green ITL badges to locate institutional swing extremes and understand the broader market trend.
Step 2: Focus on New York Session
Analyze price action during the highlighted New York Session window when market volume and institutional volatility are highest.
Step 3: Identify Liquidity Sweeps
Watch for price to sweep an active Previous Day High, Previous Day Low, or recent swing level marked by the bold red Liquidity Swept line.
Step 4: Execute on Structural Confirmation
Wait for a Market Structure Shift signal following a liquidity sweep, then evaluate entries on retaps into active Order Blocks or Fair Value Gaps.
Settings Overview
ITH / ITL Settings
- Show ITH / ITL Badge Labels: Toggle visibility of intermediate swing badges.
- Lookback Sensitivity Length: Adjust pivot lookback sensitivity for detecting macro highs and lows.
- Colors: Customization options for ITH and ITL badge background colors.
Previous Day High and Low Settings
- Show Active PDH / PDL: Toggle display of auto disappearing daily levels.
- Line Width and Style: Choose between solid, dotted, or dashed line styles and adjust thickness.
Fair Value Gap Settings
- Show Active FVGs: Toggle dynamic imbalance box visibility.
- FVG Transparency: Adjust fill opacity for bullish and bearish boxes.
Order Block Settings
- OB Lookback Length: Customize the pivot length used for order block detection (default is set to 50).
Liquidity Sweep Settings
- Show Liquidity Sweeps: Toggle sweep lines and labels.
- Sweep Line Color: Customize the color of the 2x width sweep termination line.
Session Settings
- Show Only New York Session: Toggle visibility of the session background highlight.
- NY Session Window: Set exact session hours to match your local or UTC-4/5 preferences.
Disclaimer
This script is built strictly for educational, analytical, and charting enhancement purposes. It does not provide financial advice, automated trading signals, trade management, or guaranteed results. Trading financial markets involves substantial risk of capital loss. Always perform your own analysis and practice strict risk management.
Gösterge

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. Gösterge

Support Resistance AI [PickMyTrade]Every support/resistance tool answers "where are the levels." None answer the question a trader actually has when price arrives at one: does THIS test look like the ones that held, or like the ones that broke?
――――――――――――――――――――――――――――――――――――――
🔷 WHAT IT MEASURES
🔸 Confirmed swing pivots, clustered into zones and merged as new evidence accumulates
🔸 Eight properties of every ARRIVAL at a zone — approach speed, relative volume, prior test count, zone age, trend pressure, zone width, pivot count, and cumulative touches
🔸 A broken level isn't discarded — it flips role once (broken support becomes candidate resistance) and only a second failure retires it
🔸 A live Previous Day/Week High/Low reference map, shown only when price is within range
――――――――――――――――――――――――――――――――――――――
🔷 THE CLASSIFIER
🔸 An online Gaussian Naive Bayes model, trained continuously as tests resolve — no repainting, no lookahead
🔸 Nothing about a level's price is used as a feature — only how price approached it
🔸 The classic claim that "a level tested repeatedly grows weaker" is measured on each chart's own history here, rather than assumed
🔸 Below a configurable warmup sample count, the script shows the chart's running hold rate instead and reads LEARNING — it never guesses early
――――――――――――――――――――――――――――――――――――――
🔷 SIGNALS AND DISPLAY
🔸 Zone boxes colored by role (support/resistance) and shaded by live conviction, with worded verdicts ("similar arrivals held X%") instead of a bare number
🔸 Rank-based visibility — only the nearest zones to current price are drawn, so old or distant levels never stretch the chart's scale
🔸 Test history ticks stamped inside each zone at the bar where its own tests resolved
🔸 An info table with Nearest Support/Resistance, model accuracy, and sample counts
🔸 3 alertconditions, worded as observations of what the classifier's reading — never as trade instructions
――――――――――――――――――――――――――――――――――――――
🔷 INPUTS
Pivot Left/Right Bars — swing detection window. Default 10/10.
Zone Width / Merge Distance — band thickness and clustering tolerance, in ATR. Default 0.5 / 0.75.
Break Buffer / Rejection Distance — how far price must close beyond or travel back from a zone to resolve a test. Default 0.25 / 0.75 ATR.
Post-Flip Cooldown — bars a flipped zone must survive before a break can retire it. Default 5.
Warmup Samples — resolved tests required before the classifier is trusted. Default 25.
Conviction Threshold — probability at which a zone is shown at full conviction. Default 0.62.
Max Live Zones / Show Distance — how many nearby zones are drawn and how far (in ATR) before one is hidden.
Show Trend EMA, Zen Mode — display toggles; Zen Mode hides labels and the table for clean screenshots.
――――――――――――――――――――――――――――――――――――――
🔷 REQUIREMENTS AND LIMITATIONS
🔸 Pivots confirm only after the right-side lookback bars close — a level appears on the chart later than the swing that created it, by design
🔸 One thing does refine retroactively: when a later pivot merges into an existing zone, its band re-centers toward the weighted average — a zone with an open test is never re-centered, so no in-progress outcome is affected
🔸 Early on a fresh chart, or for a zone with only one or two tests, its own read is thin — the model's overall sample count travels with every verdict so that's never hidden
🔸 This script reports how historical arrivals resolved. It does not predict, and it is not a trading system on its own.
――――――――――――――――――――――――――――――――――――――
Built in Pine Script v6. Open source — Mozilla Public License 2.0. Gösterge

Fan Principle Signals [MarkitTick]💡 Maps out market structure using a sequence of ascending swing lows (or descending swing highs) to construct a three-legged trendline fan, then triggers actionable trade signals the moment price breaks through the steepest line in that fan. Rather than relying on a single moving average or oscillator crossover, this script builds its bias from the actual geometry of recent price swings, giving traders a structural, visually intuitive way to time entries around the exhaustion of a trend.
✨ Originality and Utility
Most breakout tools react to a single reference line, such as a moving average, a fixed channel, or a static trendline drawn from only two points. This script instead applies the fan principle, a technique that connects a common origin point to three successive pivots in the same trend, producing three lines of increasing steepness. The logic behind this approach is that the third and steepest line in the fan typically represents the most aggressive rate of trend continuation, and a decisive close beyond it has historically signaled that the prevailing trend has lost its structural support.
What makes this implementation useful in practice is that it does not stop at drawing the fan. It automatically identifies valid pivot sequences from raw price action, filters out insignificant micro-swings using a minimum leg percentage threshold, validates the freshness of the structure with a lookback cap, and then converts the break event into a complete trade plan, including entry, stop-loss, and three take-profit levels, all derived mathematically from the fan's own geometry and the market's current volatility. The optional volume and higher-timeframe filters allow traders to demand additional confirmation before a signal is accepted, and the built-in dashboard keeps the entire state of the system visible at a glance. The combination of automated structural fan detection, ATR-adaptive risk placement, and live trade monitoring is what distinguishes this from a simple trendline break script.
🔬 Methodology and Concepts
• Pivot Detection
The script continuously scans for swing highs and swing lows using a symmetrical lookback and lookforward window defined by the Pivot Len input. A bar qualifies as a swing high only if it is strictly greater than every other bar within that window on both sides, and a swing low only if it is strictly lower than every bar in that window. Each time a new pivot is confirmed, its bar index and price are stored in a rolling array, keeping the most recent twenty pivots in memory for both highs and lows.
• Fan Construction
Once at least four pivot lows (for an uptrend fan) or four pivot highs (for a downtrend fan) are available, the script selects the four most recent ones. The oldest of the four becomes the fan's origin point. The remaining three form Leg 1, Leg 2, and Leg 3 respectively, each connected back to that same origin. A slope is then calculated for each leg using simple rise-over-run between the origin and that leg's pivot. For the fan to be accepted, the price move between the origin and the first leg must exceed the Min Leg % threshold, which filters out fans built from statistically insignificant noise, and the origin must fall within the Max Fan Lookback window, which prevents the script from anchoring to structure that is too old to remain relevant.
• The Break Condition
Leg 3, the line connecting the origin to the most recent and steepest pivot, is treated as the trigger line. Its price value is projected forward on every bar using the slope calculated at formation. A bullish break requires the fan to currently be in an uptrend orientation, the previous confirmed bar's close to be above the projected Leg 3 value, and the bar before that to have closed at or below it, meaning the break itself happens on a confirmed, completed bar rather than an in-progress one. The bearish break condition mirrors this logic in the opposite direction for downtrend fans. This confirmed-close approach means the script never fires or removes a signal based on an incomplete, still-forming bar, so historical signals will not disappear or move once printed.
• Optional Confirmation Filters
Two independent filters can be layered on top of the raw break condition. The volume filter requires the breaking bar's volume to exceed a multiple of its recent moving average, screening out breaks that occur on unusually thin participation. The higher-timeframe filter compares the breakout bar's close against the prior, fully closed bar on a higher timeframe of your choosing, requiring the breakout direction to align with that broader trend context before a signal is allowed to fire.
• Trade Level Calculation
When a break is confirmed, the script builds an entry, stop, and three take-profit levels automatically. Entry is anchored to the close of the breakout bar. The stop-loss is placed beyond the nearest of the two most recent fan legs, offset further by a small ATR buffer to avoid being clipped by minor wicks, but it is also capped by a maximum ATR distance so a single outlier swing cannot produce an oversized stop. The distance between entry and stop becomes the base risk unit, and the three take-profit levels are placed at user-defined multiples of that risk unit, giving a consistent, R-multiple-based framework for managing the position rather than arbitrary fixed-price targets.
🎨 Visual Guide
Dotted lines connecting the origin point to Leg 1 and Leg 2 show the earlier, less steep sections of the fan structure and provide visual context for how the trend developed.
The solid, extended line represents Leg 3, the active trigger line. It is colored using the Bull Fan color when the fan is in an uptrend orientation and the Bear Fan color when it is in a downtrend orientation, and it projects forward in real time as new bars form.
A blue dashed line marks the Entry level once a signal fires, extending to the right for as many bars as the trade remains active or until a new signal replaces it.
A red solid line marks the Stop-Loss level, with a light red shaded zone (the Risk Fill) drawn between the entry and stop lines to make the risk portion of the trade immediately visible.
Three dashed lines in progressively deeper shades of teal mark Take-Profit 1, 2, and 3, moving from lightest (TP1, closest to entry) to fully opaque (TP3, furthest away). A light teal shaded zone (the Reward Fill) spans from the entry line to the TP3 line, visually contrasting the reward portion of the trade against the risk portion.
Small labels are anchored to each of these lines on the left, displaying the exact price of the Stop, Entry, and each Take-Profit level, and updating their horizontal position as the trade progresses.
An upward-pointing "▲ BUY" label appears below the breakout bar on a bullish break, and a downward-pointing "▼ SELL" label appears above the breakout bar on a bearish break.
An optional on-chart dashboard table displays the ticker and timeframe, whether the Lock Signal feature is active, the current fan orientation, the origin price, the live value of the Leg 3 trigger line, the current entry, stop, a live risk-to-reward progress bar showing how far price has travelled toward TP3 relative to the initial risk, the volume filter status, and the number of bars elapsed since the last signal.
📖 How to Use
A signal is generated only when price decisively closes beyond the Leg 3 trigger line of an established fan, so treat the fan's orientation, shown both by the line color and by the Fan State readout on the dashboard, as the prevailing structural bias before a break occurs. When a bullish break prints, the suggested plan is to consider a long entry near the displayed Entry line, with the Stop-Loss line defining the invalidation point below and the three Take-Profit lines offering staged exit levels as the move develops. A bearish break mirrors this in the opposite direction for short setups.
The R:R Progress bar on the dashboard is useful for monitoring an active trade at a glance: it fills from 0% toward 100% as price advances from entry toward the TP3 target, and its color shifts from red through amber to teal as the trade's risk-to-reward ratio improves. If the Lock Signal option is enabled, the script freezes the most recently confirmed signal and its levels in place rather than allowing a new one to overwrite them, which can help when you want to manage an open position without the on-chart levels shifting. Because signals are confirmed only on closed bars, always wait for bar close before acting on a fresh line break rather than reacting to an in-progress wick.
Enabling the optional Volume and HTF filters will typically reduce signal frequency while raising the bar for confirmation, so consider testing both configurations to see which better matches the behavior of the instrument and timeframe you trade.
⚙️ Inputs and Settings
Pivot Len — Controls how many bars on each side must confirm a swing high or low. Smaller values detect pivots faster but produce noisier, more frequent fan structures; larger values produce fewer but more structurally significant pivots.
Max Fan Lookback — The maximum age, in bars, that a fan's origin point can have and still be considered valid. Lowering this keeps the script focused on recent structure only.
Min Leg % — The minimum percentage price move required between the origin and the first leg for a fan to be accepted, filtering out fans built on insignificant price movement.
Use Vol Filt / Vol Avg Len / Vol Mult — Enables a volume confirmation requirement, comparing current volume against its moving average over the specified length, multiplied by the chosen factor.
Use HTF Filt / HTF — Enables a higher-timeframe trend alignment requirement, comparing the breakout close against the prior confirmed close on the chosen higher timeframe.
SL ATR Buf — The ATR-based buffer added beyond the nearest fan leg when placing the stop-loss, giving the stop room to avoid minor wick noise.
SL Max ATR — A ceiling, expressed in ATR multiples, on how far the stop-loss can be placed from entry, preventing outsized stops on unusually wide fans.
ATR Len — The lookback length used for the ATR calculation that feeds both the stop buffer and the stop cap.
TP1 R / TP2 R / TP3 R — The risk-multiple distances used to place the three take-profit levels relative to the initial risk unit between entry and stop.
Lock Signal — Freezes the current signal and its associated levels in place, preventing a new signal from overwriting them until manually disabled.
Show Fan Lines / Show Trade Levels / Show Labels — Independently toggle the visibility of the fan structure lines, the entry/stop/TP levels, and their accompanying price labels.
Show Dash / Dash Pos — Toggle the on-chart dashboard and choose which corner of the chart it is anchored to.
A full set of color inputs is available to customize the fan lines, trade level lines, fill zones, signal labels, and dashboard appearance to match your own chart theme.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The fan principle applied here descends from classical technical analysis literature on trendline construction, most notably the Gann fan and Andrews' Pitchfork family of tools, which share the premise that connecting a structural origin point to successive swing extremes produces a family of trendlines whose slopes carry predictive meaning about the trend's rate of change. Where this script departs from those older, largely manual techniques is in how the origin and legs are selected: rather than relying on the analyst's subjective choice of anchor points, pivot selection here is fully algorithmic, using a symmetric local-extremum test to ensure each point used is objectively the highest or lowest price within its surrounding window.
The core statistical assumption underlying any trendline-break system is that price trends exhibit a degree of serial correlation, meaning that the rate of ascent or descent between swing points tends to persist for some period before mean-reverting or reversing, and that a violation of the most recent, steepest rate of change is informative about a shift in that underlying process. This is conceptually related to the broader family of change-point detection methods used in time-series analysis, where a structural break in a fitted trend line is used as a signal that the data-generating process has shifted regime. The ATR-based position sizing layered on top draws from the well-established use of Average True Range as a volatility-normalized unit of risk, a concept popularized in behavioral and quantitative trading literature as a way of scaling stop and target distances to the instrument's own recent volatility rather than using arbitrary fixed-point distances, which do not generalize across different assets or market conditions.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Gösterge

Major Historical S&R ZonesMajor Historical Support & Resistance Zones
Major Historical Support & Resistance Zones is designed to objectively identify and rank the most significant historical support and resistance areas on any market or timeframe. Rather than relying on manually drawn horizontal lines, the indicator automatically analyses historical price action, groups significant reactions into zones, and scores each zone based on its historical importance.
The indicator looks for meaningful pivot highs and lows, measures the strength of the subsequent price reaction using ATR (Average True Range), evaluates rejection quality through wick analysis, and clusters nearby reactions into a single support or resistance zone. When multiple significant reactions occur around the same price level, the zone becomes stronger and receives a higher score.
Unlike traditional support and resistance indicators that simply draw every swing high and low, this indicator attempts to filter out market noise and highlight only the price areas that have repeatedly influenced market direction.
Features
* Automatically detects major historical support and resistance zones.
* Clusters multiple historical reactions into a single zone.
* Scores each zone based on reaction quality and historical significance.
* Counts the number of independent reactions ("Hits") at each level.
* Identifies Support/Resistance Flip zones where price has historically acted as both support and resistance.
* Adjustable ATR sensitivity and clustering distance.
* Built-in colour and scoring guide that can be enabled or disabled from the settings.
Colour Guide
🟩 Green Zone
* Price is currently above the zone.
* The zone is acting as historical support.
🟥 Red Zone
* Price is currently below the zone.
* The zone is acting as historical resistance.
🟨 Orange Zone
* Price is currently trading inside the historical zone.
* This represents a decision area where the market is testing historical support or resistance.
Understanding the Score
Each zone receives a strength score based on:
* Size of the historical reaction.
* Quality of price rejection (wick analysis).
* Number of independent reactions.
* Support/Resistance Flip bonus.
General interpretation:
* 0–3 = Weak
* 3–5 = Minor
* 5–7 = Good
* 7–10 = Strong
* 10–15 = Very Strong
* 15+ = Exceptional
Higher scores indicate areas where price has historically shown stronger reactions.
Understanding Hits
Hits represent the number of separate significant reactions that occurred within the zone.
General guide:
* 1 = Single historical reaction
* 2 = Confirmed level
* 3 = Strong level
* 4–5 = Very strong level
* 6+ = Major historical level
More hits generally indicate greater historical recognition of that price area.
S/R Flip
When a zone displays S/R Flip, it means that the same price area has historically acted as both:
* Support
* Resistance
These zones often represent some of the strongest historical price levels because market participants have repeatedly recognised them from both directions.
Suggested Workflow
For the best results:
1. Open the Weekly chart to identify the strongest long-term support and resistance zones.
2. Switch to the Daily chart to refine those major levels.
3. Use the 4H, 8H, or 12H chart for additional precision.
4. Execute trades using your preferred lower timeframe confirmation.
This top-down approach helps maintain focus on the most significant historical levels before refining entries.
Inputs
The indicator provides several adjustable settings:
* Pivot Strength – Controls how significant a swing must be before it is considered.
* ATR Length – Used to normalise reaction size across different markets.
* Minimum Reaction ATR – Filters out weak reactions.
* Cluster Distance ATR – Controls how close reactions must be before they are grouped together.
* Zone Width ATR – Determines the thickness of each support/resistance zone.
* Minimum Hits – Minimum number of reactions required before displaying a zone.
* Minimum Score – Minimum strength score required before displaying a zone.
* Display Options – Toggle labels and the built-in legend on or off.
Best Practices
This indicator is designed to identify historically important price zones, not generate buy or sell signals.
The strongest trading opportunities often occur when:
* High-scoring zones align with your own market structure analysis.
* Higher timeframe zones overlap with lower timeframe confirmations.
* Price shows clear rejection or acceptance at the identified historical levels.
As with all technical analysis tools, this indicator should be used alongside sound risk management and your broader trading methodology rather than in isolation.
Gösterge

Institutional Flow MatrixInstitutional Flow Matrix is an open-source market-analysis framework designed to organize trend direction, confirmed market structure, institutional price zones, momentum, and location within a dealing range into one readable chart.
The purpose of this indicator is not to predict every price movement or generate constant entries. It is designed to answer a more practical sequence of questions:
1. What is the current directional bias?
2. Is market structure supporting that direction?
3. Is price trading from a meaningful location?
4. Has price returned to an active institutional zone?
5. Is momentum aligned with the proposed setup?
The script combines these questions into a structured workflow while keeping the default chart intentionally clean.
WHY THIS INDICATOR WAS BUILT
Many market-structure indicators display every swing, imbalance, liquidity level, zone, and signal at the same time. While that information can be useful for detailed analysis, it can also make the chart difficult to interpret during live trading.
Institutional Flow Matrix was built around a visual hierarchy:
* Directional bias is the primary layer.
* Active Order Blocks are the principal reaction zones.
* Momentum is a confirmation layer.
* Premium and Discount provide market location.
* Fair Value Gaps, liquidity pools, sweeps, and higher-timeframe levels are optional study tools.
The default Balanced preset focuses on the information most relevant to a directional pullback setup. Minimal mode removes most supporting visuals for live execution. Full mode reveals the additional market-structure tools for deeper analysis.
WHAT MAKES THE IMPLEMENTATION DIFFERENT
The individual concepts used by this script, including pivots, moving averages, ATR trend filters, Order Blocks, Fair Value Gaps, and Premium/Discount ranges, are established forms of technical analysis.
The original contribution of Institutional Flow Matrix is how those components are synchronized and managed as one decision framework.
Key design elements include:
* Confirmed structure events rather than unconfirmed swing guesses.
* A persistent directional state requiring agreement between structure, EMA alignment, and an ATR-based trend filter.
* Order Block freshness validation before a zone is accepted.
* Separate visual duration and analytical lifetime controls for zones.
* Automatic mitigation and expiration of old zones.
* Limited drawing-object counts to prevent long-term chart clutter.
* A weighted confluence model centered on trend, structure, zone interaction, market location, and momentum.
* Three visual presets that change the information hierarchy without changing the underlying calculations.
* Confirmed-bar signals and event-based alerts.
This is not intended to be a collection of unrelated indicators. Each module has a defined role in the same setup process.
DIRECTIONAL BIAS
The chart background represents the script's confirmed directional state.
A bullish state requires agreement between:
* Bullish market structure.
* Fast EMA positioning above the slow EMA.
* Bullish ATR trend conditions.
A bearish state uses the opposite conditions.
The background changes only after the required conditions are confirmed. A larger BUY or SELL label marks a confirmed change in this directional state.
These shift labels are different from the smaller confluence signals. A shift label identifies a change in directional bias. A confluence signal requires additional location, zone, and momentum conditions.
MARKET STRUCTURE
Confirmed pivot highs and lows form the structure engine.
The script tracks:
* Higher Highs
* Higher Lows
* Lower Highs
* Lower Lows
* Breaks of Structure
* Changes of Character
A bullish break occurs when a confirmed bar closes above the latest unbroken confirmed swing high. A bearish break occurs when a confirmed bar closes below the latest unbroken confirmed swing low.
Swing labels are retrospective by design. A pivot can only be confirmed after the selected number of right-side bars has closed. Once confirmed, its label is placed on the candle where the swing originally occurred. The label was not known on that earlier candle.
ORDER BLOCKS
Order Blocks are the primary reaction zones in the indicator.
After a confirmed structure break or qualifying displacement event, the script searches backward for an opposing candle. A candidate candle can be filtered by:
* Candle range relative to ATR.
* Body size as a percentage of candle range.
* Optional volume expansion.
* Wick-based or body-based zone construction.
Before accepting the candidate, the script checks whether price has already invalidated it. This prevents many stale zones from being created after the fact.
Active Order Blocks can be invalidated by either:
* A close beyond the opposite edge.
* A wick beyond the opposite edge.
The selected mitigation method is used consistently during both zone creation and live zone management.
Order Blocks have separate controls for visual extension and analytical age. This allows users to control how long a box remains visible independently from how long it remains eligible for signal calculations.
PREMIUM, DISCOUNT, AND EQUILIBRIUM
The script creates a rolling dealing range from the highest high and lowest low over the selected lookback.
The range is divided into:
* Premium: the upper portion of the range.
* Discount: the lower portion of the range.
* Equilibrium: the 50% midpoint.
Premium and Discount do not generate trades by themselves. They provide location.
In general:
* Bullish setups receive stronger contextual support in Discount.
* Bearish setups receive stronger contextual support in Premium.
* Equilibrium represents the midpoint of the current rolling range.
Because the range is rolling, its boundaries can change when a new lookback high or low is formed.
MOMENTUM RIBBON
The momentum module uses three exponential moving averages and an ATR-normalized difference between the fast and slow averages.
Bullish momentum requires:
* Fast EMA above the slow EMA.
* Positive normalized momentum.
* Momentum above its signal average.
Bearish momentum uses the opposite conditions.
Diamond markers identify confirmed momentum crossings. The ribbon is intended as confirmation rather than a standalone entry system.
CONFLUENCE SIGNALS
The script calculates a 0-100 Confluence Score from five conditions:
* Directional bias: 25 points.
* Market structure: 15 points.
* Momentum alignment: 15 points.
* Active Order Block interaction: 25 points.
* Premium or Discount location: 20 points.
The score measures condition alignment. It is not a probability, win rate, accuracy estimate, or forecast of future performance.
By default, BUY and SELL signals require:
* Confirmed directional bias.
* Matching confirmed structure.
* Interaction with an active Order Block.
* Correct Premium or Discount location.
* Matching momentum.
* Minimum Confluence Score.
* Completion of the selected signal cooldown.
Signals are displayed only when the complete condition changes from false to true. This prevents repeated labels while the same setup remains active.
OPTIONAL ADVANCED MODULES
Full mode provides additional analytical tools:
* Fair Value Gaps with ATR size filtering.
* Equal-high and equal-low liquidity pools.
* Confirmed liquidity sweeps.
* BOS and CHoCH labels.
* HH, HL, LH, and LL labels.
* Previous day, week, and month highs and lows.
* Optional momentum candle coloring.
These features are disabled or hidden from the default Balanced view to preserve readability.
VISUAL PRESETS
Minimal:
Designed for traders who want the least chart interference. It suppresses the background, ribbon, Premium/Discount display, trailing line, dashboard, and advanced structure annotations.
Balanced:
The default view. It emphasizes directional background, active Order Blocks, Premium/Discount context, momentum ribbon, diamonds, signals, and the dashboard.
Full:
Designed for detailed study. It adds structure labels, BOS/CHoCH events, Fair Value Gaps, liquidity tools, higher-timeframe levels, and optional candle coloring.
FOR NEWER TRADERS
A simple workflow is:
1. Start with the Balanced preset.
2. Use the background to identify the current directional bias.
3. Wait for price to return to an Order Block matching that bias.
4. Check whether price is in Discount for a bullish setup or Premium for a bearish setup.
5. Confirm that the momentum ribbon agrees.
6. Treat the signal as a point for further analysis, not an automatic order.
The equilibrium line can be used as a reference for the midpoint of the current dealing range. It is not automatically an entry or exit instruction.
FOR ADVANCED TRADERS
Experienced users can customize:
* Pivot confirmation sensitivity.
* ATR and EMA trend parameters.
* Wick-based versus body-based Order Blocks.
* Displacement-created zones.
* Candle body, range, and volume filters.
* Close-based versus wick-based mitigation.
* Zone visual duration and analytical age.
* Premium and Discount percentages.
* Fair Value Gap size.
* Liquidity sensitivity.
* Momentum lengths.
* Individual signal requirements.
* Minimum confluence threshold.
* Signal cooldown.
* Higher-timeframe reference levels.
Advanced users can also disable individual hard requirements and use the Confluence Score as a more flexible filtering system.
ALERTS
Alert conditions are included for:
* Break of Structure.
* Change of Character.
* New Order Block.
* BUY signal.
* SELL signal.
* Bias-aligned Order Block entry.
* Trend and momentum confluence.
* Liquidity sweep.
Alerts should be created using Once Per Bar Close when confirmed signals are required.
NON-REPAINTING AND TIMING
Structure breaks, directional shifts, zone creation, zone mitigation, momentum events, and confluence signals are evaluated on confirmed bars.
Pivot-based swing labels require future bars to confirm that a swing occurred. After confirmation, the label is displayed on the original pivot candle. This is delayed confirmation with retrospective placement, not advance knowledge of the swing.
Previous-period levels use completed higher-timeframe data.
LIMITATIONS
* This indicator does not predict future prices.
* It does not calculate position size, stop loss, or account risk.
* It is not a complete automated trading system.
* Signals can fail during volatile, illiquid, or range-bound conditions.
* Rolling Premium, Discount, and equilibrium levels can move when the lookback range changes.
* Confirmed pivots introduce an intentional delay.
* Order Block definitions vary among trading methodologies; this script uses the documented candle-search and filtering rules described above.
* Volume behavior differs across asset classes and data providers.
* Parameter settings that work on one symbol or timeframe may not be appropriate for another.
Suggested starting points are the 15-minute and 1-hour charts for intraday analysis and the 4-hour chart for broader swing structure. Users should test settings on their own symbols and trading sessions.
OPEN-SOURCE PURPOSE
The script is published open-source so traders can inspect the calculations, understand why signals occur, verify the confirmed-bar methodology, and adapt the framework for their own research.
The goal is to provide a readable and transparent market-structure workflow rather than a black-box prediction tool.
DISCLAIMER
This indicator is provided for educational and analytical purposes only. It is not financial advice and does not guarantee profitable results. Historical chart behavior does not ensure future performance. Users are responsible for their own analysis, testing, risk management, and trading decisions.
Gösterge

Adaptive Trend Rails [NICK789]Adaptive Trend Rails
OVERVIEW
Adaptive Trend Rails is a market-structure and break-and-retest framework built around one shared price channel. It is designed to answer four practical questions:
1. Which direction currently controls the chart?
2. What exact price level would confirm continuation or a trend change?
3. Is pressure building against the active trend before that change is confirmed?
4. Has price completed a valid breakout, retest and rejection sequence that can be turned into a structured trade plan?
This is not a collection of unrelated indicators placed on the same chart. The rail engine is the foundation of the script, and every additional component—equilibrium, reversal pressure, trend-change quality, multi-timeframe context and the break-and-retest plan—uses information derived from that same structure.
CORE RAIL ENGINE
The script builds an upper and lower rail from the highest high and lowest low of an adaptive lookback. The lookback changes according to the chart timeframe, while the user-selected Narrow, Medium or Wide setting adjusts how quickly the rails react.
A bullish break occurs when price crosses above the previous upper rail. A bearish break occurs when price crosses below the previous lower rail.
The script then classifies each break according to the existing trend state:
• A break in the current direction is treated as continuation.
• A break against the current direction is treated as a trend change.
Because the decision level is taken from the previous rail value rather than the rail currently expanding with price, users can see the actual level that must be crossed. The live “Continue?” and “Trend Change?” guides therefore act as decision levels, not predicted targets.
ADAPTIVE EQUILIBRIUM
The centre line is not a simple midpoint or fixed moving average.
First, the script measures where price is positioned between the active upper and lower rails. That normalized position is then smoothed using EMA and volume-weighted information, with a WMA fallback when volume-weighted data is unavailable. The accepted position is shifted toward the centre and constrained so the equilibrium cannot sit directly on the outer rails.
The resulting line represents an adaptive accepted-value area inside the current structure.
Equilibrium is used throughout the script:
• Its slope helps determine whether internal momentum is rising or falling.
• Its curl helps identify a possible change in pressure.
• Retest plans require price to remain on the correct side of equilibrium.
• Optional entry filtering can require equilibrium to slope in the proposed trade direction.
• A pending retest is cancelled when price loses the required equilibrium relationship.
For this reason, equilibrium is part of the calculation engine and not merely a decorative average.
REVERSAL-PRESSURE WARNINGS
The yellow reversal dots are early warnings, not reversal signals.
While a trend is active, the script measures opposing pressure using a weighted combination of:
• Candle closing location
• Upper or lower wick rejection
• Directional candle-body strength
• Relative volume participation
• Relative candle-range expansion
• Equilibrium slope or curl
• Price location within the rail structure
A bearish warning is only considered while the rail trend is bullish and price is positioned in the upper portion of the structure. A bullish warning is only considered while the rail trend is bearish and price is positioned in the lower portion.
The warning means pressure is building against the current trend. It does not change the trend by itself. Price must still close through the displayed Trend Change level before the rail state is considered reversed.
A cooldown is applied to prevent repeated warning dots from being printed on every nearby candle.
TREND-CHANGE QUALITY
When a confirmed trend change occurs, the script assigns a compact quality reading based on the breakout candle.
The score combines:
• Relative volume
• Relative candle range
• Directional body strength
• Closing location in the breakout direction
The resulting label is shown as Weak, Moderate, Good or Strong.
The tooltip also describes the character of the breakout, such as Clean Break, Expansion, Absorption, Weak Close or Low Participation. This is intended to provide context, not to guarantee that a strong-rated break will continue.
MULTI-TIMEFRAME CONTEXT
The horizontal trend strip rebuilds the same rail-state method across nine timeframes:
1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 1 day and 1 week.
This is important because the table is not mixing unrelated moving-average or oscillator definitions. Every timeframe is evaluated with the same upper-rail/lower-rail breakout method used on the chart.
The script also assigns a practical paired timeframe to the active chart—for example, a 1-minute chart is paired with 5 minutes, a 5-minute chart with 15 minutes, and a 15-minute chart with 1 hour.
Paired-timeframe information is warning-only. It does not silently block, delay or change an entry. When a plan triggers against the paired rail trend, the table and dedicated alert identify that conflict so the trader can make the final decision.
BREAK-AND-RETEST PLAN
The optional trade-plan engine does not enter immediately when a rail breaks.
Its sequence is:
1. Price closes through a continuation or trend-change level.
2. The exact broken rail level is stored.
3. Price must return on a later candle and touch or sweep that level.
4. The candle must reject the level and close back through it in the breakout direction.
5. Price must remain on the correct side of equilibrium.
6. Optional filters check equilibrium slope and whether the rail structure is wide enough relative to the configured stop distance.
All confirmed setups are labelled simply as “RETEST” to avoid implying that one setup carries a guaranteed grade or outcome. The tooltip still identifies whether the retest followed a Trend Change or a Continuation break.
The user may enable both setup types or restrict the engine to trend changes, continuations, longs or shorts.
Pending setups expire after the selected number of bars. They are also cancelled when the rail trend changes or price invalidates the required equilibrium relationship. This prevents an old breakout level from remaining armed after its original context has disappeared.
RISK AND PLAN DISPLAY
When a retest entry is confirmed, the script can display:
• Entry level
• ATR-adaptive or fixed-tick stop
• Reward/risk or fixed-tick target
• Active-plan direction
• Target-hit or stop-hit result
The default ATR Adaptive method scales the stop to current volatility and calculates the target from the selected reward/risk ratio. This makes the plan transferable across forex, metals, crypto, stocks and futures even when their price increments differ. A Fixed Ticks mode remains available for traders who intentionally use exchange tick distances on instruments such as futures. All values remain examples and must be adjusted for the instrument, timeframe and personal risk limits.
The tool is an indicator, not an automated strategy. It does not calculate position size, brokerage fees, commissions, spread or slippage, and it does not place orders.
HISTORICAL REVIEW
Historical plans and review statistics are optional and disabled by default.
The review panel counts completed target and stop outcomes visible in the loaded chart data and reports the net result in R-multiples. Replaced plans are excluded. If both the target and stop are touched within the same ordinary chart candle, the script records the stop first because the true intrabar sequence cannot be known from standard OHLC data.
Win rate is hidden until a minimum sample is available. These statistics are intended for chart review and configuration comparison only. They are not a full strategy backtest and should not be presented as expected future performance.
HOW TO USE
A simple workflow is:
1. Select Narrow, Medium or Wide rails according to the desired reaction speed.
2. Read the active rail colour to identify the current structural direction.
3. Use the Continue and Trend Change levels as the prices that would confirm the next structural event.
4. Treat reversal dots as preparation warnings only.
5. Use the quality label to inspect the participation and candle character of a confirmed trend change.
6. Check the multi-timeframe strip for broader alignment or conflict.
7. Enable the Break & Retest Plan when structured retest signals, ATR-adaptive or fixed-tick levels and review tools are required.
8. Adjust stop and target ticks for the traded symbol rather than assuming the defaults fit every market.
DEFAULT DISPLAY
The default view focuses on the rails, adaptive equilibrium, live decision levels, trend-change quality and multi-timeframe context.
Candle colouring, the trade-plan engine, historical plans and review statistics are optional so users can keep the chart clean and enable only the tools relevant to their workflow.
ALERTS
Alerts are provided for:
• Bullish and bearish continuation
• Bullish and bearish trend change
• Bullish and bearish reversal pressure
• Long and short break-and-retest entries
• Entries against the paired timeframe
• Replacement of an unresolved plan by an opposite valid setup
• Target hit
• Stop hit
Confirmed continuation, trend-change and retest-entry alerts are intended for candle-close use. Reversal-pressure warnings are intentionally earlier and should always be treated as unconfirmed until the relevant Trend Change level is closed through.
LIMITATIONS
Adaptive Trend Rails is a structure and planning tool, not a prediction engine.
Rail breaks can fail, strong breakout candles can reverse, and multi-timeframe alignment does not guarantee continuation. ATR-based distances expand and contract with recent volatility, while fixed-tick distances behave differently across instruments and feeds. Historical review results are displayed in R-multiples and depend on the loaded chart, selected settings and available OHLC data.
Users should combine the tool with their own risk management, market-session awareness and execution rules.
ORIGINAL CONTRIBUTION
The original purpose of this script is to turn one adaptive rail structure into a complete decision sequence:
current trend → live confirmation level → opposing-pressure warning → confirmed structural break → quality context → multi-timeframe comparison → delayed retest validation → risk-plan display → optional historical review.
Each component exists to explain or validate another part of that sequence. The script is therefore designed as one integrated framework rather than a mashup of independent indicators. Gösterge

NIMBUS [ThrowMaster]NIMBUS — Ichimoku, Reimagined
Classic Ichimoku is brilliant at one question: "Where is the market right now — above, below, or inside equilibrium?" It is far weaker at a second question every trader actually asks: "What is the market about to do?" NIMBUS keeps the timeless Ichimoku framework intact and adds three dimensions built to close that gap — while staying, above all, honest about what it is: a context compass, not a signal service.
━━━━━━━━━━━━━━━━━━━━━━━━
WHAT NIMBUS ADDS
━━━━━━━━━━━━━━━━━━━━━━━━
⭐ Kumo Calendar — Twist Countdown
Here is a fact most traders overlook: the cloud in front of price is already fully drawn. It is built entirely from bars that have ALREADY closed, then shifted forward. That means the next Kumo twist — the moment Senkou Span A and B swap places — is knowable in advance. NIMBUS scans the forward cloud and counts the exact number of bars until that twist reaches price, and warns you when a thin (weak-support) section is approaching. Ichimoku's most-criticised trait, its lag, becomes a schedule you can read ahead of time.
🩵 Breath — Volume-Reactive Cloud
A traditional cloud shows only price geometry; two identical-looking clouds can hide wildly different conviction. NIMBUS makes the cloud breathe: it grows more solid on high-participation bars and fainter on quiet ones, using a rolling volume percentile. Strength becomes something you feel at a glance, not something you have to calculate. (If a symbol reports no volume, the cloud simply falls back to a fixed opacity — no errors, no false readings.)
🎯 Tenkan / Kijun Cross Clarity
The Tenkan–Kijun cross is one of Ichimoku's core events, yet on most charts it hides in a tangle of lines. NIMBUS marks it precisely: a teal circle at the exact price and bar of a bullish cross, coral for bearish. No hunting, no guessing.
◈ Alignment Hints
When four independent Ichimoku dimensions agree — price vs cloud, Tenkan vs Kijun, cloud colour, and the lagging read — AND price reclaims or loses the cloud on a confirmed bar, NIMBUS prints a small diamond. Think of it as a puzzle-game hint: a nudge to look at the right place at the right time. It is deliberately NOT a buy or sell command, and it never gives a target.
━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━━━
NIMBUS uses the standard Ichimoku engine — Tenkan (9), Kijun (26), Senkou Span A/B, and the lagging span, all fully adjustable. "Price vs cloud" always compares price to the cloud value formed 25 bars ago — the cloud actually sitting beneath price — so the reading reflects real, settled structure. The Breath layer reads a 100-bar volume percentile. The Twist Countdown walks the already-shifted forward cloud bar by bar. The dashboard summarises everything in one compact, theme-aware panel with a mobile Compact Mode.
━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━
• Read the cloud for trend context: above = bullish structure, below = bearish, inside = balance/chop.
• Watch the Twist Countdown to anticipate when the cloud's support/resistance character is about to flip — useful for planning, not for firing blind.
• Let Breath tell you whether a move carries participation or is running on fumes.
• Treat Hints as a reason to zoom in and do your own analysis, never as an instruction.
• Combine with your own risk management. NIMBUS describes context; your plan decides the trade.
━━━━━━━━━━━━━━━━━━━━━━━━
ON REPAINTING (honest)
━━━━━━━━━━━━━━━━━━━━━━━━
Once a bar closes, every Tenkan/Kijun/Span value is fixed and never redrawn. Hints and cross circles are all confirmed on bar close, so a printed mark cannot later disappear. The forward cloud is built only from closed bars, so it is fixed the moment it appears. Like all Ichimoku tools, values on the CURRENT, still-forming bar update in real time until that bar closes — this is inherent to the framework, not hidden repainting, and it is documented directly in the code comments.
━━━━━━━━━━━━━━━━━━━━━━━━
WHAT MAKES IT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━━━
NIMBUS is not another line pack bolted onto Ichimoku. The Kumo Calendar reframes the forward cloud as a countdown rather than a static shape; Breath encodes participation into the cloud's opacity; and the whole tool is presented as an explicit, self-aware CONTEXT instrument — it tells you what the market is, and refuses to pretend it knows your trade. The code is fully open for you to read, study, and learn from.
━━━━━━━━━━━━━━━━━━━━━━━━
NOTE
━━━━━━━━━━━━━━━━━━━━━━━━
No indicator predicts the future or guarantees results, and NIMBUS makes no such claim. It is a decision-support and context tool. Markets involve risk; always use independent judgement and sound risk management. Not financial advice.
Gösterge

Trendline Architect [Quantum Algo]Trendline Architect
====================================================
🔶 OVERVIEW
Trendline Architect is an automatic trendline indicator that does what most trendline tools skip: it validates every line before drawing it, makes each line earn its status through real touches, grades every breakout by quality, and then automates the break-and-retest sequence that trendline traders normally track by hand. Lines are born as dotted candidates, promoted to solid confirmed trendlines only after the market validates them with a third touch, graded on breakout, kept on a retest watch after they break, and paired into parallel channels automatically — all with a deliberately quiet chart: one-letter signals whose full context lives in hover tooltips.
The problem this script solves is trendline spaghetti and trendline noise. Automatic trendline tools typically draw every pivot-to-pivot connection and alert on every violation. This engine rejects invalid lines at birth, refuses duplicates, caps how many lines can exist per side, silences the breaks of unproven lines by default, and filters weak breakouts by grade — so what remains on the chart is only what the market has actually respected.
🔶 WHAT IS A TRENDLINE BREAK AND RETEST?
A trendline connects successive swing points and acts as dynamic support or resistance while price respects it. A breakout occurs when price closes decisively through the line. The retest is what disciplined traders wait for next: price returning to the broken line from the other side and rejecting — old support acting as new resistance, or old resistance reclaimed as support. That return-and-reject is one of the most traded patterns in classical charting, and this engine detects the entire sequence automatically: validated line, graded break, watch window, confirmed retest.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. Geometric validity at birth. A candidate line is rejected before it is ever drawn if any candle close violated the segment between its two anchor pivots. Lines that were never respected never reach the chart.
2. Touch-earned lifecycle. Every line starts as a dotted, untagged candidate. Each validated touch — a wick into tolerance with a close that respects the line — is counted, and only at the configured touch count is the line promoted: solid, thicker, fully colored, with a live ×N touch tag. The chart itself shows which lines the market obeys.
3. Anti-spaghetti engineering. Duplicate candidates with similar slope and position are refused, each side is capped at a configurable number of active lines with the weakest evicted first, and stale lines expire by age. The chart stays readable on every timeframe.
4. Breakout quality grading. Every breakout is scored from three observable components — volume z-score, penetration depth in Average True Range units, and breakout candle body ratio — into grades A, B, and C. Grade A signals highlight in the accent color.
5. A retest engine. Broken lines are not deleted; they turn into gray watch lines for a configurable window. A return to the broken line with a rejecting close prints the Retest signal — the classic polarity flip, automated.
6. Silence by default, depth on demand. Signals print as single letters — B for breakout, R for retest — with the full context (direction, grade, volume, penetration) in the hover tooltip. Two noise filters ship enabled: breaks of unconfirmed lines retire silently, and breakouts below a minimum grade stay off the chart and out of the alerts.
7. Automatic channel detection. When an active support line and resistance line run parallel within a slope tolerance, the engine fills the channel between them and reports it on the dashboard.
8. A live architecture dashboard. Active support and resistance counts, the nearest line with its distance in Average True Range units, a trend read derived from confirmed line slopes, the last break grade, the retest watch count, and channel status — in a compact, fully themeable panel.
🔶 HOW IT WORKS
Line construction: Confirmed swing pivots anchor every candidate line. Each new pivot is paired with the previous same-side pivot, the segment is checked for historical violations, duplicates are rejected, and side capacity is enforced before the line is created.
Touch validation: A touch counts only when the wick enters the tolerance band around the line and the close still respects it. Touches accumulate on the line's tag; the confirming touch promotes the line and, from that point, validated touches are marked with dots.
Breakouts: A close through the line beyond the buffer triggers the break. Confirmed lines produce graded signals; forming lines retire silently when the default filter is on. The broken line converts to a gray dashed watch line.
Retests: Within the watch window, a return to the broken line with a rejecting close prints R — upward reclaim of broken resistance, or downward rejection at broken support. Watch lines that see no retest expire quietly.
Channels: Active opposite-side lines are compared by slope; the closest parallel pair within tolerance is filled as a channel.
Non-repainting: Pivots require confirmation, and all touches, promotions, breaks, and retests are evaluated on closed bars only. Once printed, nothing moves.
Chart hygiene: Completed lines, touch dots, and signals are all capped by input, keeping the chart clean and the auto-scale anchored to current price.
🔶 HOW TO USE IT
1. Works on any market — cryptocurrency, forex, gold, indices, stocks, futures — and any timeframe. Raise the pivot length for larger structures.
2. Trust the visual hierarchy: dotted lines are candidates, solid lines with ×N tags are market-validated, gray dashed lines are broken and on retest watch.
3. Treat B signals as regime information: grade A breakouts with volume and penetration carry far more weight than the minimum-grade ones, and the grade is one hover away.
4. The R signal is the classic entry location: the broken line has flipped roles and price has confirmed the flip. Stops belong on the far side of the retested line.
5. Use the dashboard's Nearest row to know how far price is from the closest active line in Average True Range units before it gets there.
6. If you want the raw, unfiltered feed, disable the two noise filters in Signals — the engine detects everything either way.
🔶 SETTINGS
- Detection: pivot length, maximum anchor span, active lines per side, line expiry, completed lines to keep.
- Touches, breaks and retests: touch tolerance, touches to confirm, breakout buffer, retest watch window.
- Signals: breakout and retest toggles, confirmed-lines-only filter, minimum breakout grade.
- Channel detection with slope similarity tolerance.
- Full color customization, extension length, touch dots toggle.
- Themeable dashboard: position, four text sizes, title band, background, frame, grid, and three text colors.
🔶 ALERTS
- Trendline Confirmed — a line collected its confirming touch.
- Bullish / Bearish Trendline Breakout — a qualified close through a line, honoring the grade filter.
- Bullish / Bearish Retest Confirmed — a broken line was retested and rejected.
- Parallel Channel Detected — an active support and resistance pair is running as a channel.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? No. Anchors are confirmed pivots and every touch, break, and retest is evaluated at bar close. Pivot confirmation introduces intentional lag equal to the pivot length.
Why do I see so few lines? By design. Between geometric validation, duplicate rejection, side caps, and expiry, only lines with genuine market respect survive. Raise the per-side cap or lower the confirmation count for a busier chart.
What do B and R mean? B is a graded breakout and R is a confirmed retest of the broken line. Hover either label for direction, grade, volume, and penetration details.
Why did a breakout print no signal? Either the line was still unconfirmed while the confirmed-only filter is on, or the break graded below your minimum. The line still changed state; only the signal was filtered.
What makes a grade A breakout? Elevated volume, deep penetration beyond the line in Average True Range terms, and a strong-bodied breakout candle — all three together.
🔶 CREDITS
Trendline analysis, breakout trading, and the break-and-retest pattern are classical charting techniques in the public domain, refined by generations of technicians. This script gratefully acknowledges that shared lineage. The geometric validity engine, touch-earned lifecycle, breakout grading model, retest watch engine, channel detection, noise-filtering architecture, and all code in this script are original work — no third-party or open-source script code was reused.
🔶 LIMITATIONS
Trendlines are geometry, not guarantees: valid lines break and graded breakouts fail. Pivot confirmation delays anchor recognition by design. Volume grading is less meaningful on symbols with unreliable volume reporting. Channel detection reports the closest parallel pair, not every possible channel. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any trendline, breakout, or retest does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently.
Gösterge
