Volume Surprise [LuxAlgo]The Volume Surprise tool displays the trading volume alongside the expected volume at that time, allowing users to spot unexpected trading activity on the chart easily.
The tool includes an extrapolation of the estimated volume for future periods, allowing forecasting future trading activity.
🔶 USAGE
We define Volume Surprise as a situation where the actual trading volume deviates significantly from its expected value at a given time.
Being able to determine if trading activity is higher or lower than expected allows us to precisely gauge the interest of market participants in specific trends.
A histogram constructed from the difference between the volume and expected volume is provided to easily highlight the difference between the two and may be used as a standalone.
The tool can also help quantify the impact of specific market events, such as news about an instrument. For example, an important announcement leading to volume below expectations might be a sign of market participants underestimating the impact of the announcement.
Like in the example above, it is possible to observe cases where the volume significantly differs from the expected one, which might be interpreted as an anomaly leading to a correction.
🔹 Detecting Rare Trading Activity
Expected volume is defined as the mean (or median if we want to limit the impact of outliers) of the volume grouped at a specific point in time. This value depends on grouping volume based on periods, which can be user-defined.
However, it is possible to adjust the indicator to overestimate/underestimate expected volume, allowing for highlighting excessively high or low volume at specific times.
In order to do this, select "Percentiles" as the summary method, and change the percentiles value to a value that is close to 100 (overestimate expected volume) or to 0 (underestimate expected volume).
In the example above, we are only interested in detecting volume that is excessively high, we use the 95th percentile to do so, effectively highlighting when volume is higher than 95% of the volumes recorded at that time.
🔶 DETAILS
🔹 Choosing the Right Periods
Our expected volume value depends on grouping volume based on periods, which can be user-defined.
For example, if only the hourly period is selected, volumes are grouped by their respective hours. As such, to get the expected volume for the hour 7 PM, we collect and group the historical volumes that occurred at 7 PM and average them to get our expected value at that time.
Users are not limited to selecting a single period, and can group volume using a combination of all the available periods.
Do note that when on lower timeframes, only having higher periods will lead to less precise expected values. Enabling periods that are too low might prevent grouping. Finally, enabling a lot of periods will, on the other hand, lead to a lot of groups, preventing the ability to get effective expected values.
In order to avoid changing periods by navigating across multiple timeframes, an "Auto Selection" setting is provided.
🔹 Group Length
The length setting allows controlling the maximum size of a volume group. Using higher lengths will provide an expected value on more historical data, further highlighting recurring patterns.
🔹 Recommended Assets
Obtaining the expected volume for a specific period (time of the day, day of the week, quarter, etc) is most effective when on assets showing higher signs of periodicity in their trading activity.
This is visible on stocks, futures, and forex pairs, which tend to have a defined, recognizable interval with usually higher trading activity.
Assets such as cryptocurrencies will usually not have a clearly defined periodic trading activity, which lowers the validity of forecasts produced by the tool, as well as any conclusions originating from the volume to expected volume comparisons.
🔶 SETTINGS
Length: Maximum number of records in a volume group for a specific period. Older values are discarded.
Smooth: Period of a SMA used to smooth volume. The smoothing affects the expected value.
🔹 Periods
Auto Selection: Automatically choose a practical combination of periods based on the chart timeframe.
Custom periods can be used if disabling "Auto Selection". Available periods include:
- Minutes
- Hours
- Days (can be: Day of Week, Day of Month, Day of Year)
- Months
- Quarters
🔹 Summary
Method: Method used to obtain the expected value. Options include Mean (default) or Percentile.
Percentile: Percentile number used if "Method" is set to "Percentile". A value of 50 will effectively use a median for the expected value.
🔹 Forecast
Forecast Window: Number of bars ahead for which the expected volume is predicted.
Style: Style settings of the forecast.
지표 및 전략
Pivot Regime Anchored VWAP [CHE] Pivot Regime Anchored VWAP — Detects body-based pivot regimes to classify swing highs and lows, anchoring volume-weighted average price lines directly at higher highs and lower lows for adaptive reference levels.
Summary
This indicator identifies shifts between top and bottom regimes through breakouts in candle body highs and lows, labeling swing points as higher highs, lower highs, lower lows, or higher lows. It then draws anchored volume-weighted average price lines starting from the most recent higher high and lower low, providing dynamic support and resistance that evolve with volume flow. These anchored lines differ from standard volume-weighted averages by resetting only at confirmed swing extremes, reducing noise in ranging markets while highlighting momentum shifts in trends.
Motivation: Why this design?
Traders often struggle with static reference lines that fail to adapt to changing market structures, leading to false breaks in volatile conditions or missed continuations in trends. By anchoring volume-weighted average price calculations to body pivot regimes—specifically at higher highs for resistance and lower lows for support—this design creates reference levels tied directly to price structure extremes. This approach addresses the problem of generic moving averages lagging behind swing confirmations, offering a more context-aware tool for intraday or swing trading.
What’s different vs. standard approaches?
- Baseline reference: Traditional volume-weighted average price indicators compute a running total from session start or fixed periods, often ignoring price structure.
- Architecture differences:
- Regime detection via body breakout logic switches between high and low focus dynamically.
- Anchoring limited to confirmed higher highs and lower lows, with historical recalculation for accurate line drawing.
- Polyline rendering rebuilds only on the last bar to manage performance.
- Practical effect: Charts show fewer, more meaningful lines that start at swing points, making it easier to spot confluences with structure breaks rather than cluttered overlays from continuous calculations.
How it works (technical)
The indicator first calculates the maximum and minimum of each candle's open and close to define body highs and lows. It then scans a lookback window for the highest body high and lowest body low. A top regime triggers when the body high from the lookback period exceeds the window's highest, and a bottom regime when the body low falls below the window's lowest. These regime shifts confirm pivots only when crossing from one state to the other.
For top pivots, it compares the new body high against the previous swing high: if greater, it marks a higher high and anchors a new line; otherwise, a lower high. The same logic applies inversely for bottom pivots. Anchored lines use cumulative price-volume products and volumes from the anchor bar onward, subtracting prior cumulatives to isolate the segment. On pivot confirmation, it loops backward from the current bar to the anchor, computing and storing points for the line. New points append as bars advance, ensuring the line reflects ongoing volume weighting.
Initialization uses persistent variables to track the last swing values and anchor bars, starting with neutral states. Data flows from regime detection to pivot classification, then to anchoring and point accumulation, with lines rendered globally on the final bar.
Parameter Guide
Pivot Length — Controls the lookback window for detecting body breakouts, influencing pivot frequency and sensitivity to recent action. Shorter values catch more pivots in choppy conditions; longer smooths for major swings. Default: 30 (bars). Trade-offs/Tips: Min 1; for intraday, try 10–20 to reduce lag but watch for noise; on daily, 50+ for stability.
Show Pivot Labels — Toggles display of text markers at swing points, aiding quick identification of higher highs, lower highs, lower lows, or higher lows. Default: true. Trade-offs/Tips: Disable in multi-indicator setups to declutter; useful for backtesting structure.
HH Color — Sets the line and label color for higher high anchored lines, distinguishing resistance levels. Default: Red (solid). Trade-offs/Tips: Choose contrasting hues for dark/light themes; pair with opacity for fills if added later.
LL Color — Sets the line and label color for lower low anchored lines, distinguishing support levels. Default: Lime (solid). Trade-offs/Tips: As above; green shades work well for bullish contexts without overpowering candles.
Reading & Interpretation
Higher high labels and red lines indicate potential resistance zones where volume weighting begins at a new swing top, suggesting sellers may defend prior highs. Lower low labels and lime lines mark support from a fresh swing bottom, with the line's slope reflecting buyer commitment via volume. Lower highs or higher lows appear as labels without new anchors, signaling possible range-bound action. Line proximity to price shows overextension; crosses may hint at regime shifts, but confirm with volume spikes.
Practical Workflows & Combinations
- Trend following: Enter longs above a rising lower low anchored line after higher low confirmation; filter with rising higher highs for uptrends. Use line breaks as trailing stops.
- Exits/Stops: In downtrends, exit shorts below a higher high line; set aggressive stops above it for scalps, conservative below for swings. Pair with momentum oscillators for divergence.
- Multi-asset/Multi-TF: Defaults suit forex/stocks on 1H–4H; on crypto 15M, shorten length to 15. Scale colors for dark themes; combine with higher timeframe anchors for confluence.
Behavior, Constraints & Performance
Closed-bar logic ensures pivots confirm after the lookback period, with no repainting on historical bars—live bars may adjust until regime shift. No higher timeframe calls, so minimal repaint risk beyond standard delays. Resources include a 2000-bar history limit, label/polyline caps at 200/50, and loops for historical point filling (up to current bar count from anchor, typically under 500 iterations). Known limits: In extreme gaps or low-volume periods, anchors may skew; lines absent until first pivots.
Sensible Defaults & Quick Tuning
Start with the 30-bar length for balanced pivot detection across most assets. For too-frequent pivots in ranges, increase to 50 for fewer signals. If lines lag in trends, reduce to 20 and enable labels for visual cues. In low-volatility assets, widen color contrasts; test on 100-bar history to verify stability.
What this indicator is—and isn’t
This is a structure-aware visualization layer for anchoring volume-weighted references at swing extremes, enhancing manual analysis of regimes and levels. It is not a standalone signal generator or predictive model—always integrate with broader context like order flow or news. Use alongside risk management and position sizing, not as isolated buy/sell triggers.
Many thanks to LuxAlgo for the original script "McDonald's Pattern ". The implementation for body pivots instead of wicks uses a = max(open, close), b = min(open, close) and then highest(a, length) / lowest(b, length). This filters noise from the wicks and detects breakouts over/under bodies. Unusual and targeted, super innovative.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Elliott Waves — Simple ZigZag (v1.4)🇷🇺 Описание (Russian)
Elliott Waves — Simple ZigZag — это лёгкий и наглядный индикатор для базовой разметки волн Эллиота.
Он автоматически определяет пивоты с помощью встроенных функций TradingView (pivothigh / pivotlow), соединяет их линиями и отмечает последние пять волн импульса (1–5).
📈 Основные функции:
Автоматическое построение зигзага на основе пивотов
Разметка волн Эллиота (1–5) по последним экстремумам
Настройка толщины и цвета линий
Настройка фона и цвета текста меток волн
Простая логика — без переоптимизации и лишней нагрузки
🎨 Настройки визуала:
Цвет и толщина линий
Цвет фона и текста меток для восходящих (1,3,5) и нисходящих (2,4) волн
Размер и отступ меток
💡 Как использовать:
Подходит для визуального анализа структуры рынка по волновому принципу
Не является автоматическим волновым счётчиком — помогает только визуализировать возможные импульсные участки
Работает на любых таймфреймах и инструментах
📘 Автор: Maximus
📅 Версия: v1.4
🇬🇧 Description (English)
Elliott Waves — Simple ZigZag is a lightweight and easy-to-read indicator designed for basic Elliott Wave visualization.
It automatically detects price pivots using TradingView’s built-in functions (pivothigh / pivotlow), connects them with lines, and marks the last five impulse waves (1–5).
📈 Main Features:
Automatic ZigZag construction based on pivots
Elliott Wave (1–5) labeling on the most recent price swings
Customizable line color and thickness
Customizable background and text color for wave labels
Minimalistic logic — fast, stable, and easy to interpret
🎨 Visual Settings:
Line color and thickness
Separate background/text colors for upward (1,3,5) and downward (2,4) waves
Adjustable label size and vertical offset
💡 How to Use:
Ideal for visual Elliott Wave structure analysis
Not an automated wave counter — helps highlight potential impulse patterns
Works on all timeframes and any instruments
📘 Author: Maximus
📅 Version: v1.4
Realtime RenkoI've been working on real-time renko for a while as a coding challenge. The interesting problem here is building renko bricks that form based on incoming tick data rather than waiting for bar closes. Every tick that comes through gets processed immediately, and when price moves enough to complete a brick, that brick closes and a new one opens right then. It's just neat because you can run it and it updates as you'd expect with renko, forming bricks based purely on price movement happening in real time rather than waiting for arbitrary time intervals to pass.
The three brick sizing methods give you flexibility in how you define "enough movement" to form a new brick. Traditional renko uses a fixed price range, so if you set it to 10 ticks, every brick represents exactly 10 ticks of movement. This works well for instruments with stable tick sizes and predictable volatility. ATR-based sizing calculates the average true range once at startup using a weighted average across all historical bars, then divides that by your brick value input. If you want bricks that are one full ATR in size, you'd use a brick value of 1. If you want half-ATR bricks, use 2. This inverted relationship exists because the calculation is ATR divided by your input, which lets you work with multiples and fractions intuitively. Percentage-based sizing makes each brick a fixed percentage move from the previous brick's close, which automatically scales with price level and works well for instruments that move proportionally rather than in absolute tick increments.
The best part about this implementation is how it uses varip for state management. When you first load the indicator, there's no history at all. Everything starts fresh from the moment you add it to your chart because varip variables only exist in real-time. This means you're watching actual renko bricks form from real tick data as it arrives. The indicator builds its own internal history as it runs, storing up to 250 completed bricks in memory, but that history only exists for the current session. Refresh the page or reload the indicator and it starts over from scratch.
The visual implementation uses boxes for brick bodies and lines for wicks, drawn at offset bar indices to create the appearance of a continuous renko chart in the indicator pane. Each brick occupies two bar index positions horizontally, which spaces them out and makes the chart readable. The current brick updates in real time as new ticks arrive, with its high, low, and close values adjusting continuously until it reaches the threshold to close and become finalized. Once a brick closes, it gets pushed into the history array and a new brick opens at the closing level of the previous one.
What makes this especially useful for debugging and analysis are the hover tooltips on each brick. Clicking on any brick brings up information showing when it opened with millisecond precision, how long it took to form from open to close, its internal bar index within the renko sequence, and the brick size being used. That time delta measurement is particularly valuable because it reveals the pace of price movement. A brick that forms in five seconds indicates very different market conditions than one that takes three minutes, even though both bricks represent the same amount of price movement. You can spot acceleration and deceleration in trend development by watching how quickly consecutive bricks form.
The pine logs that generate when bricks close serve as breadcrumbs back to the main chart. Every time a brick finalizes, the indicator writes a log entry with the same information shown in the tooltip. You can click that log entry and TradingView jumps your main chart to the exact timestamp when that brick closed. This lets you correlate renko brick formation with what was happening on the time-based chart, which is critical for understanding context. A brick that closed during a major news announcement or at a key support level tells a different story than one that closed during quiet drift, and the logs make it trivial to investigate those situations.
The internal bar indexing system maintains a separate count from the chart's bar_index, giving each renko brick its own sequential number starting from when the indicator begins running. This makes it easy to reference specific bricks in your analysis or when discussing patterns with others. The internal index increments only when a brick closes, so it's a pure measure of how many bricks have formed regardless of how much chart time has passed. You can match these indices between the visual bricks and the log entries, which helps when you're trying to track down the details of a specific brick that caught your attention.
Brick overshoot handling ensures that when price blows through the threshold level instead of just barely touching it, the brick closes at the threshold and the excess movement carries over to the next brick. This prevents gaps in the renko sequence and maintains the integrity of the brick sizing. If price shoots up through your bullish threshold and keeps going, the current brick closes at exactly the threshold level and the new brick opens there with the overshoot already baked into its initial high. Without this logic, you'd get renko bricks with irregular sizes whenever price moved aggressively, which would undermine the whole point of using fixed-range bricks.
The timezone setting lets you adjust timestamps to your local time or whatever reference you prefer, which matters when you're analyzing logs or comparing brick formation times across different sessions. The time delta formatter converts raw milliseconds into human-readable strings showing days, hours, minutes, and seconds with fractional precision. This makes it immediately clear whether a brick took 12.3 seconds or 2 minutes and 15 seconds to form, without having to parse millisecond values mentally.
This is the script version that will eventually be integrated into my real-time candles library. The library version had an issue with tooltips not displaying correctly, which this implementation fixes by using a different approach to label creation and positioning. Running it as a standalone indicator also gives you more control over the visual settings and makes it easier to experiment with different brick sizing methods without affecting other tools that might be using the library version.
What this really demonstrates is that real-time indicators in Pine Script require thinking about state management and tick processing differently than historical indicators. Most indicator code assumes bars are immutable once closed, so you can reference `close ` and know that value will never change. Real-time renko throws that assumption out because the current brick is constantly mutating with every tick until it closes. Using varip for state variables and carefully tracking what belongs to finalized bricks versus the developing brick makes it possible to maintain consistency while still updating smoothly in real-time. The fact that there's no historical reconstruction and everything starts fresh when you load it is actually a feature, not a limitation, because you're seeing genuine real-time brick formation rather than some approximation of what might have happened in the past.
Dynamic Market Structure (MTF) - Dow TheoryDynamic Market Structure (MTF)
OVERVIEW
This advanced indicator provides a comprehensive and fully customizable solution for analyzing market structure based on classic Dow Theory principles. It automates the identification of key structural points, including Higher Highs (HH), Higher Lows (HL), Lower Lows (LL), and Lower Highs (LH).
Going beyond simple pivot detection, this tool visualizes the flow of the trend by plotting dynamic Breaks of Structure (BOS) and potential reversals with Changes of Character (CHoCH). It is designed to be a flexible and powerful tool for traders who use price action and trend analysis as a core part of their strategy.
CORE CONCEPTS
The indicator is built on the foundational principles of Dow Theory:
Uptrend: A series of Higher Highs and Higher Lows.
Downtrend: A series of Lower Lows and Lower Highs.
Break of Structure (BOS): Occurs when price action continues the current trend by creating a new HH in an uptrend or a new LL in a downtrend.
Change of Character (CHoCH): Occurs when the established trend sequence is broken, signaling a potential reversal. For example, when a Lower Low forms after a series of Higher Highs.
CALCULATION METHODOLOGY
This section explains the indicator's underlying logic:
Pivot Detection: The indicator's core logic is based on TradingView's built-in ta.pivothigh() and ta.pivotlow() functions. The sensitivity of this detection is fully controlled by the user via the Pivot Lookback Left and Pivot Lookback Right settings.
Structure Calculation (BOS/CHoCH): The script identifies market structure by analyzing the sequence of these confirmed pivots.
A bullish BOS is plotted when a new ta.pivothigh is confirmed at a price higher than the previous confirmed ta.pivothigh.
A bearish CHoCH is plotted when a new ta.pivotlow is confirmed at a price lower than the previous confirmed ta.pivotlow , breaking the established sequence of higher lows.
The logic is mirrored for bearish BOS and bullish CHoCH.
Invalidation Levels: This feature identifies the last confirmed pivot before a structure break (e.g., the last ta.pivotlow before a bullish BOS) and plots a dotted line from it to the breakout bar. This level is considered the structural invalidation point for that move.
MTF Confirmation: This unique feature provides confluence by analyzing a second, lower timeframe. When a pivot (e.g., a Higher Low) is confirmed on the main chart, the script requests pivot data from the user-selected lower timeframe. If a corresponding trend reversal is detected on that lower timeframe (e.g., a break of its own minor downtrend), the pivot is labeled "Firm" (FHL); otherwise, it is labeled "Soft" (SHL).
KEY FEATURES
This indicator is packed with advanced features designed to provide a deeper level of market insight:
Dynamic Structure Lines: BOS and CHoCH levels are plotted with clean, dashed lines that dynamically start at the old pivot and terminate precisely at the breakout bar, keeping the chart clean and precise.
Invalidation Levels: For every structure break, the indicator can plot a dotted "Invalidation" line (INV). This marks the critical support or resistance pivot that, if broken, would negate the previous move, providing a clear reference for risk management.
Multi-Timeframe (MTF) Confirmation: Add a layer of confluence to your analysis by confirming pivots on a lower timeframe. The indicator can label Higher Lows and Lower Highs as either "Firm" (FHL/FLH) if confirmed by a reversal on a lower timeframe, or "Soft" (SHL/SLH) if not.
Flexible Pivot Detection: Fully adjustable Pivot Lookback settings for the left and right sides allow you to tune the indicator's sensitivity to match any timeframe or trading style, from long-term investing to short-term scalping.
Full Customization: Take complete control of the indicator's appearance. A dedicated style menu allows you to customize the colors for all bullish, bearish, and reversal elements, including the transparency of the trend-based candle coloring.
HOW TO USE
Trend Identification: Use the sequence of HH/HL and LL/LH, along with the trend-colored candles, to quickly assess the current market direction on any timeframe.
Entry Signals: A confirmed BOS can signal a potential entry in the direction of the trend. A CHoCH can signal a potential reversal, offering an opportunity to enter a new trend early.
Risk Management: Use the automatically plotted "Invalidation" (INV) lines as a logical reference point for placing stop losses. A break of this level indicates that the structure you were trading has failed.
Confluence: Use the "Firm" pivot signals from the MTF analysis to identify high-probability swing points that are supported by price action on multiple timeframes.
SETTINGS BREAKDOWN
Pivot Lookback Left/Right: Controls the sensitivity of pivot detection. Higher numbers find more significant (but fewer) pivots.
MTF Confirmation: Enable/disable the "Firm" vs. "Soft" pivot analysis and select your preferred lower timeframe for confirmation.
Style Settings: Customize all colors and the transparency of the candle coloring to match your chart's theme.
Show Invalidation Levels: Toggle the visibility of the dotted invalidation lines.
This indicator is a powerful tool for visualizing and trading with the trend. Experiment with the settings to find a configuration that best fits your personal trading strategy.
Range Oscillator (Zeiierman)█ Overview
Range Oscillator (Zeiierman) is a dynamic market oscillator designed to visualize how far the price is trading relative to its equilibrium range. Instead of relying on traditional overbought/oversold thresholds, it uses adaptive range detection and heatmap coloring to reveal where price is trading within a volatility-adjusted band.
The oscillator maps market movement as a heat zone, highlighting when the price approaches the upper or lower range boundaries and signaling potential breakout or mean-reversion conditions.
Highlights
Adaptive range detection based on ATR and weighted price movement.
Heatmap-driven coloring that visualizes volatility pressure and directional bias.
Clear transition zones for detecting trend shifts and equilibrium points.
█ How It Works
⚪ Range Detection
The indicator identifies a dynamic price range using two main parameters:
Minimum Range Length: The number of bars required to confirm that a valid range exists.
Range Width Multiplier: Expands or contracts the detected range proportionally to the ATR (Average True Range).
This approach ensures that the oscillator automatically adapts to both trending and ranging markets without manual recalibration.
⚪ Weighted Mean Calculation
Instead of a simple moving average, the script calculates a weighted equilibrium mean based on the size of consecutive candle movements:
Larger price changes are given greater weight, emphasizing recent volatility.
⚪ Oscillator Formula
Once the range and equilibrium mean are defined, the oscillator computes:
Osc = 100 * (Close - Mean) / RangeATR
This normalizes price distance relative to the dynamic range size — producing consistent readings across volatile and quiet periods.
█ Heatmap Logic
The Range Oscillator includes a built-in heatmap engine that color-codes each oscillator value based on recent price interaction intensity:
Strong Bullish Zones: Bright green — price faces little resistance upward.
Weak Bullish Zones: Muted green — uptrend continuation but with minor hesitation.
Transition Zones: Blue — areas of uncertainty or trend shift.
Weak Bearish Zones: Maroon — downtrend pressure but soft momentum.
Strong Bearish Zones: Bright red — strong downside continuation with low resistance.
Each color band adapts dynamically using:
Number of Heat Levels: Controls granularity of the heatmap.
Minimum Touches per Level: Defines how reactive or “sensitive” each color zone is.
█ How to Use
⚪ Trend & Momentum Confirmation
When the oscillator stays above +0 with green coloring, it suggests sustained bullish pressure.
Similarly, readings below –0 with red coloring, it suggests sustained bearish pressure.
⚪ Range Breakouts
When the oscillator line breaks above +100 or below –100, the price is exceeding its normal volatility range, often signaling breakout potential or exhaustion extremes.
⚪ Mean Reversion Trades
Look for the oscillator to cross back toward zero after reaching an extreme. These transitions (often marked by blue tones) can identify early reversals or range resets.
⚪ Divergence
Use oscillator peaks and troughs relative to price action to spot hidden strength or weakness before the next move.
█ Settings
Minimum Range Length: Number of bars needed to confirm a valid range.
Range Width Multiplier: Expands or contracts range width based on ATR.
Number of Heat Levels: Number of gradient bands used in the oscillator.
Minimum Touches per Level: Sensitivity threshold for when a zone becomes “hot.”
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
IIR One-Pole Price Filter [BackQuant]IIR One-Pole Price Filter
A lightweight, mathematically grounded smoothing filter derived from signal processing theory, designed to denoise price data while maintaining minimal lag. It provides a refined alternative to the classic Exponential Moving Average (EMA) by directly controlling the filter’s responsiveness through three interchangeable alpha modes: EMA-Length , Half-Life , and Cutoff-Period .
Concept overview
An IIR (Infinite Impulse Response) filter is a type of recursive filter that blends current and past input values to produce a smooth, continuous output. The "one-pole" version is its simplest form, consisting of a single recursive feedback loop that exponentially decays older price information. This makes it both memory-efficient and responsive , ideal for traders seeking a precise balance between noise reduction and reaction speed.
Unlike standard moving averages, the IIR filter can be tuned in physically meaningful terms (such as half-life or cutoff frequency) rather than just arbitrary periods. This allows the trader to think about responsiveness in the same way an engineer or physicist would interpret signal smoothing.
Why use it
Filters out market noise without introducing heavy lag like higher-order smoothers.
Adapts to various trading speeds and time horizons by changing how alpha (responsiveness) is parameterized.
Provides consistent and mathematically interpretable control of smoothing, suitable for both discretionary and algorithmic systems.
Can serve as the core component in adaptive strategies, volatility normalization, or trend extraction pipelines.
Alpha Modes Explained
EMA-Length : Classic exponential decay with alpha = 2 / (L + 1). Equivalent to a standard EMA but exposed directly for fine control.
Half-Life : Defines the number of bars it takes for the influence of a price input to decay by half. More intuitive for time-domain analysis.
Cutoff-Period : Inspired by analog filter theory, defines the cutoff frequency (in bars) beyond which price oscillations are heavily attenuated. Lower periods = faster response.
Formula in plain terms
Each bar updates as:
yₜ = yₜ₋₁ + alpha × (priceₜ − yₜ₋₁)
Where alpha is the smoothing coefficient derived from your chosen mode.
Smaller alpha → smoother but slower response.
Larger alpha → faster but noisier response.
Practical application
Trend detection : When the filter line rises, momentum is positive; when it falls, momentum is negative.
Signal timing : Use the crossover of the filter vs its previous value (or price) as an entry/exit condition.
Noise suppression : Apply on volatile assets or lower timeframes to remove flicker from raw price data.
Foundation for advanced filters : The one-pole IIR serves as a building block for multi-pole cascades, adaptive smoothers, and spectral filters.
Customization options
Alpha Scale : Multiplies the final alpha to fine-tune aggressiveness without changing the mode’s core math.
Color Painting : Candles can be painted green/red by trend direction for visual clarity.
Line Width & Transparency : Adjust the visual intensity to integrate cleanly with your charting style.
Interpretation tips
A smooth yet reactive line implies optimal tuning — minimal delay with reduced false flips.
A sluggish line suggests alpha is too small (increase responsiveness).
A noisy, twitchy line means alpha is too large (increase smoothing).
Half-life tuning often feels more natural for aligning filter speed with price cycles or bar duration.
Summary
The IIR One-Pole Price Filter is a signal smoother that merges simplicity with mathematical rigor. Whether you’re filtering for entry signals, generating trend overlays, or constructing larger multi-stage systems, this filter delivers stability, clarity, and precision control over noise versus lag, an essential tool for any quantitative or systematic trading approach.
Turtle soupHi all!
This indicator will show you turtle soups. The logic is that pivots detected from a higher timeframe, with the pivot lengths of left and right in the settings, will be up for 'grabs' by price that spents more than one candle above/below the pivot.
If only one candle is beyond the pivot it's a liquidity sweep or grab. Liquidity sweeps can be discovered through my script 'Market structure' (), but this script will discover turtle soup entries with false breakouts that takes liquidity.
The turtle soup can have a confirmation in the terms of a change of character (CHoCH). The turtle soup strategy usually comes with some sort of confirmation, in this case a CHoCH, but it can also be a market structure shift (MSS) or a change in state of delivery (CISD).
Turtle soups (pivots that have been 'taken') within a turtle soup will also be visible (but not have a turtle).
Alerts are available for when a turtle soup setup occurs and you can set the alert frequency of your liking (to get early signals with a script that might repaint or wait for a closed candle).
I hope that this description makes sense, tell me otherwise. Also tell me if you have any improvements or feature requests.
Best of trading luck!
The chart in the publication contains a 4 hour chart with a daily timeframe and confirmations with CHoCH.
Trendline MTF Optimized1️⃣ What the Script Does
The script automatically draws trendlines connecting pivot highs and lows for multiple timeframes on your chart.
Pivot highs → connect recent tops
Pivot lows → connect recent bottoms
It also shows a legend so you can see which line belongs to which timeframe.
Why it’s useful:
Helps spot trend direction across multiple timeframes at a glance.
Highlights support and resistance levels automatically.
Useful for scalpers, swing traders, and multi-timeframe analysis.
2️⃣ Inputs the User Can Adjust
Input What it Means for the User
Pivot Left Bars How many bars to the left the script checks to confirm a pivot. More bars → stronger pivot, slower reaction.
Pivot Right Bars How many bars to the right it checks. Similar effect as left bars.
Show Debug Pivot Labels Shows the exact pivot values on the chart. Good for learning or checking accuracy.
Show Legend Shows the small table with line symbols and timeframes. Helps you quickly know which line belongs to which timeframe.
3️⃣ Timeframes
The script automatically calculates pivot points for multiple timeframes:
1 min, 3 min, 5 min, 15 min, 30 min, 1 hour, 4 hours, 1 day
Each timeframe gets its own color and line thickness. This helps distinguish them visually.
4️⃣ How Trendlines Are Drawn
Pivot Highs (Red lines): Connects the previous top to the most recent top on that timeframe.
Pivot Lows (Green lines): Connects the previous bottom to the most recent bottom.
If there’s no previous pivot yet, it just starts the line at the first pivot detected.
Optional debug labels show the price and timeframe of each pivot.
User Benefit: You can instantly see short-term and long-term trendlines without manual drawing.
5️⃣ Legend Table
Shows which line corresponds to which timeframe.
Uses small bar symbols (▁▁▁▁▁, ▂▂▂▂▂, etc.) to match line thickness.
Placed at the top-right corner by default.
User Benefit: Even if the chart is cluttered, you always know which line represents which timeframe.
6️⃣ How a User Reads It on the Chart
Red line going down → recent highs are decreasing → short-term downtrend.
Green line going up → recent lows are increasing → short-term uptrend.
Multiple lines of different thickness/colors → different timeframes.
Crossovers of lines or areas where green and red lines converge → potential support/resistance zones.
7️⃣ User Actionable Tips
Adjust left/right bars for sensitivity:
Lower bars → trendlines react faster (good for scalping).
Higher bars → trendlines smoother (good for swing trades).
Use debug labels initially to see pivot points.
Check legend to quickly identify which line belongs to which timeframe.
Combine trendlines with other indicators (like RSI, ADX) for better signals.
✅ Summary for Users
“This script automatically draws support/resistance trendlines across multiple timeframes, labels pivots optionally, and shows a legend so you know which line belongs to which timeframe. Adjust pivot sensitivity to match your trading style.”
MESA Adaptive Ehlers Flow | AlphaNattMESA Adaptive Ehlers Flow | AlphaNatt
An advanced adaptive indicator based on John Ehlers' MESA (Maximum Entropy Spectrum Analysis) algorithm that automatically adjusts to market cycles in real-time, providing superior trend identification with minimal lag across all market conditions.
🎯 What Makes This Indicator Revolutionary?
Unlike traditional moving averages with fixed parameters, this indicator uses Hilbert Transform mathematics to detect the dominant market cycle and adapts its responsiveness accordingly:
Automatically detects market cycles using advanced signal processing
MAMA (MESA Adaptive Moving Average) adapts from fast to slow based on cycle phase
FAMA (Following Adaptive Moving Average) provides confirmation signals
Dynamic volatility bands that expand and contract with cycle detection
Zero manual optimization required - the indicator tunes itself
📊 Core Components
1. MESA Adaptive Moving Average (MAMA)
The MAMA is the crown jewel of adaptive indicators. It uses the Hilbert Transform to measure the market's dominant cycle and adjusts its smoothing factor in real-time:
During trending phases: Responds quickly to capture moves
During choppy phases: Smooths heavily to filter noise
Transition is automatic and seamless based on price action
Parameters:
Fast Limit: Maximum responsiveness (default: 0.5) - how fast the indicator can adapt
Slow Limit: Minimum responsiveness (default: 0.05) - maximum smoothing during consolidation
2. Following Adaptive Moving Average (FAMA)
The FAMA is a slower version of MAMA that follows the primary signal. The relationship between MAMA and FAMA provides powerful trend confirmation:
MAMA > FAMA: Bullish trend in progress
MAMA < FAMA: Bearish trend in progress
Crossovers signal potential trend changes
3. Hilbert Transform Cycle Detection
The indicator employs sophisticated DSP (Digital Signal Processing) techniques:
Detects the dominant cycle period (1.5 to 50 bars)
Measures phase relationships in the price data
Calculates adaptive alpha values based on cycle dynamics
Continuously updates as market character changes
⚡ Key Features
Adaptive Alpha Calculation
The indicator's "intelligence" comes from its adaptive alpha:
Alpha dynamically adjusts between Fast Limit and Slow Limit based on the rate of phase change in the market cycle. Rapid phase changes trigger faster adaptation, while stable cycles maintain smoother response.
Dynamic Volatility Bands
Unlike static bands, these adapt to both ATR volatility AND the current cycle state:
Bands widen when the indicator detects fast adaptation (trending)
Bands narrow during slow adaptation (consolidation)
Band Multiplier controls overall width (default: 1.5)
Provides context-aware support and resistance
Intelligent Color Coding
Cyan: Bullish regime (MAMA > FAMA and price > MAMA)
Magenta: Bearish regime (MAMA < FAMA and price < MAMA)
Gray: Neutral/transitional state
📈 Trading Strategies
Trend Following Strategy
The MESA indicator excels at identifying and riding strong trends while automatically reducing sensitivity during choppy periods.
Entry Signals:
Long: MAMA crosses above FAMA with price closing above MAMA
Short: MAMA crosses below FAMA with price closing below MAMA
Exit/Management:
Exit longs when MAMA crosses below FAMA
Exit shorts when MAMA crosses above FAMA
Use dynamic bands as trailing stop references
Mean Reversion Strategy
When price extends beyond the dynamic bands during established trends, look for bounces back toward the MAMA line.
Setup Conditions:
Strong trend confirmed by MAMA/FAMA alignment
Price touches or exceeds outer band
Enter on first sign of reversal toward MAMA
Target: Return to MAMA line or opposite band
Cycle-Based Swing Trading
The indicator's cycle detection makes it ideal for swing trading:
Enter on MAMA/FAMA crossovers
Hold through the detected cycle period
Exit on counter-crossover or band extremes
Works exceptionally well on 4H to Daily timeframes
🔬 Technical Background
The Hilbert Transform
The Hilbert Transform is a mathematical operation used in signal processing to extract instantaneous phase and frequency information from a signal. In trading applications:
Separates trend from cycle components
Identifies the dominant market cycle without curve-fitting
Provides leading indicators of trend changes
MESA Algorithm Components
Smoothing: 4-bar weighted moving average for noise reduction
Detrending: Removes linear price trend to isolate cycles
InPhase & Quadrature: Orthogonal components for phase measurement
Homodyne Discriminator: Calculates instantaneous period
Adaptive Alpha: Converts period to smoothing factor
MAMA/FAMA: Final adaptive moving averages
⚙️ Optimization Guide
Fast Limit (0.1 - 0.9)
Higher values (0.5-0.9): More responsive, better for volatile markets and lower timeframes
Lower values (0.1-0.3): Smoother response, better for stable markets and higher timeframes
Default 0.5: Balanced for most applications
Slow Limit (0.01 - 0.1)
Higher values (0.05-0.1): Less smoothing during consolidation, more signals
Lower values (0.01-0.03): Heavy smoothing during chop, fewer but cleaner signals
Default 0.05: Good noise filtering while maintaining responsiveness
Band Multiplier (0.5 - 3.0)
Adjust based on instrument volatility
Backtest to find optimal value for your specific market
1.5 works well for most forex and equity indices
Consider higher values (2.0-2.5) for cryptocurrencies
🎨 Visual Interpretation
The gradient visualization shows probability zones around the MESA line:
MESA line: The adaptive trend center
Band expansion: Indicates strong cycle detection and trending
Band contraction: Indicates consolidation or ranging market
Color intensity: Shows confidence in trend direction
💡 Best Practices
Let it adapt: Give the indicator 50+ bars to properly calibrate to the market
Combine timeframes: Use higher timeframe MESA for trend bias, lower for entries
Respect the bands: Price rarely stays outside bands for extended periods
Watch for compression: Narrow bands often precede explosive moves
Volume confirmation: Combine with volume for higher probability setups
📊 Optimal Timeframes
15m - 1H: Day trading with Fast Limit 0.6-0.8
4H - Daily: Swing trading with Fast Limit 0.4-0.6 (recommended)
Weekly: Position trading with Fast Limit 0.2-0.4
⚠️ Important Considerations
The indicator needs time to "learn" the market - avoid trading the first 50 bars after applying
Extreme gap events can temporarily disrupt cycle calculations
Works best in markets with detectable cyclical behavior
Less effective during news events or extreme volatility spikes
Consider the detected cycle period for position holding times
🔍 What Makes MESA Superior?
Compared to traditional indicators:
vs. Fixed MAs: Automatically adjusts to market conditions instead of using one-size-fits-all parameters
vs. Other Adaptive MAs: Uses true DSP mathematics rather than simple volatility adjustments
vs. Manual Optimization: Continuously re-optimizes itself in real-time
vs. Lagging Indicators: Hilbert Transform provides earlier trend change detection
🎓 Understanding Adaptation
The magic of MESA is that it solves the eternal dilemma of technical analysis: be fast and get whipsawed in chop, or be smooth and miss the early move. MESA does both by detecting when to be fast and when to be smooth.
Adaptation in Action:
Strong trend starts → MESA quickly detects phase change → Fast Limit kicks in → Early entry
Trend continues → Phase stabilizes → MESA maintains moderate speed → Smooth ride
Consolidation begins → Phase changes slow → Slow Limit engages → Whipsaw avoidance
🚀 Advanced Applications
Multi-timeframe confluence: Use MESA on 3 timeframes for high-probability setups
Divergence detection: Watch for MAMA/price divergences at band extremes
Cycle period analysis: The internal period calculation can guide position duration
Band squeeze trading: Narrow bands + MAMA/FAMA cross = high-probability breakout
Created by AlphaNatt - Based on John Ehlers' MESA research. For educational purposes. Always practice proper risk management. Not financial advice. Always DYOR.
Arnaud Legoux Gaussian Flow | AlphaNattArnaud Legoux Gaussian Flow | AlphaNatt
A sophisticated trend-following and mean-reversion indicator that combines the power of the Arnaud Legoux Moving Average (ALMA) with advanced Gaussian distribution analysis to identify high-probability trading opportunities.
🎯 What Makes This Indicator Unique?
This indicator goes beyond traditional moving averages by incorporating Gaussian mathematics at multiple levels:
ALMA uses Gaussian distribution for superior price smoothing with minimal lag
Dynamic envelopes based on Gaussian probability zones
Multi-layer gradient visualization showing probability density
Adaptive envelope modes that respond to market conditions
📊 Core Components
1. Arnaud Legoux Moving Average (ALMA)
The ALMA is a highly responsive moving average that uses Gaussian distribution to weight price data. Unlike simple moving averages, ALMA can be fine-tuned to balance responsiveness and smoothness through three key parameters:
ALMA Period: Controls the lookback window (default: 21)
Gaussian Offset: Shifts the Gaussian curve to adjust lag vs. responsiveness (default: 0.85)
Gaussian Sigma: Controls the width of the Gaussian distribution (default: 6.0)
2. Gaussian Envelope System
The indicator features three envelope calculation modes:
Fixed Mode: Uses ATR-based fixed width for consistent envelope sizing
Adaptive Mode: Dynamically adjusts based on price acceleration and volatility
Hybrid Mode: Combines ATR and standard deviation for balanced adaptation
The envelopes represent statistical probability zones. Price moving beyond these zones suggests potential mean reversion opportunities.
3. Momentum-Adjusted Envelopes
The envelope width automatically expands during strong trends and contracts during consolidation, providing context-aware support and resistance levels.
⚡ Key Features
Multi-Layer Gradient Visualization
The indicator displays 10 gradient layers between the ALMA and envelope boundaries, creating a visual "heat map" of probability density. This helps traders quickly assess:
Distance from the mean
Potential support/resistance strength
Overbought/oversold conditions in context
Dynamic Color Coding
Cyan gradient: Price below ALMA (bullish zone)
Magenta gradient: Price above ALMA (bearish zone)
The ALMA line itself changes color based on price position
Trend Regime Detection
The indicator automatically identifies market regimes:
Strong Uptrend: Trend strength > 0.5% with price above ALMA
Strong Downtrend: Trend strength < -0.5% with price below ALMA
Weak trends and ranging conditions
📈 Trading Strategies
Mean Reversion Strategy
Look for price entering the extreme Gaussian zones (beyond 95% of envelope width) when trend strength is moderate. These represent statistical extremes where mean reversion is probable.
Signals:
Long: Price in lower Gaussian zone with trend strength > -0.5%
Short: Price in upper Gaussian zone with trend strength < 0.5%
Trend Continuation Strategy
Enter when price crosses the ALMA during confirmed strong trend conditions, riding momentum while using the envelope as a trailing stop reference.
Signals:
Long: Price crosses above ALMA during strong uptrend
Short: Price crosses below ALMA during strong downtrend
🎨 Visualization Guide
The gradient layers create a "probability cloud" around the ALMA:
Darker shades (near ALMA): High probability zone - price tends to stay here
Lighter shades (near envelope edges): Lower probability - potential reversal zones
Price at envelope extremes: Statistical outliers - strongest mean reversion setups
⚙️ Customization Options
ALMA Parameters
Adjust period for different timeframes (lower for day trading, higher for swing trading)
Modify offset to tune responsiveness vs. smoothness
Change sigma to control distribution width
Envelope Configuration
Choose envelope mode based on market characteristics
Adjust multiplier to match instrument volatility
Modify gradient depth for visual preference (5-15 layers)
Signal Enhancement
Momentum Length: Lookback for trend strength calculation
Signal Smoothing: Additional EMA smoothing to reduce noise
🔔 Built-in Alerts
The indicator includes six pre-configured alert conditions:
ALMA Trend Long - Price crosses above ALMA in strong uptrend
ALMA Trend Short - Price crosses below ALMA in strong downtrend
Mean Reversion Long - Price enters lower Gaussian zone
Mean Reversion Short - Price enters upper Gaussian zone
Strong Uptrend Detected - Momentum confirms strong bullish regime
Strong Downtrend Detected - Momentum confirms strong bearish regime
💡 Best Practices
Use on clean, liquid markets with consistent volatility
Combine with volume analysis for confirmation
Adjust envelope multiplier based on backtesting for your specific instrument
Higher timeframes (4H+) generally provide more reliable signals
Use adaptive mode for trending markets, hybrid for mixed conditions
⚠️ Important Notes
This indicator works best in markets with normal price distribution
Extreme news events can invalidate Gaussian assumptions temporarily
Always use proper risk management - no indicator is perfect
Backtest parameters on your specific instrument and timeframe
🔬 Technical Background
The Arnaud Legoux Moving Average was developed to solve the classic dilemma of moving averages: the trade-off between lag and noise. By applying Gaussian distribution weighting, ALMA achieves superior smoothing while maintaining responsiveness to price changes.
The envelope system extends this concept by creating probability zones based on volatility and momentum, effectively mapping where price is "likely" vs "unlikely" to be found based on statistical principles.
Created by AlphaNatt - For educational purposes. Always practice proper risk management. Not financial advice. Always DYOR.
DCA Percent SignalOverview
The DCA Percent Signal Indicator generates buy and sell signals based on percentage drops from all-time highs and percentage gains from lowest lows since ATH. This indicator is designed for pyramiding strategies where each signal represents a configurable percentage of equity allocation.
Definitions
DCA (Dollar-Cost Averaging): An investment strategy where you invest a fixed amount at regular intervals, regardless of price fluctuations. This indicator generates signals for a DCA-style pyramiding approach.
Gann Bar Types: Classification system for price bars based on their relationship to the previous bar:
Up Bar: High > previous high AND low ≥ previous low
Down Bar: High ≤ previous high AND low < previous low
Inside Bar: High ≤ previous high AND low ≥ previous low
Outside Bar: High > previous high AND low < previous low
ATH (All-Time High): The highest price level reached during the entire chart period
ATL (All-Time Low): The lowest price level reached since the most recent ATH
Pyramiding: A trading strategy that adds to positions on favorable price movements
Look-Ahead Bias: Using future information that wouldn't be available in real-time trading
Default Properties
Signal Thresholds:
Buy Threshold: 10% (triggers every 10% drop from ATH)
Sell Threshold: 30% (triggers every 30% gain from lowest low since ATH)
Price Sources:
ATH Tracking: High (ATH detection)
ATL Tracking: Low (low detection)
Buy Signal Source: Low (buy signals)
Sell Signal Source: High (sell signals)
Filter Options:
Apply Gann Filter: False (disabled by default)
Buy Sets ATL: False (disabled by default)
Display Options:
Show Buy/Sell Signals: True
Show Reference Lines: True
Show Info Table: False
Show Bar Type: False
How It Works
Buy Signals: Trigger every 10% drop from the all-time highest price reached
Sell Signals: Trigger every 30% increase from the lowest low since the most recent all-time high
Smart Tracking: Uses configurable price sources for signal generation
Key Features
Configurable Thresholds: Adjustable buy/sell percentage thresholds (default: 10%/30%)
Separate Price Sources: Independent sources for ATH tracking, ATL tracking, and signal triggers
Configurable Signals: Uses low for buy signals and high for sell signals by default
Optional Gann Filter: Apply Gann bar analysis for additional signal filtering
Optional Buy Sets ATL: Option to set ATL reference point when buy signals occur
Visual Debug: Detailed labels showing signal parameters and values
Usage Instructions
Apply to Chart: Use on any timeframe (recommended: 1D or higher for better signal quality)
Risk Management: Adjust thresholds based on your risk tolerance and market volatility
Signal Analysis: Monitor debug labels for detailed signal information and validation
Signal Logic
Buy signals are blocked when ATH increases to prevent buying at peaks
Sell signals are blocked when ATL decreases to prevent selling at lows
This ensures signals only trigger on subsequent bars, not the same bar that establishes new reference points
Buy Signals:
Calculate drop percentage from ATH to buy signal source
Trigger when drop reaches threshold increments (10%, 20%, 30%, etc.)
Always blocked on ATH bars to prevent buying at peaks
Optional: Also blocked on up/outside bars when Gann filter enabled
Sell Signals:
Calculate gain percentage from lowest low to sell signal source
Trigger when gain reaches threshold increments (30%, 60%, 90%, etc.)
Always blocked when ATL decreases to prevent selling at lows
Optional: Also blocked on down bars when Gann filter enabled
Limitations
Designed for trending markets; may generate many signals in sideways/ranging markets
Requires sufficient price movement to be effective
Not suitable for scalping or very short timeframes
Implementation Notes
Signals use optimistic price sources (low for buys, high for sells), these can be configured to be more conservative
Gann filter provides additional signal filtering based on bar types
Debug information available in data window for real-time analysis
Detailed labels on each signal show ATH, lowest low, buy level, sell level, and drop/gain percentages
TOPIX Relative Strength vs Symbol + Volume Quality (JP)Overview
Relative Strength vs Symbol + Volume Quality (JP) visualizes the relative performance (%) of a stock versus a chosen benchmark (e.g., TOPIX, Nikkei 225, or ETFs) while incorporating volume quality and momentum analysis.
It calculates percentage-point differences between the target and benchmark, smooths them (EMA/SMA), and evaluates whether the strength is supported by quality volume flow.
All data uses confirmed bars only (request.security() with confirmed values) to minimize repainting, and labels are drawn only on confirmed bars.
What It Shows
Relative Performance (%pt): Difference in rate of change between the stock and its benchmark.
Above 0 → outperforming
Below 0 → underperforming
Trend Direction: Short-/mid-term trend from smoothed EMA/SMA.
Volume Quality: Ratio of up-volume to down-volume, scaled from -1 to +1.
Volume Momentum (Z-Score): Measures unusual surges in trading activity.
Strength Detection: Combines price-based strength (relative or z-score) with volume quality and momentum filters.
How to Use
Set your comparison symbol (e.g., TSE:1306, TVC:NI225).
Adjust lookback length and smoothing period/type to fit your analysis window.
Enable “Confirm strength by volume quality” and/or “Use volume Z-score” to filter signals with supportive volume.
Optionally, configure background thresholds to highlight extreme relative strength/weakness.
Use Screener Mode to suppress visual outputs (table/labels) for performance in Pine Screener.
Main Input Groups
Comparison Settings: Benchmark symbol, calculation timeframe.
Period & Smoothing: lookback, smoothLen, and MA type (EMA or SMA).
Price Strength Detection: Enable Z-score mode and adjust zLen / zThresh.
Volume Quality & Momentum: vqThresh (volume quality) and vZth (Z-score threshold).
Display: Toggle histogram tint, background highlight, mini-table, and signal labels.
Background Thresholds: Independent thresholds for histogram/MA lines and colors.
Screener Output: Suppress visuals for screening use.
Output & Coloring
Histogram: Relative performance in %pt. Red = outperforming, Green = underperforming (intensity by magnitude).
White Line (EMA/SMA):
Rising with good volume quality → Red
Rising but poor quality → Yellow
Falling → White
Background: Optional highlight when histogram/MA exceeds user thresholds.
Counters: Hidden plots track how many bars have consecutively exceeded thresholds (usable in screeners).
Alerts
Strength Detection (Price + Volume):
Triggered when price condition (MA > 0 or Z-score > threshold) and volume conditions are met.
Weakness / Loss of Strength:
Triggered on cross-under or when volume conditions fail.
Labels: Optional, shown only on confirmed bars.
Repaint Prevention
All calculations use confirmed bar data only.
Labels appear only when bars close.
On lower timeframes, benchmark update delays may cause minor lag.
Volume quality is derived from up/down bar classification, which can be distorted by gaps or illiquid markets.
Avoid overfitting thresholds — values differ by asset and timeframe.
Practical Applications
Identify outperformance with supportive volume across sectors or themes.
Use streak counters to find consistent relative winners or laggards.
Compare stocks vs sector indices or ETFs to track rotation and momentum shifts.
Disclaimer
This script and its description are provided for educational and informational purposes only.
They do not constitute financial advice or recommendations.
Use at your own discretion, considering market risk, liquidity, and data limitations.
This description follows TradingView’s House Rules (no promotion, plagiarism, or misleading claims).
Publication Guidelines
When publishing:
Do not include promotional links or invitations.
Do not copy text/code from other authors without permission.
Screenshots should illustrate the script’s function only, not serve as marketing material.
Maintain consistency of language (English only for this version).
概要
Relative Strength vs Symbol + Volume Quality (JP) は、対象銘柄と比較指標(例:TOPIX)との相対パフォーマンスを%ポイント差で算出し、平滑化線(EMA/SMA)とヒストグラムで可視化します。さらに、出来高を「質(上げ/下げボリュームのバランス)」と「勢い(Zスコア)」で評価し、価格×出来高の両面から“強さ/弱さ”を判定します。
リペイント抑制のため、request.security()は確定足を参照し、ラベル描画も確定時に限定しています。
何がわかるか
相対パフォーマンス(%pt):対象と比較指標の騰落率差。0より上=相対優位、下=相対劣位。
平滑化トレンド:相対の短中期的な傾き(EMA/SMA)。
出来高の質:上昇バー出来高と下降バー出来高の比から -1〜+1 で評価。
出来高の勢い(Zスコア):直近出来高の異常度。
強/弱シグナル:価格条件(基準越え・Z超え)に、出来高条件(質・勢い)を組み合わせて抽出。
使い方(基本手順)
比較対象を「比較シンボル」で指定(例:TSE:1306、TVC:NI225 等)。
「比較期間(バー数)」と「平滑化(期間/種類)」を調整し、相対の視点を合わせる。
出来高確認を使う場合は「出来高の質で“強さ”を確認」「出来高の勢い(Z)」をオンにし、閾値を調整。
背景ハイライトの**閾値(ヒスト/平均線別)**を設定すると、重要局面を一目で把握可能。
スクリーナー利用時は「スクリーナー用」をオンにして、テーブル/ラベルの描画を抑制。
主な入力項目
比較設定:比較シンボル、計算タイムフレーム。
期間・平滑化:比較期間lookback、平滑化長smoothLen、MA種別(EMA/SMA)。
強さ検出(価格):Zスコア方式のオン/オフ、zLen、zThresh。
出来高の質・勢い:質の閾値vqThresh、勢いZの長さvZlenと閾値vZth。
表示:テーブル、背景、ヒスト濃淡、直近ラベルのON/OFF。
背景(閾値):ヒスト/平均線の上下しきいと背景色。
スクリーナー出力:描画抑制トグル。
出力と色分け
ヒストグラム:相対パフォーマンス(%pt)。プラス域は赤系、マイナス域は緑系で濃淡表示。
白線(実体は平滑化相対):上向きかつ出来高質が閾値以上なら赤、上向きでも質不足なら黄、下降時は白。
背景色(任意):設定したヒスト/平均線の閾値を超過/割れで自動着色。
カウンタ:ヒスト/平均線が各閾値を連続超過/連続割れした本数を、スクリーナーが取得できるよう非表示プロットで出力。
シグナル・アラート
強さ検出(価格+出来高):
価格条件 … 平滑化線の0越え、またはZスコアがzThresh越え。
出来高条件 … 「質 ≥ vqThresh」「勢いZ ≥ vZth」(任意)。
条件一致で「強」アラート/喪失・未達で「弱」アラート。
ラベル(任意):確定足でのみ出力。
リペイントと制約
request.security()は確定足データを用い、確定時ラベルのみ描画する設計です。
比較シンボルの更新周期・分足集計差により、短期足ではタイムラグが生じる場合があります。
出来高の「質」は上昇/下降バーの単純仕分けに依存するため、ギャップや出来高の歪みが強い市場では解釈に注意。
閾値は銘柄・期間で最適値が異なります。**過度な最適化(カーブフィット)**は避けてください。
(公開ガイドライン上も、明確で誤解を生む表現の回避が推奨されます。
TradingView
)
活用アイデア(例)
相対優位×出来高質の改善が同時に起きた局面を抽出。
連続超過カウントで、相対の“粘り”や“伸び”をスクリーニング。
指数だけでなく、業種ETFやセクター指数を比較軸にしてローテーション把握。
免責
本スクリプトおよび説明は情報提供・教育目的です。投資助言・勧誘ではありません。市場リスク、流動性、スリッページ、データ仕様に起因する差異等は利用者の自己責任でご確認ください。TradingViewのハウスルール(広告禁止・独自性・言語一致・わかりやすさ)および公開ルールに準拠する形で記述しています。
Trade Price – Spread Compensator OverlayDescription:
This indicator provides a clear visual representation of the bid/ask price spread. It allows traders to account for the difference between displayed chart prices and actual trading prices by offsetting candles by a specified number of pips.
Simply input the appropriate decimal unit that matches your instrument’s price format, then set the number of pips you wish to offset to reflect your typical spread.
For best results, use the Style settings to match the overlay candle colors with your chart’s default candles—this creates a seamless, integrated appearance.
The sell-stop drawings depicted in the chart example are there to help understand how to use this for managing your entry/stop loss position. It is not a part of the indicator, only the orange candle overlay is.
Institutional Trading Suite Complete### Institutional Trading Suite Complete (ITS Pro) Indicator Description
#### Overview and Purpose
The **Institutional Trading Suite Complete (ITS Pro)** is an all-in-one overlay indicator designed for professional traders seeking a clean, comprehensive view of market structure across multiple timeframes and dimensions. Built for TradingView, this open-source tool integrates over a dozen institutional-grade features into a single, performance-optimized script, helping users identify key levels, trends, volume anomalies, and potential trade setups without cluttering the chart with multiple indicators.
Tailored for assets like forex, crypto, stocks, and indices, ITS Pro addresses the challenges of multi-timeframe analysis by combining price action tools (e.g., pivots, FVGs, order blocks), volume-based insights (PVSRA with vector zones), moving averages for trend confirmation, and statistical dashboards for quick context. Its purpose is to mimic institutional workflows—focusing on liquidity zones, fair value gaps, and average ranges—to spot high-probability entries/exits, risk areas, and market biases. For instance, a trader might use FVGs and order blocks for support/resistance while cross-referencing PVSRA vector candles for volume confirmation, all within one indicator.
This mashup isn't arbitrary; each component complements the others to create a layered analysis system. Volume tools (PVSRA) highlight momentum shifts that validate levels from pivots or psychological zones, while the dashboard provides at-a-glance metrics to tie everything together. By consolidating these, the indicator reduces lag and drawing object overhead (limited to 500 each for boxes/lines/labels), ensuring smooth performance on any timeframe.
#### Originality and Uniqueness
While individual elements like EMAs or pivots exist in basic forms on TradingView, ITS Pro's originality lies in its seamless integration and optimizations for institutional-style trading:
- **PVSRA with Clean Vector Zones**: An enhanced Price-Volume-Spread-Range Analysis that colors bars based on volume/spread ratios and draws limited, non-overlapping zones around "vector" candles (high-volume anomalies). This is unique in its lightweight implementation—capping zones to prevent clutter—allowing traders to spot climactic moves without full volume profile overhead.
- **Limited & Mitigated FVGs/Order Blocks**: Detects Fair Value Gaps and Order Blocks with strict limits (e.g., max 5 FVGs) and percentage-based mitigation (e.g., 50% fill removes the box), keeping the chart clean. Order blocks focus on swing-based bearish/bullish candles with body size filters, avoiding the noise of traditional pivot-based methods.
- **Liquidity Zones via Touch Counting**: A novel approach counting price touches within tolerance bands over a lookback, highlighting high/low liquidity areas only when a threshold is met—original for simplifying liquidity hunting without complex order flow data.
- **Multi-Timeframe Levels & Ranges**: Combines daily/weekly/monthly highs/lows/opens with average ranges (ADR/AWR/AMR) and price quartiles (dividing historical range into Q1-Q4 zones), providing a "big picture" structure not commonly bundled.
- **Dashboard & Alerts**: A customizable table summarizing key metrics (e.g., price bias, FVG/OB counts) with built-in alerts for crosses/breaks, making it a "control center" for the suite.
As open-source code, users can inspect, modify, or extend features (e.g., adjust tolerances or add symbols). It draws from concepts like ICT/Smart Money but refines them for efficiency, using Pine Script v6 optimizations like array limits and conditional drawings to handle high-bar counts without errors.
#### Credit and Acknowledgments
This script incorporates elements inspired by and adapted from the "Traders Reality" codebase, licensed under the Mozilla Public License 2.0 (mozilla.org). Original contributions include:
- Pattern formation by plasmapug.
- Rise retrace continuation to the upside by infernix, peshocore, and xtech5192.
- DST auto functions and psychological level refactor for DST by xtech5192.
- Range daily/weekly Hi/Lo added with research contributions from xtech5192.
While the code is open-source and free to use/modify, the "Traders Reality" name is protected—derivatives should not use "Traders Reality," "Pattern Watchers," or related names. Special thanks to the Traders Reality community for their foundational work on PVSRA, session handling with DST adjustments, and range calculations, which have been optimized and integrated here for enhanced performance.
#### How It Works
ITS Pro processes data in real-time, resetting calculations at timeframe changes (e.g., new days/weeks) and using security() for higher-timeframe fetches. Here's a breakdown of core features and underlying concepts:
- **PVSRA (Volume Analysis)**: Calculates average volume over 10 bars and spread-volume (range * volume). Bars are colored based on ratios: vector (≥2x avg or max spread-vol) for climaxes, strong (≥1.5x) for conviction. Zones are drawn around vectors with fixed extension (user-set bars) and capped count, using arrays for management. Optional symbol override (e.g., for crypto volume aggregation).
- **Exponential Moving Averages**: Standard EMAs (5,13,50,200,800 periods) with optional 50-period cloud. Labels show values at chart right for quick reference.
- **Daily Pivots**: Uses previous day's HLC for PP = (H+L+C)/3, R1/S1 = 2*PP - L/H, etc., up to R3/S3. M-levels are midpoints (e.g., M1 = (S1+S2)/2). Plotted as crosses with style options.
- **High/Low & Open Levels**: Fetches previous period's extremes/opens from D/W/M timeframes. Historical daily opens optional for steplines.
- **Average Ranges**: SMA of (high-low) over user lengths for ADR (daily), AWR (weekly), AMR (monthly). Projects ±50% from close as potential exhaustion levels.
- **Psychological Levels**: Rounds to multiples of spacing (e.g., 1000 for BTC), drawing limited lines (±count) around current price with dotted style.
- **Quarterly Price Zones**: Divides historical range (high-low over lookback) into 4 equal quartiles, drawing non-overlapping boxes for visual price distribution (Q1 bottom 25%, etc.).
- **Yearly Levels**: Annual high/low/open from 12M timeframe, plotted as steplines.
- **Market Sessions**: Time-based boxes for London/NY/Tokyo/Sydney with DST adjustments (US/UK/Sydney). Optional high/low lines per session, resetting at starts.
- **Fair Value Gaps (FVGs)**: Detects gaps where low > high (bullish) or high < low (bearish), drawing boxes. Mitigates when price penetrates % threshold, capping active FVGs.
- **Order Blocks**: Identifies last bearish candle before bullish swing low (or vice versa) with body size filter. Draws extendable boxes, limited count via array shift.
- **Liquidity Zones**: Counts touches near range highs/lows within % tolerance over lookback; draws if ≥threshold.
- **Dashboard**: Table on last bar showing price, levels, counts, bias (above/below PP). Custom position/size.
Alerts trigger on key crosses (e.g., PP break, vector candle).
#### How to Use It
Add ITS Pro via TradingView's indicators menu. Customize in the inputs tab—groups organize features for easy toggling (e.g., disable FVGs if not needed). Best on intraday charts (1m-1h) for stocks/crypto/forex, but scales to higher TFs.
- **Setup**: Adjust offsets for labels (e.g., 12 bars right). Enable extensions for lines/boxes. For PVSRA, override symbol if volume is unreliable (e.g., aggregate BTC exchanges).
- **Trading Examples**:
- **Bias & Trends**: Use EMA stack and PP for daily bias (above PP + golden cross = long). PVSRA vectors confirm entries.
- **Levels & Zones**: Trade bounces from order blocks/FVGs near psych levels or quarterly zones. Liquidity zones signal potential sweeps.
- **Ranges**: ADR highs/lows as take-profit; if price hits AWR early, expect expansion.
- **Sessions**: Focus entries during London/NY overlaps; session H/L as intraday S/R.
- **Dashboard/Alerts**: Monitor for "BULLISH ↑" bias; set alerts for R1 breaks or vectors.
Since it's open-source, fork the code to add features (e.g., custom alerts). Test on demo charts—feedback via comments! Developed for clean, pro analysis—happy trading!
VWAP Retest + EMA9 Cross + Candle Pattern V2📈 VWAP Retest + EMA9 Cross + Candle Pattern Strategy_V2
Setup: This intraday momentum strategy combines 3 core elements:
• VWAP Retest: Price retests VWAP within a small buffer zone
• EMA9 Crossover: EMA9 crosses above VWAP within the last 3 bars
• Bullish Candle Pattern: At least one bullish signal — Hammer, Engulfing, or Momentum candle
A trade is triggered only during the US morning session (9:30–12:30 EST) and only if price is above yesterday’s high, suggesting strong momentum.
⚙️ Strategy Settings
• Initial Capital: $100,000
• Position Sizing: 10% of equity per trade
• Commission: 0.03% per trade
• Slippage: 1 tick
• Take Profit: +3% from entry
• Stop Loss: 0.5% below VWAP at entry
• Forced Exit: 1:00 PM EST
📊 Strategy Logic
• VWAP Retest Filter ensures entry is near a value zone.
• EMA9 Cross Confirmation aligns short-term momentum with volume-weighted price.
• Bullish Candle Patterns provide price action confirmation:
○ ✅ Hammer
○ ✅ Bullish Engulfing
○ ✅ Large momentum body
• Above Yesterday’s High (YH) acts as a bullish bias filter.
🧪 Backtest Results (Jan 2023 – Oct 2025)
• Total Trades: 120
• Win Rate: 52.5%
• Profit Factor: 1.18
• Max Drawdown: 1.22%
• Net P&L: +$1,064 (+1.06%)
Due to chart data limits, only part of the period may be visible on publication charts.
🔍 Chart Visuals
This strategy plots:
• VWAP (white) and EMA9 (orange)
• Candle pattern markers:
○ “H” = Hammer
○ “BE” = Bullish Engulfing
○ “M” = Momentum Candle
• “SETUP” label when all conditions are met
• YH/YL labels for context — previous day’s high/low
💡 Use Case
This setup is designed for intraday momentum scalping, ideal for traders who:
• Trade morning breakouts
• Use VWAP as a dynamic support/resistance
• Want clear, rule-based entries based on both trend and price action
Educational and research use - not financial advice.
Metallic Retracement ToolI made a version of the Metallic Retracement script where instead of using automatic zig-zag detection, you get to place the points manually. When you add it to the chart, it prompts you to click on two points. These two points become your swing range, and the indicator calculates all the metallic retracement levels from there and plots them on your chart. You can drag the points around afterwards to adjust the range, or just add the indicator to the chart again to place a completely new set of points.
The mathematical foundation is identical to the original Metallic Retracement indicator. You're still working with metallic means, which are the sequence of constants that generalize the golden ratio through the equation x² = kx + 1. When k equals 1, you get the golden ratio. When k equals 2, you get silver. Bronze is 3, and so on forever. Each metallic number generates its own set of retracement ratios by raising alpha to various negative powers, where alpha equals (k + sqrt(k² + 4)) / 2. The script algorithmically calculates these levels instead of hardcoding them, which means you can pick any metallic number you want and instantly get its complete retracement sequence.
What's different here is the control. Automatic zig-zag detection is useful when you want the indicator to find swings for you, but sometimes you have a specific price range in mind that doesn't line up with what the zig-zag algorithm considers significant. Maybe you're analyzing a move that's still developing and hasn't triggered the zig-zag's reversal thresholds yet. Maybe you want to measure retracements from an arbitrary high to an arbitrary low that happened weeks apart with tons of noise in between. Manual placement lets you define exactly which two points matter for your analysis without fighting with sensitivity settings or waiting for confirmation.
The interactive placement system uses TradingView's built-in drawing tools, so clicking the two points feels natural and works the same way as drawing a trendline or fibonacci retracement. First click sets your starting point, second click sets your ending point, and the indicator immediately calculates the range and draws all the metallic levels extending from whichever point you chose as the origin. If you picked a swing low and then a swing high, you get retracement levels projecting upward. If you went from high to low, they project downward.
Moving the points after placement is as simple as grabbing one of them and dragging it to a new location. The retracement levels recalculate in real-time as you move the anchor points, which makes it easy to experiment with different range definitions and see how the levels shift. This is particularly useful when you're trying to figure out which swing points produce retracement levels that line up with other technical features like previous support or resistance zones. You can slide the points around until you find a configuration that makes sense for your analysis.
Adding the indicator to the chart multiple times lets you compare different metallic means on the same price range, or analyze multiple ranges simultaneously with different metallic numbers. You could have golden ratio retracements on one major swing and silver ratio retracements on a smaller correction within that swing. Since each instance of the indicator is independent, you can mix and match metallic numbers and ranges however you want without one interfering with the other.
The settings work the same way as the original script. You select which metallic number to use, control how many power ratios to display above and below the 1.0 level, and adjust how many complete retracement cycles you want drawn. The levels extend from your manually placed swing points just like they would from automatically detected pivots, showing you where price might react based on whichever metallic mean you've selected.
What this version emphasizes is that retracement analysis is subjective in terms of which swing points you consider significant. Automatic detection algorithms make assumptions about what constitutes a meaningful reversal, but those assumptions don't always match your interpretation of the price action. By giving you manual control over point placement, this tool lets you apply metallic retracement concepts to exactly the price ranges you care about, without requiring those ranges to fit someone else's definition of a valid swing. You define the context, the indicator provides the mathematical framework.
EMA Cloud - DynamicThe only EMA indicator you'll ever need.
- Flexible EMAs: Customize EMA lengths (e.g., 9, 21) to match your trading style.
- Timeframe Lock: Lock EMAs to a specific timeframe (e.g., 5m on a 1m chart) for consistent analysis.
- Dynamic Cloud: Auto-shades bullish (green) or bearish (red) clouds between EMAs for clear trend signals.
- Personalized Design: Adjust EMA colors, thickness, and cloud transparency for optimal visibility.
A friendly reminder that no tool or indicator guarantees success. Integrate this into a robust trading plan.
IPDA Ranges – Pro
### IPDA Ranges – Pro
**Overview**
The **IPDA Ranges – Pro** indicator brings the core concepts of the Interbank Price Delivery Algorithm (IPDA) from ICT (Inner Circle Trader) mentorship to life on TradingView. Inspired by ICT's foundational video on (www.youtube.com), this tool visualizes multi-period price ranges (20, 40, or 60 days) to decode institutional order flow, identify discount/premium zones, and highlight algorithmic price delivery points.
IPDA, as explained by ICT, is the "source code" behind market structure—grading ranges into quadrants to reveal high-probability support/resistance, fair value gaps, and liquidity draws. By anchoring on daily highs/lows, it filters noise, anticipates retracements, and aligns price action with time-based delivery (e.g., during key sessions like 10 AM–2 PM ET). This indicator automates the process, making it easier to spot "permissible" moves without manual charting.
**Key Features**
- **Dynamic Ranges**: Plots customizable IPDA periods (IPDA20, IPDA40, IPDA60) based on daily highest highs and lowest lows. Equilibrium (50% midpoint) acts as the core reference for mean reversion.
- **Quadrant Breakdown**: Divides each range into 25% steps—lower quadrant (deep discount), 25%/75% lines (consequent encroachment edges), and upper quadrant (premium). Optional subquadrants (12.5% steps) for finer granularity.
- **Visual Modes**:
- **Boxes**: Shade discount (below equilibrium) and premium (above) areas for intuitive zoning.
- **Lines**: Clean horizontal lines for highs, lows, equilibrium, and quadrants—ideal for lower timeframes.
- **Mid-Zone Highlight**: Optional shading of the 25%–75% "fair value" zone (customizable color/opacity) to flag balanced delivery areas where bodies often respect levels.
- **Info Table**: Choose from:
- **Table A**: Labels current price location as "Discount" or "Premium" per range (green for mid-zone).
- **Table B**: Shows distance from equilibrium in % (e.g., "52.3%") for precise positioning.
- **Customization**:
- Toggle labels (high/low, quadrants, prices), line styles (solid/dotted/dashed), extensions, and table position.
- Colors for discount/premium, equilibrium, and zones.
- Alerts for mid-zone entry/exit to catch order flow shifts.
- **Performance**: Runs efficiently on any timeframe/symbol, pulling daily data via `request.security` for accuracy.
**How It Works**
1. **Range Calculation**: For each selected period (e.g., IPDA20), it fetches the highest high and lowest low over the past N daily bars. Equilibrium = (High + Low) / 2.
2. **Zoning**:
- **Discount**: Below equilibrium (institutional buying opportunity).
- **Premium**: Above equilibrium (potential selling pressure).
- **Quadrants**: 25% (q1) and 75% (q3) lines mark edges of the "mid-zone," where price often consolidates or traps retail before directional runs.
3. **Plotting**: On the last bar, draws boxes/lines from the range start to current bar. Labels show levels (e.g., "IPDA20 High @ 1.2345").
4. **Usage Example**: On EURUSD daily, enable IPDA20. If price pierces a premium wick's low into the lower quadrant during a bullish shift (per ICT), expect a run to liquidity—use the table's % reading to gauge strength (e.g., <25% = deep discount buy). Transpose to 5-min for entries aligning with FVGs or order blocks.
**Trading Tips**
- **Higher Timeframe Bias**: Use on daily/4H for structure; drop to 1H/15M for entries. Focus on bodies (not wicks) respecting quadrants—wicks signal traps.
- **ICT Alignment**: Pair with PD Arrays (premium/discount wicks) or Market Maker models. In trends, extend to IPDA40/60; ignore extremes unless full reversals occur.
- **Risk Management**: Target liquidity pools at equal highs/lows. Avoid overleveraging—IPDA shines in 7–10 AM ET for optimal delivery. Backtest random 20-day periods to validate.
- **Best For**: Forex, indices (e.g., NAS100), commodities (e.g., Gold). Test on demo first.
Special Thanks to toodegrees for sharing the original base script.
More features to be added.
**Disclaimer**
This indicator is for educational purposes only and does not constitute financial advice. Past performance isn't indicative of future results. Trading involves substantial risk—use at your own discretion. Hypothetical results may not reflect real-market factors like slippage or liquidity. Always consult a licensed advisor.
**Author**: © MadMonkTrading (Mozilla Public License 2.0)
**Version**: Pine Script v5 | Questions? Drop a comment below!
RSI Breakout Zones█ OVERVIEW
“RSI Breakout Zones” is a technical analysis tool that identifies significant zones on the chart based on the Relative Strength Index (RSI). The indicator maps overbought (OB) and oversold (OS) zones using boxes, then extends them until the next zone of the same type is detected, highlighting breakout points to aid in trade entry decisions. These zones often serve as areas of consolidation, support, or resistance.
█ CONCEPTS
The indicator identifies overbought (above 70) and oversold (below 30) zones, drawing boxes that extend until the next zone of the same type (OB for OB, OS for OS) is detected. Breakout signals are generated when the price crosses the zone boundaries, indicating potential shifts in market momentum.
Why are RSI zones important? These zones represent areas of extreme market sentiment, often leading to corrections or reversals. Overbought zones suggest potential selling pressure, while oversold zones indicate buying opportunities. After a breakout, a zone may switch roles, e.g., from support to resistance or vice versa, making it a key element in price action analysis. Larger zones, formed during high volatility, may attract price for retests due to stronger imbalances in buyer/seller dynamics. Consolidation often occurs within these zones as the market seeks equilibrium before further moves. However, in strong trends, zones may be decisively broken without immediate pullbacks, and their significance depends on their position relative to key support and resistance levels.
█ FEATURES
- RSI Zone Detection: Calculates RSI with a customizable length (default 14) and identifies overbought/oversold zones based on user-defined levels (default 70/30), drawing boxes that dynamically adjust to price action within the zone.
- Customizable Boxes: Zones extend until the next zone of the same type is detected. The indicator draws zones with adjustable colors for overbought (red) and oversold (green) areas, with options for box and zone transparency.
- Breakout Signals: Generates upward (green triangle) and downward (red triangle) breakout signals when the price crosses the top or bottom of a zone. Signals appear below or above the bar, indicating potential trade entry points.
- Midline: Automatically draws a dashed line at the midpoint of each zone, helping traders assess price behavior within the zone and potential halfway retests.
- Box Management: Option to remove outdated boxes.
- Alerts: Built-in support for alerts on breakout signals, enabling traders to receive notifications for key zone crossings.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
- RSI Settings: Adjust RSI Length (default 14), Overbought Level (default 70), and Oversold Level (default 30) to tailor zone detection sensitivity—higher lengths smooth signals for longer-term analysis.
- Box Settings: Configure colors and transparency for overbought (red) and oversold (green) zones, including box transparency (default 90) and zone transparency (default 90).
- Signal Settings: Customize breakout signal colors (green for upward, red for downward) and enable/disable keeping boxes after RSI normalization.
Interpreting Signals:
- Upward Breakout Signal: A green triangle below the bar indicates a breakout, suggesting potential bullish momentum and trend continuation or reversal.
- Downward Breakout Signal: A red triangle above the bar indicates a breakout, suggesting potential bearish momentum.
- RSI Zones: If the price re-enters a zone after a breakout, it may signal a false breakout or consolidation; persistent zones can act as future support/resistance levels. Consolidation often occurs within these zones as the market seeks equilibrium.
- Use signals alongside other technical analysis tools for confirmation, such as moving averages (to confirm trend direction), Fibonacci levels (to identify key price zones), or volume indicators (to validate breakout strength). Analyze RSI zones on higher timeframes for stronger signals due to broader market context.
█ APPLICATIONS
- Momentum Trading: Use RSI zones as overbought/oversold filters. In an uptrend, look for buying opportunities on upward breakouts, and in a downtrend, on downward breakouts. Combining with MACD crossovers, Fibonacci levels, or pivot points enhances zone significance.
- Inter-Zone Trading: Utilize breakouts from one RSI zone and hold the position until reaching the next zone, which may act as a target level or reversal point.
█ NOTES
- Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize RSI length and levels for your trading style.
- For best results, use in trending markets where RSI extremes are more predictive; in ranging markets, additional filters are recommended to reduce false signals.
- Always combine with risk management; RSI zones alone do not guarantee reversals, and false breakouts may occur in low-liquidity environments.
💪 Trend Health Monitor v2 (fixed)Good. I worked extremely hard on this indicator.
It tells you whether the current trend is likely to continue — so you can decide whether to **hold your position to maximize profits** or not.
Name of tickerDescription:
This indicator displays the instrument’s ticker symbol and the current chart timeframe at the top center of the chart.
Features:
• Shows the ticker (e.g., BTCUSDT, AAPL, etc.).
• Displays the current timeframe (1m, 5m, 1H, 1D, etc.).
• Positioned at the top center of the chart for easy reference.
• Transparent background for minimal interference with price action.
• Lightweight and simple, no extra settings required.
Usage:
• Works with any instrument: stocks, crypto, futures.
• Useful for traders who want to always see the ticker and timeframe while analyzing the chart.
Settings:
• Text size can be adjusted in the script (text_size).
• Text and background colors can be customized (text_color, bgcolor).
LANZ Origins🔷 LANZ Origins – Multi-Framework Liquidity, Structure & Risk Management Overlay
LANZ Origins is an advanced multi-framework visualization toolkit that unifies key institutional concepts into one efficient interface. Designed for professional traders, it merges session mapping, liquidity analysis, imbalance detection, multi-account risk control, and higher-timeframe candle tracing — all in a single overlay.
🧩 Core Components
🈵 Asian Range Liquidity
Automatically detects and projects the Asian session range (19:00–02:00 NY) with an optional mid-price line (50 %). This provides visual context for intraday liquidity and manipulation zones commonly referenced in ICT-style analysis.
📊 Imbalance Detector
Highlights Fair Value Gaps (FVG), Opening Gaps (OG), and Volume Imbalances (VI) directly on-chart, using separate color schemes for bullish and bearish inefficiencies. Each element can be customized by width, ATR filter, and extension length.
🕯️ Higher-Timeframe Candles (ICT Style)
Displays multi-timeframe candles (HTF1–HTF6) simultaneously — e.g., 5 m, 30 m, 1 h, 4 h, 1 D, 1 W — each rendered with independent wick, border, and fill settings. Includes remaining-time counters, timeframe labels, and optional imbalance shading between bodies.
📈 Market Structure (ZigZag 30 m)
Replicates 30-minute swing structure to all active timeframes, producing dynamic pivots with live extension. Ideal for contextualizing BOS/CHoCH events across multiple scales.
💸 Multi-Account Lot Size Panel
Calculates position size for up to five accounts simultaneously, using your defined capital, risk %, and fixed SL distance (in pips). Results appear in a clean table at the bottom-right corner of the chart.
🎨 Session Visualization
Colored backgrounds mark key trading phases:
🟢 Day division
🔴 No-action zone
🔵 Kill-zone
🟡 Hold session
⚙️ Customization & Performance
Every module can be toggled individually, with full color, opacity, and style control. The script is optimized for overlay use and supports up to 500 boxes, lines, and labels with efficient resource handling.
🧠 Best Use Case
LANZ Origins is ideal for traders who follow:
Smart Money Concepts / ICT methodology
Liquidity & Imbalance-based trading
Multi-timeframe confluence setups
Risk-based position sizing workflows
Use it to observe how price interacts with liquidity pools, higher-timeframe candles, and imbalances within key sessions — while monitoring lot size risk in real time.
📌 Recommended Setup
Timeframes: 30m - 5m – 3m
Pairs: FX
Session Timezone: New York (EST/EDT)
Combine with: LANZ Strategy series for execution and journaling
💬 Note
This indicator does not generate buy/sell signals. It’s a visual and analytical tool built to support your own decision-making process.