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.
Trend Analizi
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.
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
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.
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.”
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.
NY Session Divisions⭐NY Session Divisions - Professional Trading Session Manager
NY Session Divisions is an advanced trading indicator that professionally segments the New York trading day into precise sessions, providing institutional-grade market structure analysis with smart breakout detection and comprehensive filtering systems.
✨ KEY FEATURES
🕒 8 Professional Trading Sessions
- US Overnight Range (03:30-11:50)
- NY Pre-Open (16:45-17:00)
- NY First Session ORB (17:00-17:15)
- Premarket Range - Recommended by Mahdi Salari*
- NY Midday Range
- NY 2nd Pre-Open
- 2nd Session ORB
- US After Hours ORB
🎯 Advanced Trading Strategies
- School Run Strategy (SRS) by Tom Hougaard - Breakout-focused approach
- Anti-SRS Strategy - Range-trading methodology
- Dual Strategy System - Combine breakout and range trading for maximum flexibility
🔔 Smart Alert System
- Multi-timeframe confirmation
- Heiken Ashi candle validation
- Customizable alert conditions
- Sound notifications with detailed messages
- Post-close confirmation to avoid false signals
🛡️ Professional Filter Stack
- Ichimoku Baseline
- Divergence Detection - Advanced market analysis
- EMA 200 Filter - Trend alignment
- Ichimoku Baseline - Market structure
- ATR Filter - Volatility validation
- RSI Filter - Momentum confirmation
🎨 Advanced Visualization
- Clean session range displays
- Professional Heiken Ashi candles
- Smart breakout markers (Small/Tiny for signal strength)
- Take Profit lines with ATR-based calculations
- Customizable colors and opacity
🏆 WHY TRADERS LOVE THIS INDICATOR
✅ For Breakout Traders
- Precise session boundary detection
- Clean breakout signals with confirmation
- Multiple filter validation
✅ For Range Traders
- Clear session range identification
- Anti-SRS strategy for range-bound markets
- Support/Resistance level tracking
✅ For Professional Traders
- Institutional-grade session management
- Comprehensive filtering system
- Multi-timeframe analysis
- Customizable risk management
⚡ QUICK START GUIDE
Basic Setup (2 Minutes)
1. Enable Sessions** - Choose 1-2 sessions to start
2. Set Alerts - Configure your preferred notification method
3. Apply Filters - Enable EMA 200 and Ichimoku for starters
Advanced Configuration
- Combine SRS + Anti-SRS for comprehensive strategy
- Use multiple divergence filters for confirmation
- Customize TP lines based on your risk profile
- Drawing 1st and 2nd Session Close lines
PROFESSIONAL TIPS
Session Selection Strategy
- Start with Session 1 (US Overnight) for overall market trend identification
- Add Session 3 (NY First ORB) for opening momentum
- Use Session 4 (Premarket) for the best perfomance of the breakout strategy
Filter Optimization
- Conservative : EMA 200 + Ichimoku Baseline
- Balanced : Add ATR filter for volatility check 0.8 is enough
- Aggressive : Enable all filters for maximum confirmation but the number of signal and performance will decrease
Risk Management
- Use TP lines for automatic profit targets
- Combine with proper position sizing
- Always use stop losses
🔧 TECHNICAL SPECIFICATIONS
- Platform : TradingView Pine Script v6
- Markets : All US trading instruments (ES, NQ, YM, CL, etc.)
- Timeframes : 1min to Daily
- Auto DST Handling : Yes
- Real-time Processing : Yes
📊 PERFORMANCE FEATURES
- Zero Repaint - All signals confirmed after candle close
- Multi-Timeframe - Works across all chart timeframes
- Resource Optimized - Efficient calculation methods
- User Customizable - Complete control over all parameters
- Consistent Performance - Reliable session-based signals
- Professional Grade - Institutional-level analysis tools
- Continuous Updates - Regular improvements and enhancements
- Community Supported - Active user community and support
🔄 KEEP UPDATED
Click the Favorite Star ⭐ to receive update notifications and stay current with new features and improvements!
Professional traders don't guess - they analyze. NY Session Divisions gives you the analytical edge.
Happy Trading! 📈
Created with precision for serious traders
DISCLAIMER
This indicator is for educational and informational purposes only. It should not be considered as financial advice. Always practice proper risk management and test strategies in demo accounts before live trading. Past performance does not guarantee future results.
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.
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!
Trend Pivot Retracements [TradeEasy]▶ OVERVIEW
Trend Pivot Retracements identifies market trend direction using a Donchian-style channel and dynamically highlights retracement zones during trending conditions. It calculates the percentage pullbacks from recent highs and lows, plots labeled zones with varying intensity, and visually connects key retracement pivots. The indicator also emphasizes price proximity to trend boundaries by dynamically adjusting the thickness of plotted trend bands.
▶ TREND DETECTION & BAND STRUCTURE
The indicator determines the current trend by checking for new 50-bar extremes:
Uptrend: If a new highest high is made, the trend is considered bullish.
Downtrend: If a new lowest low is made, the trend is considered bearish.
Uptrend Band: Plots the 50-bar lowest low as a trailing support level.
Downtrend Band: Plots the 50-bar highest high as a trailing resistance level.
Thickness Variation: The thickness of the band increases the further price moves from it, indicating overextension.
▶ RETRACEMENT LABELING SYSTEM
During a trend, the indicator monitors pivot points in the opposite direction to measure retracements:
Bullish Retracement:
Triggered when a pivot low forms during an uptrend.
Measures % pullback from the most recent swing high (searched up to 20 bars back).
Plots a bold horizontal line at the low and a dashed diagonal from the previous swing high.
Adds a “-%” label above the low; intensity is based on recent 50 pullbacks.
Bearish Retracement:
Triggered when a pivot high forms during a downtrend.
Measures % pullback from the previous swing low (up to 20 bars back).
Plots a bold horizontal line at the high and a dashed diagonal from the prior swing low.
Adds a “%” label below the high with gradient color based on the past 50 extremes.
▶ PIVOT CONNECTION LINES
Each retracement includes a visual connector:
A diagonal dashed line linking the swing extreme (20 bars back) to the retracement point.
This line visually traces the path of price retreat within the trend.
Helps traders understand where the retracement originated and how steep it was.
▶ TREND SWITCH SIGNALS
When trend direction changes:
A diamond marker is plotted on the new pivot confirming the trend shift.
Green diamonds signal new bullish trends at fresh lows.
Magenta diamonds signal new bearish trends at fresh highs.
▶ COLOR INTENSITY & CONTEXTUAL AWARENESS
To help interpret the magnitude of retracements:
The % labels are color-coded using a gradient scale that references the max of the last 50 pullbacks.
Stronger pullbacks result in deeper color intensity, signaling more significant corrections.
Trend bands also use standard deviation normalization to adjust line thickness based on how far price has moved from the band.
This creates a visual cue for potential exhaustion or volatility extremes.
▶ USAGE
Trend Pivot Retracements is a powerful tool for traders who want to:
Identify trend direction and contextual pullbacks within those trends.
Spot key retracement points that may serve as entry opportunities or reversal signals.
Use visual retracement angles to understand market pressure and trend maturity.
Read dynamic band thickness as an alert for price stretch, potential mean reversion, or breakout setups.
▶ CONCLUSION
Trend Pivot Retracements gives traders a clean, visually expressive way to monitor trending markets, while capturing and labeling meaningful retracements. With adaptive color intensity, diagonal connectors, and smart trend switching, it enhances situational awareness and provides immediate clarity on trend health and pullback strength.
💪 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.
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.
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.
HTF Candles with PVSRA Volume Coloring (PCS Series)This indicator displays higher timeframe (HTF) candles using a PVSRA-inspired color model that blends price and volume strength, allowing traders to visualize higher-timeframe activity directly on lower-timeframe charts without switching screens.
OVERVIEW
This script visualizes higher-timeframe (HTF) candles directly on lower-timeframe charts using a custom PVSRA (Price, Volume & Support/Resistance Analysis) color model.
Unlike standard HTF indicators, it aggregates real-time OHLC and volume data bar-by-bar and dynamically draws synthetic HTF candles that update as the higher-timeframe bar evolves.
This allows traders to interpret momentum, trend continuation, and volume pressure from broader market structures without switching charts.
INTEGRATION LOGIC
This script merges higher-timeframe candle projection with PVSRA volume analysis to provide a single, multi-timeframe momentum view.
The HTF structure reveals directional context, while PVSRA coloring exposes the underlying strength of buying and selling pressure.
By combining both, traders can see when a higher-timeframe candle is building with strong or weak volume, enabling more informed intraday decisions than either tool could offer alone.
HOW IT WORKS
Aggregates price data : Groups lower-timeframe bars to calculate higher-timeframe Open, High, Low, Close, and total Volume.
Applies PVSRA logic : Compares each HTF candle’s volume to the average of the last 10 bars:
• >200% of average = strong activity
• >150% of average = moderate activity
• ≤150% = normal activity
Assigns colors :
• Green/Blue = bullish high-volume
• Red/Fuchsia = bearish high-volume
• White/Gray = neutral or low-volume moves
Draws dynamic outlines : Outlines update live while the current HTF candle is forming.
Supports symbol override : Calculations can use another instrument for correlation analysis.
This multi-timeframe aggregation avoids repainting issues in request.security() and ensures accurate real-time HTF representation.
FEATURES
Dual HTF Display : Visualize two higher timeframes simultaneously (e.g., 4H and 1D).
Dynamic PVSRA Coloring : Volume-weighted candle colors reveal bullish or bearish dominance.
Customizable Layout : Adjust candle width, spacing, offset, and color schemes.
Candle Outlines : Highlight the forming HTF candle to monitor developing structure.
Symbol Override : Display HTF candles from another instrument for cross-analysis.
SETTINGS
HTF 1 & HTF 2 : enable/disable, set timeframes, choose label colors, show/hide outlines.
Number of Candles : choose how many HTF candles to plot (1–10).
Offset Position : distance to the right of the current price where HTF candles begin.
Spacing & Width : adjust separation and scaling of candle groups.
Show Wicks/Borders : toggle wick and border visibility.
PVSRA Colors : enable or disable volume-based coloring.
Symbol Override : use a secondary ticker for HTF data if desired.
USAGE TIPS
Set the indicator’s visual order to “Bring to front.”
Always choose HTFs higher than your active chart timeframe.
Use PVSRA colors to identify strong momentum and potential reversals.
Adjust candle spacing and width for your chart layout.
Outlines are not shown on chart timeframes below 5 minutes.
TRADING STRATEGY
Strategy Overview : Combine HTF structure and PVSRA volume signals to
• Identify zones of high institutional activity and potential reversals.
• Wait for confirmation through consolidation or a pullback to key levels.
• Trade in alignment with dominant higher-timeframe structure rather than chasing volatility.
Setup :
• Chart timeframe: lower (5m, 15m, 1H)
• HTF 1: 4H or 1D
• HTF 2: 1D or 1W
• PVSRA Colors: enabled
• Outlines: enabled
Entry Concept :
High-volume candles (green or red) often indicate market-maker activity , such zones often reflect liquidity absorption by larger players and are not necessarily ideal entry points.
Wait for the next consolidation or pullback toward a support or resistance level before acting.
Bullish scenario :
• After a high-volume or rejection candle near a low, price consolidates and forms a higher low.
• Enter long only when structure confirms strength above support.
Bearish scenario :
• After a high-volume or rejection candle near a top, price consolidates and forms a lower high.
• Enter short once resistance holds and momentum weakens.
Exit Guidelines :
• Exit when next HTF candle shifts in color or momentum fades.
• Exit if price structure breaks opposite to your trade direction.
• Always use stop-loss and take-profit levels.
Additional Tips :
• Never enter directly on strong green/red high-volume candles, these are usually areas of institutional absorption.
• Wait for market structure confirmation and volume normalization.
• Combine with RSI, moving averages, or support/resistance for timing.
• Avoid trading when HTF candles are mixed or low-volume (unclear bias).
• Outlines hidden below 5m charts.
Risk Management :
• Use stop-loss and take-profit on all positions.
• Limit risk to 1–2% per trade.
• Adjust position size for volatility.
FINAL NOTES
This script helps traders synchronize lower-timeframe execution with higher-timeframe momentum and volume dynamics.
Test it on demo before live use, and adjust settings to fit your trading style.
DISCLAIMER
This script is for educational purposes only and does not constitute financial advice.
SUPPORT & UPDATES
Future improvements may include alert conditions and additional visualization modes. Feedback is welcome in the comments section.
CREDITS & LICENSE
Created by @seoco — open source for community learning.
Licensed under Mozilla Public License 2.0 .
Constant Auto Trendlines (Extended Right)📈 Constant Auto Trendlines (Extended Right)
This indicator automatically detects market structure by connecting swing highs and lows with permanent, forward-projecting trendlines.
Unlike standard trendline tools that stop at the last pivot, this version extends each trendline infinitely into the future — helping traders visualize where price may react next.
🔍 How It Works
The script identifies pivot highs and lows using user-defined left/right bar counts.
When a new lower high or higher low appears, the indicator draws a line between the two pivots and extends it forward using extend.right.
Each new confirmed trendline stays fixed, creating a historical map of structure that evolves naturally with market action.
Optional filters:
Min Slope – ignore nearly flat trendlines
Show Latest Only – focus on the most relevant trendline
Alerts – get notified when price crosses the most recent uptrend or downtrend line
🧩 Why It’s Useful
This tool helps traders:
Spot emerging trends early
Identify dynamic support/resistance diagonals
Avoid redrawing trendlines manually
Backtest structure breaks historically
⚙️ Inputs
Pivot Left / Right bars
Min slope threshold
Line color, width, and style
Show only latest line toggle
Alert options
Market Trend and Squeeze Indicator MTF - Optimized v31. Overview
This indicator is designed to identify market trends and consolidation phases using a combination of:
ADX (Average Directional Index) → Measures trend strength.
Keltner Channels (KC) → Helps identify trend channels.
Bollinger Bands (BB) → Measures volatility and price squeeze.
Squeeze Momentum → Determines when the market is “coiling” for a breakout.
Multi-Timeframe Analysis (MTF) → Shows these signals across different timeframes in one table.
Essentially, it tells you whether the market is trending up, trending down, consolidating, or neutral, while also giving a squeeze strength index.
2. Key Components
A. ADX (Trend Strength)
Trending Up / Down: ADX above the trending threshold (default 25).
Consolidating: ADX below the consolidation threshold (default 20).
This helps filter strong trends from weak or sideways markets.
B. Keltner Channels & Bollinger Bands (Squeeze Detection)
Keltner Channels (KC): Shows the average price range using ATR (volatility).
Bollinger Bands (BB): Shows volatility using standard deviation.
Squeeze condition: When BB is inside KC, the market is in a low-volatility consolidation phase, often leading to a breakout.
C. Squeeze Momentum
Measures whether the market is building upward or downward momentum during a squeeze.
Green/blueish colors indicate a strong potential upward breakout, while reddish/pinkish colors indicate potential downward breakout.
D. Multi-Timeframe Table
Shows trend and squeeze status across multiple timeframes (1M, 3M, 5M, 15M, 30M, 1H by default).
Helps traders see both short-term and longer-term trends at a glance.
E. Squeeze Gauge
Displays a 10-point squeeze index for the current timeframe:
Higher value = stronger squeeze.
Colored gradient shows the squeeze strength visually.
3. How to Read the Indicator
A. Trend & Squeeze Table
Each row represents a timeframe.
Cell colors:
Green → Trending Up
Red → Trending Down
Blue/Purple Gradient → Consolidating (squeeze)
Gray → Neutral
Numbers in cells:
Trending → Trend strength (1–10)
Consolidating → Squeeze index (1–10)
This lets you quickly see:
Which timeframes are trending
Which are in consolidation
The relative strength of trends or squeeze
B. Chart Plots
Keltner Channels (green/red lines) → Trend envelopes
Bollinger Bands (purple) → Volatility envelopes
White dots → Market is currently in a squeeze
ADX reference lines → Trend vs consolidation thresholds
C. Alerts
Alerts are triggered when:
Market starts trending (up or down)
Market starts consolidating
4. How Traders Can Use It
Trend Following
Enter trades in the direction of the trend:
Green table → buy / long
Red table → sell / short
Use trend strength numbers to confirm trend strength.
Breakout Strategy
When the squeeze (blue/purple) appears:
Watch for a breakout above/below KC or BB
Use momentum to anticipate direction (green = up, red = down)
Multi-Timeframe Confirmation
Only take trades when multiple timeframes align:
Example: 15M, 30M, and 1H all trending up → stronger buy signal
Mixed signals → avoid trading (market may be choppy)
Risk Management
Use KC or BB levels for stop-loss and target placement
ADX thresholds help avoid entering weak trends
5. Settings Traders Can Adjust
Setting Default Use
ADX Length 14 How sensitive trend detection is
ADX Trend Threshold 25 Minimum ADX for trend recognition
ADX Consolidation Threshold 20 Maximum ADX for considering consolidation
KC Length / Multiplier 20 / 1.5 Adjust channel sensitivity
BB Length / Multiplier 20 / 2 Adjust volatility detection
Squeeze Length 20 Number of bars for squeeze calculation
Table / Gauge Position Top Right / Bottom Right Place tables anywhere on chart
6. Summary
Green → Strong upward trend
Red → Strong downward trend
Blue/Purple → Consolidation / Squeeze
Gray → Neutral / weak movement
Squeeze Index → Measures how compressed price action is (1–10)
Multi-timeframe table → Quickly see trends and squeezes across all timeframes
This indicator is perfect for trend-followers and breakout traders who want visual clarity across multiple timeframes in one glance.
3 Lines RCI + Psy Signal (固定ゾーン色)3 Lines RCI + Psy Signal (Fixed Zone Color) Indicator Description
Overview
This indicator displays three RCIs (Rank Correlation Index) along with a Psychological (Psy) signal.
It highlights overbought and oversold zones for the RCI with fixed colors, while the Psy indicator visually shows overbought and oversold conditions using a histogram.
Features
Three RCI Lines
Short-term (9 periods), mid-term (26 periods), and long-term (52 periods) RCIs are plotted.
Overbought/oversold lines at ±80 and a zero line are displayed.
Overheat zones are color-filled (+80 to +100 in red, -80 to -100 in green).
Psychological Signal
Calculates the ratio of consecutive price increases/decreases over a specified period (default 12).
Displays a histogram when overbought or oversold conditions occur.
Color coding:
Red: Overbought
Green: Oversold
Fixed Zone Display
Highlights the RCI overheat zones on the chart with color-filled areas.
Zone range: ±80 to ±100.
Input Parameters
Parameter Description Default
Short-term RCI Period for short-term RCI 9
Mid-term RCI Period for mid-term RCI 26
Long-term RCI Period for long-term RCI 52
Psy Period Period used for Psy calculation 12
Psy Overbought Threshold for overbought Psy 75
Psy Oversold Threshold for oversold Psy 25
RCI Overheat Line Threshold for RCI overheat zone 80
Notes
Psy calculation compares each bar with the previous bar.
The RCI function is calculated on every bar, which may slow down chart rendering if many bars are displayed.
The Psy histogram only appears when overbought or oversold conditions are met; otherwise, it is hidden (na).
How to Use
RCI Lines: Use to identify trend direction and overbought/oversold conditions.
Psy Histogram: Helps detect short-term reversal signals.
Zone Colors: Provides a visual reference for overheat areas.
Session Liquidity check for ICT mention session Low/High and according help in planing next liquidity interest.
AUTOMATIC ANALYSIS MODULE🧭 Overview
“Automatic Analysis Module” is a professional, multi-indicator system that interprets market conditions in real time using TSI, RSI, and ATR metrics.
It automatically detects trend reversals, volatility compressions, and momentum exhaustion, helping traders identify high-probability setups without manual analysis.
⚙️ Core Logic
The script continuously evaluates:
TSI (True Strength Index) → trend direction, strength, and early reversal zones.
RSI (Relative Strength Index) → momentum extremes and technical divergences.
ATR (Average True Range) → volatility expansion or compression phases.
Multi-timeframe ATR comparison → detects whether the weekly structure supports or contradicts the local move.
The system combines these signals to produce an automatic interpretation displayed directly on the chart.
📊 Interpretation Table
At every new bar close, the indicator updates a compact dashboard (bottom right corner) showing:
🔵 Main interpretation → trend, reversal, exhaustion, or trap scenario.
🟢 Micro ATR context → volatility check and flow analysis (stable / expanding / contracting).
Each condition is expressed in plain English for quick decision-making — ideal for professional traders who manage multiple charts.
📈 How to Use
1️⃣ Load the indicator on your preferred asset and timeframe (recommended: Daily or 4H).
2️⃣ Watch the blue line message for the main trend interpretation.
3️⃣ Use the green line message as a volatility gauge before entering.
4️⃣ Confirm entries with your own strategy or price structure.
Typical examples:
“Possible bullish reversal” → early accumulation signal.
“Compression phase → wait for breakout” → avoid premature trades.
“Confirmed uptrend” → trend continuation zone.
⚡ Key Features
Real-time auto-interpretation of TSI/RSI/ATR signals.
Detects both bull/bear traps and trend exhaustion zones.
Highlights volatility transitions before breakouts occur.
Works across all assets and timeframes.
No repainting — stable on historical data.
✅ Ideal For
Swing traders, position traders, and institutional analysts who want automated context recognition instead of manual indicator reading.
FDF — EMAs+VWAP with setup & entry (stable scale)- stable lineWe have the 9,21 vwap
stable lines
channel candle signal
Trend Following Reflectometry🧭 Trend Following Reflectometry (TFR)
Author: Stef Jonker
Version: Pine Script® v6
The Trend Following Reflectometry (TFR) indicator translates market behavior into the language of impedance and signal reflection theory, providing a unique way to measure trend strength, stability, and purity.
🧩 Summary
Trend Following Reflectometry acts as a trend-quality meter, helping traders identify when a trend is strong, efficient, and worth following — or when the market is too noisy to trust.
It blends physics-inspired logic with practical trading insight, offering both a directional oscillator and a trend stability filter in one tool.
⚙️ Concept
Inspired by electrical impedance matching, this tool compares the market’s characteristic impedance (Z₀) — its natural volatility-to-price behavior — with the load impedance (Zₗ), representing current trend momentum.
The interaction between these two produces a reflection coefficient (Gamma) and a VSWR ratio, which reveal how efficiently market trends are transmitting energy (moving smoothly) versus reflecting noise (becoming unstable).
📊 Core Components
Z₀ (Characteristic Impedance): Market baseline, derived from ATR and SMA.
Zₗ (Load Impedance): Trend momentum based on fast and slow EMAs.
Γ (Gamma – Reflection Coefficient): Measures the mismatch between Z₀ and Zₗ.
VSWR (Voltage Standing Wave Ratio): Quantifies trend purity — lower = cleaner trend.
Impedance Oscillator: Combines momentum and reflection to produce directional bias.
⚡ Gamma & VSWR Interpretation
Gamma (Γ) represents the reflection coefficient — how much of the market’s trend energy is being reflected instead of transmitted.
When Gamma is low, the market trend is smooth and efficient, moving with little resistance.
When Gamma is high, the market becomes unstable or overextended, signaling potential turbulence, exhaustion, or reversal pressure.
VSWR (Voltage Standing Wave Ratio) measures trend purity — how clean or distorted the current trend is.
A low VSWR indicates a well-aligned, steady trend that’s likely to continue smoothly.
A high VSWR suggests an unbalanced or noisy market, where trends may struggle to sustain or could soon reverse.
Together, Gamma and VSWR help identify how well the market’s current momentum aligns with its natural behavior — whether the trend is stable and efficient or reflecting instability beneath the surface.
Calm Bands — 2012-2024🟢 Green (Calm State): Stable conditions — active ~70% of trading days
Green periods identify when markets are in historically stable conditions