DR/IDR + S&DEnglish Description
DR/IDR + S&D is a multi-purpose market structure indicator designed for Forex traders.
It automatically plots DR / IDR (Daily Range / Initial Daily Range) zones while also detecting momentum-based Supply & Demand areas.
This indicator is especially useful for:
London / New York session trading,
intraday scalping,
liquidity sweeps,
breakout and mean reversion strategies.
Features
✔ Automatic DR / IDR boxes
✔ RDR / ADR / ODR session support
✔ Custom timezone settings
✔ Momentum-based Supply & Demand detection
✔ Automatic mitigation cleanup for used zones
✔ Zone size filtering system
✔ Maximum active zone limit for performance optimization
✔ DR midpoint (0.5) level plotting
DR / IDR Logic
DR (Daily Range) → Full session high-low range
IDR (Initial Daily Range) → Candle body based initial session range
Users can switch between DR and IDR visualization.
Supply & Demand Logic
The indicator analyzes strong momentum moves to automatically identify:
demand zones after aggressive bullish expansions,
supply zones after aggressive bearish expansions.
Once price mitigates a zone, the area becomes inactive automatically.
Best Usage
1m / 3m / 5m charts
Major Forex pairs
Session-based trading strategies
Liquidity + market structure concepts
Note
This indicator is non-repainting.
All zone calculations are confirmed only after candle close (barstate.isconfirmed).
⚠️ This indicator is designed solely as a technical analysis tool and does not constitute financial or investment advice.
All trading decisions and associated risks remain the sole responsibility of the user.
Türkçe Açıklama
DR/IDR + S&D, Forex piyasaları için geliştirilmiş çok amaçlı bir piyasa yapısı indikatörüdür.
Bu araç; DR / IDR (Daily Range / Initial Daily Range) bölgelerini otomatik olarak oluştururken aynı zamanda momentum bazlı Supply & Demand (Arz / Talep) alanlarını da tespit eder.
İndikatör özellikle:
London / New York session işlemleri,
intraday scalping,
liquidity sweep,
breakout ve mean reversion stratejileri
için optimize edilmiştir.
Özellikler
✔ Otomatik DR / IDR kutuları
✔ RDR / ADR / ODR session desteği
✔ Özelleştirilebilir timezone ayarı
✔ Momentum bazlı Supply & Demand zone tespiti
✔ Mitigated (çalışmış) bölgelerin otomatik temizlenmesi
✔ Zone genişliği filtreleme sistemi
✔ Performans optimizasyonu için maksimum aktif zone limiti
✔ DR midpoint (0.5) seviyesi çizimi
DR / IDR Mantığı
DR (Daily Range) → Session boyunca oluşan tam high-low aralığı
IDR (Initial Daily Range) → Session içerisindeki candle body bazlı başlangıç aralığı
Kullanıcı isterse DR veya IDR görünümünü seçebilir.
Supply & Demand Mantığı
İndikatör güçlü momentum hareketlerini analiz ederek:
hızlı yükselişlerden sonra oluşan demand bölgelerini,
hızlı düşüşlerden sonra oluşan supply bölgelerini
otomatik olarak işaretler.
Fiyat ilgili bölgeyi mitigate ettiğinde (tekrar test ettiğinde), zone pasif hale getirilir.
En İyi Kullanım
1m / 3m / 5m grafikler
Forex majör pariteleri
Session bazlı işlem stratejileri
Liquidity + market structure kombinasyonları
Not
Bu indikatör repaint yapmaz.
Zone oluşumları yalnızca candle kapanışı onaylandıktan sonra oluşturulur (barstate.isconfirmed).
⚠️ Bu indikatör yalnızca teknik analiz amacıyla geliştirilmiş yardımcı bir araçtır.
Herhangi bir yatırım tavsiyesi içermez. İşlem kararları ve oluşabilecek riskler tamamen kullanıcı sorumluluğundadır. Indicator

ADX/DI ProfileADX/DI Profile
Hello everyone. Please excuse my English, as I am not a native speaker. I use translation tools, but I hope my passion for coding reaches you.
First of all, I want to express my deepest respect and gratitude to @LuxAlgo. Your incredibly creative scripts and stunning visual designs have always been a huge inspiration to my coding journey. Thank you!
Usually, ADX and DMI are drawn at the bottom of the chart to show when a trend is strong. But I wanted to know where (at what price) the trend was the strongest.
This script creates a "Memory of Energy." It stacks the buying and selling power not by time, but by price levels (spatial distribution).
To keep it simple, imagine stacking toy blocks.
1 Making Boxes: We take the highest and lowest price of a period and divide that space into equal rows.
2 Storing Energy: If a candle passes through 5 rows, and the ADX/DI energy point at that time is 30, we share those points equally into those 5 rows (6 points per row).
3 Drawing Blocks: We do this for all candles in the period. The price row with the highest total points gets the longest block on the chart.
・Blue Walls (+DI): This is where strong buying energy is stored. When the price falls into a thick blue wall, it acts as a strong support.
・Red/Purple Walls (-DI): This is where strong selling energy is stored. When the price rises into a thick red wall, it acts as a strong resistance.
・ADX POC (Thick Dotted Line): This is the exact price where the trend energy exploded the most. The price often acts like a magnet here, or it becomes the starting point of a new trend.
・Sub POC Lines (Thin Dotted Lines): When enabled in the settings, this draws lines at the extreme points where buying (+DI) and selling (-DI) energy were highest. These act as pinpoint bounce lines in localized battlegrounds.
・Engine Mode
This indicator is equipped with two different calculation modes to support dual strategies.
Fixed Steps (Real-time Entry): Draws fixed profiles for specific past sessions. Since the frame is locked, signals are confirmed without repainting, making it ideal for real-time entry decisions.
Rolling Window (Context/Repaint): A dynamic profile that continuously calculates based on the most recent bars. It smoothly captures immediate energy shifts, making it perfect for observing the macro context of the market.
Layout Mode
You can choose from 4 different profile drawing styles to fit your visual preference and trade plans.
Butterfly (Center Axis): Spreads outwards from the center like butterfly wings. The most intuitive layout for grasping the balance between buyers and sellers.
Left / Right Aligned: Anchored to the start or end of the period and extends in one direction. Similar to traditional volume profiles, providing classic views or reversed perspectives to help you discover new angles.
url=https://www.pulsewire.com/x/713ZPuuj/
Mirror (Opposed): Places the +DI and -DI blocks facing each other. Highly effective for visualizing the direct conflict line between bulls and bears.
url=https://www.pulsewire.com/x/GlWc2kWT/
Noise Filter
I believe that the simpler the chart, the clearer the essence of the market becomes. By increasing the Noise Filter value (e.g., from 0.0 to 0.15), weak and transparent energy blocks are automatically stripped away. This prevents information overload and leaves only the true, thick walls of the market, allowing for pure inspiration.
Enjoy the spatial view of the market!
ADX/DI Profile
皆さんこんにちは。私は英語のネイティブスピーカーではないため、至らない表現があるかもしれませんが、このスクリプトに込めた熱意が皆様に伝われば嬉しいです。
まず初めに、@LuxAlgo 氏へ最大限の敬意と感謝を捧げます。あなたの驚くべきスクリプトと洗練された視覚的デザインは、私のコーディングの旅において常に巨大なインスピレーションの源でした。本当にありがとうございます。
通常、ADXやDMIはチャートの下部に表示され、「いつ」トレンドが強かったかを示します。しかし、私は「どの価格帯で」トレンドが最も強かったかを知りたいと考えました。
このスクリプトは「エネルギーの記憶」を描き出します。時間軸ではなく、価格帯(空間)ごとに買いと売りのパワーを積み上げ、可視化する全く新しいアプローチです。
ブロック遊びをイメージしてください。
箱を作る: 一定期間の最高値と最安値を取り、その空間を等間隔の行に分割します。
エネルギーを配分する: あるローソク足が5つの箱を通過し、その時のADX/DIのエネルギー値が「30」だった場合、通過した5つの箱に平等にポイントを配分します(各箱に6ポイント)。
ブロックを描画する: これを全期間のローソク足に対して行います。最終的に最も多くポイントが蓄積された価格帯に、最も長いブロックを描画します。
青い壁(+DI): 過去に強い「買いエネルギー」が蓄積された場所です。価格が上から落ちてきた際、この分厚い壁は強力なサポートとして機能しやすくなります。
赤紫の壁(-DI): 過去に強い「売りエネルギー」が蓄積された場所です。価格が下から上がってきた際、この分厚い壁は強力なレジスタンスとして立ちはだかります。
ADX POC(中央の太い点線): トレンドの勢いが最も爆発したコアとなる価格帯です。価格はこのラインに磁石のように吸い寄せられるか、あるいはここを起点に新たなトレンドを生み出します。
サブPOCライン(細い点線): 設定から表示をオンにすると、買い(+DI)と売り(-DI)のエネルギーがそれぞれ最も高かった極値のラインを描画します。局所的な激戦区のピンポイントな反発ラインとして機能します。
エンジンモード (Engine Mode)
リアルタイムのエントリー判断と、過去の相場分析を使い分けられるよう、2つのモードを搭載しています。
Fixed Steps (リアルタイムエントリー): 過去の特定の期間ごとにプロファイルを固定して描画します。枠が固定されるためシグナルが確定しやすく(リペイントせず)、実戦でのエントリー判断に最適です。
Rolling Window (環境認識): 最新の価格から常に一定期間を遡って計算し続ける動的なプロファイルです。直近のエネルギーシフトを滑らかに捉え、相場全体の文脈(コンテキスト)を俯瞰するのに適しています。
レイアウトモード (Layout Mode)
視覚的な好みやトレードプランに合わせて、4種類の描画スタイルを選択できます。
Butterfly(中央軸): 中央から左右に蝶の羽を広げるように描画します。買いと売りのエネルギーバランスが最も直感的に把握できる設定です。
Left / Right Aligned(左・右揃え): 期間の左端・右端を基準にして一方向へ伸ばします。従来の出来高プロファイルに近い配置と、その逆位置を提供することで、同じチャートから異なる視点や新たな発見を得ることをサポートします。
Mirror(左右反転): 買いと売りのブロックを向かい合わせに配置します。ブル(買い手)とベア(売り手)の激しい衝突ラインを視覚化するのに最適です。
ノイズフィルター (Noise Filter)
私は、チャートはシンプルであるほど本質が見えてくると考えています。フィルターの数値を上げる(例:0.0から0.15へ)と、エネルギーの弱い透明なブロックが自動的に削ぎ落とされます。情報過多による脳の混乱を防ぎ、相場で本当に意識される「分厚い壁」だけを残すことで、新たなインスピレーションをもたらします。
空間的な市場分析をお楽しみください!
Indicator

Range Equilibrium Rotation Planner [AGPro Series]Range Equilibrium Rotation Planner
🧠 Core Idea
Is price rotating cleanly away from range equilibrium toward an edge, or is the midpoint still controlling the auction?
📌 Overview / What it does
Range Equilibrium Rotation Planner maps mature range structure and focuses on the midpoint equilibrium area instead of treating every range as a breakout setup.
The script displays the active range box, equilibrium band, edge rails, rotation room rail, failure rail, event labels, right-side tags, optional bar coloring, and a compact AG Pro dashboard with a 0-100 Rotation Score.
It does not predict range breaks. It helps organize range balance, midpoint control, directional rotation, edge room, failure risk, and next-action state.
🎯 Purpose & Design Philosophy
Many range tools focus on support, resistance, or breakout alerts.
This script was built for a different question: what happens inside the range before price reaches the edge?
It helps traders review whether price is still trapped around equilibrium or beginning a clean rotation from the midpoint toward the upper or lower edge.
⚡ Why This Script Is Different
Most range indicators draw a box and wait for a breakout.
This script does NOT center the workflow on range escape.
Instead, it evaluates range maturity, midpoint control, rotation quality, edge room, and failure back through equilibrium. The goal is rotation planning, not breakout prediction.
⚙️ Methodology
1. Range Maturity Detection
The script builds a rolling range using recent high and low structure, then checks whether the height and edge interactions are meaningful.
2. Equilibrium Mapping
The midpoint band is calculated around the center of the range and becomes the key control zone.
3. Rotation Evaluation
Price must move away from equilibrium with enough buffer before directional rotation is considered active.
4. Risk / Room Structure
The active edge becomes the room reference, while the opposite side of equilibrium becomes the failure area.
5. Visual Output
The chart receives a range box, equilibrium band, edge rails, room rail, failure rail, labels, right-side tags, optional bar coloring, and dashboard panel.
🗺️ How to Read the Chart
The range box marks the current high-to-low structure.
The equilibrium band shows the midpoint area where rotation control is evaluated.
The upper and lower rails mark the active range edges.
The room rail marks the edge being targeted by the active rotation.
The failure rail marks where rotation has moved back through the wrong side of equilibrium.
Labels highlight mature ranges, rotations from midpoint, equilibrium holds, edge reviews, and failed rotations.
Colors represent context:
• Teal → bullish rotation
• Pink → bearish rotation or failure
• Gold → equilibrium, room, or edge review
• Indigo → range structure or waiting context
The panel summarizes:
• Range
• Rotation Score
• Balance
• Room
• Action
🚦 Signals & States
• Range Ready → a mature range structure is available
• Bull Rotation → price rotated upward from equilibrium
• Bear Rotation → price rotated downward from equilibrium
• Midpoint Hold → price remains controlled by the equilibrium band
• Edge Review → price reached the active range edge
• Failed → rotation moved back through the failure rail
• READY → rotation quality and room are strong enough to monitor
• MONITOR → rotation is active but not fully ready
• WAIT RANGE → no mature range exists
• WAIT ROTATION → range exists but no clean rotation has started
🔔 Alerts Logic
Alerts can trigger when a mature range appears, when bullish or bearish rotation begins, when READY state appears, when midpoint hold appears, when an edge is reached, or when the rotation fails.
Alerts are attention markers only. They are not trade instructions.
🧩 Confluence Logic
The context becomes stronger when range maturity, balanced edge interaction, midpoint departure, edge room, and failure distance align.
The script avoids treating midpoint noise as a clean rotation without confirmation.
📊 When to Use
• Sideways markets with visible range structure
• Crypto, forex, indices, and liquid stocks
• 1H, 4H, and 1D market structure review
• Mean-reversion planning inside a range
• Range edge preparation without waiting for breakout-only logic
⚠️ When NOT to Use
• Strong one-directional trends with no range structure
• Thin symbols with unreliable highs and lows
• News-driven candles that distort range boundaries
• Very small ranges where spread or tick noise dominates
• Markets with unstable data or irregular sessions
🎛️ Key Inputs
• Range Lookback → controls the structure used to build the range
• Minimum / Maximum Range Height ATR → filters ranges that are too small or too wide
• Edge Touch Tolerance → controls how edge interactions are counted
• Equilibrium Band ATR → controls midpoint band width
• Rotation Break Buffer → controls how far price must move beyond equilibrium
• Minimum Ready Score → controls READY strictness
• Projection Bars → controls how far boxes, rails, and tags extend
• Visual settings → control labels, tags, panel location, theme, and font size
🖥️ Interface & Visual Design
The panel is designed to show the range state, rotation quality, balance, room, and action without overloading the chart.
The first row uses a merged AG Pro header. The chart layer keeps the range and equilibrium structure visible while leaving room for price action.
Labels are controlled with cooldown and maximum count settings to preserve a premium screenshot style.
🧪 Practical Usage Workflow
1. Read the panel.
2. Confirm a mature range exists.
3. Check whether price is still at equilibrium or rotating away.
4. Review room to the active edge.
5. Watch the failure rail if rotation loses control.
🔍 Interpretation Guidelines
A high score means range maturity, midpoint departure, and edge room are aligned.
A midpoint hold means equilibrium is still controlling the auction.
An edge review means the rotation has reached the active range edge and should be interpreted as context, not as an automatic exit.
A failed state means the active rotation moved back through its failure boundary.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an automated trading system.
It does not place orders.
It does not guarantee edge reach, reversal, breakout, or profitability.
⚠️ Limitations & Transparency
Range boundaries can shift as new highs or lows appear.
Different timeframes may show different range structures.
Large volatility events can temporarily distort range height and edge touch quality.
Low liquidity may create unreliable equilibrium or edge behavior.
The script is rule-based and should be interpreted within broader market context.
🧠 Market Context Notes
Equilibrium is often where the market decides whether price will rotate toward an edge or remain balanced.
The strongest rotation contexts usually appear when price leaves midpoint with room, while failure remains clearly defined.
This script is designed to make that inside-range decision point easier to read.
🧾 Use Case Examples
When price holds near midpoint and then closes above the equilibrium band, the script can begin tracking bullish rotation toward the upper range edge.
When price rotates downward from equilibrium and reaches the lower edge, the context shifts into edge review rather than fresh entry signaling.
When price moves back through the failure rail, the active rotation context fails.
🧱 System Philosophy
AGPro Series tools are built as decision-support systems.
They aim to convert market structure into readable context: what is active, what improves the plan, what invalidates it, and what should be reviewed next.
🔐 Non-Promise Statement
No script can provide certainty.
No signal guarantees outcome.
This tool provides structured context only.
📉 Risk Disclosure
Trading involves risk.
Markets can move quickly and unexpectedly.
Users are responsible for their own analysis, risk management, and decisions.
This script does not provide financial advice.
📚 Educational Note
Use this tool to study how range equilibrium, midpoint control, rotation quality, and edge room interact across different symbols and timeframes.
Indicator

Indicator

Trend Lines (HTF)Trend Lines (HTF)
Auto-detected trend lines drawn between recent confirmed pivots across up to three higher timeframes. Resistance lines connect swing highs; support lines connect swing lows. Each line extends to the chart's right edge, and lines that price has closed through are dimmed and dashed — visible for context without dominating the chart.
The point is to put higher-timeframe trend structure on a single chart, without manually redrawing every time a new swing prints.
How it works
For each of the three configured timeframes, the script runs a pivot detector inside request.security, with bar timestamps stored alongside each pivot so lines stay anchored to absolute chart time and don't drift on zoom or scroll. The most recent swing highs and swing lows are kept per timeframe.
Trend lines are drawn between adjacent pivots — pivot N−1 to pivot N for the most recent line, pivot N−2 to pivot N−1 for the previous one, and so on, up to the configured number per side. Newer lines render at full opacity; older ones progressively fade.
A line is marked broken the moment current close has crossed past its projected price — above for resistance, below for support. Broken lines switch to grey and dashed.
All lines and labels rebuild on every tick of the last bar so the right-edge price label always reflects the line's current projected level.
How to read it
Each timeframe has its own color (defaults: teal for TF1, amber for TF2, purple for TF3) and its own line width. The most recent line per direction gets a price label at the right edge showing where that line currently projects.
Older lines fade with age. A solid, full-opacity line is the freshest trend; faded ones are historical structure that may still be relevant. Broken lines flip to grey-dashed — useful for spotting role reversal, where a broken resistance becomes new support or vice versa.
The lines connect adjacent pivots — they're not best-fit lines through many touches. This is deliberate: it shows you the slope of the most recent swing, not a line of best fit that may not match what price is actually doing right now.
Inputs
Timeframes 1/2/3 — defaults: Daily, Weekly, 3-Month. Choose timeframes higher than your chart timeframe.
Per-TF Pivot Lookback — bars required on each side to confirm a swing, set independently per timeframe. Default 3 each. Higher values capture only major swings.
Resistance / Support lines per TF — how many trend lines to draw per timeframe per direction. Defaults 2 each. Increase to see more historical structure.
Display toggles — per-TF, resistance/support, broken lines, pivot anchor markers, right-edge price labels, and timeframe tag in the label. TF3 is off by default because 3-Month pivots confirm very slowly.
Colors — one per timeframe, plus a separate broken-lines color.
Line widths — independent per timeframe.
Extension — Right (default), Both, or None. Controls whether each line extends past its second pivot.
Line Style — Solid, Dashed, or Dotted (applies to unbroken lines).
Built-in alerts
Six alerts, one per timeframe and direction:
TF1 / TF2 / TF3 Resistance Break ↑ — close crosses above the most recent unbroken resistance line on that timeframe
TF1 / TF2 / TF3 Support Break ↓ — close crosses below the most recent unbroken support line on that timeframe
Breaks fire on the bar they occur, based on the line's current projected price.
Notes
The lines connect adjacent pivots only. Some auto-trendline indicators try to fit lines through several swings at once; this one doesn't. The design assumption is that the slope between the two most recent swings is what's currently relevant, and older swings shouldn't be forced onto the same line just because they're nearby. If you want longer trend channels, increase pivot lookback so individual swings represent larger structural moves.
Each timeframe has its own pivot lookback by design. A daily chart and a 3-month chart usually need different sensitivities, and forcing them to share one setting tends to make at least one of them wrong.
Higher-timeframe pivots don't confirm until pivot lookback bars after the actual high or low. On a 3-month timeframe with lookback 3, that's nine months of delay — which is why TF3 is off by default and only worth turning on if you're trading multi-year structure.
When a line breaks, it stays dimmed permanently. There's no un-breaking. If price reclaims the level, that's role reversal: the broken resistance is now informing as historical structure while the most recent unbroken support takes over the active role.
This is a structural tool, not a signal generator. It marks where the recent swing slopes sit and which of those slopes price has already broken.
Five years of work on a trading system left me with dozens of indicators that ultimately didn't earn a place in the final build. They're not failures — they're tools that solved problems I no longer needed solved. So instead of shelving them, I'm publishing the majority of them open-source.
If you're a discretionary trader, take what's useful. If you're a systems builder, the source is yours to dissect, modify, and improve. The best return on five years of work is for it to keep working — for someone.
If you use this script — or part of it — in your own work, please credit the original with a link back to my profile.
Note: these indicators have been updated to Pine Script v6 — some manually, some with AI assistance. Indicator

Prior Close Reclaim Planner [AGPro Series]Prior Close Reclaim Planner
🧠 Core Idea
Is the prior close being reclaimed, rejected, or treated as a live magnet by the current market?
📌 Overview / What it does
Prior Close Reclaim Planner maps the completed prior close as a live support/resistance reference and evaluates how price reacts around that level.
The script displays a prior-close rail, an ATR-based reclaim pocket, reclaim labels, rejection labels, magnet-zone labels, right-side reference tags, and a compact AG Pro dashboard with a 0-100 reclaim score.
It does not predict where price will go next. It helps organize the reaction around the previous close: reclaim quality, rejection pressure, magnet risk, rail state, and action context.
🎯 Purpose & Design Philosophy
The previous close is one of the simplest reference levels on a chart, but it is often read too casually.
This script was built to turn that reference into a structured planning map. It helps traders see whether the prior close is acting as support, resistance, a magnet, or a failed reclaim zone.
The design supports a patient decision-support mindset: read the rail, evaluate the reaction, check the score, and place the output inside broader market context.
⚡ Why This Script Is Different
Most tools draw a prior close line and stop there.
This script does NOT treat the prior close as a passive horizontal level.
Instead, it builds an active reclaim planner with a pocket, reaction labels, magnet context, relative-volume support, volatility fit, a readiness score, and a clear action state.
⚙️ Methodology
1. Prior Close Detection
The script sources the completed prior close from the selected reference timeframe. Daily is the default setting for previous-session analysis.
2. Reclaim Pocket Mapping
An ATR-based pocket is created above and below the prior close. This pocket is used to avoid overreacting to tiny ticks around the rail.
3. Reaction Evaluation
The script evaluates close location, wick response, relative volume, distance from the rail, and volatility fit.
4. Visual Output
The chart receives the rail, pocket, labels, right-side tags, bar coloring if enabled, and a dashboard panel summarizing the current state.
🗺️ How to Read the Chart
The central rail shows the completed prior close.
The pocket around the rail shows where reclaim and rejection behavior is evaluated.
Labels highlight bullish reclaim, bearish reclaim, rail defense, rail rejection, magnet-zone entries, and failed reclaim behavior.
Colors represent context:
• Teal → bullish reclaim or defense
• Pink → bearish reclaim or rejection
• Gold → neutral or waiting context
• Indigo → magnet or monitoring context
The panel summarizes:
• Prior Close
• Reclaim Score
• Magnet Risk
• Rail State
• Action
🚦 Signals & States
• Bull Prior Close Reclaim → price closed above the reclaim pocket
• Bear Prior Close Reclaim → price closed below the reclaim pocket
• Rail Defense → price tested the pocket and closed back above it
• Rail Rejection → price tested the pocket and closed back below it
• Magnet Zone → price is close enough to the prior close to treat the rail as active
• Invalidated → a reclaim attempt failed back through the prior-close rail
• READY → reclaim/rejection quality is strong enough to monitor
• MONITOR → price is near the rail, but conditions are not fully ready
• WAIT → no strong prior-close reaction is active
🔔 Alerts Logic
Alerts can trigger when price reclaims the prior close pocket, rejects the pocket, enters the magnet zone, reaches READY conditions, or invalidates a reclaim attempt.
Alerts are attention markers only. They are not trade instructions.
🧩 Confluence Logic
The prior-close context becomes stronger when close location, wick response, relative volume, volatility fit, and distance from the rail align.
For example, a reclaim with strong close quality, acceptable volume, and controlled distance from the rail is more structured than a weak close far from the reference.
📊 When to Use
• Intraday trading around the previous session close
• Session reclaim or rejection analysis
• Support/resistance reaction planning
• Trending markets that retest the prior close
• Range conditions where the prior close acts as a magnet
• Liquid symbols with readable candles and stable spreads
⚠️ When NOT to Use
• Very low-liquidity markets
• Symbols with unreliable session structure
• Extremely noisy chop around the rail
• News candles with unstable spreads
• Markets where the selected reference timeframe is not meaningful
🎛️ Key Inputs
• Reference Timeframe → controls where the completed prior close comes from
• Reclaim Pocket ATR → controls the width of the reaction pocket around the rail
• Magnet Distance ATR → controls when price is treated as close enough to the rail
• Minimum Ready Score → controls the score required for READY state
• Relative Volume Length → controls participation comparison
• Confirmation Mode → controls how strict reclaim/rejection evaluation should be
• Visual settings → control rails, pockets, labels, tags, bar colors, and dashboard behavior
🖥️ Interface & Visual Design
The interface is built for fast chart reading.
The prior close rail creates the main reference, the pocket defines the active reaction area, labels mark important events, and the panel compresses the state into a clean decision-support dashboard.
The goal is a premium, readable chart without turning the prior close into a cluttered signal board.
🧪 Practical Usage Workflow
1. Read the panel action state
2. Check whether price is above, below, or inside the prior-close pocket
3. Evaluate reclaim or rejection labels
4. Compare score quality with magnet risk
5. Confirm the context with broader structure, volume, and timeframe alignment
🔍 Interpretation Guidelines
A READY state means the prior-close reaction has enough structure to monitor.
Magnet risk means price is still close enough to the rail for the prior close to matter.
A reclaim label means the market crossed beyond the pocket, not that continuation is guaranteed.
A rejection or defense label means price reacted at the rail, but the broader trend and volatility context still matter.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not a guaranteed prior-close trading system.
It is not an automated trading tool.
It does not provide financial advice.
It does not guarantee continuation, reversal, profit, or a specific target.
⚠️ Limitations & Transparency
Prior-close behavior depends on market structure, volatility, liquidity, session design, and timeframe.
Different symbols may treat the previous close differently.
Very noisy markets can trigger frequent pocket interactions.
The score is a rule-based context score, not a certainty model.
🧠 Market Context Notes
The prior close often acts as a memory level.
When price reclaims it with participation, the rail may become a useful support/resistance reference.
When price repeatedly returns to it without follow-through, the rail may behave more like a magnet than a directional level.
🧾 Use Case Examples
When price opens below the prior close and later reclaims the pocket, the script marks the reclaim and scores the quality of the reaction.
When price tests the prior close from above and closes back above the pocket, the script can mark rail defense.
When price stays close to the rail without clean displacement, the panel can shift toward MONITOR instead of forcing a directional read.
🧱 System Philosophy
This script follows the AGPro Series approach: turn a familiar chart reference into a structured decision-support map.
The focus is not prediction. The focus is context, quality, invalidation awareness, and visual clarity.
🔐 Non-Promise Statement
No script can remove uncertainty from markets.
This tool does not promise accuracy, profitability, or future price movement.
Its purpose is to organize prior-close context so the user can interpret the chart more clearly.
📉 Risk Disclosure
Trading involves risk.
Market conditions can change quickly, and any analytical output can fail.
Users are responsible for their own decisions, risk management, and trade execution.
This script is for educational and analytical purposes only and does not provide financial advice.
📚 Educational Note
Use the prior close as a reference, not as an automatic decision.
The best reads usually come when the rail reaction aligns with structure, liquidity, volume, and the broader market environment.
Indicator

Post-Breakout Risk Ladder [AGPro Series]Post-Breakout Risk Ladder
🧠 Core Idea
After a breakout happens, is the move still offering clean target room or is pullback risk taking control?
📌 Overview / What it does
Post-Breakout Risk Ladder maps a breakout base, locks the breakout edge, and converts the post-breakout move into a structured R-based risk ladder.
The script displays a breakout base, pullback risk shelf, entry rail, invalidation rail, 1R / 2R / 3R target rails, target defense labels, pullback test labels, and a compact AG Pro dashboard.
It does not predict that a breakout will continue. It helps organize what happens after a breakout: current R, pullback risk, target room, invalidation, and action state.
🎯 Purpose & Design Philosophy
Many breakout tools focus only on the breakout candle.
This script was built for the part that comes next: the risk management phase after the breakout is already visible.
It helps traders read whether the breakout is still structured, whether the pullback is healthy, whether the next target has room, and whether the breakout context has failed.
⚡ Why This Script Is Different
Most breakout indicators highlight the break itself.
This script does NOT treat the breakout as the end of the analysis.
Instead, it builds a post-breakout planning map with a base, entry reference, invalidation shelf, R ladder, pullback risk score, target room, and target defense context.
⚙️ Methodology
1. Breakout Base Detection
The script defines a recent base using completed bars and checks whether price closes beyond the base edge with enough displacement quality.
2. Breakout Lock
When the breakout qualifies, the script locks the base high/low, breakout edge, entry reference, and invalidation edge.
3. Risk Ladder Mapping
Risk is standardized into R units from the breakout entry to invalidation. Target rails are projected as 1R, 2R, and 3R references.
4. Pullback and Defense Evaluation
The script tracks pullback tests into the breakout shelf, current R, target room, and target defense behavior.
🗺️ How to Read the Chart
The breakout base shows the structure that price broke from.
The pullback shelf marks the zone where a retest may remain constructive or become risky.
The entry rail and invalidation rail define the R unit.
The 1R, 2R, and 3R rails show post-breakout target references.
Labels highlight breakout locks, pullback tests, target defense, and invalidation.
The panel summarizes:
• Breakout state
• Current R
• Pullback risk
• Target room
• Action state
🚦 Signals & States
• Bull Breakout → price closed above the breakout base with acceptable quality
• Bear Breakout → price closed below the breakout base with acceptable quality
• Pullback Test → price is testing the post-breakout shelf
• Target Defense → price has reached or interacted with an R target rail
• Invalidated → price lost the active breakout structure
• Expired → the breakout ladder is too old to remain active
🔔 Alerts Logic
Alerts can trigger when a breakout ladder is locked, when the breakout context is READY, when price tests the pullback shelf, when the ladder invalidates, or when target defense appears.
Alerts are attention markers only. They are not trade instructions.
🧩 Confluence Logic
The breakout context becomes stronger when base quality, breakout body strength, relative volume, pullback shelf behavior, and target room align.
The R ladder helps separate structured continuation from late or overextended movement.
📊 When to Use
• After clear range breaks
• During breakout retests
• In trending markets with continuation attempts
• When evaluating post-breakout risk-to-room structure
• On liquid symbols with readable candles and volume
⚠️ When NOT to Use
• Very low-liquidity markets
• Extremely noisy sideways ranges
• Random spike candles without structure
• News candles with unstable spreads
• When no meaningful base exists before the breakout
🎛️ Key Inputs
• Base Lookback Bars → controls how the breakout base is detected
• Break Buffer ATR → controls how far beyond the base price must close
• Minimum Break Body Ratio → filters weak wick-only breaks
• Minimum Relative Volume → filters low-participation breaks
• Retest Shelf ATR → controls the pullback shelf around the broken edge
• Invalidation Buffer ATR → controls where the ladder fails
• Target R Settings → control the 1R / 2R / 3R ladder rails
🖥️ Interface & Visual Design
The visual hierarchy is designed around post-breakout planning.
The base defines context, the shelf defines pullback risk, the rails define R structure, and the panel provides a quick state read.
The goal is to keep the chart useful, structured, and premium without turning it into a cluttered signal board.
🧪 Practical Usage Workflow
1. Check whether a breakout ladder is active
2. Read current R in the panel
3. Inspect the pullback shelf
4. Compare target room with pullback risk
5. Watch invalidation and target defense labels
🔍 Interpretation Guidelines
A READY state means the breakout ladder has enough structure to monitor.
Current R helps measure how far price has moved from the breakout reference.
Pullback risk helps evaluate whether price is still respecting the breakout shelf.
Target room helps avoid treating late moves the same as early moves.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not a guaranteed breakout system.
It is not an automated trading tool.
It does not provide financial advice.
It does not guarantee continuation, reversal, targets, or profit.
⚠️ Limitations & Transparency
Breakout quality depends on market structure, volatility, liquidity, and timeframe.
Some breakouts may fail quickly.
Some slow breakouts may not trigger if candle quality or volume is too weak.
R levels are planning references, not guaranteed destinations.
🧠 Market Context Notes
Breakouts are often strongest when structure, participation, and follow-through align.
A breakout with clean target room and controlled pullback risk is different from a late breakout already pressing into extension.
Use the ladder as context, not certainty.
🧾 Use Case Examples
When price breaks above a recent base, the script locks the breakout edge and projects 1R / 2R / 3R references.
If price later pulls back into the shelf, the script marks pullback risk so the user can evaluate whether the structure remains intact.
If price reaches a target rail, target defense labels help identify where the move may need confirmation.
🧱 System Philosophy
AGPro Series tools are built as decision-support engines.
The purpose is to organize market behavior into structure, score, state, and risk context rather than providing blind buy or sell calls.
🔐 Non-Promise Statement
No breakout is certain.
No target rail is guaranteed.
No script can remove risk.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, decisions, risk management, and execution.
This script is for educational and analytical purposes only and does not provide financial advice.
📚 Educational Note
Use this tool to study how breakout bases, retests, invalidation, current R, and target room interact across different markets and timeframes.
Indicator

Support & Resistance with MA Ribbons LITESupport & Resistance with MA Ribbons LITE is a chart overlay that combines a fully configurable Moving Average Ribbon with a pivot-based Support & Resistance engine into a single, performance-optimized indicator. The MA Ribbon defines the prevailing trend regime; the S/R engine marks the price levels most likely to generate reactions within that regime. Used together, they provide both directional context and horizontal market structure in one uncluttered overlay.
This script is open-source under the Mozilla Public License 2.0 . Parts of the MA Ribbon logic draw conceptual inspiration from publicly shared work by JustUncleL on PulseWire — full credit and thanks are extended for those contributions.
═══════════════════════════════════════════
█ WHY COMBINE THESE TWO SYSTEMS?
Most MA ribbon and S/R indicators operate independently. This script was built specifically around their interaction : a support level in a downtrend carries different weight than the same level in an uptrend. The color system, alert logic, and display behavior are all designed so that the two components reinforce each other rather than adding chart clutter.
Original features that do not exist in either component alone:
Minute-based anchor timeframe logic — MA lengths scale automatically to preserve the same trend structure across chart timeframes without manual recalculation
Mixed Source mode — Main and Strong S/R levels use wicks (High/Low) for accurate reaction zones; secondary levels use Close prices for cleaner signals
6-tone bar coloring — distinguishes bullish/bearish candles inside vs. outside the ribbon, adding nuance beyond a standard 2-color system
Smart label contrast — label text color is calculated automatically from background brightness using a weighted luminance formula (0.299·R + 0.587·G + 0.114·B), ensuring legibility across all color presets
S/R heat map — line opacity scales with historical touch count, making frequently tested zones visually prominent
Alert cooldown system — configurable minimum-bars-between-alerts prevents repeated notifications during consolidation near a level
═══════════════════════════════════════════
█ COMPONENT 1 — MA RIBBON SYSTEM
The ribbon consists of two independently configurable moving averages ( Fast and Slow ) with 13 supported calculation types :
EMA · SMA · WMA · VWMA · SMMA · DEMA · TEMA · LAGMA · LINREG · HullMA · ZEMA · TMA · SSMA
How the ribbon works:
Ribbon fills bullish when Fast MA is above Slow MA, bearish when below
Bar coloring reflects whether price is above both MAs (bullish zone), below both (bearish zone), or inside the ribbon (neutral / transitioning)
Optional 6-tone mode further distinguishes candles by close vs. open relationship within each zone
Anchor Timeframe Logic (minutes):
Setting an anchor (e.g., 60 = 1 hour) causes MA lengths to multiply proportionally so that the same underlying trend structure is visible regardless of which chart timeframe is active. This eliminates the need to reconfigure MA lengths when switching timeframes.
Anchor = 0 → uses current chart timeframe lengths as-is
Anchor = 60 on a 5-min chart → MA lengths scale ×12 to reflect 1H structure
Anchor = 240 on a 15-min chart → MA lengths scale ×16 to reflect 4H structure
Optional signals:
Swing arrows — fire when price first enters a new directional zone (filterable by ribbon color or MA slope)
MA cross markers — highlight the crossover bar with a background color flash
Continuation markers (XBuy / XSell) — identify early-trend momentum bars after a crossover
═══════════════════════════════════════════
█ COMPONENT 2 — SUPPORT & RESISTANCE ENGINE
Levels are derived from pivot structure analysis — price extremes confirmed by a configurable number of bars to the left and right. The system separates levels by confirmation speed:
⚡ Main Resistance / Support — Fast pivots (quick_right bars). Most recent, reactive levels.
Strong Resistance / Support — Confirmed pivots (right bars). Structurally significant levels.
Resistance 1–4 / Support 1–4 — Historical confirmed pivots. Provides depth and context.
Up to 12 levels can be displayed simultaneously.
Pivot Sensitivity Presets:
Scalp — Left: 20 / Right: 10 — Short-term, high-frequency charts
Intraday — Left: 30 / Right: 15 — Intraday sessions
Swing — Left: 50 / Right: 25 — Multi-day position context
Custom — Full manual control over all pivot parameters
Source Modes:
High/Low — All levels use candle wicks; captures full reaction range
Close — All levels use closing prices; reduces noise from wicks
Mixed (Wick/Close) — Main and Strong levels use High/Low; levels 5–12 use Close. Combines precise major zones with cleaner minor levels.
Multi-Timeframe (MTF) Mode:
Higher-timeframe S/R levels can be overlaid on the current chart. HTF data is requested using barmerge.lookahead_off , which means levels update only after each HTF bar closes — no lookahead bias on historical bars .
Strength Filter & Heat Map:
Strength filter — hides any level with fewer than N historical touches within a configurable lookback window
Heat map mode — line opacity scales proportionally to touch count; the more a level has been tested, the more visually prominent it becomes
═══════════════════════════════════════════
█ ALERT SYSTEM
Six configurable event types:
⚡ Main Resistance / Support Touch — Close within tolerance % of level
🎯 Strong Resistance / Support Touch — Close within tolerance % of strong level
🚀 Breakout Above Main Resistance — Close exceeds level × (1 + min breakout %)
📉 Breakdown Below Main Support — Close falls below level × (1 − min breakout %)
🔁 Retest of Broken Level — Price returns to a previously broken level from the correct side
♻️ Rejection at Level — Wick pierces level but close returns inside
Cooldown logic: A minimum-bars-between-alerts setting prevents the same alert from firing repeatedly during sideways price action near a level. Set to 0 to disable.
All alerts are informational and should be visually validated before acting.
═══════════════════════════════════════════
█ COLOR SYSTEM
A unified 5-preset + Custom color palette controls both the MA Ribbon and S/R lines simultaneously, ensuring visual consistency across the indicator.
Presets: Classic · Aqua · Cosmic · Ember · Neon · Custom
Ribbon opacity and bar/candle opacity are independently adjustable. In Custom mode, all 7 color slots are individually configurable (Bullish, Bearish, Neutral, Bullish 2, Bearish 2, Bull Candle, Bear Candle).
═══════════════════════════════════════════
█ HOW TO USE
1. Chart Setup
Add the indicator to any chart and timeframe. Both systems are enabled by default and can be toggled independently via Master Controls .
2. Set the correct Color Preset
Open Settings → 🎨 Color Settings and select the Color Preset that best suits your chart theme (Classic, Aqua, Cosmic, Ember, Neon, or Custom). Both the MA Ribbon fill and all S/R level colors will update simultaneously. Adjust Ribbon Opacity and Bar Opacity to match your preferred visual weight.
3. Bring the indicator to front
This indicator uses plotcandle to render color-coded bars directly on the price chart. If other indicators or chart overlays are layered on top, the colored candles, S/R lines, and MA ribbon may appear behind them and render incorrectly.
To ensure all elements display with full color accuracy:
Right-click on the indicator name label on the chart (the label that reads "S/R with MA Ribbons LITE..." )
Select "Visual Order" → "Bring to Front"
This places the indicator's candles, S/R lines, and MA ribbon above all other chart elements , ensuring colors render exactly as configured. This setting is saved per chart layout and only needs to be done once.
4. MA Ribbon — Trend Context
Price above both MAs → bullish regime; bias longs, watch support levels
Price below both MAs → bearish regime; bias shorts, watch resistance levels
Price inside ribbon → transitioning; reduce exposure, wait for confirmation
Use the Anchor Timeframe to lock ribbon behavior to a reference timeframe (e.g., 240 for 4H structure on any intraday chart)
5. Support & Resistance — Structure
Focus on price behavior around levels, not exact prices
⚡ Main levels are the most reactive; Strong levels carry more structural weight
Enable Strength Filter to reduce noise from weakly tested levels
Enable Heat Map to visually identify the most interacted zones
Use MTF mode to overlay daily or weekly structure on lower timeframe charts
6. Reading Both Systems Together
In uptrends → reactions near support are higher-probability continuation setups
In downtrends → reactions near resistance are higher-probability continuation setups
Breakouts above resistance are more significant when ribbon is bullish
Retests of broken levels gain confirmation weight when ribbon direction agrees
7. Alerts (optional)
Configure alert types in S/R Alert Settings
Set Min Bars Between Alerts to match your instrument's typical volatility
Always visually confirm before acting on any alert
═══════════════════════════════════════════
█ PERFORMANCE NOTES
Touch count loops (Strength Filter / Heat Map) only execute when enabled
Reduce Number of Levels to 4–6 on lower-end systems or very fast timeframes
Disabling unused features (swing arrows, MA cross markers) improves rendering speed
═══════════════════════════════════════════
█ OPEN SOURCE & CREDITS
This script is released open-source under the Mozilla Public License 2.0 .
Parts of the MA Ribbon calculation logic draw conceptual inspiration from publicly shared work by JustUncleL on PulseWire. Respect and thanks are extended for those contributions.
You are free to study the code, modify it for personal use, and share improvements under the same license terms.
═══════════════════════════════════════════
█ DISCLAIMER
This indicator is provided for educational and informational purposes only . It does not constitute financial advice, trading recommendations, or investment guidance of any kind. No guarantees are made regarding accuracy, performance, or outcomes. Use at your own discretion alongside independent analysis and appropriate risk management.
Indicator

Supply Demand Flip Planner [AGPro Series]Supply Demand Flip Planner
🧠 Core Idea
Has an old supply or demand zone changed role and started acting as the opposite side of the market?
📌 Overview / What it does
Supply Demand Flip Planner is a role-change price action tool designed to identify when a prior supply zone turns into demand, or when a prior demand zone turns into supply.
The script detects pivot-based supply and demand zones, monitors breaks through those zones, maps the active flip zone, evaluates retest acceptance, and displays a structured 0-100 score. It also shows invalidation shelves, target rails, centered zone text, labels, and a compact AG Pro dashboard.
It does not predict future price movement, automate trades, or provide guaranteed buy/sell signals. It is a visual decision-support framework for reading supply-demand flip behavior.
🎯 Purpose & Design Philosophy
This script was built for traders who watch support/resistance role reversal but want a cleaner way to separate meaningful flips from ordinary breaks.
Many zones break and never matter again. Some zones break, retest, and start acting as the opposite side of the market. This planner focuses on that role-change moment.
The design supports a structured workflow: map supply and demand, wait for break, monitor retest, evaluate acceptance, then track invalidation.
⚡ Why This Script Is Different
Most supply and demand tools draw zones and leave interpretation fully manual.
This script does NOT simply flood the chart with historical zones.
Instead, it focuses on the active role-change zone, measures retest quality, scores acceptance, and presents the result through a clear READY / MONITOR / WAIT / INVALIDATED framework.
⚙️ Methodology
1. Context Detection
The script detects pivot-based supply and demand zones using configurable left/right pivot confirmation.
2. Reference Mapping
It maps source supply and demand shelves, then converts a broken zone into an active flip zone.
3. Reaction Evaluation
When price retests the flip zone, the script evaluates break strength, retest depth, wick response, body quality, source-zone quality, freshness, and relative volume.
4. Visual Output
The active flip zone is shown with centered text, invalidation shelf, target rails, right-side tags, labels, and an AG Pro panel.
🗺️ How to Read the Chart
Supply zones represent pivot-based resistance shelves.
Demand zones represent pivot-based support shelves.
Demand Flip means old supply has been broken and is being evaluated as new demand.
Supply Flip means old demand has been broken and is being evaluated as new supply.
READY FLIP labels mark retests that pass the selected acceptance score.
Invalidation shelf marks where the flip context weakens or fails.
The AG Pro panel summarizes Flip State, Acceptance, Retest, Failure Risk, and Action.
🚦 Signals & States
• DEMAND → pivot-based demand zone mapped.
• SUPPLY → pivot-based supply zone mapped.
• DEMAND FLIP → old supply was broken and is being watched as new demand.
• SUPPLY FLIP → old demand was broken and is being watched as new supply.
• FLIP RETEST → price is interacting with the active flip zone.
• READY FLIP → retest acceptance reached the required score threshold.
• INVALIDATED → the active flip lost its invalidation edge.
• READY → qualified flip acceptance is active.
• MONITOR → the flip zone is active or retesting.
• WAIT → no qualified flip acceptance is active.
🔔 Alerts Logic
Demand Flip Locked triggers when price breaks above a prior supply zone.
Supply Flip Locked triggers when price breaks below a prior demand zone.
Demand Flip Acceptance Ready triggers when a bullish flip retest reaches the score threshold.
Supply Flip Acceptance Ready triggers when a bearish flip retest reaches the score threshold.
Supply Demand Flip Retest triggers when price interacts with the active flip zone.
Supply Demand Flip Invalidated triggers when the flip loses its invalidation shelf.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The strongest flip contexts appear when break strength, retest depth, wick response, close quality, source-zone quality, freshness, and relative volume align.
When a broken zone is retested cleanly and accepted from the opposite side, the score improves and the panel shifts toward a stronger action state.
📊 When to Use
• Support/resistance role reversal
• Breakout retests
• Trend continuation after zone breaks
• Failed range boundaries that become new reaction zones
• Markets with clear swing structure
⚠️ When NOT to Use
• Extremely noisy markets with weak pivot structure
• Very low liquidity symbols
• Markets with large spread or unreliable candles
• News spikes where zones break and fail too quickly
• Timeframes where pivot zones are too dense or too sparse
🎛️ Key Inputs
• Pivot Left / Right Bars → control how strict the source zone detection is.
• Zone Depth ATR → controls the thickness of supply and demand shelves.
• Break Buffer ATR → requires price to break beyond the source zone by a volatility-adjusted amount.
• Retest Window Bars → controls how long the flip remains relevant.
• Acceptance Buffer ATR → defines how much confirmation is required after retest.
• Invalidation Buffer ATR → controls the failure shelf beyond the flip zone.
• Minimum Ready Score → sets how strict READY labels should be.
• Visual Settings → control zones, labels, centered zone text, target rails, and right-side tags.
• Panel Settings → control panel visibility, location, theme, and font size.
🖥️ Interface & Visual Design
The interface is designed to make role-change structure readable without overwhelming the chart.
The active flip zone uses centered text so the purpose of the zone is immediately visible. Source zones are subtle, while READY labels and target rails stand out only when a valid acceptance context appears.
The panel gives a quick summary of the current flip state and risk context.
🧪 Practical Usage Workflow
1. Identify the latest supply and demand zones.
2. Wait for a zone to break and become a flip candidate.
3. Watch for retest interaction inside the flip zone.
4. Check the READY FLIP label and acceptance score.
5. Compare price with invalidation shelf and target rails.
6. Confirm broader trend, volatility, and liquidity before making decisions.
🔍 Interpretation Guidelines
A high acceptance score means the role-change reaction is cleaner according to the script's rules.
A pending retest means price has returned to the zone but has not yet shown enough acceptance.
A failed flip means price lost the invalidation edge and the role-change context should be treated as weakened.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an automated trading system.
It does not guarantee entries, exits, profits, or outcomes.
⚠️ Limitations & Transparency
Pivot-based zones are confirmed after the selected right-side bars, so source zones appear after confirmation.
Different timeframes can create very different supply and demand structures.
High volatility can cause quick break-and-fail behavior around zones.
No rule-based script can fully account for news, liquidity shocks, or sudden market structure changes.
🧠 Market Context Notes
Supply-demand flips are a form of role reversal.
Old resistance can become new support after acceptance. Old support can become new resistance after acceptance.
The script is strongest when used with broader market structure, trend context, liquidity, and volatility analysis.
🧾 Use Case Examples
When price breaks above a supply zone, returns to the zone, and holds above it with clean reaction quality, the script may mark a Demand Flip acceptance.
When price breaks below a demand zone, retests it from below, and rejects cleanly, the script may mark a Supply Flip acceptance.
🧱 System Philosophy
Supply Demand Flip Planner follows the AG Pro Series approach: transform a common market concept into a structured decision map with context, score, risk reference, and clean visuals.
The goal is not to replace judgment. The goal is to make role-change analysis easier to read.
🔐 Non-Promise Statement
No script can provide certainty.
No signal should be treated as guaranteed.
Outputs should always be interpreted with independent analysis and responsible risk control.
📉 Risk Disclosure
Trading involves risk.
Market conditions can change quickly.
Users are responsible for their own decisions, risk management, and trade execution.
This script is for educational and analytical purposes only and does not provide financial advice.
📚 Educational Note
This script is designed to help traders study how supply zones, demand zones, breakout retests, and role-change acceptance behave across different market conditions.
Indicator

Fair Value Gap Reclaim Planner [AGPro Series]Fair Value Gap Reclaim Planner
🧠 Core Idea
Has price returned into a fair value gap and reclaimed the imbalance midpoint with enough quality?
📌 Overview / What it does
Fair Value Gap Reclaim Planner is an imbalance-focused price action tool built around three-candle fair value gap structure.
The script detects bullish and bearish FVG zones, tracks fill progress, maps the midpoint, evaluates reclaim quality, and displays a structured 0-100 readiness score. It also projects an active reclaim corridor, invalidation shelf, target rails, labels, and a clean AG Pro dashboard.
It does not predict future price movement, automate entries, or provide guaranteed signals. It is a visual framework for reading fair value gap reclaim behavior.
🎯 Purpose & Design Philosophy
This script was built for traders who study imbalance zones but want a cleaner way to separate meaningful reclaim behavior from ordinary gap interaction.
Fair value gaps can attract attention, but not every touch matters. The planner focuses on whether price fills, reacts, and reclaims a meaningful reference level inside the imbalance.
The design supports patient analysis: identify the zone, measure the fill, wait for reclaim, then evaluate context.
⚡ Why This Script Is Different
Most FVG tools highlight many imbalance zones and leave the user to interpret the rest manually.
This script does NOT flood the chart with every historical imbalance.
Instead, it focuses on the active FVG context, tracks fill progress, evaluates midpoint or full-edge reclaim, and converts the reaction into a clear score and action state.
⚙️ Methodology
1. Context Detection
The script detects bullish and bearish three-candle fair value gaps using a minimum ATR-based size filter.
2. Reference Mapping
It maps the FVG top, bottom, midpoint, fill area, and invalidation boundary.
3. Reaction Evaluation
When price interacts with the active FVG, the script evaluates fill progress, reclaim distance, wick response, body quality, relative volume, gap quality, and freshness.
4. Visual Output
Qualified reclaim events are shown with labels, projected zones, target rails, right-side level tags, and a compact panel.
🗺️ How to Read the Chart
FVG Zone shows the active imbalance area.
Midline marks the primary reclaim reference when Midline mode is selected.
Fill Progress shows how deeply price has returned into the imbalance.
READY FVG RECLAIM labels mark reclaim events that meet the selected score threshold.
Invalidation Shelf marks the area where the reclaim context weakens or fails.
The AG Pro panel summarizes Gap State, Reclaim Score, Fill Progress, Risk, and Action.
🚦 Signals & States
• BULL FVG → bullish fair value gap detected and locked.
• BEAR FVG → bearish fair value gap detected and locked.
• READY FVG RECLAIM → price reclaimed the selected FVG reference with enough quality.
• FVG TOUCH → price interacted with the active FVG zone.
• INVALIDATED → the active reclaim context lost the opposite FVG edge.
• READY → a qualified reclaim event is active.
• MONITOR → the active FVG is being tested or a reclaim context remains open.
• WAIT → no qualified reclaim event is active.
🔔 Alerts Logic
Bullish FVG Reclaim Ready triggers when price reclaims the selected FVG reference upward with enough score quality.
Bearish FVG Reclaim Ready triggers when price reclaims the selected FVG reference downward with enough score quality.
FVG Touch triggers when price interacts with the active imbalance zone.
FVG Reclaim Invalidated triggers when the active reclaim context loses the opposite FVG edge.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The strongest reclaim contexts appear when fill progress, wick response, close quality, relative volume, gap size, and freshness align.
When price returns into the imbalance, respects the zone, and reclaims the midpoint or edge with clean reaction quality, the score improves.
📊 When to Use
• Markets with visible imbalance behavior
• Breakout pullbacks into fair value gaps
• Trend continuation reviews
• Reclaim attempts after partial FVG fills
• Intraday or swing contexts where FVG zones remain meaningful
⚠️ When NOT to Use
• Very low liquidity markets
• Extremely noisy or illiquid symbols
• Markets with unreliable candles or volume
• Wide-spread conditions where small gaps are misleading
• News spikes where imbalance zones can be invalidated quickly
🎛️ Key Inputs
• Minimum FVG Size ATR → filters out tiny imbalance zones.
• Maximum FVG Age Bars → controls how long an FVG can remain active.
• Reclaim Reference → chooses midpoint reclaim or full-edge reclaim.
• Touch Lookback Bars → controls how recent the FVG interaction must be.
• Invalidation Buffer ATR → controls the risk shelf beyond the FVG edge.
• Minimum Ready Score → sets how strict READY events should be.
• Target Rails → control projected T1 and T2 levels.
• Label Settings → control label density, size, and spacing.
• Panel Settings → control panel visibility, location, theme, and font size.
🖥️ Interface & Visual Design
The interface is designed to show the active imbalance context without filling the chart with excessive historical zones.
The FVG zone, midline, fill meter, invalidation shelf, target rails, and panel are visually separated so the chart remains readable.
The goal is a premium first-glance layout: zone first, reclaim second, action state third.
🧪 Practical Usage Workflow
1. Check the panel for active Gap State.
2. Locate the FVG zone and midpoint.
3. Watch how deeply price fills the imbalance.
4. Evaluate READY FVG RECLAIM labels and score quality.
5. Compare price with the invalidation shelf and target rails.
6. Confirm broader structure before making decisions.
🔍 Interpretation Guidelines
A high reclaim score means the reaction is cleaner according to the script's rules.
A lower score means the reclaim may be weaker, late, noisy, or incomplete.
Fill progress is not a signal by itself. It becomes more meaningful when combined with reclaim quality and broader market context.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an automated trading system.
It does not guarantee entries, exits, profits, or outcomes.
⚠️ Limitations & Transparency
Fair value gap interpretation can vary across markets, sessions, and timeframes.
Some markets create many small gaps that may not carry meaningful context.
Volatility changes can make an active FVG less relevant over time.
No rule-based script can fully account for news, liquidity shocks, or sudden market structure shifts.
🧠 Market Context Notes
Fair value gaps often represent fast price displacement and temporary imbalance.
The reclaim of a midpoint or edge can help traders study whether the market is accepting or rejecting the imbalance area.
The script works best when combined with structure, liquidity, volatility, and trend context.
🧾 Use Case Examples
When a bullish FVG forms after displacement, price returns into the zone, partially fills it, and then reclaims the midpoint, the script may mark a bullish reclaim context.
When a bearish FVG forms after downside displacement, price retraces into the imbalance and then rejects back below the midpoint, the script may mark a bearish reclaim context.
🧱 System Philosophy
Fair Value Gap Reclaim Planner follows the AG Pro Series approach: turn a popular market concept into a structured decision map with context, score, risk reference, and clean visuals.
It is designed to support judgment, not replace it.
🔐 Non-Promise Statement
No script can provide certainty.
No signal should be treated as guaranteed.
Outputs should always be interpreted with independent analysis and responsible risk control.
📉 Risk Disclosure
Trading involves risk.
Market conditions can change quickly.
Users are responsible for their own decisions, risk management, and trade execution.
This script is for educational and analytical purposes only and does not provide financial advice.
📚 Educational Note
This script is designed to help traders study how fair value gap fills, midpoint reclaims, and imbalance reactions behave across different market conditions.
Indicator

Indicator

Liquidity Areas (MTF)Liquidity Areas (MTF)
Maps the price levels on up to three higher timeframes where stop orders are most likely clustered, plotted as filled zones. Levels above swing highs are buy-side liquidity (BSL) — short sellers' stops sit there. Levels below swing lows are sell-side liquidity (SSL) — long holders' stops sit there. When two adjacent swings line up within a tight tolerance, they're labeled EQH (equal highs) or EQL (equal lows): a denser stop cluster and historically a stronger magnet.
When price closes beyond a level, it's marked as swept and rendered in a dimmed, dashed style — visible for context but visually de-emphasized.
How it works
For each of the three configured timeframes, the script runs a pivot detector inside request.security (with lookahead_off) and tracks the most recent N swing highs (BSL candidates) and N swing lows (SSL candidates). Each level becomes a filled zone centered on the pivot price, with half-width = ATR × multiplier on the chart's own timeframe.
A level is checked for EQH/EQL status against its immediate neighbor in the array: if two consecutive swing highs (or lows) sit within the configured percentage tolerance, both are flagged as equal and recolored.
A level is marked swept on the first bar where close goes beyond it — above for BSL, below for SSL. Swept status is permanent: once flagged, a level stays swept for the remainder of the chart.
A proximity filter hides levels further than X% from current close. All drawing objects rebuild on the last bar so widths and statuses stay current.
How to read it
Four color states carry information independently:
Live BSL (default teal) — buy-side liquidity, unswept
Live SSL (default red) — sell-side liquidity, unswept
EQH / EQL (default amber) — equal highs or lows, denser clusters
Swept (default grey, dashed) — price has already closed through
Labels at the right edge mark the timeframe, the type (BSL, SSL, EQH, EQL, or "swept"), and the exact level.
The intuition behind the indicator: large orders are filled where liquidity exists, and liquidity exists where stops are clustered. A cleanly swept level often coincides with a reversal because the stop run has supplied the fills the large order needed. The indicator doesn't predict that reversal — it just makes the magnets visible.
Inputs
Timeframes 1/2/3 — defaults: 1H, Daily, Weekly. Choose timeframes higher than your chart timeframe.
Pivot Lookback — bars required on each side to confirm a swing. Default 2. Lower values flag more levels; higher values restrict to more major swings.
Levels per side per TF — number of recent BSL and SSL levels kept per timeframe. Default 3.
Equal High/Low Tolerance — two adjacent swings within this percentage of each other get flagged EQH/EQL. Default 0.1%.
Display toggles — BSL, SSL, swept, plus per-timeframe.
Proximity filter — hide levels more than X% from current close. Default on, 5%.
ATR Length / Multiplier — controls zone half-width. Defaults 14 / 0.25.
Colors — BSL, SSL, EQH/EQL, and swept, customizable independently.
Built-in alerts
New TF1 / TF2 / TF3 BSL — new pivot high confirmed on the corresponding timeframe
New TF1 / TF2 / TF3 SSL — new pivot low confirmed on the corresponding timeframe
TF1 BSL Swept — first bar where close crosses above the nearest unswept TF1 BSL level
TF1 SSL Swept — first bar where close crosses below the nearest unswept TF1 SSL level
Sweep alerts are TF1-only by design. Higher timeframes have enough delay between pivot confirmation and a meaningful sweep that a real-time alert isn't useful — watch the chart for TF2/TF3 sweeps, alert on TF1.
Notes
The framework here borrows from Smart Money Concepts / ICT trading, where the underlying claim is that price tends to move toward visible liquidity pools before reversing. Whether you accept that as causal or just descriptive, the indicator is purely mechanical: it marks where stops are most likely sitting and lets you see when they're taken.
EQH/EQL detection only compares each level against its adjacent neighbor in the array, not all combinations. This is deliberate — equal highs separated by several swings historically are usually not the same liquidity pool in practice. Tighten the tolerance if you're getting false EQH flags; widen it if levels you visually consider equal aren't being marked.
The proximity filter defaults tighter than the other MTF indicators in this collection (5% vs 10–20%) because liquidity matters most when price is near it. A weekly BSL 25% away is irrelevant tactically; a weekly BSL 3% away might be where the next session is heading.
Higher-timeframe pivots don't confirm until pivot lookback bars after the actual high or low. Same lag caveat as the other MTF tools.
This is a structural tool, not a signal generator. It marks where stops cluster and which clusters have already been swept.
Five years of work on a trading system left me with dozens of indicators that ultimately didn't earn a place in the final build. They're not failures — they're tools that solved problems I no longer needed solved. So instead of shelving them, I'm publishing the majority of them open-source.
If you're a discretionary trader, take what's useful. If you're a systems builder, the source is yours to dissect, modify, and improve. The best return on five years of work is for it to keep working — for someone.
If you use this script — or part of it — in your own work, please credit the original with a link back to my profile.
Note: these indicators have been updated to Pine Script v6 — some manually, some with AI assistance. Indicator

Automatic Fibonacci Retracement Levels (MTF)Automatic Fibonacci Retracement Levels (MTF)
Auto-anchored Fibonacci retracement levels drawn between the most recent confirmed swing high and swing low, replicated across up to three higher timeframes. As new pivots form on each timeframe, the levels reanchor automatically — no manual redrawing every time the swing range changes.
The point is to see Fibonacci structure across multiple horizons on a single chart, without juggling drawing tools.
How it works
For each of the three configured timeframes, the script runs a pivot detector inside request.security (with lookahead_off, so no future-data leak). The most recent confirmed swing high and swing low per timeframe are stored as the active anchors. Standard ratios — 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100% — are computed between low and high, with optional extensions at 127.2%, 161.8%, 200%, and 261.8% beyond the 100% pivot.
A proximity filter compares each individual level to current close and hides anything more than X% away. All drawing objects rebuild on the last bar so levels and labels stay current.
How to read it
Each timeframe has its own color (defaults: teal for TF1, amber for TF2, purple for TF3). The 50% and 61.8% lines are drawn thicker and more saturated — these are the classical reversal area — and the optional golden zone fill shades the band between them.
The 0% and 100% levels are the swing low and swing high themselves, drawn solid. Intermediate ratios are dashed. Extensions, when enabled, are dotted — visually marking them as projected targets rather than retracements.
When fib levels from different timeframes cluster around the same price, that's confluence — and tends to matter more than any single level on its own.
Inputs
Timeframes 1/2/3 — the three higher timeframes to source pivots from. Defaults: Daily, Weekly, Monthly. Choose timeframes higher than your chart timeframe.
Pivot Lookback — bars required on each side to confirm a swing. Higher values detect only major swings and keep the anchors stable for longer. Default 5.
Display toggles — turn each timeframe on or off independently.
Golden Zone Fill — shade the 50%–61.8% band, the highest-probability reversal zone in classical Fibonacci analysis. Default on.
Extensions — draw 127.2%, 161.8%, 200%, and 261.8% beyond the 100% pivot. Useful for projecting price targets once a full swing has been exceeded. Default off.
Proximity filter — hide levels further than X% from current close. Default on, 10%.
Colors — one per timeframe.
Built-in alerts
A swing-confirmation alert is available for each timeframe and direction (six total):
New TF1 / TF2 / TF3 Swing High — fires when a new pivot high is confirmed and the Fibonacci range reanchors
New TF1 / TF2 / TF3 Swing Low — fires when a new pivot low is confirmed and the Fibonacci range reanchors
Notes
The pivot lookback is the key knob. Small values (2–3) produce fast-moving fib ranges that retag often — useful for short-term retracement plays but visually busy. Larger values (5–10+) lock onto major structural swings that stay anchored for longer, which is closer to how most traders actually use Fibonacci.
Higher-timeframe pivots don't confirm until pivot lookback bars after the actual high or low. On a monthly timeframe with lookback 5, that's five months of delay. The reanchor lag is the price of getting confirmed, non-repainting levels.
When the retracement direction looks wrong — for example, price has clearly made a lower swing low but the indicator is still anchored to an older one — it usually means the new pivot hasn't confirmed yet on that timeframe. Drop down a timeframe or wait it out.
This is a structural tool, not a signal generator. It plots the classical retracement and extension grid across multiple horizons.
Five years of work on a trading system left me with dozens of indicators that ultimately didn't earn a place in the final build. They're not failures — they're tools that solved problems I no longer needed solved. So instead of shelving them, I'm publishing the majority of them open-source.
If you're a discretionary trader, take what's useful. If you're a systems builder, the source is yours to dissect, modify, and improve. The best return on five years of work is for it to keep working — for someone.
If you use this script — or part of it — in your own work, please credit the original with a link back to my profile.
Note: these indicators have been updated to Pine Script v6 — some manually, some with AI assistance. Indicator

Adaptive S/R Reversal - RSI Divergence + DCA + BE Stop (5m)Adaptive S/R Reversal - RSI Divergence + DCA + BE Stop (5m)
DESIGNED FOR: BTCUSDT perpetual · 5-minute timeframe · ONLY.
Other symbols and timeframes have not been validated. The script enforces 5m and warns on any other TF.
A 5-minute mean-reversion strategy for BTCUSDT perpetual futures. Fades touches of yesterday's high/low when momentum confirms via fresh RSI divergence. Averages down once if price moves further against, exits at yesterday's midpoint pre-DCA or a fixed % from first entry post-DCA. Closes flat at 20:00 UTC daily — unless the trade is favorable enough to ride overnight (24-hour hard cap).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STRATEGY LOGIC
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ENTRY (no trend bias)
- LONG: 5m bar low touches prev_day low (within 0.05% zone) AND a fresh BULLISH RSI divergence (price LL, RSI HL) was confirmed within the last 20 bars.
- SHORT: 5m bar high touches prev_day high (within 0.05%) AND a fresh BEARISH RSI divergence (price HH, RSI LH) was confirmed within the last 20 bars.
- Both directions allowed regardless of higher-timeframe trend. The divergence + S/R AND-filter is the edge — neither alone is sufficient.
FILTERS
- Volume confirmation: entry bar volume ≥ 1.1× SMA(20)
- Adaptive S/R range: when prev_day range < 2% (squeeze day), expand lookback to a 2-day rolling H/L band so R:R doesn't collapse
- One cycle per UTC day (configurable up to 5)
- Trade window: entries blocked after 20:00 UTC
DCA
- 1 add at worst_entry × (1 ∓ 0.85%) — total 2 legs per cycle
- Sizing: riskPct of equity is split across DCA levels
- Per-leg quantity capped by leverage × equity / close / dcaLevels
EXITS
- TP (hybrid, default): prev_mid × (1 ∓ 0.1%) pre-DCA → switches to firstEntry × (1 ∓ 4%) once DCA fires (avg entry has shifted, post-DCA leg can ride a wider target).
- SL: worst_entry × (1 ∓ 2%) raw. Once BE arms (+1% favorable from first entry), tightens to firstEntry × (1 ± 0.25%) — locks in real ~0.20% net after fees.
- EOD flatten: closes at 20:00 UTC unless trade is ≥ +1.5% favorable from first entry → holds another 24 hours max.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BEST CONFIGURATION (defaults — tested on BTC 5m)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Risk per cycle: 6% (4% safer / 8% aggressive)
Leverage cap: 2x (higher amplifies bad days)
DCA levels: 2 (3+ stretches SL distance)
DCA spacing: 0.85% (tighter burns SL faster)
SL below worst entry: 2.0% (pairs with BE-stop ON)
S/R touch zone: 0.05% (wider hurts win rate)
Volume × avg: 1.1× (1.0 lets more in / 1.5 over-filters)
RSI period: 14 (standard)
Pivot left/right: 5 / 5 (3/3 noise / 7/7 misses)
Divergence freshness: 20 bars (~100 min on 5m)
Range floor: 2.0% (below this R:R collapses)
Max lookback (extend): 2 days (3+ rarely improves)
TP mode: hybrid (prev_mid is more conservative)
Post-DCA TP %: 4% (best balance hit-rate vs win-size)
BE trigger: 1.0% (earlier over-triggers)
BE buffer: 0.25% (covers 2× taker fee + slippage)
EOD close hour: 20:00 UTC
Hold-past-EOD: ON @ 1.5%
Cycles per day: 1 (more = N× SL exposure on trend days)
CONSERVATIVE VARIANT (lower DD)
- Risk per cycle: 4% (was 6%)
- Leverage cap: 1.5x (was 2x)
- SL below worst: 1.5% (was 2.0%)
- TP mode: prev_mid (caps upside)
AGGRESSIVE VARIANT (higher return, higher DD)
- Risk per cycle: 8%
- Leverage cap: 3x
- TP post-DCA: 6% (lets winners run further)
- Hold-past-EOD: ON @ 1.0% (more frequent overnight holds)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ REGIME WARNING — READ BEFORE GOING LIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The strategy is regime-favorable, not regime-robust.
IT WORKS when daily H/L levels consistently revert to the mid (chop, range-bound markets, mean-reverting volatility).
IT LOSES in strong trending markets where price punches through prev_day levels and keeps going — every losing trend day costs a full SL, and the small mean-reversion wins don't pay for them.
DO NOT size up based on a few good weeks. Paper-trade for at least 2-4 weeks across different regimes before deploying real capital. Short-window backtests are real but NOT predictive — they're regime artifacts.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. BTCUSDT.P (perp) only — params are tuned to BTC's volatility profile. Spot has different funding/fee structure; alts have different ranges.
2. 5m chart only — script enforces this and warns on other TFs.
3. Paper trade first. Use TV alerts → paper account on Binance Futures testnet, or a dedicated paper-trading bot, for at least 2-4 weeks.
4. Watch the on-chart dashboard (top-right) for live state: position, prev levels, active TP/SL, BE status, EOD hold status.
5. Don't change parameters mid-trade. Re-tune only after a full month of data on a new config.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT'S PLOTTED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- prev_day Low (dim green dotted)
- prev_day High (dim red dotted)
- prev_day Mid / TP target (cyan dotted)
- Active SL (solid red, 2px)
- Active TP (solid cyan, 2px)
- Avg entry (yellow dotted, after DCA fires)
- 1h EMA(20) (purple, visual reference only — not used for entries)
- Entry triangle markers when L1/S1 conditions fire
- Bull/Bear divergence diamonds at the pivot bar
- Top-right dashboard: position, prev levels, UTC hour, TP mode, filled count, BE status, RSI div age, equity, EOD-hold status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TESTED + REJECTED (anti-recipes)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
These were tried during development and removed — saving you the experiments:
- Trend bias filter (1h EMA) — blocks 60%+ of valid entries because bias flips against you exactly when price reaches the S/R level.
- RSI anti-extreme filter as primary gate — redundant with divergence.
- Multi-RSI variants (fast 7 / slow 21) — fast fires on noise, slow on stale moves.
- Trailing stop (post-DCA or full trail) — too many false trail-outs near peaks. BE-stop does the job cleaner.
- Wider S/R zone (0.2%) — fires on near-misses, hurts WR.
- SL on candle close (only fire SL when 5m bar closes beyond SL) — saves wick stops but gives more rope on real trends; net negative.
- Multi-cycle per day (2-3 cycles) — same-day re-entries whipsaw on trend days. 1 cycle/day is the validated default.
- Always-in-market flip on every divergence (no S/R touch required) — built and tested; loses. Divergence alone is not an edge.
- Recycling grid sub-strategies — slippage + risk amplification on dip-buy rungs destroy the math.
- Wait-for-HTF-rejection-candle confirm filter — cuts return ~60% for marginal DD improvement.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Backtest results don't predict live performance. Slippage, funding fees, exchange downtime, latency, and live order routing all affect real-world returns. The PulseWire backtester assumes intra-bar fills that may not happen in live trading without resting orders.
This script is shared for educational and research purposes. Use it as one input in your own due diligence — never as a turn-key money-printer. Past performance is not indicative of future results, especially for a strategy this regime-dependent.
Strategy

MTF Support / Resistance ChannelsMTF Support / Resistance Channels
Filled support and resistance zones built from confirmed pivots across up to three user-selected timeframes, plotted on the chart. Channel thickness is ATR-derived, so zones scale automatically with volatility — no fiddling with absolute pip/dollar widths when you switch instruments. A proximity filter hides distant zones to keep things readable.
The point is to put hourly, daily, and weekly structure on a single chart without stacking three windows or losing context every time you change zoom.
How it works
For each of the three configured timeframes, the script runs a pivot detector inside request.security (with lookahead_off, so no future-data leak) and stores the most recent N confirmed pivot highs and lows. Each pivot becomes a horizontal channel centered on the pivot price, with half-width = ATR × multiplier computed on the chart's own timeframe. The proximity filter compares each pivot to current close and hides anything more than X% away.
All drawing objects are rebuilt on the last bar so zone widths stay current with the latest ATR reading.
How to read it
Each timeframe has its own color (defaults: teal for TF1, amber for TF2, purple for TF3). The filled bands are the zones themselves. Labels at the right edge mark the timeframe, whether it's support or resistance, and the exact pivot price.
The most useful signal isn't any individual zone — it's confluence. When a TF1 zone overlaps with a TF2 or TF3 zone, you have multiple timeframes pointing at the same price area, which tends to matter more than any single level on its own.
Inputs
Timeframes 1/2/3 — the three higher timeframes to source pivots from. Defaults: 1H, Daily, Weekly. Choose timeframes higher than your chart timeframe.
Pivot Lookback — bars required on each side to confirm a pivot. 2 captures most meaningful swings; 4–5 restricts to major structural pivots only. Default 2.
Zones per direction per TF — how many of the most recent pivots to keep per timeframe per direction. 1 = freshest level only; 3–5 for historical structure; up to 15 for deep multi-level context. Default 1.
Display toggles — turn off resistance, support, or any individual timeframe.
Proximity filter — hide zones further than X% from current close. Default on, 20%.
ATR Length / Multiplier — controls channel half-width. Defaults 14 / 0.3. Increase the multiplier on volatile instruments; decrease on smooth ones.
Colors — one per timeframe.
Built-in alerts
A pivot-confirmation alert is available for each timeframe and direction (six total):
New TF1 / TF2 / TF3 Resistance Pivot — fires when a new pivot high is confirmed on that timeframe
New TF1 / TF2 / TF3 Support Pivot — fires when a new pivot low is confirmed on that timeframe
Each one signals that the projected zone set has been updated with a fresh reference level.
Notes
Higher-timeframe pivots don't confirm until pivot lookback bars after the actual high or low. On a weekly timeframe with lookback 2, that's two weeks of delay. This is by design — you're getting confirmed structural levels, not real-time fractals — but it's worth keeping in mind when the chart shows a level that visually looks "late."
Pair the pivot lookback with how you intend to use the zones. Lookback 2 with N=3 zones gives you a recent structural map suitable for swing context. Lookback 4 with N=1 gives you only the major levels — less clutter, more meaning per zone.
The ATR multiplier matters more than people expect. 0.3 of a 14-period ATR is a sensible starting point, but a forex pair and a small-cap stock will need very different settings before the bands look right against actual price respect.
This is a structural tool, not a signal generator. It marks where price has historically rejected on multiple horizons.
Five years of work on a trading system left me with dozens of indicators that ultimately didn't earn a place in the final build. They're not failures — they're tools that solved problems I no longer needed solved. So instead of shelving them, I'm publishing the majority of them open-source.
If you're a discretionary trader, take what's useful. If you're a systems builder, the source is yours to dissect, modify, and improve. The best return on five years of work is for it to keep working — for someone.
If you use this script — or part of it — in your own work, please credit the original with a link back to my profile.
Note: these indicators have been updated to Pine Script v6 — some manually, some with AI assistance. Indicator

Round Number Rejection Planner [AGPro Series]# Round Number Rejection Planner
🧠 Core Idea
Is the round number acting as rejection, magnet, or failed reference?
📌 Overview / What it does
Round Number Rejection Planner is a psychological price level decision-support script built to evaluate how price reacts around nearby round numbers.
The script maps adaptive round-number bands, detects wick-based rejection behavior, separates rejection from magnet conditions, scores the context from 0 to 100, and summarizes the current state inside a compact AG Pro panel.
It does not predict price direction, automate trades, or provide guaranteed signals. It is designed to organize round-number context, rejection quality, distance, failure risk, and action state into a clean visual workflow.
🎯 Purpose & Design Philosophy
Round numbers often attract attention because they are easy reference points for traders, algorithms, stops, targets, and liquidity.
This script was built for traders who want to evaluate whether price is respecting a psychological level, getting pulled toward it, or failing to reject it cleanly.
The design supports structured observation instead of treating every round-number touch as a signal.
⚡ Why This Script Is Different
Most tools draw psychological levels or mark round numbers.
This script does NOT stop at drawing levels.
Instead, it evaluates the behavior around the level: wick rejection, close location, distance, reaction count, volatility fit, and failure risk.
⚙️ Methodology
1. Adaptive Round Level Detection
2. Psychological Band Mapping
3. Wick Rejection Evaluation
4. Magnet And Failure Risk Detection
5. 0-100 Rejection Score
6. Panel And Alert Output
🗺️ How to Read the Chart
The active round band marks the nearest psychological price zone.
Nearby round rails show the next upper and lower round references.
READY REJECTION labels appear when wick response, close location, and score quality align.
Magnet or failed-reference states appear when price interacts with the level without a clean rejection.
The panel summarizes Round Level, Rejection Score, Distance, Failure Risk, and Action.
🚦 Signals & States
• READY → A qualified round-number rejection has formed.
• MONITOR → Price is near the round number but rejection quality is not yet strong enough.
• WAIT → No active round-number context is close enough to evaluate.
• INVALIDATED → Price failed through the level instead of rejecting it.
• BLOCKED → The script cannot define a valid round-number context.
🔔 Alerts Logic
Bullish Round Number Rejection Ready triggers when price rejects upward from a round-number band with enough quality.
Bearish Round Number Rejection Ready triggers when price rejects downward from a round-number band with enough quality.
Round Number Magnet Warning triggers when price is close to the level but rejection quality is weak.
Round Number Rejection Invalidated triggers when price fails through the level instead of respecting it.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The rejection score combines wick strength, close distance from the level, proximity, recent reaction count, relative volume, and volatility fit.
When several of these conditions align, the context becomes stronger.
When they do not align, the script remains in WAIT, MONITOR, INVALIDATED, or BLOCKED state.
📊 When to Use
• Psychological level analysis
• Intraday price action workflows
• Round-number rejection setups
• Stop and liquidity reaction observation
• Support and resistance context around visible price levels
⚠️ When NOT to Use
Avoid relying on this script in extremely illiquid markets, very noisy symbols, holiday sessions, or conditions where round numbers are not meaningful to participants.
It should not be used as a standalone decision tool without broader market context, risk planning, and independent confirmation.
🎛️ Key Inputs
• Round Level Mode controls whether level spacing is automatic or manual.
• Manual Round Step defines custom level spacing when manual mode is selected.
• Round Band ATR controls the width of the psychological level band.
• Max Active Distance controls how close price must be before evaluation begins.
• Minimum Ready Score controls how strong the rejection must be before READY appears.
• Failure Risk Threshold controls when weak rejection or magnet behavior blocks READY.
• Visual settings control bands, rails, labels, right-side tags, panel location, and font size.
🖥️ Interface & Visual Design
The interface is designed to make the active psychological level readable without flooding the chart.
The chart shows the active round band, nearby round rails, failure shelf, and relevant rejection labels.
The AG Pro panel provides compact decision context while preserving chart visibility.
🧪 Practical Usage Workflow
1. Check the active round level in the panel.
2. Observe whether price is touching or rejecting the round band.
3. Read the rejection score and failure risk.
4. Check whether the action state is READY, MONITOR, WAIT, INVALIDATED, or BLOCKED.
5. Confirm the context with broader trend, liquidity, volatility, and risk structure.
🔍 Interpretation Guidelines
A higher rejection score means the round-number reaction is cleaner according to the script logic.
A high failure risk means the level may be acting more like a magnet or failed reference.
READY means the rejection context deserves attention, not that price must reverse.
MONITOR means price is near the level but the reaction is not yet clean enough.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not provide guaranteed signals.
It does not replace risk management or independent analysis.
⚠️ Limitations & Transparency
Round-number behavior changes across markets, symbols, timeframes, volatility regimes, and liquidity conditions.
The score is rule-based and depends on wick behavior, close location, distance, relative volume, and ATR normalization.
Different symbols may require different round-step or sensitivity settings.
🧠 Market Context Notes
Round-number rejection can be more meaningful when aligned with liquidity response, trend context, session timing, volume participation, and nearby structure.
Weak rejection near a level can become magnet behavior instead of a clean turn.
🔐 Non-Promise Statement
No script can guarantee future price behavior.
This tool provides structured visual context only.
📉 Risk Disclosure
Trading involves risk.
Users remain responsible for their own decisions.
This script is for educational and analytical purposes only and does not provide financial advice or guaranteed trading outcomes.
Indicator

Opening Range Retest Planner [AGPro Series]# Opening Range Retest Planner
## Core Idea
Did the opening range breakout return to its boundary and hold with enough quality to deserve attention?
## Overview / What It Does
Opening Range Retest Planner is an intraday opening range decision-support script built for traders who want to evaluate the quality of the first meaningful retest after an opening range breakout.
The script builds the opening range, tracks the first bullish or bearish breakout, maps a focused retest pocket around the broken boundary, grades the retest from 0 to 100, and displays a clear action state in a compact AG Pro panel.
It does not predict price direction, automate execution, or provide guaranteed outcomes. Its purpose is to organize structure, acceptance, invalidation, and retest quality in a clean visual workflow.
## Purpose & Design Philosophy
Many opening range tools focus only on the initial break. In practice, the first retest after the break is often where the structure becomes more meaningful.
This script was built for traders who want to separate a clean retest hold from a weak pullback, failed breakout, or expired setup. The design supports structured observation instead of impulsive reaction.
## Why This Script Is Different
Most opening range tools stop at the range or breakout itself.
This script does not stop there.
Instead, it focuses on what happens after the break: whether price returns to the broken boundary, respects it, fails back inside the range, or runs out of time before a qualified retest appears.
## Methodology
1. Opening Range Mapping
2. Breakout Detection
3. Retest Pocket Construction
4. Retest Quality Scoring
5. Acceptance, Invalidation, or Expiration State
6. Panel and Alert Output
## How To Read The Chart
The opening range remains the main session reference.
The retest pocket marks the area where the script evaluates whether the broken boundary is being respected or rejected.
Labels highlight qualified retests, invalidations, and key state changes.
Target rails project possible continuation space after a qualified retest.
The panel summarizes OR state, retest score, acceptance side, failure risk, and current action.
## Signals & States
READY -> A retest touched the pocket, held the broken boundary, and met the minimum quality threshold.
MONITOR -> A breakout occurred and the script is tracking whether a qualified retest develops.
WAIT -> The opening range is still building, has just locked, or is waiting for a valid post-break condition.
INVALIDATED -> Price failed back inside the opening range after the breakout.
EXPIRED -> The retest window closed without a qualified retest.
BLOCKED -> The opening range is not valid enough to evaluate.
## Alerts Logic
Bullish Opening Range Retest Ready triggers when a bullish breakout retest holds the broken range high with enough score.
Bearish Opening Range Retest Ready triggers when a bearish breakout retest holds the broken range low with enough score.
Opening Range Retest Invalidated triggers when price fails back inside the opening range after a breakout.
Opening Range Retest Expired triggers when the retest window expires without a qualified hold.
Alerts are attention markers, not trade instructions.
## Confluence Logic
The retest score combines pocket touch quality, close response, retest timing, relative volume, opening range volatility fit, and available target room.
When these conditions align, the context becomes stronger. When they do not align, the panel remains in MONITOR, WAIT, INVALIDATED, or EXPIRED state.
## When To Use
This script is most useful in liquid intraday markets where the opening range matters and session structure is clear.
It fits breakout-retest workflows, opening drive continuation, failed breakout monitoring, and structured intraday planning.
## When NOT To Use
Avoid relying on this script in very low-liquidity symbols, extremely noisy sessions, holiday trading, or chart conditions where the opening range session cannot be represented cleanly.
## Key Inputs
Opening Range Mode controls whether the script uses an exact session window or the first chart bars of each day.
Auto mode uses session-window logic on lower intraday charts and switches to first-bars-of-day logic on higher timeframes.
Retest Pocket ATR controls the depth of the retest zone around the broken boundary.
Minimum Ready Score controls how strong the 0-100 retest score must be before READY appears.
Panel and label controls let users adjust position, theme, and visual density.
## Interface & Visual Design
The visual design is chart-first.
The opening range stays readable, the active retest pocket becomes the focus area, and the panel provides compact decision context without covering the whole chart.
The first panel row uses the AG Pro blue header style and shows only the script name.
## Practical Usage Workflow
1. Wait for the opening range to lock.
2. Watch for a breakout beyond the range boundary.
3. Observe whether price returns to the retest pocket.
4. Check the retest score and action state.
5. Treat alerts as attention markers and confirm context with your broader process.
## What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not guarantee outcomes.
It does not replace independent risk management or market context.
## Limitations & Transparency
Opening range behavior changes across markets, sessions, liquidity conditions, and timeframes.
The score is rule-based and depends on the configured session, ATR normalization, volume behavior, and retest window.
Different chart timeframes may display session structure differently.
## Risk Disclosure
Trading involves risk.
Users remain responsible for their own decisions.
This script is for educational and analytical purposes only and does not provide financial advice or guaranteed trading outcomes.
Indicator

Trendline Bounce [EXCAVO]Automatic Trendline Detection with Multi-Stage Bounce Detection and Quality Filters
The Trendline Bounce automatically identifies support and resistance trendlines
validated by three or more confirmed pivot touches. When price returns to an established
line, the indicator places a directional bounce arrow and triggers the alert. A dual-
lookback architecture fires earlier than traditional pivot-confirmation methods, while
span, regime, and trend filters eliminate structurally weak or contextually invalid setups.
This is not a simple two-point line connector. The slope is derived from a best-fit
search across all qualifying pivots, every candidate line is rejected if any candle
between touch points crosses the boundary, and three parallel detection channels reduce
the confirmation delay without sacrificing structural validity.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE
Step 1 → Add the indicator. Trendlines appear immediately - solid line
is the most recent valid line per direction, dashed lines are
the previous ones (up to Max Lines per Side).
Step 2 → Watch for the bounce arrow. A triangle (▲ or ▼) marks the bar
where the third or later touch is detected. Check the dashboard
for the quality grade (A / B / C).
Step 3 → Use the Trend Filter and ATR Regime Filter inputs to narrow the
context. Enable Trend Filter to gate bounces by 200 EMA direction.
Enable ATR Regime Filter to suppress detections during extreme
volatility spikes.
Step 4 → Adjust Early Detection Lookback to trade off timing vs. accuracy.
Lower values fire earlier but may produce more noise. The Detection
Lookback controls the quality trendline anchor; Early Detection
Lookback controls how quickly subsequent touches are confirmed.
Step 5 → Use dashed historical lines for context. They show where price
previously respected trendlines and may act as reference levels.
Step 6 → Set alerts to monitor conditions in real time. Use "Any Bounce"
for general monitoring or direction-specific alerts for automated
setups via webhook.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES
◆ Pivot Detection (Quality Layer)
Swing highs and lows are confirmed using ta.pivothigh() / ta.pivotlow() with
Detection Lookback bars required on each side (default 14). A pivot high at bar B
requires bar B's high to be the maximum of the surrounding 14 bars on both sides.
Up to 60 pivots per direction are stored in a rolling buffer. These quality pivots
form the structural anchor for trendline fitting.
◆ Best-Slope Trendline Fitting
For each anchor pivot A, the algorithm scans all other pivots B to compute slope:
sl = (price_B - price_A) / (bar_B - bar_A). Slopes steeper than 0.5 x ATR per bar
are rejected. For each valid slope, the algorithm counts how many pivots fall within
ATR x Tolerance of the projected line. The slope maximizing confirmed touch count
(minimum 3) is selected. This approach finds the line that fits the most pivots
rather than simply connecting two points.
◆ Breakout Rejection Sampling
Once a candidate line passes the touch count test, 60 evenly spaced bars between the
first and last touch are sampled. If any sampled bar's high (for resistance) or low
(for support) exceeds the projected price plus tolerance, the line is rejected. This
catches wick or body violations between pivot points that pure pivot-based validation
would miss.
◆ Minimum Span Filter
A trendline whose first and last touch are fewer than Min Trendline Span bars apart
is discarded. Three pivots clustered within a few bars share no structural significance.
This filter ensures every displayed line represents a meaningful price reaction period,
not a short-term oscillation.
◆ Three-Channel Bounce Detection
After the structural line set is built, three parallel detection channels produce the
bounce arrow:
1. Quality path: when the most recent quality pivot (i_len delay) falls on an
established line within the tolerance band, a detection fires.
2. Early path: when the most recent fast pivot (Early Detection Lookback, default 5)
touches an already-established quality trendline, a detection fires earlier than
waiting for full quality confirmation.
3. Real-time path: every tick, each stored trendline is projected to the current bar.
If the current bar's high (resistance) or low (support) enters the tolerance band,
a detection fires immediately without waiting for pivot confirmation.
All three channels require the line to have been built from quality pivots. The early
and real-time channels only fire against pre-validated structural lines - they do not
create new lines themselves.
◆ Trend and Regime Gates
Two optional gates filter the output of all three detection channels. The Trend Filter
(200 EMA) passes bullish detections only when close is above the EMA and bearish
detections only when close is below. The ATR Regime Filter computes
ta.percentrank(ATR, 200) / 100 and suppresses all detections when the result exceeds
0.90 - this blocks entries during the top 10% of volatility events where trendline
breaks are more likely than bounces.
◆ Bounce Grade (A / B / C)
Each detected bounce is evaluated at the detection bar: volume ratio = volume /
SMA(volume, 20); wick position = (close - low) / (high - low) for bullish or
(high - close) / (high - low) for bearish. Grade A requires volume ratio >= 2.0
AND wick position >= 0.60. Grade B requires ratio >= 1.5 OR position >= 0.50.
Grade C is assigned otherwise.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT
◆ Best-Slope Fitting Across All Pivots
Rather than connecting only two pivots, the algorithm finds the slope that maximizes
the number of confirmed touches. A line with three near-misses is ranked higher than
a line connecting two pivots perfectly, because more touches represent stronger
structural significance.
◆ Breakout Rejection via Bar Sampling
Most trendline tools draw a line between any two pivots regardless of what happens in
between. This indicator samples 60 bars between the first and last touch and rejects
any line where a candle crosses the boundary. Only lines price has genuinely respected
are shown.
◆ Minimum Span Filter
Trendlines that form in fewer bars than the span threshold are discarded. This removes
short-term pivot clusters that look like trendlines but carry no structural weight.
The result is fewer, higher-quality lines.
◆ Three-Channel Detection for Earlier Timing
Traditional trendline indicators confirm a bounce only after the full pivot lookback
elapses - on a 4H chart with lookback 14, that is 56 hours after the actual low. The
early detection channel reduces this to 5 bars (20 hours on 4H). The real-time channel
fires on the current bar. Both channels require the line to already be structurally
validated - they reduce timing delay without introducing unvalidated lines.
◆ Trend and Regime Filters
The 200 EMA gate removes counter-trend detections. The ATR regime gate suppresses
detections during the highest-volatility periods where trendline structure tends to
break rather than hold. Both filters are optional and off by default.
◆ Exact Touch Markers
Circles are placed at actual candle prices (high for resistance, low for support), not
at the theoretical projected price on the line. This makes it immediately visible
whether the wick tapped the line or the body closed through it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD
Real-time panel (top right corner) showing current state:
Last Bounce - direction (▲ bullish / ▼ bearish) and quality grade (A/B/C) of the most recent bounce
Trend (200 EMA) - current price position relative to 200 EMA (▲ Bull / ▼ Bear)
Lines R / S - count of currently active resistance and support trendlines
Legend table (bottom left) explains every visual element. Both panels can be
toggled independently in Dashboard settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS
Trendlines
Detection Lookback - 14 bars (bars on each side to confirm a quality swing pivot; higher = fewer but stronger lines)
Max Lines per Side - 5 (maximum number of trendlines shown per direction)
Tolerance (xATR) - 0.5 (ATR multiple defining how close a pivot must be to the line to count as a touch)
Min Trendline Span - 30 bars (minimum bars between first and last touch; filters structurally insignificant lines)
Bounce Detection
Min Touches - 3 (minimum confirmed touches before a bounce arrow appears)
Show Grade (A/B/C) - ON (display quality grade in the dashboard)
Early Detection Lookback - 5 bars (shorter lookback for faster bounce detection on established lines)
Trend Filter (200 EMA) - OFF (when ON: bullish bounces above EMA only, bearish below only)
ATR Regime Filter - OFF (when ON: suppresses detections when ATR is above 90th percentile of last 200 bars)
Visualization
Support Color - blue (color for support trendlines and bullish bounce arrows)
Resistance Color - red (color for resistance trendlines and bearish bounce arrows)
Bounce Color - orange (color for bounce arrows)
Bar Coloring - OFF (color bars on bounce detection using direction color)
Show 200 EMA - OFF (plot 200-bar EMA on the chart)
Dashboard
Show Dashboard - ON
Dashboard Position - Top Right (Top Right / Top Left / Bottom Right / Bottom Left)
Show Legend - ON
Alert Settings
Allow Repainting - OFF (when off, detection confirms at bar close; enable only if monitoring open bars)
JSON Alerts - OFF (structured JSON payload for webhook automation)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ ALERTS
Bullish Bounce - price touches a confirmed support trendline for the 3rd+ time
Bearish Bounce - price touches a confirmed resistance trendline for the 3rd+ time
Any Bounce - bounce detected in either direction
All alerts respect the Allow Repainting setting. When off, bounces are confirmed
at bar close only. JSON Alerts option sends a structured payload with ticker,
price, timeframe, direction, and grade fields.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best regards,
EXCAVO
Disclaimer
Trading involves significant risk. This indicator is a technical analysis tool
and does not constitute financial advice, investment recommendations, or a
guarantee of future results. Past indicator behavior does not guarantee future
performance. Always use proper risk management and your own judgment.
Indicator

Svopex S&D ScanSvopex S&D Scan
Multi-symbol Supply & Demand zone scanner that displays the status of up to 40 instruments in a single table. Built on the same detection logic as Svopex Supply &
Demand Zones (base + explosive ATR candle pattern), but extended to portfolio-wide screening with on-chart zone drawing for the active symbol.
What it does
For each of up to 40 user-defined symbols (default: NAS100, XAU, EURUSD, US30, SPX500, WTICO, XAG, BTC + 27 main and cross OANDA currency pairs), the scanner detects
supply and demand zones in real time and shows in the result table where price currently sits relative to those zones.
Detected statuses (priority order: IN > NEAR > WAS_IN > none):
- IN SUPPLY / IN DEMAND — price is currently inside an active zone
- NEAR SUPPLY / NEAR DEMAND — price is within nearMult × ATR of the zone edge
- WAS IN SUPPLY / WAS IN DEMAND — price was inside a zone within the last N closed bars but is no longer in/near it (zone has been broken). Useful as a follow-up
signal after price entered a zone and the zone was invalidated
- (blank) — no relevant state
The table can be filtered to show only hits, and rows update as the chart timeframe changes — the scanner always operates on the chart's current TF.
Zone detection logic (identical to Svopex Supply & Demand Zones):
- 1 to N "base" candles with body ≤ baseBodyPct × ATR
- Followed by an explosive candle with body ≥ explMult × ATR
- The high/low of the base candles defines the zone boundaries
- The zone is invalidated when price breaks through it according to breakPct threshold (with optional wick or body-only mode)
On-chart zone drawing
For the current chart symbol, the scanner also draws supply (red) and demand (green) boxes the same way as Svopex S&D Zones — so you can use it as a single-symbol
indicator and as a multi-symbol scanner in one. Switching the chart to any other symbol redraws the boxes for that symbol.
---
Parameters
Symbols (1–40)
- Each slot accepts a BROKER:TICKER format (e.g. OANDA:EURUSD, BINANCE:BTCUSD). Empty slots are skipped (mapped to chart symbol internally and deduplicated by Pine).
Zone detection
- Max base candles (default 3, range 1–6) — maximum number of base candles that can precede the explosive move.
- Base body ≤ ATR × (default 0.5) — the body of base candles must be at most this multiple of ATR.
- Explosive body ≥ ATR × (default 1.5) — the body of the explosive candle must be at least this multiple of ATR.
- ATR length (default 14) — period for ATR calculation.
- Max active zones per side (default 20, range 1–100) — how many supply/demand zones to track per symbol; oldest are dropped when the limit is exceeded.
Zone Break
- Include wicks (else body only) (default true) — when ON, the break check uses candle high/low (wicks); when OFF, only body (max/min of open, close).
- Break threshold (%) (default 0, range 0–100) — how far price must penetrate the zone to invalidate it. 0 = zone breaks at first touch of the near edge, 50 = breaks
at midline, 100 = breaks only after fully crossing the zone.
Proximity
- Near threshold (ATR ×) (default 1) — distance from zone edge (in ATR units) within which price counts as "NEAR".
Was-in zone
- Bars back for 'was in zone' (default 10, range 1–50) — lookback window for the WAS_IN status. If price was inside a zone within the last N confirmed bars but is no
longer there, the symbol shows WAS IN SUPPLY / WAS IN DEMAND. Only triggers when no IN/NEAR status applies.
Current-symbol zones
- Draw zones for current chart symbol (default true) — toggles zone box rendering on the chart.
- Max drawn zones per side (default 20) — limit for boxes drawn on chart.
- Supply fill / Demand fill (default red 80% / green 80%) — zone box colors.
Table
- Position (default top_right) — top/bottom × left/right/middle.
- Show only hits (default true) — hides symbols with no signal.
- Text size (default normal) — tiny / small / normal / large / huge.
- Strip exchange prefix (default true) — shows EURUSD instead of OANDA:EURUSD.
---
Typical usage
- Open any chart and timeframe — the scanner immediately shows which symbols in your watchlist are in/near a zone.
- When you change the chart timeframe, the scanner recomputes all symbols on the new TF.
- When you switch the chart to a symbol from the list, you see its zones rendered as boxes directly on the chart.
Limitations
- Pine Script enforces a hard limit of 40 unique request.security calls per indicator — hence the 40-symbol cap. Empty slots are mapped to the chart symbol and
deduplicated, so the actual call count depends on how many distinct tickers you populate.
- Zone boxes are drawn only for the active chart symbol (price-axis scaling makes cross-symbol overlay meaningless).
- With breakPct=0 and useWicks=true, zones have a short life (a single wick touch invalidates them) — the WAS_IN status acts as a follow-up signal in that mode.
Tip: For longer-lived zones, raise breakPct to 50–100% — IN/NEAR statuses will then persist as long as price holds the zone. For a classic S&D screener, the
recommended combination is useWicks=true + breakPct=0 + wasInLookback=10. Indicator

Pymander's EZ Key LevelsHey everyone! Pymander here. I’m excited to share EZ Key Levels, a tool I built to solve one of the biggest problems we face as intraday traders: chart clutter.
We all know that "levels are king," but when your screen is a spiderweb of Daily, Weekly, and Session lines, it’s easy to get lost in the noise. This indicator is designed to give you total clarity so you can focus on execution.
What is EZ Key Levels?
At its core, this is a hybrid indicator. It combines High Timeframe (HTF) logic with Machine Learning (K-Means Clustering) to map out the most important psychological and volume-based zones on your chart.
How It Works & Why It’s Different:
Solid Until Mitigated: This is the real game-changer. Every level starts as a solid line (meaning it's fresh and untested). The moment price "mitigates" it—either by a wick touch or a candle close—the line automatically turns dotted. You’ll never have to guess if a level is still "fresh" again.
Volume-Weighted Clustering: Instead of just looking at where price sat, our dynamic clusters use VWAP logic to find where the most volume actually traded. It identifies the true "Value Areas" of the last few days.
Premium Proximity & Focus Mode: Most indicators show you everything at once. EZ Key Levels identifies the 4 levels closest to price and highlights them in Rose (Above) and Emerald (Below). Turn on Focus Mode, and every other line disappears, leaving you with a clean, "pro-style" chart that only shows what matters right now.
All-In-One Session Logic: It automatically tracks Asia, London, and NY session highs/lows and projects them infinitely so you can see how those ranges act as support or resistance days later.
How This Helps You:
This tool is built for the 3-5 minute trader who needs to make split-second decisions. By identifying high-confluence zones (where a V-Cluster lines up with a PDH or Session Low) and highlighting them automatically, it removes the "analysis paralysis" that kills so many trades.
I’d love to hear your thoughts! If you have any feedback or ideas on how to make this even better for your workflow, please let me know.
Wishing you all the best of luck and many, many green days!
-Pymander
Indicator

Support and Resistance Institutional Zones [FEELS]Trade Volume-Weighted, Actionable Zones.
Many traditional support and resistance tools draw lines at every recent high and low. This script takes a different approach. It waits until price has actually used a level multiple times, weights each touch by how much volume and rejection was behind it, and only then draws a zone. The result is fewer levels on your chart, but the ones that do show up have a real mathematical reason to be there. Coupled with a strict, non-repainting signal engine, this tool is designed for serious Price Action traders.
—
🔥 Why This is Different
100% Non-Repainting Signals: Our signal engine operates strictly in real-time. Once a signal (Break, Bounce, Hold) is printed on a closed candle, it stays there forever, ensuring full historical accuracy for your backtesting.
Liquidity Sweep & "Born-Dead" Protection: Sometimes, algorithmic approaches can print false breakout signals if a zone forms retroactively during a massive price drop. We built a custom "Live Break" memory engine that verifies if the price was actually above/below the zone before the break. Furthermore, deep wicks (liquidity sweeps) do not trigger breaks—only solid candle closes do.
Volume & Rejection Weighting: Not all levels are created equal. Pivots that fired on heavy volume with long wicks weigh significantly more than quiet pokes. Zones with higher volume automatically become more vivid, while low-volume zones fade into the background.
—
⚙️ How It Works Under the Hood
The script collects confirmed pivots – both highs and lows – and groups them into clusters by price proximity. It uses a temporal spacing rule that prevents tight, standard consolidations from artificially inflating a single zone.
Older pivots gradually decay in influence, ensuring the active zones reflect what is actually relevant to current price action. The top zones by weighted strength are kept and ranked relative to each other.
—
📊 Reading the Chart
★ to ★★★ – The relative strength of the zone vs. other zones currently visible.
2× / 4× / 7× – The number of qualifying touches the zone has accumulated.
Vol: 72.19K – The cumulative volume of all pivots that built this zone.
Color intensity – Vividness scales with volume; highly transparent, faded zones are weak levels you can mostly ignore.
—
🎯 Strength Presets
Most users do not want to tune pivot parameters manually. The preset selector handles this in one click:
Local — Short pivots, tight zones. Use on intraday for scalping levels.
Swing (Default) — Balanced. Works incredibly well on most timeframes.
Major — Long pivots, wide zones. Surfaces the macro structure of the asset.
Custom — Full manual control over pivot length, tolerance, and spacing. Note: You can switch presets without losing the chart's other visual settings.
—
🚥 Active vs. Broken vs. Dropped Zones
There are three states a zone can be in:
Active: Currently respected by price. Drawn in your chosen support or resistance color.
Confirmed broken: Price closed through the zone with conviction. (Optional setting).
Dropped: Disappeared from the active list because newer pivots reorganized the cluster set. (Optional setting). Useful when reviewing why a past signal fired.
Both broken types are off by default for a clean chart. Toggle them on to study how zones evolved or to backtest signal context.
—
⚡ Optional Signals
The script can mark four types of price reactions. All are off by default – turn on what fits your style:
Successful test: A circle below or above the bar when price tests an active zone and closes back in the rejection direction.
Retest: A diamond when price returns to a previously broken zone within the retest window and reacts off it. The classic broken-resistance-becomes-support play.
Zone reaction marks: A small diamond when price touches a zone and holds without closing through. Bold Break R / Break S text labels appear only when a zone is genuinely broken on close.
RSI filter: An extra confirmation gate. Bullish signals only fire on RSI oversold; bearish only on overbought. Reduces signals to higher-conviction setups.
—
🔔 Alerts
Eight precise alert conditions are exposed for automated trading or notifications:
Resistance touched / Support touched
Resistance broken / Support broken
Successful support test / Successful resistance test
Bullish retest / Bearish retest
New pivot confirmed
Set them through the standard PulseWire alert dialog – the conditions appear directly in the dropdown.
—
💡 Pro Tips
No Volume? No Problem: On low-liquidity assets or indices without volume data, zones still build correctly using the wick and structure components. Volume coloring will be uniform, but everything else works flawlessly.
Clean the Clutter: If the chart looks crowded, lower "Active zones per side" to 3-4, or increase "Hide zones farther than (%)" to filter out distant zones.
Fast Timeframes: On 1m or 5m charts, switch the preset to Local and lower the Cooldown bars if you trade off rapid bounce signals.
Relative Strength: Strength is a relative measure within the visible zones, not an absolute score. ★★★ on a quiet, ranging chart is not the same as ★★★ on a high-volume, trending one.
This script is open-source. If you build something interesting on top of it, please reference where the original idea came from.
Disclaimer: Not financial advice. Always backtest before risking capital. Indicator

Order Block Detector [SMC ChartSense]# SMC ChartSense — Order Block Detector
**Order block detection with mandatory FVG (Fair Value Gap) confirmation.** Each zone marked must have a 3-bar FVG at the anchor candle — institutional displacement that left a literal gap in price. Most basic OB scripts flag every breakout candle as an order block; this script filters to only the zones that came with displacement footprint, producing a cleaner chart with fewer but more meaningful zones.
## How it works
The script tracks swing pivots at a configurable length and waits for a confirmed break — a candle that closes beyond the prior swing high or low. When a break occurs, it searches back through the recent bars to identify the deepest counter-direction candle (lowest low for a bullish OB, highest high for a bearish OB). This becomes the OB anchor.
The anchor is then validated against the FVG requirement: there must be a 3-bar gap at the anchor index (bar A high below bar C low for bullish, bar A low above bar C high for bearish). No FVG, no OB. This is the central quality filter.
Validated zones extend forward from the anchor and remain active until invalidated — either when price closes through the zone or when the wick touches the far side, depending on user preference.
## Features
- FVG validation gate at the anchor candle (3-bar gap requirement)
- Configurable swing pivot length for structural sensitivity
- User-tunable OB anchor lookback (5–100 bars)
- Wick-based or body-based zone definition
- Configurable mitigation trigger: Close-through or Wick-touch
- Auto-pruning of oldest OBs when active count exceeds limit
- Optional faded display of mitigated zones for historical study
- Built on Pine v6 with clean, maintainable architecture
## Inputs
**Structure Detection**
- *Swing Pivot Length* — Higher values produce fewer, more significant pivots. Lower values produce more frequent pivots of smaller structural significance. Default: 5.
**Quality Filters**
- *OB Anchor Lookback Bars* — How far back from a confirmed pivot break to search for the OB anchor candle. Default 30 covers most timeframes; reduce for scalping, increase for higher TFs.
- *Anchor OB to Wick (vs Body)* — Wick mode uses the full candle range. Body mode uses open/close only (tighter zones).
- *Mitigation Trigger* — Close mode invalidates when a candle closes through the zone. Wick mode invalidates on first wick touch.
**Visualization**
- Bull/Bear OB colors (customizable)
- Max OBs Per Side (caps active display, oldest auto-pruned)
- Show OB Labels (off by default — boxes alone are usually sufficient)
- Show Midline (50% level inside each OB, dotted)
- Keep Mitigated OBs Visible (faded gray boxes remain for historical reference)
## Built-in alerts
- New Bull OB formed
- New Bear OB formed
- Bull OB touched (price entered zone)
- Bear OB touched (price entered zone)
## Suggested use
Best on liquid intraday markets — major forex pairs, crypto perps, index futures, large-cap equities — at timeframes from 5m to 4h. Default settings are tuned for 15m–1h ranges; adjust Swing Pivot Length down to 3 for scalping or up to 8–10 for higher-TF trend trading.
Use this as a context tool. The zones identify where institutional displacement occurred — actual entries should incorporate your own analysis: HTF bias, structural alignment with current market regime, risk-reward planning, and confirmation from other tools.
## Part of the SMC ChartSense suite
One of several focused SMC tools. Designed to work alongside other SMC ChartSense scripts for a coherent analytical workflow across the SMC vocabulary.
## Disclaimer
This is a technical analysis tool. It does not provide investment advice or trade recommendations. The author is not a SEBI-registered Research Analyst. Use at your own risk; do your own due diligence. Indicator

Market Sessions [Crypto Imperija]Market Sessions is a clean session-mapping indicator designed for crypto traders who want to better understand how price behaves during different parts of the trading day.
The indicator highlights the main market sessions directly on the chart using customizable boxes, session names, session times, completed session high/low levels, sweep detection, reclaim detection and alerts.
It is especially useful for traders who work with liquidity concepts, session ranges, intraday market structure, and time-based trading analysis.
Default Sessions:
• Asian Session: 02:00 - 10:00 UTC;
• London Session: 09:00 - 17:30 UTC;
• New York Session: 16:30 - 23:00 UTC;
• Closed / Low Activity Session: 23:00 - 02:00 UTC.
1. Session Boxes
The indicator draws visual boxes around each selected session. Each box shows the full price range created during that session, including the session high and session low.
This helps traders quickly see:
• Where price ranged during a specific session;
• Which session created the most volatility;
• Whether price is expanding or consolidating;
• How the current session reacts to previous session ranges.
2. Session Names and Times
Each session box can display the session name and session time directly on the chart.
This makes it easier to follow the trading day without constantly checking the clock, especially when analyzing multiple timeframes or trading crypto markets that run 24/7.
3. Session High / Low Levels, Sweeps and Reclaims
After each session finishes, the indicator automatically draws the completed session high and low as horizontal levels. These levels are often important because previous session highs and lows can act as key liquidity areas. Traders commonly watch them to see whether price rejects from them, breaks through them, sweeps them, or reclaims them.
Examples of completed session levels:
• Asian High / Asian Low;
• London High / London Low;
• New York High / New York Low;
• Closed Session High / Closed Session Low.
The indicator detects two important events around these levels:
• Session Sweep:
A high sweep is detected when the current candle high reaches or moves above a completed session high.
A low sweep is detected when the current candle low reaches or moves below a completed session low.
• Session Reclaim:
After a sweep, the indicator watches the candle close.
If a completed session high is swept and price closes back below that high, it is considered a reclaim.
If a completed session low is swept and price closes back above that low, it is considered a reclaim.
This helps traders identify when price has interacted with a previous session liquidity level and whether the move continued or failed after the sweep.
4. Mitigated Levels
When a session level is swept, the trader can choose whether to remove it from the chart or keep it visible as a faded/dotted mitigated level.
This gives more control over chart cleanliness:
• Hide mitigated levels for a cleaner chart;
• Show mitigated levels to study how price reacts after liquidity is taken.
5. Customizable Visual Settings
The indicator includes multiple customization options:
• Show or hide session boxes;
• Show or hide session names;
• Show or hide completed session high/low levels;
• Show or hide price values on labels;
• Choose label size;
• Choose session level line style;
• Choose line width;
• Choose box border style;
• Choose box border width;
• Customize each session color;
• Hide weekend sessions.
This makes the indicator flexible for different trading styles, chart layouts, and visual preferences.
6. Alerts
The indicator includes alert conditions for:
• Session Sweep
• Session Sweep Reclaim
The alert messages can include the ticker, timeframe, swept level, price, and reclaim direction.
Important Notes:
This indicator does not predict price direction. It is a visual and alert-based tool that helps traders identify session ranges, completed session highs/lows, sweeps, and reclaims. A sweep does not guarantee a reversal, and a reclaim does not guarantee continuation in the opposite direction. These events should always be analyzed together with market structure, candle closes, volatility, volume, risk management, and a complete trading plan.
Trading involves risk. This indicator is for educational and analytical purposes only and should not be considered financial advice. Indicator
