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 PulseWire 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 PulseWire. Indicator

Indicator

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

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. Indicator

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.
Indicator

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. Indicator

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

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. Indicator

Indicator

Smart Money Liquidity Matrix & Session Finder==============================================================================================
SMART MONEY LIQUIDITY MATRIX & SESSION FINDER
==============================================================================================
OVERVIEW
The Smart Money Liquidity Matrix & Session Finder is a lightweight, high-precision technical mapping indicator designed to help traders analyze market structure, session ranges, and key supply/demand areas in real time.
By combining smooth higher-timeframe trend directional bias, automated swing structure breaks, and session liquidity windows, this tool provides a clean, clutter-free environment for contextual chart analysis.
KEY TECHNICAL FEATURES
1. ASIAN SESSION RANGE & TIMING ENGINE
• Automatically tracks and marks the Asian Range boundaries (default: 20:00–00:00 NY time).
• Defines a clear trading session execution window (default: 00:00–03:00 NY time) to analyze session breakouts and liquidity sweeps.
2. DYNAMIC SMOOTHED TREND DIRECTION
• Utilizes a double-smoothed moving average filter to plot a clean, adaptive trend line.
• Eliminates false color flips during minor pullbacks, staying Green during bullish momentum and Red during bearish trends.
3. STRUCTURE BREAK MAPPING (BOS & CHoCH)
• Automatically identifies major market structure pivots and plots clean horizontal level lines.
• Features centered text labels for Break of Structure (BOS) and Change of Character (CHoCH) to maintain clean horizontal visualization.
4. BREAKER BLOCK STYLE ZONES
• Maps key dynamic Support and Resistance areas directly around pivot wicks and bodies.
• Features clean, right-aligned inside box text labels identifying major Reversal and Support/Resistance boundaries.
INDICATOR SETTINGS & INPUTS EXPLAINED
1. SESSION & TIMEZONE SETTINGS
• NY Timezone: Configures the base exchange time standard for accurate session calculation.
• Range Window: Defines the exact session hours used to calculate initial liquidity range high/low.
• Trade Window: Sets the active session hours where breakout evaluation is active.
2. SIGNAL & ENTRY CONFIGURATION
• Show Buy / Sell Signals: Toggle display for session breakout and FVG confirmation labels.
• Only 1 Trade Per Day: Limits signal generation to a single daily execution setup to prevent over-analysis.
• Signal Padding: Adjusts the vertical offset (in ticks) for signal labels relative to candle highs/lows.
3. MAJOR SMOOTH TREND LINE
• Smooth Trend Length: Adjusts the baseline length of the trend-following moving average (Higher values smooth out short-term market noise).
4. PROFESSIONAL STRUCTURE (BOS / CHoCH)
• Major Swing Sensitivity: Controls pivot lookback period for detecting major structural breaks (Higher values focus only on higher-timeframe swings).
5. BREAKER BLOCK ZONES
• Zone Sensitivity: Controls the lookback depth for active Support and Resistance breaker zones.
HOW TO USE IN YOUR ANALYSIS
• Trend Bias: Use the smooth dynamic trend line to align your trades with the primary market direction
( Green = Bullish Bias, Red = Bearish Bias).
• Session Liquidity: Observe price behavior relative to the Asian Session High/Low levels during the active trade window.
• Breaker Zones: Dynamic Resistance boxes indicate potential supply/reversal areas, while Support boxes highlight potential demand/bounce levels.
• Structure Confirmation: Use BOS and CHoCH signals to confirm structural trend continuations or shifts.
DISCLAIMER
This technical indicator is provided strictly for educational and chart analysis purposes. It does not constitute financial or investment advice. Past performance is not indicative of future results. Always manage risk responsibly.
==============================================================================================
Indicator

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. Indicator

EonMetrics CISDCISD — Change In State of Delivery
CISD marks the moment the market's delivery flips. Price is "delivered" in one direction through a series of consecutive same-direction candles; the open of the first candle of that series is the delivery level. When a later candle closes back through that level, the state of delivery has changed — that close is the CISD. The level is then kept on the chart and tracked as support or resistance, with retest and invalidation handling.
🔶 HOW IT WORKS
The script counts consecutive same-direction candles (by candle body, by default). When such a series ends, the open of its FIRST candle is remembered as the delivery level, shown as a dotted pending line. When a later candle CLOSES through that level against the series direction, the CISD is confirmed — the level is drawn and tracked as support or resistance from that bar on.
🔶 HOW CISD DIFFERS FROM MSS / BOS
Structure tools (MSS, BOS, CHoCH) need a swing pivot: a high or low must form and be confirmed by candles on both sides before a break of it means anything. CISD needs no pivot at all — the reference level comes straight from the candle series itself (the open of the first candle of the last delivery leg). That is why a CISD typically confirms earlier than a structure shift: the close through the series origin often prints several bars before the equivalent MSS. Earlier also means less filtered — CISD is a faster, more granular read of the same idea, not a replacement for structure.
🔶 WHAT IT DOES
Series detection — counts consecutive same-direction candles (direction by candle body, or optionally close-vs-previous-close). A series qualifies as delivery once it reaches the minimum length you set. A doji can either ride the series or end it — your choice.
Pending level (dotted) — as soon as a qualifying series ends, the open of its first candle becomes the candidate level, drawn as a dotted line. This is where the next CISD would confirm. Nothing is signaled yet — the line just shows you what the market has to close through.
Confirmed CISD (solid) — when a candle closes through the pending level, the level turns solid, gets its CISD label, and starts being tracked: bullish CISD levels act as support, bearish as resistance.
Level lifecycle — an active level extends bar by bar. When price fully leaves it and later returns to touch it, that touch is marked as a retest (wick-based). When a candle closes back through the level, it is invalidated — removed, or kept dimmed on the chart if you prefer to study failures. An optional lifetime cap quietly expires old levels.
Current delivery state — an optional floating label shows the running series direction and its candle count (e.g. "Bearish x4").
🔶 NON-REPAINTING
The entire engine advances on confirmed bars only. Nothing is drawn, moved or deleted intrabar: a pending level appears only after its series is complete, a CISD confirms only on a closed candle, and retests/breaks are evaluated on closed candles. What you see on a historical chart is exactly what you would have seen live.
🔶 ALERTS
Six alert conditions: bullish/bearish CISD confirmed, bullish/bearish level retested, bullish/bearish level broken.
🔶 HOW TO USE
1. Keep Min Series Length at 2 for a responsive read, raise to 3-4 to only mark the strongest delivery legs.
2. Watch the dotted pending line — it tells you in advance which level a close has to take out for delivery to flip.
3. After a confirmed CISD, the level itself is the tradeable information: bullish CISD levels tend to act as support on the retest, bearish as resistance.
4. Set alerts on confirmations and retests instead of watching the chart.
🔶 SETTINGS
Detection (min series length, candle direction mode, doji handling) · Levels (max active per side, lifetime, keep broken, retest markers, pending line) · Style (colors, line width, label size, delivery-state label).
This tool annotates delivery levels. It does not predict direction, does not generate entries and has no targets — what you do at a level is your decision.
Part of the EonMetrics toolset.
Indicator

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.
Indicator

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.
Indicator

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. Indicator

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.
Indicator

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.
Indicator

AlgoZ Pro Price ActionAlgoZ Pro Price Action is a clean price action based forex indicator built to help traders identify potential Buy, Sell, and Exit areas using a combination of market structure, trend filtering, volatility logic, and dynamic trade management.
This indicator is designed around the idea that not every trade needs to have a high win rate to be useful. Instead of only looking for quick scalp targets, AlgoZ Pro Price Action is built to manage trades with a runner-style approach. The goal is to cut weak trades faster, protect trades that start moving in the right direction, and allow stronger moves to continue when momentum is present.
The default settings are best suited for 1-minute EUR/USD forex trading. Other forex pairs and timeframes may work differently and should be tested before use.
The indicator uses market structure breaks to identify possible directional shifts. When price breaks key internal support or resistance levels, the script checks multiple filters before plotting a signal. These filters are designed to reduce low-quality signals during chop, weak momentum, or overextended conditions.
AlgoZ Pro Price Action includes Buy, Sell, and Exit labels directly on the chart. Buy signals are shown in teal, Sell signals are shown in pink, and Exit signals are shown in a neutral color. The bars can also be colored based on the active signal direction so it is easier to visually track the current market bias.
One of the main parts of this indicator is the trend lock system. The trend lock helps prevent the indicator from flipping back and forth too quickly during noisy market conditions. It uses EMA trend structure, slope behavior, and confirmation bars to decide whether the market is currently favoring Buy-side or Sell-side continuation. Countertrend signals must be stronger before they are allowed through, which helps reduce random reversal signals during an active move.
The indicator also includes automatic forex pair adjustment. It detects whether the chart is a JPY pair or a non-JPY forex pair and automatically adjusts pip size calculations. This helps prevent issues where a stop or exit calculation is too tight or too wide because of the symbol’s price format. The script also includes auto volatility tuning, which uses ATR-based logic to scale stop size, runner triggers, trailing stop distance, dead-trade protection, and cooldown behavior based on the current pair’s movement.
Trade management is handled through a dynamic exit engine. Instead of using only fixed take profit levels, the indicator uses runner logic. Once a trade moves far enough in profit, the trade can enter runner mode. From there, the script can move the stop, protect profit, and trail the trade if the move continues. This allows stronger trades to breathe while still giving the indicator a way to exit when momentum fades.
AlgoZ Pro Price Action also includes dead-trade protection. If a trade has been open for a certain number of bars and has failed to make meaningful progress, the script can plot an Exit signal. This is designed to help remove weak trades that are not moving enough to justify staying in them.
The indicator includes several optional filters and controls, including EMA trend filtering, ADX strength filtering, chop filtering, candle body quality filtering, minimum EMA separation, price distance from the slow EMA, overextension protection, post-exit cooldown, and emergency protection logic.
Main features include:
• Buy, Sell, and Exit labels
• Teal and pink AlgoZ Pro visual theme
• Price action and market structure based signals
• Internal support and resistance break logic
• Optional BOS / CHoCH structure markings
• EMA trend filtering
• ADX trend strength filter
• Chop and range filter
• Candle quality filter
• Trend lock system
• Countertrend signal protection
• Auto pip size detection
• Auto adjustment for JPY and non-JPY forex pairs
• ATR-based auto pair tuning
• Dynamic stop logic
• Runner-style trade management
• Breakeven / profit lock logic
• Trailing stop logic for stronger moves
• Dead-trade exit protection
• Optional bar coloring
• Optional entry and stop lines
• Optional status table
Recommended default use:
1-minute EUR/USD forex chart.
Other forex pairs and timeframes may require adjustment depending on spread, volatility, session, and market conditions. Indicator

Liquidity Sweep Hunter [BigBeluga]🔵 OVERVIEW
The Liquidity Sweep Hunter is a smart, volume-aware charting tool that automatically detects major support and resistance levels.
Unlike basic horizontal line indicators that just draw lines on every swing high or low, this script filters levels based on volume strength . It identifies the "heavy" levels where big money has clearly participated, projects them forward as active boundaries, and alerts you the exact moment price "sweeps" through them.
🔵 FEATURES
The system works by tracking the relationship between price pivots and real-time volume:
1 — Volume-Weighted Level Detection
Smart Pivot Filtering: The engine identifies price pivots ( Length ) but only confirms a level if the volume at that pivot exceeds your defined Filter threshold. This ignores "weak" pivots and keeps your focus only on high-conviction zones.
Dynamic Intensity Engine: The indicator automatically changes the look of the lines based on volume. Levels created with higher volume activity get thicker lines ( Max Line Width ) and higher opacity, making them visually stand out more on your chart.
2 — Automated Liquidity Sweep & Break Logic
Sweep Alerts (✔): When the price briefly dips below a support level (or spikes above a resistance level) and then closes back inside, the indicator plots a checkmark (✔) to identify the "liquidity sweep."
Smart Self-Cleaning: If the price candles break directly through a support or resistance line, the indicator detects the structural breach, changes the line to a dotted style, and removes it from your active list. This keeps your chart free of outdated, broken levels.
🔵 HOW TO USE
This tool is designed to help you trade based on where market participants have placed their stops and orders:
Identify High-Volume Anchors: Use the thick, bold lines to spot the most important support and resistance levels on your timeframe. These are the zones where the script detected significant institutional interest.
Look for Sweep Confirmations: Watch for the (✔) checkmarks after a line is tagged. A liquidity sweep often signals that the market is grabbing "stop-loss" liquidity before reversing in the opposite direction.
Manage Trade Exit Points: Use the lines as your target zones. Since the script automatically turns lines into "dotted" style when they are broken, you have a visual trigger to cut a position if a key structural level fails.
🔵 NOTES
Why this implementation is unique:
It combines two powerful concepts—volume analysis and pivot structure—into a single, lightweight tool that doesn't overwhelm your chart.
The "Dynamic Intensity" settings allow you to see at a glance which levels are mathematically the most significant based on the volume data behind them.
It is a "self-managing" system; by automatically deleting broken levels, it ensures your screen stays clear for your actual trade execution.
Indicator

Intraday MTF SR Zones | ProjectSyndicateIntraday MTF S/R Zones · Reaction Matrix builds the session's support and resistance from real pivot structure on four timeframes at once, then power-ranks every level so you know which ones actually deserve a trade. Each session it pulls confirmed pivot highs and lows from M30, H1, H2 and H4 by default, wraps each one in a uniform ATR-scaled band, fuses overlapping levels into single confluence zones tagged with every timeframe involved, and grades all of them 0–10. The whole tool runs on one idea: not all levels are equal — a level that four timeframes agree on, that rejected price with a violent wick, and that stands far out from the local mean is a different animal from a shallow M30 pivot, and it should not look the same on your chart.
This is a reaction matrix, not a signal generator. It tells you where the auction has previously reacted, how many timeframes are stacked at that price, how hard price was rejected there, and which zone is the strongest one on the chart right now. The read is directional only in the sense that you can see, at a glance, whether the session's structure is stacked with resistance above or support below.
🟢🔴 Summary how to trade this more details below, read entire guide. Two clean approaches: react at the zone, or trade the break of it. Prefer STRONG / ELITE grades and ◆ confluence zones — the shallow low-graded zones tag constantly and mean little. The dashboard's Nearest Res / Nearest Sup and Room in ATR tell you instantly whether a trade from here has space to work. Runs on any intraday timeframe, i.e. M1 M5 M10 M15 M30 H1 H2 H4 +.
🧱 The Pivot Core the only source of truth — Every zone in this tool descends from a confirmed swing pivot, never from an indicator line, a moving average or a projected level. Pivot strength is set left/right 5/5 by default, so a pivot must be the highest high or lowest low of its neighborhood before it counts. Each of the four timeframe slots runs its own pivot scan independently and reports back. Nothing is drawn from a guess.
📐 Four-Timeframe Stacking — Four independent slots, each toggleable, defaulted to M30 · H1 · H2 · H4. A pivot found on H4 spawns a zone; so does one on M30. They are graded very differently — timeframe rank is the heaviest input to the score — but they all live on the same chart, in the same session, in one coherent ladder. Every zone is labeled with the exact timeframe set that produced it, so an M30·H1·H4 zone announces itself as such.
BTCUSD
◆ Confluence Merge the signature feature — This is where the tool separates from a stack of plain pivot lines. Within a session, same-side zones whose bands overlap within a 0.35 ATR tolerance are fused into a single confluence zone. The merged zone inherits a wick-weighted average level, the deepest prominence, the highest timeframe rank, and the union of every timeframe that contributed to it. It is then re-scored, tagged with a ◆ marker, painted in the dedicated confluence color, and given a scoring bonus for every extra timeframe present. Instead of four near-identical lines cluttering the same price, you get one zone that reads M30·H1·H2·H4 and grades near-elite. Merging repeats until the session settles, so three or four overlapping levels collapse cleanly into one.
🏷️ The 0–10 Strength Engine — Every zone carries a live grade with stars and a tier word FORMING → WEAK → MODERATE → STRONG → ELITE. The score is a weighted blend of four independently measurable properties, and all four weights are user-adjustable:
▪️ Timeframe Rank 0.40 — an H4 pivot outranks an M30 pivot. The dominant term.
▪️ Confluence 0.28 — how many timeframes are stacked at this price, plus a flat bonus per extra timeframe.
▪️ Rejection Wick 0.18 — the actual wick beyond the candle body at the pivot, normalized against ATR. A pivot that speared price and snapped back scores higher than a soft rounded turn.
▪️ Pivot Prominence 0.14 — how far the pivot stands out from the local mean, normalized against ATR. An isolated extreme outranks a pivot buried inside congestion.
Read the grade as a descriptive conviction ranking for which zone deserves your attention — it is not a backtested win-rate. A score filter hides everything below a level you choose, so you can strip the chart down to STRONG and ELITE only.
GBPUSD
🗓️ Session Engine & Auto-Cleanup — A fresh stack of zones is born on every new bar of the session timeframe daily by default. Zones span exactly their own session and close cleanly at the boundary — no bleed into the next day. The current session extends a configurable number of bars to the right so live price has room to interact with it. The last N sessions are kept 3 by default and older ones are deleted automatically. Within each session a hard cap 14 by default keeps the stack clean: once it is hit, the weakest-scoring zones are dropped first, so what survives on your chart is by construction the strongest structure of that session.
🎨 Strength-Graded Shading — Four shades per side, graded weak → elite, with opacity scaling directly off the score. Weak zones stay faint, elite zones render solid, and confluence zones take the dedicated confluence color regardless of side. You are reading conviction with your peripheral vision before you read a single number. Resistance runs the teal family, support the magenta-red-purple family, and the whole palette plus transparency floor, opacity span and borders are fully user-editable.
🔎 In-Zone Labels — Each zone is labeled at its center with a ▲ resistance / ▼ support / ◆ confluence marker, the exact timeframe set, the star grade, the X.X/10 score and the tier word. Labels can be restricted to the latest session only, or turned off entirely for a pure heatmap look. Four label sizes.
XAUUSD
📋 Live Dashboard — A compact panel that answers the questions you actually ask a levels tool:
▪️ Per-timeframe breakdown — how many resistance and how many support zones each of the four timeframes currently holds, with a ▲ RES / ▼ SUP / ● BAL bias tag per timeframe. Structure stacked above or below, at a glance, timeframe by timeframe.
▪️ ★ Strongest — the single highest-graded zone on the chart: its price, its timeframe set, its score and tier, marked ◆ when it is a confluence zone.
▪️ ▲ Nearest Res / ▼ Nearest Sup — the closest zone above and below price, each with its price, timeframe set and score. Your immediate context.
▪️ Price Position & Room — whether price sits nearer support or nearer resistance, and the distance between the two nearest zones expressed in ATR. Room tells you whether there is anything to trade for.
▪️ Session state — zones this session vs total kept, confluence count, average score, current session Asian / London / NY, pivot setting, merge state, per-session cap and the strong-zone threshold.
🔒 Non-Repainting — Higher-timeframe data is requested with lookahead disabled, and zones only spawn on confirmed bars. A pivot is only a pivot once its right-hand bars have printed, so a level appears after its confirmation delay and then never moves, never repaints, and never disappears retroactively. Past sessions are frozen exactly as they were drawn. This is the honest tradeoff of pivot structure: confirmation costs you bars, and in exchange the level is real.
🔔 Native Alerts — New Resistance Level and New Support Level fire the moment a fresh pivot zone forms on any enabled timeframe. Price At Resistance Zone and Price At Support Zone fire on a touch. Price At STRONG Zone fires only when price tests a zone above your strong-zone threshold — the one alert most people will actually run.
ES
🔧 Fully Customizable — Four timeframe slots and their toggles, pivot strength left/right, resistance/support toggles, session timeframe, sessions kept, per-session zone cap, right-extension, zone thickness by ATR multiple or percent of price, ATR length, merge toggle and merge distance, confluence bonus, all four scoring weights, the score filter, the strong-zone threshold, label visibility/size/scope, the full eight-shade palette, confluence color, transparency floor, opacity span, borders, and dashboard position and size — all adjustable.
🎯 Why this is different — Most S/R tools draw every pivot they find and leave you staring at forty identical lines, all weighted the same, with no way to tell the H4 confluence shelf apart from an M30 blip. This one grades them, merges them, caps them and shades them by conviction, so the chart itself does the filtering. You read the level, the timeframes stacked at it, and the conviction score — at a glance.
🚀 Apply to Gold XAUUSD, Silver, Forex, Crypto and Indices on any intraday timeframe.
🎯 How To Trade It — Two Approaches
Everything hinges on the grade. A FORMING or WEAK zone is noise you can see; a STRONG or ELITE ◆ confluence zone is where multiple timeframes have already fought. Trade the graded zones, and use Room in ATR to confirm the trade has somewhere to go.
◾ 1 REACT at the zone — trade the rejection
This is the tool's core use. Price arrives at a high-graded zone and you fade the touch back toward the opposite side of the ladder.
▪️ Setup: wait for price to reach a STRONG / ELITE zone — ideally a ◆ confluence zone carrying three or four timeframes. Check the dashboard: is it the ★ Strongest zone? Is Room to the opposite zone worth the risk?
▪️ Entry: on rejection out of the zone, with your own confirmation — a wick, an engulfing close, a lower-timeframe structure break. The zone is the location; it is not the trigger.
▪️ Stop: on the far side of the zone band. The band has real thickness for exactly this reason. A decisive close through the zone means the level failed and the thesis is wrong.
▪️ Targets: the Nearest Sup / Nearest Res on the opposite side, then step through the ladder tier by tier, banking partials at each graded zone.
⚖️ The cleanest version: price runs into a ◆ confluence zone that four timeframes share, grades ELITE, sits at the top of an empty stretch of Room, and rejects on the first touch. First touches of fresh high-graded zones are the setup; the fifth retest of the same zone is not.
◾ 2 TRADE THE BREAK — the zone flips role
The mirror case, and the one that saves you when approach 1 fails.
▪️ Setup: a decisive close through a high-graded zone — especially a ◆ confluence zone — is meaningful information. It took real displacement to break a level that many timeframes were defending.
▪️ Entry: on the retest of the broken zone from the other side, once it has flipped from resistance to support or support to resistance.
▪️ Stop: back on the original side of the zone. If price reclaims it, the break failed.
▪️ Targets: the next graded zone in the direction of travel, then the next. Use the per-timeframe bias tags on the dashboard: breaking into a region where every timeframe shows ▼ SUP means thin structure ahead.
⚖️ Watch the ★ Strongest readout. When the strongest zone on the chart breaks and holds as a flip, that is the session's structural event.
Rule of thumb: ⭐ First touch of a fresh STRONG / ELITE ◆ zone with Room behind it → look for the rejection trade. ⭐ Decisive close through a high-graded zone → stop fading it, wait for the retest and trade the flip. ⭐ Low grades, no Room, or a zone already tested repeatedly → no trade. The score exists to tell you when to do nothing.
⚠️ IMPORTANT NOTICE: Intraday MTF S/R Zones · Reaction Matrix maps and ranks pivot-derived support and resistance across four timeframes. The 0–10 score is a descriptive conviction ranking built from timeframe rank, confluence, rejection wick and pivot prominence — it is not a backtested win-rate, and this indicator tracks no trade outcomes and reports no performance statistics. Zones are locations, not entries. Pivot confirmation means a level appears only after its right-hand bars have printed. These zones are decision support, not a standalone trade trigger. Always combine them with your own strategy, price-action confirmation and risk management. Past behavior does not guarantee future results. Indicator

[ A L P H A X ] BREAKRUNE - Pattern Breakout RSI EngineAlphaX BREAKRUNE — Pattern Breakout Intelligence + RSI Trigger Engine: Real vs Fake Breakout Classification, Five-Pattern Detection, Fakeout Reversal Signals & Pending State Machine
AlphaX BREAKRUNE is a professional-grade breakout intelligence system built around a single foundational problem that defeats most breakout traders: the inability to distinguish a genuine structural breakout from a fakeout in real time. Most breakout indicators fire on any close beyond a pattern boundary — and then leave the trader holding a loss when price immediately reverses back inside the structure. BREAKRUNE solves this at the architectural level by separating breakout detection into three sequential phases — pattern recognition, breakout classification, and RSI trigger confirmation — and requiring all three to align before a signal fires. Every raw break is first classified as PENDING, then evaluated over a configurable decision window for either TRUE BREAK or FAKEOUT status using candle body and wick geometry, and only confirmed true breaks with RSI momentum alignment produce long or short entry signals. Fakeouts become their own opportunity: when a breakout is classified as fake, BREAKRUNE reverses the bias and watches for an RSI-confirmed trap reversal signal in the opposite direction. The result is a system that profits not just from real breakouts but also from the very fakeouts that trap the crowd — with the RSI trigger layer ensuring every entry has genuine momentum behind it. Designed for traders across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔮 The Core Philosophy — Three Phases Before a Signal
The fundamental failure of conventional breakout systems is compression of the detection and confirmation steps into a single bar event. Price closes above resistance — signal fires. This approach has no mechanism for distinguishing momentum breakouts from stop-hunt spikes, thin-market wicks, or false structural breaks that reverse immediately.
BREAKRUNE separates these into three distinct sequential phases that every potential signal must pass through:
Phase 1 — Pattern Recognition:
The system continuously scans the pivot structure to identify one of five major pattern types — Range, Double Top/Bottom, Triangle, Wedge, or Trend Channel. The detected pattern provides the structural context for the breakout evaluation: where the resistance and support levels are, what the directional bias of the formation is, and whether the pattern height meets the minimum size requirement for a qualified break.
Phase 2 — Breakout Classification:
When a raw break of the pattern boundary occurs, the system enters PENDING state. Over the next configurable bars (the fakeout decision window), it watches for one of two outcomes. If candles close back inside the structure with a significant rejection wick, the break is reclassified as FAKEOUT. If the required number of candles all close beyond the boundary without a wick rejection, the break is classified as TRUE BREAK. No premature signal fires during this window — the system waits for the evidence.
Phase 3 — RSI Trigger Confirmation:
Only after a TRUE BREAK or FAKEOUT classification does the RSI trigger layer evaluate. For true breaks, the Fast RSI must be above the configured long trigger (default: 55) with Core RSI above 50 and both RSI slopes positive. For fakeout reversals, the Fast RSI must cross the midline in the reversal direction with positive directional slope. Both must pass the quality score gate. Only then does a signal fire.
This three-phase architecture is what makes BREAKRUNE categorically different from breakout indicators that react to a single bar event.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Five-Pattern Detection Engine
BREAKRUNE continuously classifies the current market structure into one of five pattern types using the most recent confirmed pivot highs and lows. Every pattern provides resistance (res) and support (sup) levels used as the breakout boundaries.
Pattern detection uses:
Confirmed fractal pivot highs and lows (configurable pivot length, default: 5 bars each side), ATR-normalized tolerance values for determining flat vs sloped levels, and a minimum pattern height filter to eliminate micro-structures.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Range:
Both the most recent pivot high and pivot low are within the flat level tolerance (default: 0.35× ATR) of their respective prior pivots — price has been oscillating between approximately horizontal support and resistance. The pattern bias is neutral (patBias = 0) — a range can break either direction. The resistance is the average of the two pivot highs; support is the average of the two pivot lows.
Double Top / Double Bottom:
Two pivot highs at approximately the same level (within flat tolerance) with the current price below both peaks — Double Top, bearish bias. Or two pivot lows at the same level with current price above — Double Bottom, bullish bias. The pattern height is the distance from the support/resistance level to the opposing pivot extreme. The directional bias (patBias) is set accordingly — bearish for Double Top, bullish for Double Bottom.
Triangle (Converging):
The pivot highs are trending lower (by more than the trend shift tolerance, default: 0.20× ATR, between consecutive highs) while the pivot lows are trending higher — a symmetrical converging triangle. No directional bias is set (patBias = 0) since triangles resolve in either direction. The resistance is the most recent pivot high; support is the most recent pivot low.
Wedge:
Both pivot highs and pivot lows are trending in the same direction. Rising Wedge: both highs and lows trending upward — despite the upward direction the narrowing structure is bearish (patBias = -1). Falling Wedge: both trending downward — bullish (patBias = 1). The wedge pattern is identified when the pivot-to-pivot shift exceeds the trend tolerance on both sides in the same direction.
Trend Channel:
Pivot highs are trending in one direction and pivot lows are trending in the same direction, but the high trend direction opposes the expected wedge classification — a parallel channel. The channel bias follows the direction of the trend (upward-sloping channel = bullish patBias, downward = bearish).
Pattern freshness filter:
All pivot-based pattern detections are subject to a maximum age constraint (default: 80 bars from the most recent contributing pivot). Patterns older than this threshold are excluded from pattern detection — the oldest pivot must be within the freshness window for the pattern to be considered current and relevant.
Pattern size validation:
The pattern height (distance from support to resistance) must meet or exceed the minimum pattern height in ATR multiples (default: 1.1× ATR). This sizeOk condition contributes 2 points to the quality score — the largest single weight component — and reflects that properly sized patterns have more institutional significance than micro-structures.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ The Breakout Classifier — PENDING → TRUE BREAK or FAKEOUT
When price closes beyond a pattern boundary by more than the break threshold (default: 0.12× ATR), a raw break event is registered and the breakout classifier enters PENDING state. From this moment, every bar within the fakeout decision window (default: 5 bars) is evaluated.
Raw break detection:
Long raw break: Close above the resistance level plus break threshold, with the pattern allowing long breaks (not a bearish pattern — Double Top and Rising Wedge suppress long breaks)
Short raw break: Close below the support level minus break threshold, with the pattern allowing short breaks
PENDING state variables stored at the break bar:
The direction (pendingDir), the exact level broken (pendingLvl), the bar index of the break (pendingBar), and the pattern name (pendingPat) are all stored in persistent variables. The PENDING state is displayed on the dashboard CLASS row as PENDING — visible awareness that a break has occurred and is being evaluated.
FAKEOUT classification:
Within the fakeout window (pendingAge ≤ fakeWindow), if price closes back inside the pattern:
For a long break fakeout: close falls back below the broken resistance level AND the upper wick of the current bar exceeds the configurable minimum wick rejection ratio (default: 45% of bar range) — the bar closed back inside with a dominant upper wick, confirming selling rejection of the attempted breakout
For a short break fakeout: close rises back above the broken support AND the lower wick exceeds the minimum ratio
When these conditions are met, pendingFake is set to true and the CLASS row displays FAKEOUT — the orange classification that activates the trap reversal signal pathway.
TRUE BREAK classification:
When the configurable number of consecutive candles (default: 2 bars) all close beyond the broken level — `ta.lowest(close, confirmBars) > pendingLvl` for longs, `ta.highest(close, confirmBars) < pendingLvl` for shorts — without any fakeout having been detected, pendingTrue is set to true and CLASS displays TRUE BREAK. The confirmed candles all remaining beyond the level eliminates the single-bar false breakout.
Window expiry:
If neither FAKEOUT nor TRUE BREAK is classified within the fakeout window, the pending state expires silently — pendingDir resets to zero, the level clears, and the system resumes scanning. This prevents stale pending states from generating signals long after the relevant price action has passed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 The RSI Trigger Layer — Momentum Gating on Classified Breaks
The RSI trigger layer is the final gate before a signal fires. It ensures every entry — whether on a true break or a fakeout reversal — has genuine momentum direction behind it at the moment of entry.
Dual RSI architecture:
Fast RSI (default: 7 periods) — the timing layer. Reacts quickly to price movement and provides the momentum trigger reading
Core RSI (default: 14 periods) — the confirmation layer. The intermediate momentum context that must agree with the fast RSI direction
RSI slope measurement:
Both RSI slopes are computed over the configurable slope bars (default: 3 bars) — the current RSI value minus the value N bars ago. A positive slope means RSI is accelerating; a negative slope means decelerating.
True Break Long RSI conditions (rsiLongOk):
Fast RSI above the long trigger threshold (default: 55) — momentum has already crossed into bullish territory
Core RSI above 50 — the intermediate RSI confirms the bullish bias
Fast RSI slope positive — momentum is still accelerating upward
Core RSI slope non-negative — intermediate momentum is not rolling over
True Break Short RSI conditions (rsiShortOk):
Fast RSI below the short trigger threshold (default: 45)
Core RSI below 50
Fast RSI slope negative
Core RSI slope non-positive
Fakeout Reversal RSI conditions:
Trap Long (rsiTrapLong): Fast RSI crosses above 50 (ta.crossover) with a positive slope — the RSI midline crossover after the fakeout confirms the reversal is gaining momentum
Trap Short (rsiTrapShort): Fast RSI crosses below 50 with a negative slope
Why the RSI trigger is a layer, not a gate: The RSI conditions are required for the signal to fire but are also the primary quality score component (2 points when fully met). This dual role means the RSI is simultaneously a hard entry requirement and a quality contributor — signals that barely pass the RSI threshold score lower than signals where momentum is strongly confirmed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔀 The Fakeout Reversal — Trapping the Trap
The fakeout reversal is BREAKRUNE's most distinctive and high-reward signal type. When a long breakout is classified as FAKEOUT (price returned below resistance with a rejection wick), the crowd that bought the breakout is now trapped — holding longs above what has become confirmed resistance again. The RSI trap reversal watches for the Fast RSI to cross below 50 with negative slope: the momentum of the trapped buyers failing. When this occurs within the cooldown window, a short signal fires — entering precisely as the trapped longs begin capitulating.
Why fakeout reversals often produce the strongest moves: A failed breakout above resistance concentrates stop losses of all the breakout buyers just above the resistance level. As those stops are triggered on the reversal, they add selling pressure to the downside move — creating a self-reinforcing cascade. The fakeout reversal entry captures this cascade from near the top.
Enabling/disabling: The Enable Fakeout Reversal Signals setting (default: on) controls whether trap reversal signals are active. Disabling it restricts BREAKRUNE to true break signals only — appropriate for traders who prefer pure momentum continuation entries.
Visual differentiation: True break signals are rendered in the standard bull/bear score-based colors (yellow-green for longs, red for shorts). Fakeout reversal signals fire through the same triangle shapes but with the quality score reflecting the trap penalty — trap signals score 1 point on the setup component vs 2 for true breaks, naturally producing slightly lower overall scores that are reflected in the triangle's brightness.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏅 The 10-Point Quality Score
Every signal — true break or fakeout reversal — is scored through a 10-point composite system before it can fire. Signals below the minimum threshold (default: 5) are suppressed regardless of classification.
Score components:
Pattern Size (up to 2 points):
sizeOk (pattern height ≥ minimum ATR threshold) scores 2 points. A zero-score here (pattern too small) alone can suppress a signal by 2 points — the largest single deduction possible. Well-sized patterns carry proportionally more institutional significance and this component enforces that.
RSI Trigger Alignment (up to 2 points):
rsiLongOk (for long signals) or rsiShortOk (for short signals) scores 2 points. This is the second largest component — reflecting that genuine momentum confirmation at the moment of entry is as important as pattern quality. Signals where RSI barely meets the threshold (Fast RSI just above 55 with flat slope) score these 2 points; signals where RSI is not aligned at all score 0.
Signal Type (1–2 points):
True break signals score 2 points; fakeout reversal (trap) signals score 1 point. This weighting reflects the inherently lower confirmation of a reversal trade versus a confirmed structural continuation — the trap trade is valid but carries more uncertainty.
Volume Confirmation (1 point):
Current bar volume meets or exceeds the volume average × multiplier (default: 1.1×). When volume confirmation is disabled in settings, this point is always awarded.
Non-Chop Market (1 point):
Choppiness Index is below the configured threshold (default: 62.0). Also enforced as a hard gate — extreme chop blocks all signals regardless of score.
HTF Bias (up to 2 points):
When useHtf is on and the higher timeframe EMA structure agrees with the signal direction (htfBull for longs, htfBear for shorts), 2 points are awarded. When HTF is disabled, 1 neutral point is always given. When HTF opposes the signal and useHtf is on, 0 points. This component has the same maximum weight as RSI and pattern size — reflecting the institutional significance of macro directional alignment.
Grade-coded signal colors:
Score 8–10 → full brightness (colBull / colBear). Score 6–7 → slightly dimmer. Score below 6 → transparent-tinted version. The triangle color communicates quality at a glance without reading the dashboard.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 10-row real-time dashboard displays the complete internal state of the breakout classifier and all filter conditions.
PATTERN — the current detected pattern: Range, Dbl Top, Dbl Bot, Triangle, Rising Wedge, Falling Wedge, Up Channel, Down Channel. Purple color. Updates on every bar as the pivot structure evolves
CLASS — the current breakout classification state: IDLE (no pending break), PENDING (raw break registered, evaluating), TRUE BREAK (confirmed continuation), FAKEOUT (rejection detected, reversal watching). Color-coded — yellow-green for TRUE BREAK, orange for FAKEOUT, neutral for IDLE/PENDING
BIAS — the directional bias: BULL (pendingDir=1 or patBias=1), BEAR (pendingDir=-1 or patBias=-1), or NEUTRAL. Yellow-green or red
LEVELS — the current support and resistance levels as a price pair (e.g., "2450.50 / 2490.25"). The exact boundaries the breakout classifier is watching
QUALITY — the live quality score out of 10. Yellow-green when at or above the minimum threshold, neutral otherwise
RSI F/C — the live Fast RSI and Core RSI values as a pair (e.g., "58.4 / 53.7"). Yellow-green when above 50, red when below
HTF — higher timeframe EMA structure: ▲ BULL, ▼ BEAR, or — FLAT
CHOP — live Choppiness Index value. Orange when above the block threshold
VOL — CONFIRMED (volume above threshold) or LIGHT (below threshold). Yellow-green or orange
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Pattern Boundary Lines — when Show Pattern Boundary Lines is enabled, a resistance line (res, red-tinted) and support line (sup, yellow-green-tinted) are drawn from the pattern's origin bar to the current bar, showing the exact levels the breakout classifier is watching
▲ Triangle (below bar) — long signal. Full brightness yellow-green for score 8+, standard for 6–7, transparent-tinted for minimum score. Fires on both TRUE BREAK longs and FAKEOUT reversal longs (trap shorts become long entries)
▼ Triangle (above bar) — short signal with matching grade-coded coloring
✕ Cross (above bar, orange) — fakeout mark for a failed long breakout. Appears when Show Fakeout Marks is enabled and fakeLongNow fires. The orange × above the bar is the visual alert that a bull breakout has been rejected
✕ Cross (below bar, orange) — fakeout mark for a failed short breakout
Candle tinting — when Show Tint Candles by Active Bias is enabled, bars are tinted yellow-green (bias=1) or red (bias=-1) during active pending or pattern-biased periods. The tint shows the directional context continuously, not just at signal bars
SL Line (red dashed) — when Show SL + TP1 + TP2 is on, the ATR-based stop loss level extending guideExtend bars forward
TP1 Line (lime dotted) — first take profit at 1.8× ATR from entry
TP2 Line (bright yellow-green dashed, width 2) — second take profit at 3.0× ATR from entry
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX BREAKRUNE — Step by Step
Step 1 — Read the Pattern and Levels
Check the PATTERN row on the dashboard — what structure is the system currently detecting? A Triangle or Wedge has directional bias; a Range or Double Top/Bottom has a directional expectation. Understanding the pattern context helps you assess which breakout direction is more probable
Check the LEVELS row — note the exact support and resistance prices. These are the lines the classifier is watching. If price is approaching resistance, a long break event may be imminent
Check BIAS — if it already shows BULL or BEAR from the pattern's directional classification, the system has a pre-existing directional lean before any break occurs
Step 2 — Monitor the Breakout Classification
When CLASS changes from IDLE to PENDING, a raw break has occurred. Watch the dashboard closely over the next fakeWindow bars — CLASS will shift to either TRUE BREAK or FAKEOUT
If CLASS shows FAKEOUT with an orange × appearing on the chart, the fakeout reversal pathway has activated. Check RSI F/C — is the Fast RSI approaching or crossing the 50 midline in the reversal direction?
If CLASS shows TRUE BREAK, check RSI F/C — is Fast RSI above 55 (long) or below 45 (short) with Core RSI confirming and slopes positive? If yes, a signal is likely imminent or has just fired
Step 3 — Enter on the Triangle Signal
A ▲ or ▼ triangle confirms all three phases have aligned — pattern identified, break classified, RSI triggered, quality scored
Read the triangle color — bright full-color triangle is Grade A (score 8+). This is the premium entry with all components confirming. Faded triangles are Grade C — valid but with reduced size
The QUALITY row shows the exact score. For fakeout reversal signals, the score will typically be 1 point lower than an equivalent true break signal due to the trap signal type weighting
Enable Show SL + TP1 + TP2 to see the ATR guide levels projecting forward from the signal bar
Step 4 — Manage the Trade
Watch the CLASS row during the trade. A new PENDING state in the opposing direction during an open position is an early warning that a counter-breakout is developing
Monitor RSI F/C — if Fast RSI begins rolling toward 50 against the trade direction, intermediate momentum is weakening. Consider taking TP1
The candle tint changing from yellow-green to red (or vice versa) during a trade means the bias has reversed — this is a structural exit cue
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
CHOP is orange on the dashboard — the hard chop gate is active. All signals are blocked. Pattern breakouts in extreme chop environments are dominated by noise — the range is too oscillatory for genuine structural breaks
CLASS shows PENDING for multiple consecutive bars with no resolution — when the system remains in PENDING state approaching the fakeWindow expiry without classifying as either TRUE BREAK or FAKEOUT, the break is ambiguous. The system will expire it silently. This ambiguity itself is a warning — directional commitment is absent
Pattern height is too small (sizeOk = false, quality score below 7) — the pattern exists but is too narrow to produce meaningful measured moves. Low-quality entries at micro-patterns carry reduced reward with the same stop risk
HTF Bias opposes the breakout direction — a bull breakout signal against a bearish HTF produces 0 HTF confluence points. The signal may still fire if other components score sufficiently, but counter-HTF breakouts resolve in the HTF direction far more often than not
FAKEOUT class appears but RSI is not approaching the midline — a fakeout has been detected but the RSI trigger for the reversal has not yet materialized. ARM SHORT / ARM LONG conditions are developing but no signal has fired. Do not anticipate the reversal signal without the RSI confirmation — the reversal could still fail
Multiple rapid PENDING → expiry cycles without TRUE BREAK or FAKEOUT — when the classifier repeatedly enters and exits PENDING state without resolving, the pattern boundary is being tested multiple times without follow-through. This is range-bound behavior masquerading as a breakout environment. Increase the break threshold or wait for a cleaner structural setup
The ideal BREAKRUNE setup:
Well-sized pattern (sizeOk true, pattern height 2× ATR or more)
Clean single raw break bar followed by TRUE BREAK classification within 2–3 bars
Fast RSI clearly above 55 (long) or below 45 (short) with positive/negative slopes on both RSI layers
HTF aligned with the breakout direction
Volume confirmed on the breakout bar
Chop Index well below threshold
Quality score at 8–10 (Grade A triangle, full brightness)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🔮 Three-phase breakout architecture — Pattern Recognition → Breakout Classification (PENDING → TRUE BREAK or FAKEOUT) → RSI Trigger Confirmation. No signal fires without all three phases completing sequentially
📐 Five-pattern detection engine — Range, Double Top/Bottom, Triangle, Rising/Falling Wedge, and Trend Channel identified from confirmed pivot structure with freshness and size filters
⚡ Real vs fake breakout classifier — candle body and wick geometry over a configurable decision window distinguishes genuine structural breaks from stop-hunt reversals before the signal fires
🔀 Fakeout reversal signal mode — when a break is classified as FAKEOUT, BREAKRUNE reverses bias and watches for an RSI midline crossover trap signal in the opposing direction, profiting from the crowd that got trapped
📊 Dual RSI trigger layer — Fast RSI (7) for timing precision and Core RSI (14) for momentum confirmation, with slope measurement on both. Required alignment conditions differ between true break and trap reversal entries
✕ Live fakeout markers — orange × marks above (failed long break) or below (failed short break) on bars where fakeout classification occurs, providing real-time awareness of failed breakouts independently of signal generation
🏅 10-point quality scoring — Pattern Size (2pts), RSI Alignment (2pts), Signal Type (1–2pts), Volume (1pt), Non-Chop (1pt), HTF Bias (2pts). Grade-coded triangle colors reflect score quality at a glance
🎨 Candle tinting — bars tinted yellow-green during bull pending/bias periods and red during bear periods, providing continuous directional context between signals
📊 10-row live dashboard — Pattern, Class, Bias, Levels, Quality, RSI F/C, HTF, Chop, and Volume updated in real time every bar
🔔 3 alert conditions — BREAKRUNE Long, BREAKRUNE Short, BREAKRUNE Fakeout (independent alert for fakeout detection regardless of reversal signal)
⚙ Fully configurable — pivot length, flat and trend tolerances, minimum pattern height, freshness window, break threshold, confirmation bars, fakeout decision window, wick rejection minimum, volume filter, dual RSI periods and trigger levels, RSI slope lookback, fakeout reversal enable, cooldown, quality minimum, HTF parameters, chop gate, SL/TP ATR multiples, guide extension, all visual toggles, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Pattern Intelligence
Pivot Length — fractal sensitivity for pivot detection (default: 5). Lower = more frequent smaller patterns; higher = fewer, larger structural patterns
Flat Level Tol (xATR) — ATR tolerance for determining whether consecutive pivots are at the same level (default: 0.35). Controls Double Top/Bottom and Range classification sensitivity
Trend Shift Tol (xATR) — ATR tolerance for determining whether consecutive pivots show a directional shift (default: 0.20). Controls Triangle, Wedge, and Channel classification
Min Pattern Height (xATR) — minimum pattern height for the sizeOk condition and quality score (default: 1.1). Raise to filter micro-patterns
Pattern Freshness (bars) — maximum age of the oldest contributing pivot for pattern classification (default: 80). Older pivots are excluded
Breakout Classifier
Break Threshold (xATR) — minimum close extension beyond the pattern boundary to register a raw break (default: 0.12). Lower = more sensitive; higher = requires stronger breaks
True Break Confirmation Bars — consecutive candles that must all close beyond the level for TRUE BREAK classification (default: 2)
Fakeout Decision Window — maximum bars after the raw break within which FAKEOUT or TRUE BREAK must be classified (default: 5). After this window, the pending state expires
Fakeout Wick Rejection Min — minimum wick-to-body ratio required for FAKEOUT classification (default: 0.45). Higher = requires more obvious rejection wicks
Volume Confirm — require volume above average on the signal bar (default: on)
Volume Avg Length / Volume vs Avg — volume baseline parameters (defaults: 20 bars / 1.1×)
RSI Trigger Layer
RSI Fast — the timing RSI period (default: 7)
RSI Core — the confirmation RSI period (default: 14)
Long Trigger — minimum Fast RSI level for a true break long (default: 55). Above 50 is the baseline; raising this requires stronger bull momentum
Short Trigger — maximum Fast RSI level for a true break short (default: 45)
RSI Slope Bars — lookback period for RSI slope calculation (default: 3)
Enable Fakeout Reversal Signals — toggle the trap reversal signal mode (default: on)
Confluence Gate
Signal Cooldown (bars) — minimum bars between consecutive signals (default: 6)
Min Quality Score (of 10) — minimum score to fire a signal (default: 5)
HTF Bias Layer — when on, HTF alignment contributes up to 2 points to the quality score (default: on)
Hard HTF Alignment — when on, counter-HTF signals are fully blocked regardless of score (default: off)
HTF Timeframe / HTF Fast / Slow EMA — higher timeframe parameters (defaults: 60-minute / 21 / 55)
Block Extreme Chop / Choppiness Length / Chop Block Above — chop gate parameters (defaults: on / 14 / 62.0)
Entry / Exit Guides
Show SL + TP1 + TP2 — toggle guide line display (default: off)
ATR Length — ATR calculation lookback (default: 14)
SL (xATR) — stop loss distance in ATR multiples (default: 1.2)
TP1 (xATR) — first take profit distance (default: 1.8)
TP2 (xATR) — second take profit distance (default: 3.0)
Guide Extend (bars) — bars forward the guide lines project (default: 30)
Display
Show Pattern Boundary Lines — toggle the resistance and support boundary lines (default: on)
Show Signals — toggle signal triangle rendering (default: on)
Show Fakeout Marks — toggle the orange × fakeout markers (default: on)
Tint Candles by Active Bias — toggle directional candle tinting (default: on)
Show Dashboard — toggle the full dashboard (default: on)
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Bull Bright — yellow-green family for bullish signals and tinting
Bear / Bear Bright — red family for bearish signals
Pattern Accent — purple for pattern labels, boundary lines, and structural elements
Pending / Fakeout — orange for fakeout marks, CHOP warnings, and VOL LIGHT indicators
Neutral — gray for IDLE class and neutral dashboard states
Stop / TP1 / TP2 — individual guide line colors
Dash BG / Dash Header / Dash Section / Dash Frame / Dash Text — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (3 total)
BREAKRUNE Long — all three phases confirmed for a long entry: pattern identified, TRUE BREAK or FAKEOUT reversal classified, RSI trigger aligned, quality score met
BREAKRUNE Short — all conditions confirmed for a short entry
BREAKRUNE Fakeout — a fakeout has been classified on the current bar (fakeLongNow or fakeShortNow). This fires independently of whether a reversal signal follows — useful for awareness of failed breaks even when the reversal RSI conditions are not yet met
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M5–H1 :
Pivot Length at 5 — captures intraday structural swings without excessive micro-sensitivity
Fakeout Window at 5 — on M5 this is 25 minutes, sufficient to observe whether a break holds or fails without waiting too long. On M15, consider reducing to 3
Confirmation Bars at 2 — requires two consecutive closes beyond the level before TRUE BREAK classification. On M1, consider reducing to 1
RSI Long/Short Triggers at 55/45 — the asymmetric thresholds (not 60/40) accept momentum confirmation that is directional but not yet overbought/oversold
For other instruments or timeframes, adjust:
M1–M3 scalping — reduce Pivot Length to 3, reduce Fakeout Window to 3, reduce Confirmation Bars to 1, reduce Cooldown to 3, tighten Break Threshold to 0.08
H4–Daily swing trading — increase Pivot Length to 8–10, increase Pattern Freshness to 150, increase Fakeout Window to 8–10, increase Confirmation Bars to 3, increase TP2 to 5.0× ATR
Crypto (BTC, ETH) — increase Fakeout Wick Rejection to 0.50 for crypto's wider rejection wicks, increase Break Threshold to 0.18, increase Min Quality to 6 for tighter filtering on volatile instruments
Indices (NAS100, US30) — use Hard HTF Alignment (on), set RSI Long Trigger to 57, increase Confirmation Bars to 3 for cleaner index breakouts
Pure true-break mode — disable Enable Fakeout Reversal Signals, raise Min Quality to 6, raise RSI Long Trigger to 58 for higher-conviction momentum-only entries
Fakeout-specialist mode — enable Fakeout Reversal Signals, reduce Fakeout Wick Rejection to 0.38 for more sensitive fakeout detection, lower RSI Slope Bars to 2 for faster RSI crossover detection
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🔮 Breakout traders who are tired of being faked out — BREAKRUNE is built specifically around the fakeout problem. The three-phase architecture exists for one reason: to separate genuine structural breaks from the stop-hunt reversals that cost breakout traders money consistently
🔀 Traders who want to profit from both real breaks AND fakeouts — the fakeout reversal signal mode transforms the system's most common failure scenario into its own entry opportunity. The crowd that bought the false breakout becomes the fuel for the reversal trade
📊 Pattern-aware traders who want quantified structure — the five-pattern detection engine provides automatic structural context without manual drawing. Every signal tells you which pattern type it came from
📐 Momentum traders who need RSI precision — the dual RSI trigger layer (Fast 7 + Core 14) with slope measurement provides the most precise momentum timing gate in the AlphaX breakout signal suite
🧠 Systematic traders who want state transparency — the PENDING → TRUE BREAK / FAKEOUT classification state machine is fully visible on the dashboard in real time. You always know exactly what phase the system is in and why
🥇 Gold and forex intraday traders — breakout and fakeout patterns are particularly consistent on XAUUSD and major forex pairs during London and New York session transitions. Default settings are calibrated for these instruments
⚠ Traders who struggle with breakout timing — the RSI trigger layer forces every entry to have genuine momentum behind it at the moment of entry, eliminating the common experience of entering a breakout just as momentum exhausts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Pattern detection, breakout classification, and RSI conditions all finalize on confirmed bars
The pending state machine uses persistent variables (var) — the PENDING, TRUE BREAK, and FAKEOUT states persist across bars until resolved or expired. This is essential for multi-bar classification but means the state machine holds values from previous breakout events. A signal firing clears all pending state variables
Pattern detection is a best-fit classification — the system selects the most matching pattern from the available pivot structure on every bar. When the pivot structure changes (new pivots form), the pattern classification may update. This means the PATTERN row on the dashboard may change between signal events as new structure forms
The Pattern Freshness filter (default: 80 bars) ensures the oldest contributing pivot is recent. On slower timeframes with infrequent pivots, this may cause pattern detection to intermittently show — before new pivots form. Increase the freshness window on higher timeframes
Maximum 80 labels, 120 lines, and 600 bars back are configured. On very active low-timeframe charts, the oldest guide lines may be removed by PulseWire's rendering limits
The fakeout mark (orange ×) fires independently of the reversal signal. A fakeout mark can appear without a subsequent reversal signal if the RSI trap conditions (midline cross with slope) are not met — the fakeout is real but the reversal momentum confirmation is absent
The indicator does not track open positions or P&L and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who understand that a breakout is not a signal — it is the beginning of an evaluation. The signal comes after the market proves whether the break was real. Indicator

EonMetrics MTF Supply & Demand ZonesMTF SUPPLY & DEMAND ZONES
What it does
A "supply and demand zone" is a small area on the chart where price paused quietly for a few candles, and was then immediately followed by one strong, decisive candle that shot away from it in one direction. That quiet pause is where this indicator draws its zone — the idea being that this is where a large amount of buying or selling built up right before the big move, so price is likely to react again if it ever comes back to that exact area.
The key part of this tool is that it does this search across up to six different timeframes at the same time — your current chart's timeframe plus up to five higher ones (like 15-minute, 1-hour, 4-hour, Daily) — and draws all of them directly onto the chart you're actually looking at. This means if you trade on a 5-minute chart, you can still see a major 4-hour or Daily zone approaching, without ever switching your chart away from the 5-minute view.
How to actually use it (step by step)
Watch price as it approaches a colored box. Green boxes are "demand" zones (expect a possible bounce upward). Red boxes are "supply" zones (expect a possible bounce downward).
Pay more attention to boxes tagged with a bigger timeframe (like "4H" or "D") — these represent more significant, longer-term levels than a box tagged "5m" or "15m".
When price actually returns into a box, a small "R" letter appears — that's your cue that a retest is happening right now, worth watching closely for a reaction.
If a box's tag shows more than one timeframe at once (for example "15m, 1H"), it means multiple timeframes agree on almost the exact same price level — generally a stronger, more meaningful zone than one confirmed by only a single timeframe.
If a box gets fully broken through (depending on your settings, either by a wick or by a candle closing past its far edge), that zone has failed and should no longer be trusted — either it disappears from the chart or stays visible dimmed out, depending on your setting.
Every setting explained
Detection group
Sensitivity — controls how strong and sudden the "breakout candle" must be before its pause area counts as a zone. Lower numbers require a much stronger candle (fewer zones, but stronger ones); higher numbers accept weaker candles (more zones, more frequent but less significant).
Min Base Candles — the minimum number of small pause candles required right before the strong candle for it to count as a real zone. A higher number demands a proper, visible pause; a lower number (like 1) also accepts a zone built from just a single quiet candle.
Max Base Candles — how far back the script is allowed to look for pause candles. This mostly just prevents extremely long pauses from creating unusually oversized zones.
Base Candle Max Size (x impulse) — how small each pause candle must be compared to the strong breakout candle to actually count as "part of the pause." Lower values demand a very obvious size difference between the quiet candles and the big one.
Zone Size Multiplier — makes every drawn zone box slightly bigger or smaller than its natural measured size, without changing where it's centered.
Min Zone Height (x ATR) — throws out zones that are too thin/flat to be meaningful (basically just noise). Raise this if you keep seeing tiny, unhelpful zones.
Max Zone Height (x ATR) — throws out zones that are too tall — a pause that large usually isn't really a tight pause, just a wide sideways range, and produces low-quality zones.
Timeframes group
Six on/off + timeframe pairs — turn each timeframe slot on or off, and pick which timeframe it should scan. Leaving a timeframe box empty means "use whatever timeframe my chart is currently on."
Zone Behavior group
Retest Trigger — decide what counts as price "returning" to a zone: any wick poking into it ("Wick" — earliest, most sensitive), or a full candle close inside it ("Close" — stricter, fewer false signals).
Zone Invalidation — decide what counts as a zone being broken/failed: a candle closing all the way through the far edge ("Close" — recommended, survives brief stop-hunt wicks), or any wick trading through it ("Wick" — kills the zone immediately, more sensitive).
Skip Overlapping Zones — when a new zone from one timeframe lands on almost the same price as an existing zone from another timeframe, this merges them into a single box (showing both timeframe tags) instead of drawing two overlapping duplicates.
Overlap Threshold — how much two zones need to overlap before they're considered "the same level" and merged together. Lower values merge more aggressively; higher values keep each timeframe's version separate more often.
Max Active Zones per Timeframe — the maximum number of zones from a single timeframe kept on the chart at once (the oldest one is dropped once you go over this). Since several timeframes can be active at once, the total on-screen count adds up across all of them.
Keep Broken Zones on Chart — when turned on, a zone that fails stays visible but dimmed with a dashed border (useful for reviewing which levels didn't hold). When off, failed zones are removed immediately.
Zone Display Range (x ATR) — temporarily hides zones that are currently very far away from price, just to reduce clutter. Hidden zones keep working in the background and reappear automatically once price gets close again. Set to 0 to always show every zone regardless of distance.
Style group
Supply / Demand — the fill colors for red (supply) and green (demand) zones.
Show Timeframe Label — prints which timeframe each zone came from directly inside the box.
Show Zone Mid-Line — adds a dotted line through the exact middle of every zone, sometimes used as a more precise reaction point.
Show Retest Markers — turns the small "R" touch-markers on or off.
Alerts group
New Zone / Zone Retest / Zone Break — turn each alert type on or off individually. In PulseWire's own "Create Alert" window, choose "Any alert() function call" to receive the full, detailed messages (direction, timeframe, exact prices) for all of them at once. Indicator

[ A L P H A X ] BASTION - Support & Resistance PatternsAlphaX BASTION — Support & Resistance Lattice Engine: Touch-Clustered Zone Detection, HTF Level Blending, Four Interaction Playbooks & Level-to-Level Target System
AlphaX BASTION is a professional-grade support and resistance system built around the concept of a lattice — a dynamic, self-updating grid of strength-scored price zones that are continuously constructed from fractal pivot clusters, blended with higher timeframe levels, decayed over time as they lose relevance, and scored by touch frequency and institutional significance. Unlike static horizontal line indicators or basic pivot systems, BASTION treats every support and resistance level as a living structure with a birth date, a touch history, an HTF weight, and a decay clock. Where most S/R systems simply identify levels and leave the trader to decide what to do, BASTION goes one step further: it monitors every active level for four specific micro-pattern interactions — DEFEND, SWEEP, RETEST, and COIL — and fires precision entry signals when those interactions occur at qualified levels with sufficient confluence. The target for every signal is not an arbitrary ATR multiple or measured move — it is the next Bastion level in the signal direction, the natural institutional delivery destination from one defended wall to the next. Designed for traders across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏰 The Lattice — A Self-Building Defended Price Map
The word "lattice" captures the core concept precisely: BASTION constructs an interconnected grid of defended price levels that represents the current institutional support and resistance landscape. This lattice is not drawn manually, not imported from a fixed timeframe, and not redrawn from scratch on every bar. It is built incrementally — growing as new pivots form, strengthened as levels are retested, and pruned as levels age beyond their relevance window.
How the lattice is constructed:
On every bar, BASTION detects confirmed fractal pivot highs and lows (using a configurable pivot length, default: 5 bars each side). Each new pivot is fed into the lattice's merge algorithm:
If the new pivot is within the merge tolerance (default: 0.22× ATR) of an existing level, it merges with that level — the level's midpoint shifts to the weighted average of all contributing pivots, the touch count increments, the zone boundaries expand if necessary, and the last touch timestamp updates
If the new pivot is farther than the merge tolerance from any existing level, a new level is created with the pivot as its midpoint, zone height of ±0.18× ATR above and below, touch count of 1, and the current bar as its birth bar
When the number of levels per side exceeds the configured maximum (default: 4), the oldest level is dropped from the end of the array
Level decay:
Levels that have not been touched in more than the configured decay period (default: 250 bars) are pruned automatically. This ensures the lattice reflects current institutional market memory rather than accumulating ancient, irrelevant levels that clutter the chart and produce false signals.
Why touch clustering produces better levels than standard S/R: A single pivot high at a price is a weak level — it represents one instance of sellers overwhelming buyers. The same price area touched three times across different sessions represents a genuine institutional order cluster — the level where significant participants have repeatedly defended their position. BASTION's weighted averaging and touch counting system identifies these genuine defended levels and distinguishes them from noise pivots.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📡 HTF Level Blending — Multi-Timeframe Institutional Walls
Every Bastion level is either a current timeframe pivot cluster or a higher timeframe structural level . When Show HTF Swing Levels is enabled (default: on), BASTION pulls pivot highs and lows from the configured HTF (default: H4) and feeds them into the same merge algorithm as current timeframe pivots.
HTF levels receive a special weight in the strength calculation: +2 additional strength points beyond their touch count. This reflects the institutional significance differential — a resistance level formed on H4 represents a zone where a much larger institutional participant defended their position, and carries proportionally more weight than a current timeframe pivot at the same price.
HTF levels are visually distinguished: HTF-sourced zones are rendered with a slightly different purple color (slateblue rather than the standard purple), and HTF-contributing midlines use a thicker dashed line (width 2 vs 1 for standard levels). This allows you to immediately identify which levels have higher timeframe structural backing.
How HTF blending works in practice: When an H4 resistance level is at 2490.00 and a current timeframe resistance forms at 2491.50 — within the merge tolerance — they merge into a single strengthened level. The merged level receives the touch count of both the HTF pivot and any current timeframe retests, plus the HTF weight bonus, making it one of the strongest levels in the lattice. This is the precise behavior of real institutional support and resistance: the H4 level acts as the anchor, and intraday touches confirm it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💪 Level Strength Scoring
Every level in the lattice has a dynamically computed strength score used to qualify signals and sort level priority.
Strength components:
Touch count — the primary strength component. Each time a new pivot merges into the level, touch count increments. A level with 4 touches is significantly stronger than one with 1
HTF bonus (+2) — levels that have HTF pivot contributions receive 2 additional strength points, reflecting their higher institutional significance
Recency bonus (+1) — levels born within the last 80 bars receive 1 additional point. Fresh levels that were recently created and immediately retested carry more immediate institutional relevance than older levels with the same touch count
Minimum strength gate: Signals are blocked from firing at levels with strength below the configured minimum (default: 2 touches). This single filter eliminates the single most common false signal in S/R trading — entering at an untested level that has not proven itself as a genuine defended zone.
Strength display on dashboard: The nearest support and resistance levels are displayed on the dashboard with their strength scores in brackets — e.g., "2450.50 " means the level at 2450.50 has a strength score of 4. At a glance, you know which levels are most defended.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎮 The Four Interaction Playbooks
The lattice provides the structural map. The playbook engine defines what to do when price arrives at a lattice level. Four specific micro-pattern interactions are monitored continuously — each representing a different way price can interact with a defended wall and a different entry scenario.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DEFEND — Wick Rejection at Level
The most common and cleanest S/R interaction. A wick rejection candle forms when price tests the level and is immediately repelled — buyers overwhelm sellers at support, or sellers overwhelm buyers at resistance, within a single candle.
Long conditions (support DEFEND):
The current bar's low is within the proxAtr distance of the nearest support level
The lower wick exceeds the configured minimum (default: 52% of bar range) — a dominant rejection wick
The close is in the upper quarter of the bar (above bodyBot + 25% of range)
The close is above the zone bottom — price rejected from inside the zone
The DEFEND signal tells you: The support level absorbed the selling pressure on this bar with a clear institutional response. The wick is the signature of buyers stepping in aggressively at the defended zone. This is the most textbook S/R signal available and the highest-frequency of the four playbooks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SWEEP — Liquidity Grab + Reclaim
The institutional stop-hunt interaction. Price breaches the zone boundary to trigger stop orders, then immediately reverses and closes back inside the zone.
Long conditions (support SWEEP):
The current bar's low extends below the zone bottom by more than the minimum sweep depth (default: 0.12× ATR) — stop orders below support have been triggered
The bar closes above the zone midline — the reclaim is decisive, not just touching the boundary
The bar closes bullish (close above open) — institutional buying drove the recovery
Why SWEEP is the highest-conviction signal: A liquidity sweep at a lattice level combines two layers of institutional evidence. The level itself has been defended multiple times (touch count) and has institutional order significance. The sweep event confirms that institutions actively used the liquidity pool below the level to fill their buy positions — the same sweep-and-reclaim dynamic that underlies MAGNET, but now occurring specifically at a pre-qualified lattice level with known strength.
The SWEEP playbook carries a confluence bonus (+1 layer point) because of this elevated institutional evidence.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RETEST — Break Then Hold (S/R Flip)
The classic support-becomes-resistance and resistance-becomes-support interaction. Price previously broke through the level from the other side, and is now returning to test the flipped level.
Long conditions (support RETEST):
Within the lookback window (default: 12 bars), the close was below the zone bottom — a genuine prior breakdown
The current bar's low is within the zone and the close is above the zone midline — the retest from above is holding
The current bar closes bullish
The RETEST signal captures: The moment when a broken resistance becomes confirmed new support. When a level that previously acted as resistance is broken, retail traders who were long above the level are stopped out or become sellers. When price returns to test the level from above — and the close holds above the midline — the same institutional level that attracted sellers is now attracting buyers who missed the initial breakout. This is the "second chance" entry that offers excellent risk/reward relative to the original breakout candle.
The RETEST playbook also carries a confluence bonus (+1 layer point).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COIL — Compression into Level
The pre-breakout compression interaction. Price has been ranging with narrow ATR bars approaching the level — a coiling squeeze that frequently precedes an explosive directional move.
Long conditions (support COIL):
The last N bars (default: 4) each have an ATR of less than 0.75× the overall ATR — the market is compressing with below-average volatility
The close is within the proxAtr distance of the support level — the compression is occurring directly at the lattice level
The close is above the zone midline — the compression is occurring on the correct side of the level
The COIL signal captures: The energy-building phase at a defended level. When price approaches a lattice level with declining volatility over multiple bars, it indicates the institutional response to that level is suppressing price movement — buyers and sellers are in equilibrium at the level, but the institutional bias (toward defending it as support or resistance) creates a coiled spring. The first decisive bar after the coil frequently produces a large directional move.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Level-to-Level Target System — The Bastion's Unique Approach
Every other entry system in the AlphaX suite uses ATR multiples, Fibonacci measured moves, or pattern heights to compute take profit targets. BASTION uses none of these. The target for every BASTION signal is the next Bastion level in the direction of the trade.
For a long signal at support: The target is the nearest resistance level above the entry price in the current lattice. This is the next defended wall — the level where sellers are expected to step in and potentially cap the move.
For a short signal at resistance: The target is the nearest support level below the entry price — the next defended wall where buyers are expected to step in.
Why level-to-level targeting is superior to measured moves for S/R trading: The market does not move from support to an arbitrary ATR multiple above. It moves from support to resistance — from one institutional wall to the next. Using the actual lattice level as the target ensures the trade is exited at the next genuine institutional interaction point rather than at an arbitrary mathematical distance. This aligns the trade's exit with the same institutional framework that generated the entry.
NEXT WALL TGT on dashboard and chart: The target level is displayed on the dashboard as NEXT WALL TGT and plotted as a yellow-green dashed line on the chart labeled "NEXT WALL." When no opposing lattice level is currently qualified (the target would be beyond the available lattice), the system shows — rather than fabricating a target.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 7-Layer Confluence Engine
Every playbook signal is evaluated through a 7-layer scoring system. Signals below the minimum layer count (default: 4) are suppressed.
Layer 1 — Level Strength (1 point):
The interacted level meets the minimum strength threshold (touch count + HTF bonus + recency bonus ≥ minimum). Levels that do not meet this floor cannot produce signals regardless of playbook quality.
Layer 2 — HTF Trend Bias (1 point):
The higher timeframe EMA structure (default: 60-minute, 21/55 EMA) agrees with the signal direction. Bull signals require HTF bull, bear signals require HTF bear. When HTF bias is disabled, this layer is neutral (0 points). Note that the HTF bias is also enforced as a hard condition in the signal firing logic — signals opposing the HTF are blocked entirely when useHtfBias is on.
Layer 3 — Volume Expansion (1 point):
Current bar volume exceeds the volume moving average by the configured multiplier (default: 1.08×). Confirms institutional participation on the interaction bar.
Layer 4 — Non-Chop Market (1 point):
Choppiness Index is below the configured threshold (default: 62). Also enforced as a hard gate — extreme chop blocks all signals. S/R interactions during extreme chop frequently produce false breakouts and fake rejections.
Layer 5 — Playbook Bonus (1 point):
SWEEP and RETEST playbooks receive 1 additional point reflecting their elevated institutional evidence. DEFEND and COIL do not receive this bonus — they are valid but carry less structural confirmation than a sweep reclaim or S/R flip.
Layer 6 — Bar Range Quality (1 point):
The current bar's range is at least 0.35× ATR — the interaction bar has sufficient price action to produce a genuine signal. Doji and near-doji bars in critical zones do not score this point.
Layer 7 — Session Active (1 point):
The current bar is within the configured active session window when the session filter is enabled. When the filter is off, this layer always contributes its point.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 14-row real-time dashboard displays the complete state of the lattice and the current signal context.
LATTICE
Nearest Sup — the price of the nearest support level below current price, with its strength score in brackets (e.g., "2450.50 "). Yellow-green color
Nearest Res — the price of the nearest resistance level above current price with strength score. Red color
Zone Count — the total number of active support and resistance levels in the lattice (e.g., "3 sup · 4 res"). Provides awareness of how populated the current lattice is
PLAYBOOK
State — the current playbook state: the active playbook name (DEFEND, SWEEP, RETEST, COIL) when a signal just fired; WATCH WALLS during the inter-signal period
Bias — ▲ LONG or ▼ SHORT when a signal fired; NEAR RES, NEAR SUP, or MID-RANGE based on current price position relative to the lattice when idle
Next Wall Tgt — the price of the next opposing lattice level — the level-to-level target for the current trade
FILTERS
HTF Bias — ▲ BULL, ▼ BEAR, or — FLAT
Chop — live Choppiness Index value. Orange when above the stand-aside threshold
Volume — EXPAND (above threshold) or QUIET
Playbooks On — abbreviations of all currently enabled playbooks (DEF SWP RET COIL) for quick reference
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Resistance Zone Boxes (purple / slateblue) — semi-transparent boxes spanning each resistance level from its birth bar to 15 bars beyond current. Standard purple for current timeframe levels, slateblue for HTF-blended levels
Resistance Midlines (purple dashed) — the exact midpoint of each resistance zone. Width 1 for standard, width 2 for HTF levels
Support Zone Boxes (yellow-green) — semi-transparent yellow-green boxes for all active support levels
Support Midlines (yellow-green dashed) — support zone midpoints. Width 2 for HTF levels
⬡ Diamond (below bar, bright yellow-green) — BASTION long signal. Playbook fired at a support level with qualifying confluence
⬡ Diamond (above bar, bright red) — BASTION short signal
Playbook Label — appears above or below the signal diamond showing "BASTION LONG/SHORT" + playbook name + level price
SL Guide (red dotted) — stop loss below the zone bottom plus ATR buffer (long) or above zone top plus ATR buffer (short), extending 30 bars forward with "SL" label
NEXT WALL Guide (yellow-green dashed) — the level-to-level target extending 30 bars forward with "NEXT WALL" label
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX BASTION — Step by Step
Step 1 — Read the Lattice
Check the NEAREST SUP and NEAREST RES rows on the dashboard. Note the strength scores in brackets. Levels with strength 4+ are the most defended — prioritize interactions at these levels
Look at the Zone Count row — a lattice with 3–4 levels on each side represents a well-populated market map. A sparse lattice (1–2 levels per side) means fewer reference points and potentially lower signal quality
Check whether the nearest support or resistance has HTF origin — the slateblue color on the chart or the higher strength score indicates institutional level significance
Step 2 — Monitor Price Approaching a Level
When the dashboard Bias row shows NEAR RES or NEAR SUP, price is approaching a lattice level within the proximity threshold. Watch for a playbook interaction to develop
Identify which playbook is most likely: Is price approaching with narrow bars (COIL)? Did price recently spike below (SWEEP potential)? Has the level previously been broken (RETEST setup)? Is price arriving with a clear wick forming (DEFEND setup)?
Check HTF Bias and Chop on the dashboard — both must be favorable before a signal can fire
Step 3 — Enter on the Diamond Signal
A ⬡ diamond below the bar confirms a qualifying long interaction. The playbook label shows which of the four setups fired and at which exact level
The SL guide shows the stop level — placed below the zone bottom plus ATR buffer (long) or above zone top plus buffer (short). This is the structural invalidation point: if price closes through the zone boundary in the wrong direction, the level has failed to defend
The NEXT WALL guide shows the target level — the next opposing lattice wall
SWEEP and RETEST signals carry the highest confluence (extra playbook layer point) — size these entries at full allocation. DEFEND and COIL at standard allocation
Step 4 — Manage to the Next Wall
The trade targets the NEXT WALL level shown on the chart. As price approaches that level, watch for rejection signals in the opposing direction — if BASTION fires a signal at the target level against your trade, this is a natural exit point
Monitor the lattice continuously — new levels may form during the trade that become relevant intermediate targets or stop adjustment points
If the lattice map shifts significantly (a level is pruned by decay or a strong new level forms), reassess the trade's target
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Chop Index is orange on the dashboard — the hard gate is active. No signals fire in extreme chop. S/R levels lose their predictive power when the market is oscillating — every touch becomes ambiguous
Zone Count shows 1–2 levels per side — a sparse lattice means the system has insufficient structural reference. The market may be trending strongly through all levels or may be too early in the session to have built meaningful clusters. Wait for the lattice to populate
Nearest level strength is 1 — the minimum strength gate will block signals at untested levels, but if the nearest levels all show , the lattice is populated with fresh, unproven levels. Increase the minimum level strength in settings to require at least 2–3 touches
HTF Bias shows FLAT — no higher timeframe directional conviction. Counter-trend S/R interactions in a flat HTF environment fail at a higher rate because neither institutional buyers nor sellers have committed to a directional view
NEXT WALL TGT shows — — no opposing qualified level exists in the lattice above (for longs) or below (for shorts). Without a level-to-level target, the trade lacks a natural exit framework. Consider skipping signals when no next wall target is available
Playbook is COIL at a level with strength 2 — a coil at a weak, lightly-tested level carries the lowest probability of the signal matrix. COIL at high-strength (4+) levels with HTF backing is a quality setup; COIL at minimum-strength levels is marginal
The ideal BASTION setup:
Support or resistance level with strength 4+ (multiple touches, ideally HTF-blended)
HTF Bias aligned with the trade direction
SWEEP or RETEST playbook (highest confluence bonus)
Volume expanding on the interaction bar
Chop Index well below threshold
Clear NEXT WALL target on the opposing side of the lattice
Signal layers at 6–7 out of 7
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🏰 Dynamic S/R lattice — self-building, self-pruning grid of touch-clustered support and resistance zones. New pivots merge into existing levels, incrementing touch counts and adjusting zone boundaries automatically
📡 HTF level blending — H4 (or any configurable HTF) pivot levels fed into the same lattice with a strength bonus, producing a multi-timeframe S/R map in a single indicator
💪 Level strength scoring — touch count + HTF bonus + recency bonus produces a composite strength score for every level. Minimum strength gate blocks signals at untested levels
⏱ Level decay — zones older than the configurable decay period are automatically pruned, keeping the lattice relevant to current institutional market memory
🎮 Four interaction playbooks — DEFEND (wick rejection), SWEEP (liquidity grab + reclaim), RETEST (S/R flip), COIL (compression) — each detecting a different institutional level interaction scenario
🎯 Level-to-level target system — take profit targets the next opposing lattice wall rather than an arbitrary ATR multiple or measured move. The most institutionally grounded target method available
🛡 Zone-anchored stop loss — stop placed beyond the zone boundary plus configurable ATR buffer, at the structural invalidation point for each interaction type
🧠 7-layer confluence engine — Level Strength, HTF Trend Bias, Volume, Non-Chop, Playbook Bonus, Bar Range Quality, Session Active
📊 Live lattice dashboard — Nearest Support/Resistance with strength scores, Zone Count, active Playbook, Bias, Next Wall Target, and all filter states
🎨 Phase-coded zone visualization — resistance zones in purple/slateblue, support zones in yellow-green. HTF levels distinguished by color shade and line width
🔔 2 alert conditions + runtime alerts — Bastion Long and Bastion Short with level price and target in the alert message
⚙ Fully configurable — pivot length, zone merge and half-height tolerances, max levels per side, level decay, HTF timeframe for levels, all four playbook enables, proximity, wick minimum, sweep depth, retest lookback, coil bars, minimum level strength, confluence minimum, HTF bias timeframe and EMAs, volume filter, chop gate, session, cooldown, SL buffer, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
S/R Lattice
Swing Pivot Length — fractal sensitivity for pivot detection (default: 5)
Zone Merge (xATR) — ATR distance within which new pivots merge into existing levels (default: 0.22)
Zone Half-Height (xATR) — ATR distance above and below each level midpoint defining the zone boundaries (default: 0.18)
Max Levels per Side — maximum active resistance and support levels maintained simultaneously (default: 4 each)
Level Decay (bars) — bars since last touch after which a level is pruned from the lattice (default: 250)
ATR Length — ATR calculation lookback (default: 14)
Show S/R Zones — toggle lattice boxes and midlines
Blend HTF Swing Levels — toggle higher timeframe level incorporation
HTF for Levels — the higher timeframe from which pivot levels are imported (default: H4)
HTF Pivot Length — pivot length for HTF level detection (default: 5)
Interaction Playbooks
DEFEND — Wick Rejection at Level — toggle the rejection wick playbook
SWEEP — Liquidity Grab + Reclaim — toggle the sweep and reclaim playbook
RETEST — Break then Hold — toggle the S/R flip retest playbook
COIL — Compression into Level — toggle the narrow-bar compression playbook
Max Distance to Level (xATR) — ATR distance from level within which an interaction is considered proximate (default: 0.35)
Min Rejection Wick % — minimum wick fraction of bar range for DEFEND (default: 0.52)
Min Sweep Depth (xATR) — minimum extension below/above zone boundary for SWEEP (default: 0.12)
RETEST Lookback (bars) — bars to scan for the prior breakout in RETEST detection (default: 12)
COIL Min Narrow Bars — consecutive narrow-ATR bars required for COIL (default: 4)
Min Level Strength (touches) — minimum composite strength for a level to generate signals (default: 2)
Confluence
Min Layers (of 7) — minimum confluence score to fire a signal (default: 4)
HTF Trend Bias / HTF Bias TF / HTF Fast / Slow EMA — trend bias filter parameters
Volume Expansion / Volume vs Avg / Volume Avg Length — volume layer parameters
Block Extreme Chop / Choppiness Length / Chop Block Above — chop gate parameters
Session Filter / Active Session — trading hours restriction
Signal Cooldown (bars) — minimum bars between signals (default: 6)
Level-to-Level Guidance
Show SL + Next Level Target — toggle the stop and target guide lines
SL Beyond Sweep/Zone (xATR) — ATR buffer beyond the zone boundary for stop placement (default: 0.35)
Show Playbook Label — toggle the signal label showing playbook name and level price
Display
Show Entry Markers — toggle the ⬡ diamond signal shapes
Show Dashboard — toggle the full dashboard
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Support — yellow-green for support zones and bullish signal elements
Bear / Resistance — red for resistance zones and bearish signal elements
S/R Lattice — purple for standard lattice zones and midlines
HTF Level — slateblue for HTF-blended level zones and midlines
Sweep Accent — orange for SWEEP playbook accents and chop warnings
Stop Guide / Next Level Target — stop and target line colors
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (2 total + runtime)
Entry Alerts
Bastion Long — qualifying long interaction fired at a support level. Alert message includes playbook name, level price, and next wall target
Bastion Short — qualifying short interaction fired at a resistance level
Runtime alerts (via the alert() function) fire simultaneously with the chart signals, also containing the playbook, level price, and target in the message for immediate actionability.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M5–H1 :
Pivot Length at 5 — balanced sensitivity for intraday lattice construction
Zone Merge at 0.22× ATR — appropriate for gold's tick structure; tighter than typical forex parameters
Level Decay at 250 bars — approximately 20 hours on M5; sufficient to maintain intraday relevance without accumulating ancient levels
HTF for Levels at H4 — the most widely respected swing timeframe for gold and forex institutional structure
Minimum Level Strength at 2 — requires at least two confirmed touches before a level can generate signals
For other instruments or timeframes, adjust:
M1–M3 scalping — reduce Pivot Length to 3, reduce Zone Merge to 0.15, reduce Level Decay to 100–150 bars, reduce Cooldown to 3, reduce COIL Min Narrow Bars to 2–3
H4–Daily swing trading — increase Pivot Length to 8–10, increase Zone Merge to 0.35, increase Level Decay to 500+, set HTF for Levels to Weekly, increase Min Level Strength to 3
Crypto (BTC, ETH) — increase Zone Merge to 0.28–0.35 for wider tick structure, increase Min Sweep Depth to 0.18, increase Level Decay to 300
Indices (NAS100, US30) — use session filter for cash market hours, increase Zone Merge to 0.25, increase Min Level Strength to 3 for index structure
More signals — lower Min Layers to 3, reduce Min Level Strength to 1, increase Max Distance to Level to 0.50
Highest-quality only — raise Min Layers to 5–6, increase Min Level Strength to 3+, enable only SWEEP and RETEST playbooks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🏰 Support and resistance traders — BASTION is the most complete and systematic S/R implementation in the AlphaX suite. Every aspect of the S/R trading approach — level identification, strength scoring, interaction detection, stop placement, target identification — is automated and quantified
📡 Multi-timeframe S/R traders — the HTF level blending system automatically incorporates H4 (or any configurable timeframe) swing levels into the same lattice, producing a multi-timeframe S/R map without requiring manual level drawing across timeframes
💧 Liquidity sweep traders — the SWEEP playbook at lattice levels is the highest-conviction signal type in BASTION, combining the stop-hunt reversal concept from MAGNET with the pre-qualified, strength-scored level framework of the lattice
🎯 Traders who want structurally meaningful targets — the level-to-level target system is the most institutionally grounded TP approach available — targeting the next defended wall rather than an arbitrary distance
🧠 Systematic traders who want quantified S/R — touch counts, strength scores, decay parameters, and confluence layers replace entirely subjective level identification with objective, repeatable criteria
📈 Traders across all asset classes — the ATR-normalized zone parameters adapt naturally to gold, forex, crypto, and indices without manual recalibration between instruments
⚠ Traders who draw too many or too few S/R levels manually — BASTION manages level count automatically through the Max Levels per Side setting and the decay system — always showing the most current and most relevant levels without chart clutter
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Lattice construction, level strength, playbook detection, and confluence scoring all finalize on confirmed bars only
The lattice is built incrementally from the first bar of chart history. On initial chart loads, the lattice will be sparse for the first 50–100 bars as pivots begin to form and levels begin to cluster. Signal quality improves as the lattice populates
The level decay mechanism (default: 250 bars) means that on very active instruments with frequent pivots, the lattice refreshes relatively quickly. On slower instruments or higher timeframes, levels persist longer. Adjust the decay period to match your instrument's typical S/R memory window
HTF level blending uses Pine Script's request.security — HTF pivots are confirmed on the HTF's own bar close schedule, not the current timeframe. This is non-repainting and consistent with all standard security requests
When multiple playbooks fire at the same level on the same bar, the signal with the highest layer count is selected. The dashboard's playbook abbreviations show which playbooks are currently enabled
Maximum 500 lines, 500 labels, and 60 boxes are rendered. The lattice visualization uses boxes and lines for each level, the signal uses a label, and the guide uses lines and labels. On very active charts with maximum level counts, older elements may be removed by PulseWire rendering limits
The indicator does not track open positions or P&L; and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who understand that price does not move in a vacuum — it moves between walls, and the key to reading the market is knowing where those walls are, how strong they are, and exactly what price does when it arrives at them. Indicator
