ICT Session Zones & Sweep Signals [WillyAlgoTrader]🎯 ICT Session Zones & Sweep Signals is an overlay indicator that maps the full ICT session framework onto your chart: five configurable killzone boxes with adaptive high/low pivots, confirmed liquidity sweep signals scored by ATR-normalized wick depth, session VWAP lines, Asian session bias engine, D/W/M open and previous high/low levels, custom opening price lines, vertical timestamps, and a day-of-week label system. Everything is timezone-aware, timeframe-gated, and designed for 1m–15m intraday charts.
🏗️ Most session indicators on PulseWire draw static time boxes and stop there. This indicator builds a complete ICT session analysis environment: it tracks killzone ranges in real time, extends session pivots beyond the killzone until price sweeps them, detects and confirms the sweep with multiple filters (ATR depth, body confirmation, cooldown), scores each sweep's strength, calculates session VWAP inside each killzone for fair value reference, tracks Asian session bias, and overlays D/W/M structural levels — all in one tool with a unified dashboard.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Confirmed liquidity sweep detection with strength scoring. The core signal engine detects when price wicks beyond a session high or low and closes back inside — the classic ICT liquidity grab pattern. Every sweep must pass four filters before becoming a signal:
— 📏 ATR depth filter : the wick beyond the pivot must exceed a configurable ATR multiple (default 0.1×) — filtering out insignificant touches
— 🕯️ Body confirmation : close must be beyond the candle body midpoint in the rejection direction (bullish sweep: close in upper half; bearish: close in lower half) — confirming genuine rejection, not just a wick
— ⏱️ Cooldown filter : minimum bars between sweeps from the same session (default 3) — preventing rapid-fire signals from the same pivot
— ✅ Bar-close confirmation : all sweeps require barstate.isconfirmed — no intrabar repainting
Each confirmed sweep receives a strength score based on wick depth as an ATR multiple: Strong (≥ 0.5× ATR), Medium (≥ 0.2×), or Weak (< 0.2×). The score and strength appear in the label tooltip and on the dashboard.
2️⃣ Intelligent pivot lifecycle management. Session high/low lines are not static — they follow a lifecycle:
— 🟢 Created at session start with the first bar's high/low
— 📈 Updated during the session as new highs/lows form
— ➡️ Extended beyond the session until swept or invalidated
— 🎯 Swept: wick beyond + close back inside → sweep signal fires
— ❌ Invalidated: only when price closes decisively beyond the level (not just a wick touch) — preventing premature pivot death from intrabar noise
— 🔄 Mode option: "Until Swept" (pivot disappears after sweep) or "Always" (pivots extend indefinitely for historical reference)
3️⃣ Session VWAP (volume-weighted average price per killzone). Unlike the simple midpoint between session high and low, the session VWAP accumulates close × volume inside each killzone, providing the true volume-weighted fair value for that session. The VWAP line extends beyond the session end, serving as a more accurate equilibrium reference than the midpoint. This is especially useful on instruments with uneven volume distribution within a session.
4️⃣ Asian session bias engine. The dashboard continuously shows the Asian bias state: Bullish (price above Asia high), Bearish (price below Asia low), or Neutral (inside range). This directly implements the ICT concept that the Asian range sets the liquidity pool for London and NY sessions — if price is above Asia high, London/NY are expected to seek downside liquidity, and vice versa.
5️⃣ Five fully customizable killzones. Each killzone has independently configurable:
— Session name, time window, and color
— High/Low pivot label text (e.g., "AS.H" / "AS.L")
— Enable/disable toggle
Default zones cover the standard ICT framework: Asia (20:00–00:00), London (02:00–05:00), NY AM (09:30–11:00), NY Lunch (12:00–13:00), NY PM (13:30–16:00). All times follow the selected timezone. You can modify any zone to match your specific session definitions.
6️⃣ D/W/M structural levels with break alerts. The indicator tracks and draws:
— 📅 Daily / Weekly / Monthly opening price lines
— 📊 Previous Day High/Low (PDH/PDL), Previous Week High/Low (PWH/PWL), Previous Month High/Low (PMH/PML)
— 📍 Vertical day/week/month separators
Each level extends across the chart with configurable style and width. Break alerts fire when price closes above PDH, below PDL, above PWH, below PWL, above PMH, or below PML — six structure-level alerts in addition to sweep alerts.
7️⃣ Custom opening price lines and vertical timestamps. Four configurable opening price slots let you mark any specific time's opening price (e.g., True Day Open at 00:00, 06:00 open, 10:00 open, 14:00 open). Four vertical timestamp slots add time-of-day vertical lines (e.g., 08:00 London open, 10:00 macro time, etc.). All follow the selected timezone and are trimmed by session history.
8️⃣ Killzone range comparison table. An optional range table shows each killzone's current range (high − low) alongside its N-session average range. This helps you identify when a session is extended beyond its typical range (potential exhaustion) or still compressed (potential expansion ahead).
9️⃣ Comprehensive dashboard. The info panel shows:
— 🔵 Active session name (with overlap count when multiple sessions are active simultaneously)
— 📊 Asian session bias (Bullish / Bearish / Neutral)
— 🎯 Last sweep type, session, and strength with ATR score
— 📈 Total sweep counts (bullish / bearish)
— ⏱️ Current timeframe and symbol
— 🏷️ Indicator version
🔟 Full timezone support with 35+ timezone options. All session calculations use a single timezone setting. Options include named timezones (America/New_York, Europe/London, Asia/Tokyo, etc.) and GMT offsets (GMT-12 through GMT+12). This ensures killzone boxes, pivot times, opening prices, and timestamps all align correctly regardless of your broker's server time.
⚙️ HOW IT WORKS
🏗️ Killzone box creation:
On each bar, the indicator checks whether the current time falls inside each enabled killzone using the configured session string and timezone. When a session starts (current bar inside, previous bar outside), a new box is created with the bar's high/low. During the session, the box expands to encompass the full range. Pivot lines (high/low) are created at session start and updated as new extremes form. Session VWAP accumulates close × volume and updates on each bar.
🎯 Sweep detection:
After a session ends, the pivot lines continue extending on each bar. On every confirmed bar, the indicator checks: does the wick exceed the pivot level? If yes, it evaluates four conditions: ATR depth threshold met, close back inside the level, body confirmation (close in correct half of candle), and cooldown since last sweep from this session. Only if all four pass does the sweep signal fire. The pivot is invalidated (stops extending) only when price closes decisively through the level — not on a wick touch alone.
📊 Sweep strength:
Wick depth beyond the pivot is divided by ATR(14) to produce a dimensionless score. Strong ≥ 0.5×, Medium ≥ 0.2×, Weak < 0.2×. The score appears in the signal tooltip and on the dashboard, helping you prioritize higher-quality sweeps.
📏 Session VWAP:
Inside each killzone, the indicator accumulates sum(close × volume) and sum(volume). VWAP = numerator / denominator. The line updates on each bar during the session and extends beyond session end as a reference level. Volume is floored at 1.0 to handle instruments with zero reported volume.
🔄 Asian bias:
The dashboard reads the Asia session's most recent high and low pivot levels. If the current close is above Asia high → Bullish. Below Asia low → Bearish. Inside the range → Neutral. This updates in real time.
📅 DWM levels:
On each D/W/M timeframe change, the indicator stores the previous period's high and low, then draws horizontal lines at those levels. Lines extend forward on each bar. Break detection fires alerts when price closes above the high or below the low for the first time since the period change.
📖 HOW TO USE
🎯 Recommended setup:
— ⏱️ Timeframe: 1m–15m — the indicator auto-hides on timeframes ≥ the TF Limit setting (default 30m). Session zones and sweeps are most meaningful on intraday charts.
— 🌐 Timezone : set to your exchange or broker timezone for accurate killzone alignment. For ICT concepts, America/New_York (EST/EDT) is the standard reference.
— 📦 Session History (default 3): controls how many past sessions' boxes and pivot lines remain on chart. Increase for more context, decrease for cleaner charts.
👁️ Reading the chart:
— 📦 Colored boxes = killzone time windows (Asia blue, London red, NY AM green, NY Lunch yellow, NY PM purple)
— ─── Horizontal lines extending from boxes = session high/low pivots (active until swept or invalidated)
— ··· Dotted lines = session midpoints and/or VWAP
— 🟢 ▲ label below candle = confirmed bullish sweep (wick below session low + close back above)
— 🔴 ▼ label above candle = confirmed bearish sweep (wick above session high + close back below)
— Hover over sweep labels for tooltip: session name, strength, ATR score, price
🔁 ICT workflow with this indicator:
1. 🌏 Check Asian session range — note the high and low pivots
2. 📊 Read the dashboard — Asian Bias tells you the directional lean
3. 🇬🇧 During London killzone — watch for sweeps of Asian high/low pivots
4. 🇺🇸 During NY AM — watch for sweeps of London or Asian pivots
5. 🎯 When a sweep fires — check strength (Strong > Medium > Weak) and confluence with DWM levels
6. 📍 Use PDH/PDL, PWH/PWL as additional confluence — sweep + DWM level break = highest conviction
7. 🕐 NY Lunch — lower probability zone, expect consolidation
8. 🔄 NY PM — potential continuation or reversal of AM move, watch for PM pivot sweeps
🔧 Tuning sweep sensitivity:
— 🎚️ Min Sweep Depth 0.0 : any wick beyond the pivot counts (most signals, more noise)
— 🎚️ Min Sweep Depth 0.1 (default): requires 10% of ATR beyond pivot (balanced)
— 🎚️ Min Sweep Depth 0.2–0.3 : only significant wicks qualify (fewer but stronger signals)
— 🔄 Cooldown 0 : no restriction (same pivot can trigger multiple sweeps)
— 🔄 Cooldown 3 (default): minimum 3 bars between sweeps from the same session
— 🕯️ Body Confirmation On (default): filters weak wicks — recommended to keep enabled
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Timezone (default GMT+0): 35+ options including named and GMT offset
— Timeframe Limit (default 30m): hide all drawings on TFs ≥ this value
— Session History (default 3): number of past sessions to keep visible
📦 Killzones:
— 5 independently configurable zones: name, session time, color, enable/disable
— Box Transparency (default 80%): killzone box fill opacity
— Show Box Labels (default On): session name text inside boxes
📏 Session Pivots:
— Show Session Pivots (default On): high/low lines from each killzone
— Show Midpoints (default Off): 50% level between session high and low
— Show Session VWAP (default Off): volume-weighted average price per killzone
— Extend Pivots (default Until Swept): line stops after sweep, or "Always" for permanent extension
— Show Price on Labels (default Off): append price value to pivot label text
— Customizable pivot label text per killzone (e.g., AS.H, LO.H, AM.H)
🎯 Sweep Signals:
— Min Sweep Depth (default 0.1× ATR): minimum wick beyond pivot
— Cooldown (default 3 bars): minimum bars between sweeps from same session
— Body Confirmation (default On): require close in correct body half
📅 Day / Week / Month:
— Daily / Weekly / Monthly Open lines (each toggleable)
— Previous D/W/M High/Low lines with labels (PDH, PDL, PWH, PWL, PMH, PML)
— Day / Week / Month separator verticals
— Day-of-Week text labels (top or bottom, weekends hideable)
— Unlimited DWM Lines (default Off): override session history limit
🕐 Opening Prices:
— 4 configurable opening price slots (session time, name, color)
— Line style and width settings
📍 Timestamps:
— 4 configurable vertical timestamp slots (session time, color)
— Line style and width settings
🎨 Visual:
— Auto / Dark / Light theme detection
— Bull / Bear signal colors
— Watermark toggle
📊 Dashboards
— 📋 Main Dashboard : active session, Asian bias, last sweep (type + session + strength + ATR score), sweep counts (bull/bear), timeframe, symbol, version
— 📏 Range Table (optional): current range and N-session average range per killzone — identify extended vs. compressed sessions
🔔 Alerts
Sweep alerts (bar-close confirmed):
— 🟢 Sweep Buy — includes ticker, timeframe, price, strength, reason (which session's pivot was swept)
— 🔴 Sweep Sell — same fields
Both support plain text and JSON webhook format for bot integrations.
DWM break alerts:
— 📈 PDH / PWH / PMH Break — price closes above previous high
— 📉 PDL / PWL / PML Break — price closes below previous low
Six structural alerts, all bar-close confirmed.
⚠️ IMPORTANT NOTES
— ⏱️ Designed for intraday timeframes (1m–15m). The indicator auto-hides on timeframes at or above the TF Limit setting. Session zones and sweeps lose their meaning on higher timeframes.
— 🚫 No repainting. All sweep signals and DWM break alerts require barstate.isconfirmed. Pivot invalidation also occurs only on confirmed bar close, not intrabar.
— 🌐 Timezone accuracy is critical. If your killzone boxes don't align with the expected session times, verify that the Timezone setting matches your exchange or broker timezone. For standard ICT analysis, use America/New_York.
— 📊 Sweep signals indicate liquidity grabs — they show where stop-losses were likely triggered. They are not standalone entry signals. Combine with order flow, FVGs, order blocks, or other ICT concepts for complete trade setups.
— 🔄 Session VWAP requires volume data. On instruments with no reported volume (some forex pairs), the VWAP line defaults to close-based calculation.
— 📏 The range table's average is calculated from the last N completed sessions (configurable, default 5). It takes several sessions to build a meaningful average.
— 🎯 Sweep strength is relative — "Strong" on a low-volatility instrument may represent a smaller absolute move than "Weak" on a high-volatility one. The ATR normalization makes strength comparable across timeframes but not across instruments with very different ATR profiles.
— 🛠️ This is an analysis and signal tool , not an automated trading system. It visualizes ICT session concepts and detects liquidity sweeps — trade decisions remain yours. Indicator

BASCOOL_LibBASCOOL Library v1
Range–Body Structure Analysis Toolkit for Intraday Trading
The BASCOOL Library provides high-quality, reusable Pine Script components for structural conviction analysis based purely on price action. It is designed for intraday traders who rely on volatility-adjusted range expansion and candle-body efficiency to identify strong, weak, or choppy market conditions.
Included Functions
rbm_from_ohlc() – Range–Body Measure (RBM)
A volatility-normalized structure indicator that evaluates:
Range Expansion:
Smooth EMA of (High–Low), normalized by ATR
→ captures strength of movement relative to volatility
Body Efficiency:
Body-to-Range ratio smoothed with EMA
→ measures how much of the candle’s range is “directional”
The RBM output is a smooth structural strength score typically between 0 and 1, where:
High RBM → strong structure, clean movement, trend-friendly conditions
Low RBM → compressed ranges, weak bodies, low-quality structure
Flat RBM → choppy environment, avoid directional trades Library

Fair Value Range Breakout [by Oberlunar]Fair Value Range Breakout by Oberlunar is a community tool built around higher-timeframe structure and HTF imbalance zones. It reconstructs and draws up to three recent candles from a user-selected HTF and optionally displays their High, Low, Open, and Close levels with configurable styles and colours, keeping HTF candles and FVG ranges readable while working on lower timeframes.
On each confirmed HTF candle close, the script scans the last three closed HTF candles to detect bullish and bearish Fair Value Gaps using either wicks or candle bodies as the reference. You can filter gaps by a minimum size in ticks, keep only the most recent zones, and extend zones to the right for ongoing interaction tracking.
Set the HTF timeframe according to your horizon, such as Daily for swing context or H4-H2 for intraday structure, then enable the HTF candle overlay and choose which OHLC levels to show for each candle. In the HTF FVG settings, pick Wicks for zones that reflect extremes or Bodies for tighter zones, and increase the minimum gap in ticks if you want fewer, cleaner zones. If you use signals, choose “Close inside” for stricter interaction requirements or “Wick touch” for earlier detection, and apply a small exit buffer in ticks when noise is high. A practical workflow is using HTF=2H on a 5m or 15m chart, monitoring price interaction with an HTF FVG zone, and treating the plotted signal as confirmation of a zone exit rather than a standalone entry system.
Attribution and derivative work notice is explicit and intentional.
The HTF candle architecture component is a derivative work based on HTF Candle Architecture by BigBeluga, and the HTF FVG engine is a derivative work based on “Fair Value Gap MTF” by Oberlunar.
The original references are provided above exactly and in the code as required.
Enjoy
Oberlunar 👁️★
Indicator

Levels [BeNice]
Levels is a precision mapping tool for traders who rely on High Timeframe (HTF) levels to define their daily bias. It automates the process of marking Open, High, Low, and Equilibrium (EQ) levels across all major lookback periods.
💎 Key Functionalities
Dynamic HTF Mapping: Supports Yearly, Quarterly, Monthly, Weekly, Daily, and H4 timeframes.
Monday Range Specialist: Specifically tracks Monday's price action, a vital zone for setting the weekly narrative.
EQ (Equilibrium) Tracking: Automatically plots the mid-point of any given period, helping you identify Discount and Premium zones instantly.
Clean UI Logic: Features a built-in "anti-overlap" array system. If multiple levels occupy the same price point, the script optimizes the visuals to keep your chart professional and readable.
Full Customization: Control line styles (Solid, Dotted, Dashed), colors, text sizes, and line extensions to fit your personal chart aesthetic.
💡 Pro Trading Tip
Use these levels as Liquidity Targets or Points of Interest (POI). When price interacts with a Prev. Weekly High or a Monthly Open, look for the Reversal Pro+ SFP signals to confirm high-probability trade entries. Indicator

NFP Price Zones [LuxAlgo]The NFP Price Zones indicator provides a comprehensive statistical and visual toolkit for trading Non-Farm Payroll (NFP) releases. It analyzes historical volatility to project future price expansion zones based on the average market reaction to this high-impact news event.
🔶 USAGE
The script is designed to help traders prepare for the extreme volatility associated with NFP releases. It automatically identifies the relevant Friday, tracks historical data, and projects expansion targets based on that data.
🔹 How to use
Setup the Release Time: Ensure the NFP Release Hour and NFP Release Minute are set to the correct release time (default is 08:30 AM ET).
Analyze Historical Zones: Look back at the highlighted boxes on the chart to identify how price usually clusters or expands during the release window. Use the Historical NFPs to Analyze input to adjust the sample size.
Anticipate with Projections: Scroll to the right side of the chart to see the projected expansion lines. These levels represent the historical average move relative to current price action.
Execution During News: As the NFP release approaches, the projection levels will "freeze" 30 minutes before the news. Use these levels as potential exhaustion points, take-profit targets, or breakout triggers.
Monitor the Dashboard: Use the "To High/Low Exp" metrics to gauge how much of the "average move" price has already covered in real-time.
🔶 DETAILS
🔹 Frozen Anchor Logic
To ensure the projected levels are actionable during the news event, the script employs a "Frozen Anchor" logic. While the market is trending toward the NFP event, the projection levels move dynamically with price. However, exactly 30 minutes before the specified release time, the anchor point locks (freezes). This creates static support and resistance zones that remain fixed throughout the news window, allowing you to measure the reaction against historical norms.
🔹 Dashboard Explained
Avg Range/Max Range: Statistical average and peak volatility of NFPs in the lookback period.
Avg Up/Dn Exp: The average distance price moved above or below the pre-news open price.
Countdown: Time remaining until the next release. Switches to EVENT LIVE during the window.
To High/Low Exp: Real-time distance in pips from current price to the projected expansion levels.
This indicator is fully compatible with Bar Replay , allowing traders to backtest NFP reactions and see how the projections update dynamically relative to historical dates.
🔶 SETTINGS
🔹 Calculations
Historical NFPs to Analyze: Number of past NFP events to include in the statistical average.
NFP Release Hour (24h): The hour the news is released (e.g., 8 for 08:00 AM).
NFP Release Minute: The minute the news is released.
🔹 Visuals
Show Historical Zones: Toggles the visibility of boxes around previous NFP events.
Zone Color: Sets the color for the historical NFP boxes.
🔹 Dashboard
Dashboard: Toggles the visibility of the statistics table.
Position: Determines where the dashboard is placed on the chart.
Size: Controls the text and cell size of the dashboard.
Indicator

Multi-Horizon Volatility Waterfall [LuxAlgo]The Multi-Horizon Volatility Waterfall indicator is a quantitative tool that visualizes market volatility as a multi-layered spectrum across ten distinct time horizons. By normalizing Average True Range (ATR) using percentile ranking, the script identifies volatility clusters and regime shifts, providing a comprehensive "heat map" of market expansion and compression directly on the price chart and in a dedicated oscillator pane.
🔶 USAGE
The indicator provides a holistic view of volatility by stacking different lookback periods—from "Fast" (micro-bursts) to "Slow" (macro-shifts). This allows traders to observe how volatility "flows" through different timeframes, often signaling the inception of major trends before they are reflected in price action.
🔹 The Volatility Waterfall (Oscillator Pane)
The bottom pane features ten horizontal ribbons representing different volatility horizons.
Hot (Red): Indicates that current volatility is in the highest percentiles relative to its recent history for that specific horizon. Cold (Blue): Indicates a compression phase where volatility is historically low. Aggregate Line: A central line representing the average "heat" across all ten horizons, serving as a primary gauge for the overall market regime.
🔹 Main Chart Visuals
The script projects its findings onto the main price chart through three primary features:
Gradient Candles: When enabled, candles are colored based on the aggregate volatility heat, allowing for immediate identification of "hot" price action. Expansion Glow: A dynamic background highlight that "pulses" and fades based on the intensity of volatility expansion. The glow becomes more opaque as the market enters extreme expansion (Aggregate Heat > 70%). Pro Dashboard: A real-time data table providing the exact Aggregate Heat percentage, a Regime Classifier (Expansion, Neutral, or Compression), and the Fast/Slow Ratio.
🔶 HOW TO USE
The Multi-Horizon Volatility Waterfall can be used to identify high-probability trading environments based on the "state" of market volatility.
Identifying Squeeze Breakouts: Look for periods where all ten ribbons in the waterfall are "Cold" (Blue). This indicates a deep volatility compression across all time horizons. A sudden shift to "Hot" (Red) in the top (Fast) ribbons often precedes a powerful breakout. Trend Confirmation: In a trending market, volatility should ideally remain in the "Neutral" to "Hot" range. If price continues to move but the Waterfall turns "Cold" across the board, it may suggest the trend is losing participation and entering a distribution or consolidation phase. Volatility Clusters: When the Aggregate Heat exceeds 70%, the "Expansion Glow" appears on the main chart. This signifies a high-intensity market environment. Traders can use this to adjust risk management, as higher volatility typically requires wider stop-losses but offers greater reward potential. Mean Reversion: Extreme "Hot" readings across all ribbons (a full red waterfall) can sometimes signal an exhausted move. If price reaches a key resistance level while the Waterfall is at maximum heat, it may indicate a climax followed by a reversal or a period of sideways "cooling."
🔶 DETAILS
The core methodology of the Waterfall is based on Percentile Rank Normalization . Standard volatility measures like ATR are difficult to compare across different assets or timeframes because their absolute values vary. By converting ATR into a percentile rank (0-100%) over a long-term lookback (e.g., 200 bars), the indicator creates a standardized "Heat" metric.
Vertical Alignment: When all ten horizons turn red simultaneously, it indicates a "Volatility Cluster." This suggests that the expansion is occurring across all time horizons, often preceding a high-conviction breakout. Volatility Flow: Traders can watch for heat starting at the "Fast" (top) ribbons and moving down toward the "Slow" (bottom) ribbons. This "Waterfall" effect suggests that a short-term momentum burst is successfully transitioning into a sustained structural trend.
🔶 SETTINGS
🔹 Main Settings
Base Horizon Step: The multiplier used to define the 10 horizons. If set to 10, the horizons will range from 10 to 100 periods. Percentile Lookback: The historical window used to determine the percentile rank of the current volatility. Smoothing: Applies an EMA to the volatility heat to reduce noise and provide a cleaner visual flow.
🔹 Visualization
Cold/Hot Colors: Customizes the gradient colors for low and high volatility states. Color Candles by Volatility Heat: Toggles the gradient candle coloring on the main chart. Max Glow Intensity (%): Controls the maximum brightness of the background expansion glow to prevent it from overpowering the price action.
🔹 Dashboard
Show Dashboard: Toggles the visibility of the real-time data table. Position/Size: Adjusts the location and scale of the dashboard on the chart interface. Indicator

Range Intelligence Suite [LuxAlgo]The Range Intelligence Suite indicator is a specialized consolidation analysis tool that identifies price ranges using ATR-based sensitivity and provides deep volume-based insights through a delta-coded profile and real-time dashboard.
🔶 USAGE
The indicator helps traders identify periods of market indecision (consolidation) and analyze the internal volume dynamics to predict potential breakout directions.
When the price enters a consolidation phase, the script automatically draws a range box with a mid-line and gradient shading. To the right of each range, a Volume Profile is generated, providing a structural view of where most trading activity occurred. This allows users to see not just the price boundaries, but the "fair value" areas within those boundaries.
🔹 Liquidity Sweeps
The script highlights "Fakeouts" or "Liquidity Sweeps" with labels. These occur when price briefly exits the range boundaries (High or Low) but fails to close outside, signaling a potential reversal back into the range or a "stop-run" before a real breakout.
🔹 Delta-Coded Volume Profile
Unlike standard volume profiles, this profile dynamically changes color based on the Net Delta of the range:
A bullish profile indicates the range is currently under accumulation (more buy volume than sell volume).
A bearish profile indicates distribution (more sell volume than buy volume).
🔶 DETAILS
🔹 Range Detection Mechanism
The indicator determines a range by comparing the current price volatility to a historical average. It calculates the Highest High and Lowest Low over a user-defined lookback period (Detection Length).
A range is triggered when the total distance between that highest high and lowest low is less than the Average True Range (ATR) multiplied by the Range Sensitivity. Essentially, if the price action is "squeezed" into a vertical space smaller than the expected volatility, the script identifies it as a consolidation. The range remains active until a candle closes outside of these identified boundaries.
🔹 Dashboard Metrics
State : Displays whether the current range is in a state of Accumulation, Distribution, or if the script is currently scanning for a new trend.
Ready Score : A percentage-based metric that combines the duration of the range with the intensity of the net delta. A higher score suggests the range is "mature" and potentially nearing a significant breakout.
Range Net Delta : The raw difference between buying and selling volume accumulated since the range began.
🔶 SETTINGS
🔹 Intelligence Core
Detection Length : The lookback period used to identify consolidation ranges.
Range Sensitivity : ATR multiplier that determines how "tight" the price must be to trigger a range. Lower values require tighter price action to start a range.
Hide Overlapping Ranges : When enabled, only the most recent range is shown if multiple ranges overlap in time.
🔹 Visual UX
Bullish/Bearish Color : Sets the primary colors for the ranges and volume profiles.
Fill Transparency : Adjusts the opacity of the range background fills.
Show Point of Control (POC) : Displays the gold dotted line representing the price level with the highest total volume.
Highlight Liquidity Sweeps : Toggles the labels for high/low fakeouts.
🔹 Volume Profile
Show Volume Profile : Enables or disables the right-aligned volume histogram.
Rows : Determines the vertical granularity of the profile. Lower values create thicker bins.
Profile Max Width : Adjusts how far the profile extends horizontally to the right as a percentage of the range duration.
🔹 Dashboard
Dashboard : Toggles the on-screen information table.
Position/Size : Controls the location and scale of the dashboard UI.
Indicator

Session Range Boxes by APOVERVIEW
This indicator is designed for traders who require clear, visual boundaries for different trading sessions. It tracks the highest high and lowest low of up to six custom-defined time windows, wrapping them in dynamic boxes that update in real-time.
FEATURES
6 Customizable Sessions: Fully adjustable time ranges and names (Asia, London, NY Open, etc.).
Real-Time Tracking: Session boxes expand dynamically as price creates new highs or lows during the session.
Visual Organization: Individual color and transparency controls for each session to keep your chart clean.
Auto-Delete Logic: Automatically removes older session boxes to prevent chart clutter (user-definable "Keep Last N Sessions").
Timezone Flexibility: Built-in timezone support (IANA/Olson format) to ensure sessions align perfectly with your chart regardless of your local time.
HOW TO USE
Define your Timezone: Set the global "Session Timezone" to your reference market (e.g., America/New_York)
Input Sessions: Enter the 24-hour time ranges for your desired trading windows (e.g., 0930-1100).
Customize your settings & colors
Enjoy :)
SETTINGS
Global : Toggle borders and labels globally, and set the auto-cleanup frequency.
Session-Specific: Individual toggles for time, background fill, border color, and naming.
NOTES
Of course I could add more functionality, but my main goal was to keep the indicator as small and simple as possible, while providing functionality which it was built for.
Since the functionality is limited, I will keep this indicator open-source so everybody can edit and customize it to his own liking.
Indicator

Indicator

Absorption ReversalAbsorption Reversal detects institutional absorption patterns at the extremes of a trading range. When price reaches a range boundary, large limit orders from institutional players can "absorb" aggressive market orders — this creates a characteristic candle with high volume and a long rejection wick. The indicator identifies these setups and waits for confirmation before signaling a reversal.
Free & Open Source — no invite-only access, no paywall. Full source code, fully transparent.
## The Concept: What Is Absorption?
In order flow terms, absorption occurs when resting limit orders at a price level absorb incoming market orders without allowing price to break through. This is a core concept in Wyckoff analysis (Effort vs. Result) and institutional trading:
- High volume (Effort) + small price movement / long wick (no Result) = absorption
- The wick shows that price was pushed to the extreme but immediately rejected
- This typically happens at range boundaries where institutional players defend levels
The indicator automates this detection process with quantifiable rules.
## How It Works
The signal generation follows a strict 6-step process:
Step 1 — Range Detection: A Donchian Channel (highest high / lowest low) defines the current trading range boundaries.
Step 2 — Range Width Filter: The channel width must be below its own average — confirming the market is sideways/contracting, not expanding into a trend.
Step 3 — ADX Trend Filter: Wilder's ADX must be below the threshold (default 25) — no strong trend active. Absorption setups work best in range-bound markets.
Step 4 — Proximity Check: Price must be in the upper or lower proximity zone of the range (default: outer 15%). Absorption in the middle of a range is meaningless.
Step 5 — Absorption Bar: A candle that shows:
- Volume spike (default 1.5x average — significant participation)
- Long rejection wick (default 66% of candle range — strong rejection)
- Located at the range extreme (within proximity zone)
Step 6 — Confirmation: Within the next N bars (default 3), a follow-up candle must close back inside the range in the expected reversal direction. No confirmation = no signal.
## Chart Elements
- Range Lines — Donchian Channel upper (red) and lower (green) boundaries
- Proximity Zones — Optional shaded areas showing where absorption signals can trigger
- Orange Diamonds — Absorption bars detected (before confirmation)
- Green/Red Triangles + BUY/SELL Labels — Confirmed reversal signals only
## Dashboard
The real-time dashboard displays:
- Market Regime — Range or Trending (based on ADX + channel width)
- ADX Value — Current trend strength with classification
- Range Width — Contracting or Expanding
- Position — Where price sits in the range (Near High / Near Low / Middle)
- Volume — Current volume relative to average + spike detection
- Pending — Active absorption bars awaiting confirmation (with countdown)
## Settings
Range Detection: Donchian Channel Length (default 20), Proximity Zone % (default 15%)
Trend Filter: ADX Filter ON/OFF (default ON), Range Width Filter ON/OFF (default ON)
Absorption Criteria: Min Wick/Range Ratio (default 0.66), Volume SMA Length (default 20), Volume Spike Multiplier (default 1.5x)
Confirmation: Max Confirmation Bars (default 3)
## Alerts
4 alert conditions:
- Absorption Buy Signal — confirmed bullish reversal at range low
- Absorption Sell Signal — confirmed bearish reversal at range high
- Bullish Absorption Detected — absorption bar found, awaiting confirmation
- Bearish Absorption Detected — absorption bar found, awaiting confirmation
## Best Used For
- Identifying high-probability reversal setups at range boundaries
- Spotting institutional absorption activity via volume + wick analysis
- Range-trading strategies with clear entry signals
- Confluence tool alongside other indicators
- Works on all instruments: stocks, forex, crypto, futures, indices
## Technical Notes
- Pine Script v6 (latest version)
- Signals on confirmed bars only — no repainting
- State-based confirmation logic
- Open source, no external dependencies
- All inputs have tooltips
## Disclaimer
This indicator is for educational and informational purposes only. It does not constitute financial advice. No signals should be interpreted as buy or sell recommendations. Past performance is not indicative of future results. Always implement proper risk management. Trade at your own risk. Indicator

ORB Visual Backtester [MTF]This indicator is designed to help traders visualize and backtest the Opening Range Breakout (ORB) strategy with precision and flexibility. Its primary goal is to facilitate rapid visual backtesting , allowing traders to instantly see how price action behaved around the opening range on historical dates and refine their strategies accordingly without needing complex replay modes.
A key feature of this script is its Multi-Timeframe (MTF) capability. It allows you to view the ORB levels of a higher timeframe (e.g., 60-minute or 15-minute) while trading or analyzing on a lower timeframe (e.g., 1-minute or 5-minute chart).
Key Features
Visual Backtesting Optimized: By keeping the ORB box visible for a set duration on past sessions, you can easily scroll back through history to analyze win/loss rates and price behavior at a glance.
Multi-Timeframe Support: Define the ORB candle on any timeframe (e.g., 15m) and view it seamlessly on lower timeframes.
Custom Session Duration: The ORB box does not clutter the chart indefinitely. It stays visible for a specific duration (default: 390 minutes/full session) and then stops, keeping your chart clean.
Precise Timing: Users can set the exact Start Hour and Start Minute to match any market open (e.g., NYSE, London, or crypto sessions).
Weekend Filter: The indicator automatically skips Saturdays and Sundays to prevent invalid drawings during weekend gaps.
Settings & Configuration
1. ORB Settings
ORB Timeframe: Select the resolution used to calculate the Opening Range (e.g., "15" for a 15-minute ORB).
Start Hour (0-23) & Minute (0-59): The exact time the market session begins (e.g., 09:30).
Box Duration (Minutes): How long the box should extend to the right. The default is 390 minutes (6.5 hours), covering a standard trading session.
2. Visual Settings
Box Background Color: Sets the fill color and transparency of the ORB zone.
Border Color / Width: Customizes the outline of the box.
Show Price Labels: Toggles the visibility of price labels extending from the High and Low of the range.
How to Use for Strategy Building
Set the ORB Timeframe (e.g., 15 min).
Scroll back to previous days on your chart.
Observe whether the price respected the range, faked out, or broke out cleanly.
Use this visual data to determine the most profitable breakout rules for your specific asset.
Note: This Pine Script code and the description text above were generated with the assistance of Artificial Intelligence. Indicator

Indicator

Price Efficiency Ratio (PER) [SharpStrat]Price Efficiency Ratio (PER)
The Price Efficiency Ratio (PER) is built around a simple question: how efficiently is the market moving from its starting point to its current point?
Price often moves in indirect ways. Sometimes it travels cleanly in one direction with very little noise, and sometimes it spends more energy moving up and down than actually progressing. PER quantifies this behavior and turns it into a clear, readable number that identifies whether the market is behaving like a trend or a range.
To make the idea intuitive, imagine walking from point A to point B. If you walk straight, you arrive efficiently. If you zigzag, backtrack, or wander before reaching the same point, your total travel distance becomes much larger than the straight line distance. PER applies this exact idea to price movement.
How the Indicator Computes Efficiency
The indicator measures two distances over the selected lookback period:
Net Distance: This is the absolute distance between the closing price now and the closing price at the start of the lookback period. It represents how far the market has actually progressed.
Total Distance: This is the sum of every bar to bar price change within that same period. Every small rise, drop, spike, reversal, and retrace is included.
These two distances are then compared: PER = (Net Distance / Total Distance) × 100
The result is a 0-100% reading where:
HIGH values (above threshold) = Price moved efficiently in one direction = Trending
LOW values (below threshold) = Price zigzagged without net progress = Ranging
Understanding High PER vs Low PER
The easiest way to see what PER measures is by observing how price travels between two points. The image below shows a clean directional movement compared to a choppy, back and forth one.
On the left, the market moves steadily from point A to point B with only small interruptions. Most of the movement contributes directly toward the final destination. Because the total distance is close to the straight line distance, PER is high. This represents a trending environment where trend following tools typically perform well.
On the right, the market still reaches point B, but the path is filled with reversals. Price spends more time oscillating than progressing. Total distance becomes much larger than net distance, which produces a low PER. This represents a ranging or mean-reversion environment, where fading extremes and playing inside the range tends to be more appropriate.
In simple terms:
High PER means price is moving with intention and direction.
Low PER means price is moving inefficiently and indecisively.
How to Use PER
PER is not a signal generator by itself. It is a market regime classifier, and its strength lies in selecting the right strategy for the right environment.
When PER is above the threshold (Trending Environment)
Price is moving efficiently. Most bars contribute to the same directional bias. This is when trend following strategies excel. Examples include:
Breakouts
Pullback entries into trend direction
Moving average crossovers
In these situations, using mean-reversion is generally less effective.
When PER is below the threshold (Ranging / Mean-Reversion Environment)
Price is inefficient and oscillatory. The market wastes movement and fails to make directional progress. Examples include:
RSI overbought/oversold reversals
Bollinger Band bounces
Liquidity sweeps and reversals
Breakouts tend to fail more frequently in these conditions.
Example:
Below is a section of the S&P 500 on the daily timeframe showing both trending and ranging conditions, along with how PER responded to each.
This chart shows how PER naturally separates trending phases from ranging phases using objective efficiency rather than subjective chart reading. It demonstrates exactly how the indicator identifies regime changes and helps you understand what kind of behavior the market is currently showing.
Features & Settings
Dynamic vs Fixed Threshold
Threshold- Different markets and timeframes produce different typical PER values.
Fixed Threshold:
You choose the efficiency level manually. Useful if you trade the same instrument and know the PER levels that define a trend for it.
Dynamic Threshold:
The threshold is calculated from historical PER distribution.
This adapts automatically to each timeframe and each asset, aligning the threshold with what is normal for that chart. It reduces manual tuning and produces more consistent regime classification.
Smoothing Option
Raw PER can fluctuate rapidly on lower timeframes. Smoothing helps reveal the underlying efficiency trend more clearly.
Volume Weighted PER
A volume weighted mode is also included. When enabled, price movement occurring during high volume bars has more influence, making PER more meaningful on assets where volume impacts trend quality.
Information Box
The information box provides quick context, including the current PER value, the current regime (trending or ranging), and whether the threshold mode is fixed or dynamic. It is designed to make interpretation instant without additional settings or visual clutter.
Summary
PER will not tell you when to buy or sell. PER doesn't predict the future or generate signals. It simply tells you what kind of market you're in right now.
The value is in knowing when to apply trend strategies versus mean reversion strategies. A lot of traders already have good tools they just use them in the wrong conditions. PER helps you avoid that mistake. Use it as part of your overall analysis, not as a standalone system.
This indicator is open source and free. If you find it useful, a like or comment helps others discover it.
Risk Disclaimer: For educational purposes only. Trading involves risk. No indicator guarantees profits. Use proper risk management.
Indicator

ADR**Overview**
This indicator displays the **Average Daily Range (ADR)** and **ADR Percentage** in a customizable table on your chart.
While the standard ATR (Average True Range) is a popular metric for volatility, it accounts for price gaps (e.g., overnight moves). **ADR**, on the other hand, strictly measures the average distance between the **High** and **Low** of price bars, completely ignoring gaps.
**Why use ADR instead of ATR?**
* **Day Trading:** For intraday traders (Forex, Crypto, Futures), ADR is often preferred because it calculates the "tradable" range of the day. It answers the question: *"On average, how much does this asset move from High to Low?"*
* **Target Setting:** ADR is excellent for projecting daily highs and lows. If price has already moved 100% of its ADR, the statistical probability of further extension decreases.
* **Pure Volatility:** It filters out the noise of overnight gaps to show pure intraday volatility.
**Calculation Logic**
* **ADR:** Calculated using a Simple Moving Average (SMA) of the `High - Low` range over the specified length.
* Formula: `SMA(High - Low, Length)`
* **ADR%:** Shows the ADR relative to the current price.
* Formula: `(ADR / Current Close) * 100`
**Features**
* **Clean Dashboard:** A minimalist table displays the ADR value and the ADR %.
* **Customizable:** You can change the calculation length (default is 14) and move the table to any corner of the chart (Top/Bottom, Left/Right) to fit your workspace.
**Settings**
* **ADR Length:** The lookback period for the average (Default: 14).
* **Display Position:** Choose where the table appears on your screen. Indicator

Indicator

Indicator

cephxs + fadi / Previous Time Based Dealing RangesPREVIOUS TIME BASED DEALING RANGES
Visualize previous and current higher timeframe dealing ranges with dual-box OHLC representation, extending reference lines, and HTF candle displays.
Open Source Fork of @fadizeidan 's HTF Candles Indicator
OVERVIEW
This indicator displays time-based dealing ranges from higher timeframes directly on your chart. It shows the complete price action structure of previous (or current/forming) periods using a dual-box system: one box for the full High-Low range and another for the Open-Close body. Reference lines extend from key levels to help identify potential support, resistance, and mean reversion zones.
Perfect for traders who use ICT concepts, market structure analysis, or any methodology that relies on understanding where price has been relative to previous dealing ranges.
KEY FEATURES
Dual-Box Range Visualization: Each range displays two boxes - the full H-L range (outer) and the O-C body (inner) - giving immediate visual context of candle structure
Multiple Timeframes: Support for 90m, 4H, 6H, 1D, 1W, 1M, and 3M ranges
Previous/Current Mode: View completed ranges (Previous) or the forming range (Current) with real-time updates
Auto Mode: Automatically selects the appropriate range based on your chart timeframe
Reference Lines: Extending lines from High, Mid, Low (or Quadrants: H/75/M/25/L) with trade-into detection
HTF Candle Display: Visual HTF candles positioned to the right of price for context
6H Session Support: Session-aware ranges for Asia, London, NY AM, and NY PM with labeled names
Open Line: Vertical line marking the range's opening price/time
Imbalance Detection: Fair Value Gaps and Volume Imbalances highlighted on HTF candles
MODE OPTIONS
Previous/Current: Previous shows the last completed range. Current shows the forming range with dynamic H/L/C updates
Auto/Manual: Auto selects range by chart TF. Manual lets you choose specific ranges
Extend Box (Current): In Current mode, extends the box's right edge as price develops
AUTO MODE TIMEFRAME LOGIC
Auto mode now selects up to 3 ranges automatically based on chart timeframe, providing multi-timeframe context:
Chart ≤ 3m → 90m + 6H + 1D
Chart 4m-14m → 6H + 1D + 1W
Chart 15m-59m → 1D + 1W (+ 1M available)
Chart 1H-3H → 1D + 1W + 1M
Chart 4H-23H → 1W + 1M + 3M
Chart ≥ 1D → 1M + 3M
INPUTS
Mode
Mode: Previous/Current - Choose completed or forming range
Auto/Manual: Auto selects range by chart TF, Manual lets you choose
Extend Box (Current): Extends box right edge with price (Current mode only)
Show Range Boxes: Toggle box visibility (lines remain visible when off)
Filter Lines by Distance: When boxes are hidden, hide reference lines that are too far from current price (Really Close / Balanced / Slightly Far)
Previous Ranges
Range 1: Enable/disable, select timeframe (90m/4H/6H/1D/1W/1M/3M), max display count (1-2)
Range 2: Second range layer for multi-timeframe analysis
Range 3: Third range layer for additional context
Reference Lines
Line Mode: Levels (H/M/L) or Quadrants (H/75/M/25/L)
Line Style: Solid, dashed, or dotted
Line Thickness: 1-4 pixels
Show Labels: Toggle reference line labels
Label Offset: Distance of labels from current price (1-20 bars)
HTF Candle Levels: Show mini H/M/L lines on HTF candles
Open Line: Vertical line at range open with customizable style
Range Boxes & Colors
Per-Range Colors: Customize box and line colors for each timeframe (90m, 4H, 6H, 1D, 1W, 1M, 3M)
HTF Candle Styling
Show HTF Candles: Toggle HTF candle display
Body/Border/Wick Colors: Customize bull and bear candle appearance
Padding/Buffer/Width: Control candle spacing and size
Labels
HTF Label: Show timeframe label above/below candles
Remaining Time: Countdown timer to candle close
Label Position: Top, Bottom, or Both
Label Alignment: Align across timeframes or follow individual candles
Imbalance
Fair Value Gap: Highlight FVGs on HTF candles
Volume Imbalance: Highlight VIs on HTF candles
HOW TO USE
Add the indicator to your chart
Choose Previous or Current mode based on your analysis preference
Use Auto mode for intelligent range selection, or Manual to select specific timeframes
Reference lines extend from range levels - watch for price reactions at H/M/L
In Current mode, observe how the range develops with real-time updates
Use the HTF candles on the right for quick multi-timeframe context
REFERENCE LINE LABELS
Labels follow this format:
Previous mode: pD-H (previous Daily High), pW-M (previous Weekly Mid), p6H-London-L (previous 6H London Low)
Current mode: D-H (Daily High), W-M (Weekly Mid), 6H-Asia-L (6H Asia Low)
6H SESSION NAMES
Asia: 18:00-00:00 ET
London: 00:00-06:00 ET
NYAM: 06:00-12:00 ET
NYPM: 12:00-18:00 ET
RECOMMENDED TIMEFRAMES
Tick/Second charts: 90m ranges
1-5 minute charts: 6H or 1D ranges
15-60 minute charts: 1D or 1W ranges
4H charts: 1W or 1M ranges
Daily charts: 1M or 3M ranges
Or simply use Auto mode to let the indicator choose the optimal range.
TIPS
The Mid (M) level often acts as equilibrium - watch for mean reversion plays
High and Low levels are natural support/resistance zones
In Current mode, watch how price interacts with the forming range boundaries
Combine with your existing analysis for confluence
The Open Line helps identify the "true open" of each range for gap analysis
DISCLAIMER
This indicator is for educational and informational purposes only.
Past performance does not guarantee future results.
Always use proper risk management and never risk more than you can afford to lose.
Trading involves substantial risk of loss and is not suitable for all investors.
CREDITS
Original indicator by @fadizeidan.
Enhanced by cephxs/fstarcapital
CHANGELOG
Pro + v1.1: Reupload + Added 90m ranges for ultra-low timeframe analysis, distance-based line filtering (lines-only mode), third range slot.
Open sourced so users can add more slots.
Enjoy 🤙
Indicator

Indicator

Indicator

Indicator

Range Indicator Golden Pocket, Liquidity, FairValueGapOverview
This indicator is a comprehensive institutional market structure toolkit. It is designed to identify high-probability reversal zones by merging three powerful technical analysis concepts: Fibonacci Golden Pockets (61.8% - 65%), Liquidity Pool Analysis (Swing Failure Patterns), and Fair Value Gaps (FVG). By automating the detection of price inefficiencies and "stop runs," it helps traders navigate complex price action with objective, rule-based confirmation.
What the Script Does
The script continuously monitors a user-defined lookback period to define a trading range. Within this range, it dynamically plots:
Golden Pockets: High-confluence retracement zones (calculated as 0.35 - 0.382 internal range levels).
Liquidity Zones: Highlighted regions at the absolute high and low (Top/Bottom 5%) where institutional orders and retail stops are typically concentrated.
Swing Failure Patterns (SFP): Real-time detection of liquidity grabs where price breaches a range extreme but fails to close outside, signaling a potential trap.
Fair Value Gaps (FVG): Visualizes 3-candle price imbalances, showing areas of aggressive buying or selling that often act as future magnets or support/resistance.
2-Candle Confirmation: A momentum-based filter requiring a candle-close confirmation before a reversal signal is generated.
For Whom is it?
Smart Money Concepts (SMC) & ICT Students: Traders looking for automated liquidity sweeps and market inefficiencies.
Fibonacci & Mean Reversion Traders: Those seeking a clean, professional visualization of the Golden Pocket across multiple timeframes.
Systematic Day Traders: Who require strict price-action confirmation (SFP and 2-candle rules) to remove emotional bias from their entries.
Functions and Input Options
1. Market Structure & Visuals
Lookback Period (Default: 100): Defines the window for calculating the range extremes.
Box Offset Right (Default: 50): Extends all zones into the future for better anticipatory trading.
Show Price Lines & Labels: Displays the exact price for every zone boundary on the right axis for precise execution.
2. Fair Value Gap (FVG) Settings
Show Fair Value Gaps: A toggle to enable/disable the plotting of price imbalances.
FVG Extension (Default: 10): Determines how many bars into the future the FVG box remains visible.
Custom Colors: Separate color inputs for Bullish (Gap Up) and Bearish (Gap Down) inefficiencies.
3. Professional Alert System
The script includes five specific alert conditions:
GP Touch: Early warning when price enters a Golden Pocket.
2-Candle Pattern: Confirmed momentum shift within a Golden Pocket.
SFP Long/Short: Alerts when a Liquidity Grab (Swing Failure) is confirmed at the range high or low.
Transparency and Compliance (Moderator Info)
Non-Repainting Logic: All signals (SFP, 2-Candle, and FVG) are calculated and triggered based on confirmed candle closes. Drawings use barstate.islast purely for visual efficiency without altering historical data integrity.
Educational Context: The script visualizes well-known market principles (Fibonacci, SFPs, and FVGs) to aid traders in their analysis; it does not provide automated financial advice or "black-box" buy/sell signals.
Resource Management: Optimized for Pine Script v5, using efficient array and box handling to ensure smooth performance even on lower timeframes. Indicator

Range Breakout Statistics [Honestcowboy]⯁ Overview
The Range Breakout Statistics uses a very simple system to detect ranges/consolidating markets. The principle is simple, it looks for areas where the slope of a moving average is flat compared to past values. If the moving average is flat for X amount of bars that's a range and it will draw a box.
The statistics part of the script is a bit more complicated. The aim of this script is to expand analysis of trading signals in a different way than a regular backtest. It also highlights the polyline tool, one of my favorite drawing tools on the pulsewire platform.
⯁ Statistics Methods
The script has 2 different modes of analyzing a trading signals strength/robustness. It will do that for 2 signals native to the script.
Upper breakout: first price breakout at top of box, before max bars (100 bars by default)
Lower breakout: first price breakout at bottom of box, before max bars
The analysis methods themselves are straightforward and it should be possible for pulsewire community to expand this type of analysis to other trading signals. This script is a demo for this analysis, yet some might still find the native signals helpful in their trading, that's why the script includes alerts for the 2 native signals. I've also added a setting to disable any data gathering, which makes script run faster if you want to automate it.
For both of the analysis methods it uses the same data, just with different calculations and drawing methods. The data set is all past price action reactions to the signals saved in a matrix. Below a chart for explaining this visually.
⯁ Method 1: Averages Projection
The idea behind this is that just showing all price action that happened after signal does not give actionable insights. It's more a spaghetti jumble mess of price action lines. So instead the script averages the data out using 3 different approaches, all selectable in the settings menu.
Geometric Average: useful as it accurately reflects compound returns over time, smoothing out the impact of large gains or losses. Accounts for volatility drift.
Arithmetic Average: a standard average calculation, can be misleading in trading due to volatility drift. It is the most basic form of averaging so I included it.
Median: useful as any big volatility huge moves after a signal does not really impact the mean as it's just the middle value of all values.
These averages are the 2 lines you will find in the middle of the projection. Having a clear difference between a lower break average and upper break average price reaction can signal significance of the trading signal instead of pure chaos.
Outside of this I also included calculations for the maximum and minimum values in the dataset. This is useful for seeing price reactions range to the signal, showing extreme losses or wins are possible. For this range I also included 2 matrices of highs and lows data. This makes it possible to draw a band between the range based on closing price and the one using high/low data.
Below is a visualisation of how the averages data is shown on chart.
⯁ Method 2: Equity Simulation
This method will feel closer to home for traders as it more closely resembles a backtest. It does not include any commissions however and also is just a visualisation of price reaction to a signal. This method will simulate what would happen if you would buy at the breakout point and hold the trade for X amount of bars. With 0 being sell at same bar close. To test robustness I've given the option to visualise Equity simulation not just for 1 simulation but a bunch of simulations.
On default settings it will draw the simulations for 0 bars holding all the way to 10 bars holding. The idea behind it is to check how stable the effect is, to have further confirmation of the significance of the signal. If price simulation line moves up on average for 0 bars all the way to 10 bars holding time that means the signal is steady.
Below is a visualisation of the Equity Simulation.
⯁ Signal filtering
For the boxes themselves where breakouts come from I've included a simple filter based on the size of the box in ATR or %. This will filter out all the boxes that are larger top to bottom than the ATR or % value you setup.
⯁ Coloring of Script
The script includes 5 color themes. There are no color settings or other visual settings in the script, the script themes are simple and always have colors that work well together. Equity simulation uses a gradient based on lightness to color the different lines so it's easier to differentiate them while still upper breaks having a different color than lower breaks.
This script is not created to be used in conjunction with other scripts, it will force you into a background color that matches the theme. It's purpose is a research tool for systematic trading, to analyse signals in more depth.
Metaverse color theme:
⯁ Conclusion
I hope this script will help traders get a deeper understanding of how different assets react to their assets. It should be possible to convert this script into other signals if you know how to code on the platform. It is my intention to make more publications that include this type of analysis. It is especially useful when dealing with signals that do not happen often enough, so a regular backtest is not enough to test their significance. Indicator

Indicator
