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.
Indicatori e strategie
Order Flow Bubbles -Volume-CORINDDisplays “Order Flow Bubbles” on a TradingView chart — highlighting candles with unusually high volume or delta (buy/sell imbalance).
The bubbles show numeric values (volume, delta, etc.) above or below candles.
⚙️ Main Features
Detects Volume or Delta Spikes:
Compares each bar’s value to a moving average. If it’s much higher (a “spike”), it plots a bubble.
Buy vs Sell Detection:
Green bubbles → high buying activity.
Red bubbles → high selling activity.
Dynamic Bubble Placement:
Uses candle range and ATR so bubbles move naturally with chart zooming and scaling.
Black Text Inside Bubble:
Clear and bold-style numbers inside each bubble for easy reading.
Optional Faux-Bold Text:
Adds extra invisible text layers to make text appear bolder without breaking TradingView limits.
Tooltip Info:
Hovering a bubble shows details — volume, ratio, delta, buy/sell volume, and price.
Delta Line (Optional):
Option to plot the delta as a line below chart for reference.
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.
CQ_(0)_Essential Indicators [BITCOIN HOY]Essential indicators (BitcoinHoy)
A Comprehensive TradingView Indicator for Crypto Traders and Analysts
Introduction
The Essential indicators (BitcoinHoy) is a versatile TradingView indicator designed to streamline and enrich the trading experience for cryptocurrency traders and analysts. Developed as a practical complement to popular Fibonacci-based range tools, this indicator brings together manual input capabilities and a curated suite of proven Pine Script tools, providing users with a robust, all-in-one solution for technical analysis.
Complementary Indicators
Essential indicators (BitcoinHoy) is specifically crafted to work alongside the Fibonacci IntraDay Range, Fibonacci IntraWeek Range, and Fibonacci IntraMonth Range tools. By integrating with these established indicators, it enhances multi-timeframe analysis, allowing traders to visualize and act upon key price levels within daily, weekly, and monthly contexts. This synergy helps users refine their strategies and better anticipate market movements.
Manual Input Features
A standout feature of Essential indicators (BitcoinHoy) is its support for manual input of both mid and long-term price targets. Users can easily enter their own key levels, including potential entries and target prices, directly on the chart. Additionally, the indicator enables the marking of specific entry events and target events, offering a clear historical and forward-looking view of trading plans and outcomes. This manual flexibility empowers traders to adapt their analysis to evolving market conditions and personal strategies.
Integrated Indicators
To further enhance its utility, Essential indicators (BitcoinHoy) integrates a selection of carefully chosen indicators authored by respected members of the Pine Script community. Each tool adds unique analytical power, covering various aspects of price action, trend identification, and market structure.
Candles in a Row: Sequence Visualization
Based on Zeiierman's popular "Candles in a Row," this feature counts and displays consecutive green (bullish) and red (bearish) candles on the chart. By visualizing these sequences, traders can quickly identify streaks of buying or selling pressure, spot potential exhaustion points, and time entries or exits more effectively. This clarity is especially valuable in volatile crypto markets, where momentum shifts can be rapid and impactful.
Trend Range Detector: Range and Breakout Identification
Also from Zeiierman, the "Trend Range Detector" module identifies and highlights price ranges, signaling periods of consolidation or equilibrium. When price action breaks out of these defined ranges, the indicator draws attention to these events, helping traders recognize emerging trends and potential trade opportunities. This detection capability supports both range-bound and breakout trading strategies.
Fibonacci Retracement Neo: Key Level Progress Tracking
Incorporating .srb's "Fibonacci Retracement Neo," Essential indicators (BitcoinHoy) displays a dynamic progress gauge, showing how far price has moved through significant Fibonacci retracement levels. The indicator also marks entry events at these key levels, providing actionable signals for traders who rely on Fibonacci-based strategies. This visual feedback aids in tracking price reactions at important support and resistance zones.
ZigZag Trend Metrics Delta: Pivot Analysis
Leveraging Fract's "ZigZag Trend Metrics Delta," this component identifies and annotates major price pivots, offering insight into the broader trend structure. By highlighting significant swing highs and lows, the indicator helps users spot trend reversals, continuation patterns, and optimal points for entry or exit. This information is crucial for analyzing market cycles and refining risk management.
Conclusion
Essential indicators (BitcoinHoy) provides a holistic and user-friendly solution for crypto traders and analysts seeking to enhance their technical analysis on TradingView. By combining the flexibility of manual input with a suite of trusted Pine Script indicators, it enables users to monitor price action, track key events, and respond proactively to market developments. Whether used alone or in conjunction with Fibonacci range tools, Essential indicators (BitcoinHoy) supports informed decision-making and improved trading outcomes
Asia Session Mechanical Entry by AleThis indicator executes fully mechanical trades at the start of the Asian session (default: 20:00 Argentina time).
Core logic:
Compares the closing prices of the previous two sessions at 20:00 and 09:00 to determine bias.
If both days move in the same direction, the indicator takes a mean-reversion trade (opposite to the last two days’ move).
If the days move in opposite directions, the trade follows the most recent day’s direction.
Execution details:
Entry price: exact session open or delayed by a user-defined number of candles.
Stop Loss: nearest swing high/low ± ATR multiplier buffer.
Take Profit: calculated from entry to SL distance, multiplied by user-defined RR ratio.
ATR value plotted for volatility reference.
Works on H1 charts for consistent candle timing.
Features:
Adjustable start/end session times.
Configurable ATR multiplier, RR ratio, and delay before entry.
Manual overrides for SL/TP levels.
Automatic daily reset for next session's logic.
Notes:
This tool is based on a classic session-reversion model enhanced with ATR-based filters, flexible timing, and manual overrides. It is designed for systematic execution and quick visual backtesting.
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.
CQ_(0)_Essential Indicators [BITCOIN HOY]Essential indicators (BitcoinHoy)
A Comprehensive TradingView Indicator for Crypto Traders and Analysts
Introduction
The Essential indicators (BitcoinHoy) is a versatile TradingView indicator designed to streamline and enrich the trading experience for cryptocurrency traders and analysts. Developed as a practical complement to popular Fibonacci-based range tools, this indicator brings together manual input capabilities and a curated suite of proven Pine Script tools, providing users with a robust, all-in-one solution for technical analysis.
Complementary Indicators
Essential indicators (BitcoinHoy) is specifically crafted to work alongside the Fibonacci IntraDay Range, Fibonacci IntraWeek Range, and Fibonacci IntraMonth Range tools. By integrating with these established indicators, it enhances multi-timeframe analysis, allowing traders to visualize and act upon key price levels within daily, weekly, and monthly contexts. This synergy helps users refine their strategies and better anticipate market movements.
Manual Input Features
A standout feature of Essential indicators (BitcoinHoy) is its support for manual input of both mid and long-term price targets. Users can easily enter their own key levels, including potential entries and target prices, directly on the chart. Additionally, the indicator enables the marking of specific entry events and target events, offering a clear historical and forward-looking view of trading plans and outcomes. This manual flexibility empowers traders to adapt their analysis to evolving market conditions and personal strategies.
Integrated Indicators
To further enhance its utility, Essential indicators (BitcoinHoy) integrates a selection of carefully chosen indicators authored by respected members of the Pine Script community. Each tool adds unique analytical power, covering various aspects of price action, trend identification, and market structure.
Candles in a Row: Sequence Visualization
Based on Zeiierman's popular "Candles in a Row," this feature counts and displays consecutive green (bullish) and red (bearish) candles on the chart. By visualizing these sequences, traders can quickly identify streaks of buying or selling pressure, spot potential exhaustion points, and time entries or exits more effectively. This clarity is especially valuable in volatile crypto markets, where momentum shifts can be rapid and impactful.
Trend Range Detector: Range and Breakout Identification
Also from Zeiierman, the "Trend Range Detector" module identifies and highlights price ranges, signaling periods of consolidation or equilibrium. When price action breaks out of these defined ranges, the indicator draws attention to these events, helping traders recognize emerging trends and potential trade opportunities. This detection capability supports both range-bound and breakout trading strategies.
Fibonacci Retracement Neo: Key Level Progress Tracking
Incorporating .srb's "Fibonacci Retracement Neo," Essential indicators (BitcoinHoy) displays a dynamic progress gauge, showing how far price has moved through significant Fibonacci retracement levels. The indicator also marks entry events at these key levels, providing actionable signals for traders who rely on Fibonacci-based strategies. This visual feedback aids in tracking price reactions at important support and resistance zones.
ZigZag Trend Metrics Delta: Pivot Analysis
Leveraging Fract's "ZigZag Trend Metrics Delta," this component identifies and annotates major price pivots, offering insight into the broader trend structure. By highlighting significant swing highs and lows, the indicator helps users spot trend reversals, continuation patterns, and optimal points for entry or exit. This information is crucial for analyzing market cycles and refining risk management.
Conclusion
Essential indicators (BitcoinHoy) provides a holistic and user-friendly solution for crypto traders and analysts seeking to enhance their technical analysis on TradingView. By combining the flexibility of manual input with a suite of trusted Pine Script indicators, it enables users to monitor price action, track key events, and respond proactively to market developments. Whether used alone or in conjunction with Fibonacci range tools, Essential indicators (BitcoinHoy) supports informed decision-making and improved trading outcomes
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 .
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.
OTS Confirmation (RSI + Thrust)# OTS Confirmation Panel – Operator Guide
This guide covers `apps/tradingview/pine/panel_ots_confirmation.pine`, the companion
panel for the OTS Trend Suite. It explains how to deploy the script, decode every visual
layer, tune the inputs for different markets, and wire alerts for automated workflows.
Use this doc when onboarding new analysts, preparing TradingView alerts, or logging QA
runs in `docs/qa/`.
---
## 1. Add the Panel to a Chart
1. In TradingView open **Pine Editor**, paste the contents of
`apps/tradingview/pine/panel_ots_confirmation.pine`, and click **Add to chart**.
2. The script renders as a non-overlay panel. Keep the default settings for a full
session to let the auto-calibration warm up.
3. Pair it with `overlay_ots_trend.pine` on the main chart. The panel acts as a momentum
confirmation layer for OTS structure calls.
4. Save your TradingView template so inputs reload automatically.
---
## 2. What the Panel Shows
| Layer | Engine | Interpretation | Typical Use |
| --- | --- | --- | --- |
| **RSI stack** (gray/orange/blue) | RSI(21/14/7) | Gray = slow regime, orange = baseline, blue = fast | Gauge momentum alignment; look for spreads between lines. |
| **RSI crosses** (“RSI↑” / “RSI↓”) | `ta.crossover` / `ta.crossunder` of RSI(14) against fast/slow envelopes | Momentum shifts inside larger structure | Pair with thrust color to time entries/exits. |
| **Divergence dots** (“Div↑” / “Div↓”) | Price vs RSI(14) over `look=20` bars | Early warning for exhaustion | Treat as heads-up; wait for thrust/RSI confirmation. |
| **Thrust columns** | Robust z-score of ATR-normalized price change × volume factor | Colored buckets flag institutional-like pressure | Immediate confirmation of impulsive moves. |
---
## 3. Input Reference
### 3.1 Momentum Stack
- `Source` – price series feeding the RSI trio (default `close`).
- `RSI Fast/Normal/Slow` – lookbacks for the fast (7), baseline (14), and slow (21)
curves. Keep the 3:2:1 ratio unless you have a strong reason to change it.
- `Show simple divergences` – toggles the divergence markers.
### 3.2 Thrust Engine
- `Thrust lookback (z-score)` – rolling window for the robust median/MAD statistics.
Smaller values react faster but can flicker in noisy tape.
- `Price ROC length` – horizon for price change (1 = bar-to-bar impulse).
- `Volume SMA for norm` – smooths volume before computing the relative weight.
### 3.3 Session Gating
- `Use RTH only (09:30–16:00 ET)` – restrict thrust calculations to the defined session.
- `RTH Session (exchange time)` – session string; defaults to U.S. equity hours.
- Under the hood the script uses `time()` to check whether the current bar belongs to the
session. Outside the session the thrust column paints blue and quantile buffers pause.
### 3.4 Auto Buckets
- `Auto thrust buckets (quantiles)` – enables rolling quantile calibration.
- `Auto bucket window` – sample length for quantiles (default 180 bars).
- `Green quantile (auto)` / `Orange quantile (auto)` – percentile thresholds that define
“meaningful” vs “extreme” thrust. Lower green or higher orange to tighten filters.
---
## 4. Thrust Computation Cheat Sheet
1. Compute ATR-normalized price move: `move = change(close, rocLen) / atr(14)`.
2. Scale by the square root of relative volume: `volNorm = volume / sma(volume, volSmaL)`.
3. Multiply: `raw = move * sqrt(volNorm)` to emphasize high-volume impulses.
4. Stabilize with robust statistics: subtract the rolling median and divide by MAD
(scaled by 1.4826 to map to σ).
5. Gate by session. If `Use RTH` is true, values outside the session revert to zero so
alerts do not spam during illiquid after-hours prints.
6. Quantile buckets update only during valid session bars, which prevents thin-tail
expansion on micro-cap tapes.
Color mapping:
- **Orange Up** – `z` exceeds the orange quantile → extreme bullish thrust.
- **Green** – `z` between green and orange thresholds → constructive buying pressure.
- **Blue** – outside session or neutral thrust.
- **Red** – `z` below `-green` → constructive selling pressure.
- **Orange Down** – `z` below `-orange` → extreme bearish thrust.
---
## 5. Playbooks
### 5.1 Trend Continuation (with Overlay)
1. Confirm OTS overlay track is lime (bullish) or red (bearish).
2. Wait for a matching RSI cross (`RSI↑` in longs, `RSI↓` in shorts).
3. Require the thrust column to print Green or Orange in the trade direction.
4. Scale out when thrust fades back to Blue or opposing RSI cross fires.
### 5.2 Reversal Scouts
1. Spot a divergence dot against the prevailing move.
2. Wait for thrust to flip from Orange/Red to Blue/Green plus an RSI cross confirmation.
3. Use tighter stops; reversals are lower probability unless the overlay also signals a
pivot (e.g., `B✓`/`T✓`).
### 5.3 Session-Aware Scalps
1. Keep `Use RTH` enabled on equities. The panel flags off-session bars as Blue so you
can ignore outliers.
2. For 24/7 assets (crypto, some FX), disable the gate or edit the session string to
match your synthetic “prime hours”.
3. If thrust never leaves Blue during valid hours, reduce `Auto bucket window` or lower
the quantile thresholds slightly.
---
## 6. Alerts
The script pre-registers four alerts so TradingView never drops them:
- **Thrust ORANGE Up** – extreme bullish thrust.
- **Thrust ORANGE Down** – extreme bearish thrust.
- **RSI Bullish Momentum** – `RSI(14)` crosses above both fast and slow anchors.
- **RSI Bearish Momentum** – `RSI(14)` crosses under both anchors.
To deploy: right-click the chart → **Add alert…** → choose this indicator and the alert
name → set message/routing. The panel exposes `Use RTH` as a guard, so alerts only fire
within session when the toggle is on.
---
## 7. Tuning & Troubleshooting
| Symptom | Likely Cause | Remedy |
| --- | --- | --- |
| Thrust columns stay blue all day | Session window excludes the instrument or auto buckets are too strict | Adjust session string or lower `Green/Orange quantile`. |
| Orange prints constantly | `Auto bucket window` too small or the asset is very volatile | Increase window or raise quantiles. |
| Divergence markers feel noisy | 20-bar lookback too tight | Increase the `look` constant in code or disable the toggle for automation. |
| Alerts firing after the bell | `Use RTH` disabled | Enable the toggle or update session hours. |
---
## 8. QA Checklist Before Publishing
1. **Warm-up pass** – load at least 200–250 bars so auto buckets stabilize.
2. **Session sanity** – confirm blue columns outside the chosen session, green/orange
inside when impulsive moves occur.
3. **Overlay sync** – run alongside the OTS overlay and capture screenshots where thrust
confirms `AVWM` entries or `T/B` confirms.
4. **Alert audit** – manually trigger each alert in replay mode and ensure they remain in
TradingView’s alert dropdown.
5. **QA notes** – log findings, symbol/timeframe coverage, and screenshots in
`docs/qa/-ots-confirmation.md`.
---
Keep this panel as a confirmation filter rather than a standalone signal generator.
Primary decisions should respect structure from the overlay; use thrust and RSI timing to
validate momentum before committing risk.
Crypto DanR 1.5📜 Crypto DanR 1.5 Evolution Trading Society
This is Pre-Configured (Plug & Play) just install and use as is ready to trade !
This indicator combines Smart Money Concepts (SMC), Liquidity Analysis, and Trend Filtering to provide traders with a high-quality tool for intraday and swing trading on assets like XRP/USDT.
✅ What This Script Does
Crypto DanR 1.5 integrates the following advanced features:
Break of Structure (BOS) & Change of Character (CHoCH):
Detects key shifts in market structure
Helps confirm trend direction and reversal points
Fair Value Gaps (FVG):
Displays unmitigated liquidity voids using a style inspired by LuxAlgo
Highlights potential retracement zones where smart money may re-enter
Equal Highs / Equal Lows (EQH/EQL):
Marks liquidity zones that institutions often target before reversals
Order Blocks (OB):
Identifies potential institutional demand/supply zones
Option to filter by wick, body, or mitigation logic
Fibonacci Volatility Bands (based on BigBeluga’s logic):
Detects potential price extremes using Fib extensions on volatility
10 Moving Averages in One (inspired by hiimannshu's script):
Supports 10 custom MAs (SMA, EMA, RMA, HMA, VWMA, etc.) with adjustable source and timeframe
Ideal for trend filtering or dynamic support/resistance
Vector Candles (TradersReality / PVSRA):
Color-coded candles showing real-time volume pressure and trend bias
Visual Trade Plan:
Optional overlay for entry, stop-loss, and take-profit planning
Displays risk-to-reward ratio and potential % gain/loss live
🧠 How It Works
The script uses a price-action-first approach, built around concepts from Smart Money Theory. CHoCH and BOS detect structural shifts, while FVGs and OBs help forecast likely reaction zones. The multiple moving averages act as a trend filter to avoid entering against momentum.
This combination allows traders to:
Enter on mitigations or breakouts
Set stops outside liquidity zones
Manage trades visually with dynamic risk/reward levels
📊 Best Use Cases
15m or 1h scalping (ideal)
Swing trading on 4h
Works well on crypto, FX, and indices
🙏 Credits
TradersReality for PVSRA logic via public library
LuxAlgo for FVG inspiration
hiimannshu for 10-in-1 MA logic
BigBeluga for Fibonacci Bands methodology
All reused logic is significantly modified and part of a broader framework.
📌 Notes
Script is open-source to promote transparency and collaboration
Please do not copy-paste and republish without adding meaningful improvements
Feedback and suggestions welcome!
Mean Reversion Oscillator [Alpha Extract]An advanced composite oscillator system specifically designed to identify extreme market conditions and high-probability mean reversion opportunities, combining five proven oscillators into a single, powerful analytical framework.
By integrating multiple momentum and volume-based indicators with sophisticated extreme level detection, this oscillator provides precise entry signals for contrarian trading strategies while filtering out false reversals through momentum confirmation.
🔶 Multi-Oscillator Composite Framework
Utilizes a comprehensive approach that combines Bollinger %B, RSI, Stochastic, Money Flow Index, and Williams %R into a unified composite score. This multi-dimensional analysis ensures robust signal generation by capturing different aspects of market extremes and momentum shifts.
// Weighted composite (equal weights)
normalized_bb = bb_percent
normalized_rsi = rsi
normalized_stoch = stoch_d_val
normalized_mfi = mfi
normalized_williams = williams_r
composite_raw = (normalized_bb + normalized_rsi + normalized_stoch + normalized_mfi + normalized_williams) / 5
composite = ta.sma(composite_raw, composite_smooth)
🔶 Advanced Extreme Level Detection
Features a sophisticated dual-threshold system that distinguishes between moderate and extreme market conditions. This hierarchical approach allows traders to identify varying degrees of mean reversion potential, from moderate oversold/overbought conditions to extreme levels that demand immediate attention.
🔶 Momentum Confirmation System
Incorporates a specialized momentum histogram that confirms mean reversion signals by analyzing the rate of change in the composite oscillator. This prevents premature entries during strong trending conditions while highlighting genuine reversal opportunities.
// Oscillator momentum (rate of change)
osc_momentum = ta.mom(composite, 5)
histogram = osc_momentum
// Momentum confirmation
momentum_bullish = histogram > histogram
momentum_bearish = histogram < histogram
// Confirmed signals
confirmed_bullish = bullish_entry and momentum_bullish
confirmed_bearish = bearish_entry and momentum_bearish
🔶 Dynamic Visual Intelligence
The oscillator line adapts its color intensity based on proximity to extreme levels, providing instant visual feedback about market conditions. Background shading creates clear zones that highlight when markets enter moderate or extreme territories.
🔶 Intelligent Signal Generation
Generates precise entry signals only when the composite oscillator crosses extreme thresholds with momentum confirmation. This dual-confirmation approach significantly reduces false signals while maintaining sensitivity to genuine mean reversion opportunities.
How It Works
🔶 Composite Score Calculation
The indicator simultaneously tracks five different oscillators, each normalized to a 0-100 scale, then combines them into a smoothed composite score. This approach eliminates the noise inherent in single-oscillator analysis while capturing the consensus view of multiple momentum indicators.
// Mean reversion entry signals
bullish_entry = ta.crossover(composite, 100 - extreme_level) and composite < (100 - extreme_level)
bearish_entry = ta.crossunder(composite, extreme_level) and composite > extreme_level
// Bollinger %B calculation
bb_basis = ta.sma(src, bb_length)
bb_dev = bb_mult * ta.stdev(src, bb_length)
bb_percent = (src - bb_lower) / (bb_upper - bb_lower) * 100
🔶 Extreme Zone Identification
The system automatically identifies when markets reach statistically significant extreme levels, both moderate (65/35) and extreme (80/20). These zones represent areas where mean reversion has the highest probability of success based on historical market behavior.
🔶 Momentum Histogram Analysis
A specialized momentum histogram tracks the velocity of oscillator changes, helping traders distinguish between healthy corrections and potential trend reversals. The histogram's color-coded display makes momentum shifts immediately apparent.
🔶 Divergence Detection Framework
Built-in divergence analysis identifies situations where price and oscillator movements diverge, often signaling impending reversals. Diamond-shaped markers highlight these critical divergence patterns for enhanced pattern recognition.
🔶 Real-Time Information Dashboard
An integrated information table provides instant access to current oscillator readings, market status, and individual component values. This dashboard eliminates the need to manually check multiple indicators while trading.
🔶 Individual Component Display
Optional display of individual oscillator components allows traders to understand which specific indicators are driving the composite signal. This transparency enables more informed decision-making and deeper market analysis.
🔶 Adaptive Background Coloring
Intelligent background shading automatically adjusts based on market conditions, creating visual zones that correspond to different levels of mean reversion potential. The subtle color gradations make pattern recognition effortless.
1D
3D
🔶 Comprehensive Alert System
Multi-tier alert system covers confirmed entry signals, divergence patterns, and extreme level breaches. Each alert type provides specific context about the detected condition, enabling traders to respond appropriately to different signal strengths.
🔶 Customizable Threshold Management
Fully adjustable extreme and moderate levels allow traders to fine-tune the indicator's sensitivity to match different market volatilities and trading timeframes. This flexibility ensures optimal performance across various market conditions.
🔶 Why Choose AE - Mean Reversion Oscillator?
This indicator provides the most comprehensive approach to mean reversion trading by combining multiple proven oscillators with advanced confirmation mechanisms. By offering clear visual hierarchies for different extreme levels and requiring momentum confirmation for signals, it empowers traders to identify high-probability contrarian opportunities while avoiding false reversals. The sophisticated composite methodology ensures that signals are both statistically significant and practically actionable, making it an essential tool for traders focused on mean reversion strategies across all market conditions.
Smooth Theil-SenI wanted to build a Theil-Sen estimator that could run on more than one bar and produce smoother output than the standard implementation. Theil-Sen regression is a non-parametric method that calculates the median slope between all pairs of points in your dataset, which makes it extremely robust to outliers. The problem is that median operations produce discrete jumps, especially when you're working with limited sample sizes. Every time the median shifts from one value to another, you get a step change in your regression line, which creates visual choppiness that can be distracting even though the underlying calculations are sound.
The solution I ended up going with was convolving a Gaussian kernel around the center of the sorted lists to get a more continuous median estimate. Instead of just picking the middle value or averaging the two middle values when you have an even sample size, the Gaussian kernel weights the values near the center more heavily and smoothly tapers off as you move away from the median position. This creates a weighted average that behaves like a median in terms of robustness but produces much smoother transitions as new data points arrive and the sorted list shifts.
There are variance tradeoffs with this approach since you're no longer using the pure median, but they're minimal in practice. The kernel weighting stays concentrated enough around the center that you retain most of the outlier resistance that makes Theil-Sen useful in the first place. What you gain is a regression line that updates smoothly instead of jumping discretely, which makes it easier to spot genuine trend changes versus just the statistical noise of median recalculation. The smoothness is particularly noticeable when you're running the estimator over longer lookback periods where the sorted list is large enough that small kernel adjustments have less impact on the overall center of mass.
The Gaussian kernel itself is a bell curve centered on the median position, with a standard deviation you can tune to control how much smoothing you want. Tighter kernels stay closer to the pure median behavior and give you more discrete steps. Wider kernels spread the weighting further from the center and produce smoother output at the cost of slightly reduced outlier resistance. The default settings strike a balance that keeps the estimator robust while removing most of the visual jitter.
Running Theil-Sen on multiple bars means calculating slopes between all pairs of points across your lookback window, sorting those slopes, and then applying the Gaussian kernel to find the weighted center of that sorted distribution. This is computationally more expensive than simple moving averages or even standard linear regression, but Pine Script handles it well enough for reasonable lookback lengths. The benefit is that you get a trend estimate that doesn't get thrown off by individual spikes or anomalies in your price data, which is valuable when working with noisy instruments or during volatile periods where traditional regression lines can swing wildly.
The implementation maintains sorted arrays for both the slope calculations and the final kernel weighting, which keeps everything organized and makes the Gaussian convolution straightforward. The kernel weights are precalculated based on the distance from the center position, then applied as multipliers to the sorted slope values before summing to get the final smoothed median slope. That slope gets combined with an intercept calculation to produce the regression line values you see plotted on the chart.
What this really demonstrates is that you can take classical statistical methods like Theil-Sen and adapt them with signal processing techniques like kernel convolution to get behavior that's more suited to real-time visualization. The pure mathematical definition of a median is discrete by nature, but financial charts benefit from smooth, continuous lines that make it easier to track changes over time. By introducing the Gaussian kernel weighting, you preserve the core robustness of the median-based approach while gaining the visual smoothness of methods that use weighted averages. Whether that smoothness is worth the minor variance tradeoff depends on your use case, but for most charting applications, the improved readability makes it a good compromise.
Alpha Candles-Candlestick Pattern Recognition — Multi-Pattern DeCandlestick Pattern Recognition — Multi-Pattern Detector
Description:
This Pine Script intelligently scans price action to automatically detect and label multiple candlestick patterns directly on your TradingView chart. It’s designed for traders who want to combine price psychology and pattern-based setups into their technical analysis.
Using built-in and custom logic, the script identifies both bullish and bearish reversal & continuation patterns, dynamically marking them on the chart for quick visual recognition.
✨ Key Features
🔍 Pattern Detection: Automatically identifies major candlestick formations such as:
Bullish Reversal Patterns: Hammer, Morning Star, Bullish Engulfing, Piercing Line, Three White Soldiers
Bearish Reversal Patterns: Shooting Star, Evening Star, Bearish Engulfing, Dark Cloud Cover, Three Black Crows
Continuation Patterns: Rising Three, Falling Three, Marubozu, Doji, Spinning Top
🧠 Smart Filtering: Optionally filters signals based on trend direction, volume confirmation, or body-to-wick ratios for higher accuracy.
🕯️ Custom Labels: Each detected pattern is plotted with a clean, color-coded label (green for bullish, red for bearish).
⚙️ Adjustable Sensitivity: Fine-tune thresholds like wick size, body ratio, or lookback periods to adapt detection to your preferred timeframe or asset class.
📈 Multi-Timeframe Ready: Works seamlessly across intraday, daily, and weekly charts.
How It Works
The script measures the relative body and wick sizes of recent candles and compares them against pattern-specific ratios.
For example:
A Bullish Engulfing is confirmed when the latest candle’s body fully engulfs the previous candle’s body, following a downtrend.
A Hammer is identified when the lower wick is at least twice the body size, appearing after a price decline.
These detections are then plotted as visual markers on your chart, helping you instantly spot momentum shifts or trend exhaustion zones.
Use Case
Perfect for:
Traders using price action-based entries
Backtesting pattern-based strategies
Educators demonstrating candlestick psychology
Analysts combining pattern recognition with indicators (RSI, EMAs, etc.)
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.
Inside SwingsOverview
The Inside Swings indicator identifies and visualizes "inside swing" patterns in price action. These patterns occur when price creates a series of pivots that form overlapping ranges, indicating potential consolidation or reversal zones.
What are Inside Swings?
Inside swings are specific pivot patterns where:
- HLHL Pattern: High-Low-High-Low sequence where the first high is higher than the second high, and the first low is lower than the second low
- LHLH Pattern: Low-High-Low-High sequence where the first low is lower than the second low, and the first high is higher than the second high
Here an Example
These patterns create overlapping price ranges that often act as:
- Support/Resistance zones
- Consolidation areas
- Potential reversal points
- Breakout levels
Levels From the Created Range
Input Parameters
Core Settings
- Pivot Lookback Length (default: 5): Number of bars on each side to confirm a pivot high/low
- Max Boxes (default: 100): Maximum number of patterns to display on chart
Extension Settings
- Extend Lines: Enable/disable line extensions - this extends the Extremes of the Swings to where a new Swing Started or Extended Right for the Latest Inside Swings
- Show High 1 Line: Display first high/low extension line
- Show High 2 Line: Display second high/low extension line
- Show Low 1 Line: Display first low/high extension line
- Show Low 2 Line: Display second low/high extension line
Visual Customization
Box Colors
- HLHL Box Color: Color for HLHL pattern boxes (default: green)
- HLHL Border Color: Border color for HLHL boxes
- LHLH Box Color: Color for LHLH pattern boxes (default: red)
- LHLH Border Color: Border color for LHLH boxes
Line Colors
- HLHL Line Color: Extension line color for HLHL patterns
- LHLH Line Color: Extension line color for LHLH patterns
- Line Width: Thickness of extension lines (1-5)
Pattern Detection Logic
HLHL Pattern (Bullish Inside Swing)
Condition: High1 > High2 AND Low1 < Low2
Sequence: High → Low → High → Low
Visual: Two overlapping boxes with first range encompassing second
Detection Criteria:
1. Last 4 pivots form High-Low-High-Low sequence
2. Fourth pivot (first high) > Second pivot (second high)
3. Third pivot (first low) < Last pivot (second low)
LHLH Pattern (Bearish Inside Swing)
Condition: Low1 < Low2 AND High1 > High2
Sequence: Low → High → Low → High
Visual: Two overlapping boxes with first range encompassing second
Detection Criteria:
1. Last 4 pivots form Low-High-Low-High sequence
2. Fourth pivot (first low) < Second pivot (second low)
3. Third pivot (first high) > Last pivot (second high)
Visual Elements
Boxes
- Box 1: Spans from first pivot to last pivot (larger range)
- Box 2: Spans from third pivot to last pivot (smaller range)
- Overlap: The intersection of both boxes represents the inside swing zone
Extension Lines
- High 1 Line: Horizontal line at first high/low level
- High 2 Line: Horizontal line at second high/low level
- Low 1 Line: Horizontal line at first low/high level
- Low 2 Line: Horizontal line at second low/high level
Line Extension Behavior
- Historical Patterns: Lines extend until the next pattern starts
- Latest Pattern: Lines extend to the right edge of chart
- Dynamic Updates: All lines are redrawn on each bar for accuracy
Trading Applications
Support/Resistance Levels
Inside swing levels often act as:
- Dynamic support/resistance
- Breakout confirmation levels
- Reversal entry points
Pattern Interpretation
- HLHL Patterns: Potential bullish continuation or reversal
- LHLH Patterns: Potential bearish continuation or reversal
- Overlap Zone: Key area for price interaction
Entry Strategies
1. Breakout Strategy: Enter on break above/below inside swing levels
2. Reversal Strategy: Enter on bounce from inside swing levels
3. Range Trading: Trade between inside swing levels
Technical Implementation
Data Structures
type InsideSwing
int startBar // First pivot bar
int endBar // Last pivot bar
string patternType // "HLHL" or "LHLH"
float high1 // First high/low
float low1 // First low/high
float high2 // Second high/low
float low2 // Second low/high
box box1 // First box
box box2 // Second box
line high1Line // High 1 extension line
line high2Line // High 2 extension line
line low1Line // Low 1 extension line
line low2Line // Low 2 extension line
bool isLatest // Latest pattern flag
Memory Management
- Pattern Storage: Array-based storage with automatic cleanup
- Pivot Tracking: Maintains last 4 pivots for pattern detection
- Resource Cleanup: Automatically removes oldest patterns when limit exceeded
Performance Optimization
- Duplicate Prevention: Checks for existing patterns before creation
- Efficient Redraw: Only redraws lines when necessary
- Memory Limits: Configurable maximum pattern count
Usage Tips
Best Practices
1. Combine with Volume: Use volume confirmation for breakouts
2. Multiple Timeframes: Check higher timeframes for context
3. Risk Management: Set stops beyond inside swing levels
4. Pattern Validation: Wait for confirmation before entering
Common Scenarios
- Consolidation Breakouts: Inside swings often precede significant moves
- Reversal Zones: Failed breakouts at inside swing levels
- Trend Continuation: Inside swings in trending markets
Limitations
- Lagging Indicator: Patterns form after completion
- False Signals: Not all inside swings lead to significant moves
- Market Dependent: Effectiveness varies by market conditions
Customization Options
Visual Adjustments
- Modify colors for different market conditions
- Adjust line widths for visibility
- Enable/disable specific elements
Detection Sensitivity
- Increase pivot length for smoother patterns
- Decrease for more sensitive detection
- Balance between noise and signal
Display Management
- Control maximum pattern count
- Adjust cleanup frequency
- Manage memory usage
Conclusion
The Inside Swings indicator provides a systematic approach to identifying consolidation and potential reversal zones in price action. By visualizing overlapping pivot ranges
The indicator's strength lies in its ability to:
- Identify key price levels automatically
- Provide visual context for market structure
- Offer flexible customization options
- Maintain performance through efficient memory management
MoreThanMoney - Scanner V3.4 Scanner fot Development purposes, part of MorethanMoney implementations
NWOG/NDOG + EHPDA🌐 ENGLISH DESCRIPTION
Hybrid NWOG/NDOG + EHPDA – Advanced Gaps & Event Horizon Indicator
(Enhanced with Real-Time Alerts and Info Table)
📊 Overview
This advanced indicator combines automatic detection of weekly gaps (NWOG) and daily gaps (NDOG) with the Event Horizon (EHPDA) concept, now featuring customizable alerts and a real-time info table for a more efficient trading experience. Designed for traders who operate based on institutional price structures, liquidity zones, and SMC/ICT confluences.
✨ Key Features
1. Gap Detection & Visualization
NWOG (New Week Opening Gap): Identifies and visualizes the gap between Friday’s close and Monday’s open.
NDOG (New Day Opening Gap): Detects daily gaps on intraday timeframes.
Enhanced visualization: Semi-transparent boxes, price levels (top, middle, bottom), and lines extended to the current bar.
Customizable labels: Display gap formation date and price levels (optional).
2. Event Horizon (EHPDA)
Automatically calculates the Event Horizon level between two non-overlapping gaps.
Dashed line marking the equilibrium zone between bullish and bearish gaps.
3. Advanced 5pm-6pm Mode
Special option to detect the Sunday-Monday gap using 4H bars.
4. Real-Time Alerts
New gaps (NWOG/NDOG): Immediate notification when a new gap forms.
Gap fill: Alert when price completely fills a gap.
Event Horizon active: Notification when the Event Horizon level is triggered.
5. Info Table
Real-time display: number of active gaps, Event Horizon status, time remaining until weekly/daily close.
Customizable: position, size, and style.
🎨 Customization
Configurable colors for bullish gaps, bearish gaps, and Event Horizon line.
Customizable price labels and date format.
📈 Use Cases
Reversal trading, price targets, liquidity zones, SMC/ICT confluences.
⚙️ Recommended Settings
Timeframes: Daily and intraday (15m, 1H, 4H, etc.).
NWOG: Enable on all timeframes.
NDOG: Enable only on intraday.
Max Gaps: 3-5 for clean charts, 10-15 for historical analysis.
📝 Important Notes
Works best on 24/5 markets (Forex, Crypto).
Gaps automatically close when filled.
Event Horizon only appears with at least 2 non-overlapping gaps.
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
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
RSRCH: DC-VWMA Width Calc// Research intention of this script
// Objective : to find the direction of movement of index indicators
// Methodology : take the Donchian and VWMA input
// Compute Donchian and VWMA
// find the total width of Donchian = upper donchian value - lower donchian value
// Find the upper segment = upper donchian value - VWMA value
// find the lower segment = VWMA value - lower donchian value
// Plot them to see the trends glaringly.
// This works best with linebreak or Hiekin Ashi
Surge Guru CoreSurge.Guru
ALL WHAT YOU NEED IN ONE
EMA200
BB middle band/
Ichimoku Cloud
Correlation Panel
FULL DASHBOARD