Dynamic Trend Indicator (DTI) - VWAP FilterThe Dynamic Trend Indicator (DTI) with VWAP Filter is a trend-following indicator.
It aims to identify and follow market trends while minimizing false signals in choppy or ranging markets.
The DTI combines a dynamically adjusted Exponential Moving Average (EMA) with a daily Volume Weighted Average Price (VWAP) confirmation filter and a cooldown mechanism to enhance signal reliability. This indicator is particularly useful for traders on intraday timeframes (e.g., 4-hour charts) who want to align their trades with the broader daily trend while avoiding whipsaws.
Key Features:
Dynamic Trend Line:
The core of the DTI is a trend line calculated using a custom EMA that adjusts its period dynamically based on market conditions.
The period of the EMA is determined by a combination of volatility (measured via ATR) and trend strength (measured via price momentum). In strong trends, the period shortens for faster responsiveness; in weak or ranging markets, it lengthens to reduce noise.
An optional smoothing EMA can be applied to the dynamic trend line to further reduce noise, with a user-defined smoothing length.
Daily VWAP Confirmation Filter:
A daily VWAP is calculated to provide a higher-timeframe trend bias. VWAP represents the average price paid for an asset during the day, weighted by volume, and is often used as a benchmark by institutional traders.
Buy signals are only generated when the price is above the daily VWAP (indicating a bullish daily bias), and sell signals are only generated when the price is below the VWAP (indicating a bearish daily bias).
The VWAP resets at the start of each day, ensuring it reflects the current day’s trading activity.
Cooldown Mechanism:
To prevent rapid signal reversals (whipsaws), the indicator includes a cooldown period between signals. After a buy or sell signal is generated, no new signals can be generated for a user-defined number of bars (default: 5 bars).
This helps filter out noise in choppy markets, ensuring signals are spaced out and more likely to align with significant trend changes.
Visual Elements:
Trend Line: Plotted on the chart, colored green when the price is above (uptrend) and red when below (downtrend). A gray color indicates a neutral trend.
Buy/Sell Signals: Displayed as green triangles below the bar for buy signals and red triangles above the bar for sell signals.
Background Coloring: The chart background is shaded green during uptrends and red during downtrends, providing a quick visual cue of the trend direction.
Daily VWAP Line: Optionally plotted as a purple step line, allowing traders to see the VWAP level and its relationship to the price.
Alerts:
The indicator includes built-in alerts for buy and sell signals, triggered when the price crosses the trend line and satisfies the VWAP filter and cooldown conditions.
Alert messages specify whether the signal is a buy or sell and confirm that the VWAP condition was met (e.g., "DTI Buy Signal: Price crossed above trend line and VWAP").
Input Parameters
Base Length (default: 14): The base period for calculating volatility and trend strength, used to adjust the dynamic EMA period.
Volatility Multiplier (default: 1.5): Adjusts the sensitivity of the dynamic period to market volatility (via ATR).
Trend Threshold (default: 0.5): Controls the sensitivity of the dynamic period to trend strength (via price momentum).
Use Smoothing (default: true): Enables/disables smoothing of the trend line with an additional EMA.
Smoothing Length (default: 3): The period for the smoothing EMA, if enabled.
Cooldown Bars (default: 5): The minimum number of bars between consecutive signals, reducing signal frequency in choppy markets.
Show Daily VWAP (default: true): Toggles the display of the daily VWAP line on the chart.
How It Works
Dynamic Trend Line Calculation:
Volatility is measured using the Average True Range (ATR) over the base length, scaled by the volatility multiplier.
Trend strength is calculated as the absolute price momentum (change in price over the base length) divided by the volatility factor.
The dynamic EMA period is adjusted based on the trend strength: stronger trends result in a shorter period (faster response), while weaker trends result in a longer period (more stability). The period is constrained between 5 and 50 to avoid extreme values.
A custom EMA function is used to handle the dynamic period, as Pine Script’s built-in ta.ema() requires a fixed length. The trend line is optionally smoothed with a secondary EMA.
Signal Generation:
A buy signal is generated when the price crosses above the trend line, the price is above the daily VWAP, and the cooldown period has elapsed.
A sell signal is generated when the price crosses below the trend line, the price is below the daily VWAP, and the cooldown period has elapsed.
The cooldown mechanism ensures that signals are not generated too frequently, reducing false signals in ranging markets.
Daily VWAP Calculation:
The VWAP is calculated by accumulating the price-volume product (close * volume) and total volume for the day, resetting at the start of each new day.
The VWAP is then computed as the cumulative price-volume divided by the cumulative volume, providing a volume-weighted average price for the day.
Usage
Timeframe: Best suited for intraday timeframes (e.g., 1-hour, 4-hour) where the daily VWAP provides a higher-timeframe trend bias. It can also be used on daily charts with adjustments to the cooldown period.
Markets: Works well in trending markets (e.g., forex, crypto, stocks) where the dynamic trend line can capture sustained price movements. The VWAP filter helps align signals with the daily trend, making it effective for assets with clear daily biases.
Trading Strategy:
Buy: Enter a long position when a green triangle (buy signal) appears, indicating the price has crossed above the trend line and is above the daily VWAP.
Sell: Enter a short position (or exit a long) when a red triangle (sell signal) appears, indicating the price has crossed below the trend line and is below the daily VWAP.
Use the trend line and VWAP as dynamic support/resistance levels to set stop-losses or take-profit targets.
Backtesting: Use TradingView’s strategy tester to evaluate the indicator’s performance on your chosen market and timeframe, adjusting parameters like cooldown_bars and volatility_mult to optimize for profitability.
Example
On a 4-hour SOLUSDT chart, the DTI with VWAP Filter might show:
An uptrend with the price above the green trend line and above the daily VWAP, generating buy signals as the price continues to rise.
A downtrend where the price falls below the red trend line and the daily VWAP, generating sell signals that align with the bearish daily bias.
During choppy periods, the cooldown mechanism and VWAP filter reduce false signals, ensuring trades are taken only when the price aligns with the daily trend.
Limitations
Lagging Nature: Like all trend-following indicators, the DTI may lag during sharp price reversals, as the dynamic EMA needs time to adjust.
Ranging Markets: While the VWAP filter and cooldown mechanism reduce whipsaws, the indicator may still generate some false signals in strongly ranging markets. Combining it with a trend strength filter (e.g., ADX) can help.
VWAP Dependency: The effectiveness of the VWAP filter depends on the market’s respect for the daily VWAP as a support/resistance level. In markets with low volume or erratic price action, the VWAP may be less reliable.
Potential Improvements
VWAP Buffer: Add a percentage buffer around the VWAP (e.g., require the price to be 1% above/below) to further reduce noise.
Multi-Timeframe VWAP: Incorporate a weekly VWAP for additional trend confirmation on longer timeframes.
Trend Strength Filter: Add an ADX filter to ensure signals are generated only during strong trends (e.g., ADX > 25).
Trend Analizi
VBSMI with Dynamic Bands and MTF Screener by QTX Algo SystemsVolatility Based SMI with Dynamic Bands & MTF Screener by QTX Algo Systems
Overview
This enhanced version of the Volatility Based SMI with Dynamic Bands (VBSMI) expands on the original design by integrating a Multi-Timeframe (MTF) Screener. It maintains the core momentum detection and volatility-responsive adjustments of the standard VBSMI while providing expanded multi-timeframe analysis across multiple assets in a tabular format.
By allowing users to track momentum shifts, reversals, and trend conditions across multiple timeframes and multiple assets, this version enhances market awareness and helps traders make more informed decisions.
How It Works
Enhanced SMI Calculation
The core SMI calculation uses double smoothing through Exponential Moving Averages (EMAs) to refine price movements.
Inputs for Smoothing K and Smoothing D control how much noise is filtered.
A final SMI EMA is applied to help confirm momentum direction.
Adaptive Volatility Scaling
A fixed Bollinger Band Width Percentile (BBWP) calculation is used to create an Adaptive Adjustment Factor for the SMI.
This ensures the oscillator adapts to current volatility levels, making signals more context-aware.
Dynamic Threshold Adjustment
The overbought and oversold thresholds (default 50 and -50) adjust in real time based on market conditions.
These adjustments use three proprietary factors:
Trend Lookback Period – Determines historical trend strength using a VWMA-based comparison.
Upper & Lower Band Tilt Strength – Controls how aggressively the bands shift in response to trends.
Opposite Band Compression – Adjusts the speed of threshold contraction when trends reverse, making it more responsive.
Multi-Timeframe and Multi-Asset Screener (MTF) – New Feature
The integrated MTF Screener provides a real-time overview of the VBSMI's conditions across multiple timeframes and assets.
It includes:
✅ User-selectable timeframes (Default: 1H, 4H, 1D, 3D, 1W, 1M).
✅ Up to 6 additional tickers for multi-asset analysis.
✅ Real-time VBSMI color-coded conditions for easier signal interpretation.
How to Read the MTF Screener Table
Each cell in the table provides a momentum reading based on VBSMI conditions in different timeframes:
🟢 Green Background → Oversold Condition (Potential Buy Zone)
🔴 Red Background → Overbought Condition (Potential Sell Zone)
📊 Label: "Up" or "Down" → Shows whether VBSMI is above or below its EMA.
🟠 Orange Background → VBSMI crossovers from oversold/overbought conditions
How to Use & Adjust Inputs
Momentum Confirmation & Reversals
Use the dynamically adjusting thresholds to confirm when momentum is overextended or entering a new trend phase.
Monitor crossovers between the SMI and its EMA—these can be potential reversal or trend continuation signals.
Multi-Timeframe Trend Confirmation
Look for alignment across multiple timeframes in the MTF Screener (e.g., if the 1H, 4H, and 1D all show green, it strengthens a bullish case).
Use the multi-ticker feature to see how different assets align with your primary asset’s momentum signals.
Fine-Tuning the Inputs
Smoothing K & D: Controls how much the SMI is smoothed. Lower values make the indicator respond faster but can introduce noise, while higher values produce smoother signals with a slight delay.
SMI EMA Length: Adjusts the sensitivity of the exponential moving average applied to the SMI. A lower value makes the EMA react more quickly, while a higher value slows it down for more stable signals.
Trend Lookback Period: Defines how far back the indicator looks to assess trend strength. A shorter lookback makes it more reactive to recent price movements, while a longer period smooths out fluctuations for a broader trend perspective.
Band Tilt Strengths: Determines how much the overbought and oversold levels shift in response to market trends. Increasing this value causes the thresholds to adjust more aggressively, making the indicator more sensitive to trend direction.
Opposite Band Compression: Controls how quickly the opposite band contracts when a trend reversal occurs. A higher value results in faster compression, making the indicator more responsive to sudden market shifts.
What Makes This Unique?
Unlike traditional Stochastic Momentum Index (SMI) indicators, which rely on fixed overbought/oversold levels, this version:
✔ Adjusts the SMI based on relevant volatility
✔ Adapts thresholds based on volatility & trend strength
✔ Incorporates multi-timeframe screening for trend confirmation
✔ Uses an MTF table for real-time, multi-asset tracking
Disclaimer
This indicator is for educational purposes only and is meant to support trading strategies—not replace independent analysis.
No financial guarantees are provided. Past performance does not guarantee future results. Always use proper risk management.
TradeDots - Buy Sell Signals ProThe TradeDots - Buy Sell Signals Pro is an advanced technical analysis tool engineered to identify key market turning points and trend continuations. By combining multiple confirmation methods, this indicator provides traders with a comprehensive system for recognizing high-probability entry and exit points across various market conditions.
📝 HOW IT WORKS
Enhanced Supertrend Implementation
Unlike the traditional Supertrend indicator that simply changes color when price crosses above or below a calculated line, our implementation incorporates multiple layers of confirmation:
Advanced Calculation: Uses an enhanced ATR-based algorithm that incorporates trend bias detection and momentum filtering
Multi-Factor Confirmation: Considers price interaction with previous Supertrend values, not just current crossovers
Contextual Awareness: Distinguishes between different entry types based on market risk levels and momentum conditions
Visual Enhancement: Provides background shading to clearly indicate trend direction and strength
Smart Trendline Algorithm
The indicator employs a proprietary Smart Trendline that adapts to market conditions using an advanced moving average system. Unlike traditional moving averages that simply track price, the Smart Trendline incorporates volatility data to change colors based on momentum strength, providing immediate visual feedback about the current market phase with zero lag.
Calculation: Processes price data through selectable advanced calculation methods (including Hull, Jurik, and McGinley averages) with dynamic color-coding based on a modified Keltner Channel system.
Visualization: Green indicates strong bullish momentum, purple represents bearish momentum, and gray signals consolidation or uncertain conditions.
Multi-Signal Confirmation System
The indicator integrates three distinct signal mechanisms to confirm trading opportunities:
1. RSI-Sequential Reversal Signals: Combines RSI levels with seq count patterns to identify potential short-term reversals.
Calculation: Analyzes RSI conditions against specific thresholds while tracking consecutive pattern formations.
Visualization: Green triangles for buy signals and red triangles for sell signals.
2. Statistical Reversal Signals: Identifies statistically significant deviations from normal price behavior.
Calculation: Uses a modified standard deviation approach to determine when price has moved too far from its statistical average.
Visualization: Large green arrows emoji for powerful buy signals and red arrows emoji for powerful sell signals.
3. Supply & Demand Zone Detection: Automatically identifies key price levels where significant buying or selling pressure may exist.
Calculation: Uses RSI extremes combined with confirmation periods to establish high-probability reversal zones.
Visualization: Green-filled areas mark support (demand) zones and red-filled areas mark resistance (supply) zones.
Buy/Sell Signal Generation
The system generates several types of signals with varying strengths:
1. Regular Buy/Sell Signals: Generated when:
Price crosses with MA above/below the Supertrend line
RSI conditions confirm the direction
Candlestick patterns support the signal direction (bullish/bearish candle formation)
Visualized as green/red triangles
2. Strong Buy/Sell Signals: Appear when multiple confirmation factors align:
Regular buy/sell condition is met
Price is interacting with a Supply/Demand zone
Additional momentum confirmation from auxiliary indicators
Seq count reaches significant levels
Statistical Reversal signal confirms the direction
3. Breakout Signals: Special case signals that appear during:
Trend transitions after consolidation
When price breaks through significant resistance/support levels from previous trend
Following pattern completions that suggest increased momentum
Market Structure Analysis
The indicator categorizes market conditions and provides visual cues for traders:
Trend Identification: Supertrend-based algorithm with enhanced visual presentation identifies the prevailing market direction.
Bar Coloring System: Candles change color based on price position relative to EMAs to clearly display strength and direction of momentum
🛠️ HOW TO USE
Signal Interpretation
Buy Signals: "Buy" signals, Green triangles (RSI-Sequential) and large green arrows (Statistical Reversals) appear at potential buy points.
Sell Signals: "Sell" signals, Red triangles (RSI-Sequential) and large red arrows (Statistical Reversals) appear at potential sell points.
Highest Probability Entries: Occur when signals appear near or within Supply & Demand zones.
Trading Strategies
Trend-Following Strategy
1. Identify the main trend using the Smart Trendline color
2. Enter long positions during uptrends when:
Price pulls back to the Smart Trendline
Green triangles or arrows appear
Signals occur near green demand zones
3. Enter short positions during downtrends when:
Price bounces up to the Smart Trendline
Red triangles or arrows appear
Signals occur near red supply zones
Counter-Trend/Reversal Strategy
1. Look for Statistical Reversal arrows at significant price extremes
2. Confirm with an RSI-Sequential signal in the same direction
3. Pay special attention when these signals appear inside Supply & Demand zones
4. Use the Smart Trendline color change as additional confirmation
Multiple Confirmation Technique
For highest probability trades, look for:
Signal alignment (both signal types in same direction)
Supply/Demand zone interaction
Smart Trendline color supporting the signal direction
❗️LIMITATIONS
Signal Lag: The system identifies reversals after they have begun, potentially missing the absolute bottom or top.
False Signals: Can occur during periods of high volatility or range-bound markets.
Timeframe Sensitivity: Some signals work better on higher timeframes for long-term trading, while others are more effective on lower timeframes for short-term trading.
Bar Closing Requirement: All signals are based on closed candles and may be subject to change until the candle closes.
RISK DISCLAIMER
Trading involves substantial risk, and most traders may incur losses. All content, tools, scripts, articles, and education provided by TradeDots are for informational and educational purposes only. Past performance is not indicative of future results.
This indicator should be used as part of a complete trading approach that includes proper risk management, consideration of the broader market context, and confirmation from price action patterns. No trading system can guarantee profits, and users should always exercise caution and use appropriate position sizing.
ACCURATE TREND LEVELS - TABLE PSv6.1Accurate Trend Level Indicator
Description:
The "Accurate Trend Level" indicator is a powerful tool designed to identify market trends and potential reversals with precision. Built on the concept (foundation) of Swing Highs and Swing Lows, this indicator easily detects uptrends and downtrends, providing traders with clear signals for trend continuation or reversal. Whether you are a swing trader or a trend follower, this indicator offers customization options to suit your trading style.
Key Features:
Trend Identification: Accurately identifies uptrends and downtrends based on Swing High and Swing Low points. This indicator provides signals for Up after Down and Down after Up.
Percentage Adjustment: Includes a customizable percentage factor that reduces false signals and helps identify accurate and strong trends.
Trend Table: Displays essential data in a table, such as:
Last and running Trend Position (Uptrend/Downtrend)
Date and Time of the last and running trend change
Reversal Level (price level for the next potential trend change)
Max. Run-up feature is also provided, which shows how much the market has moved according to the trend.
How It Works:
The indicator analyzes price action using Swing Highs and Lows to determine the current trend direction. A user-defined percentage threshold filters out minor fluctuations, ensuring only significant trends are highlighted. The table provides a quick snapshot of the latest trend data, while reversal levels help traders anticipate the next move.
Cumulative Histogram TickThis script is designed to create a cumulative histogram based on tick data from a specific financial instrument. The histogram resets at the start of each trading session, which is defined by a fixed time.
Key Components:
Tick Data Retrieval:
The script fetches the closing tick values from the specified instrument using request.security("TICK.NY", timeframe.period, close). This line ensures that the script works with the tick data for each bar on the chart.
Session Start and End Detection:
Start Hour: The script checks if the current bar's time is 9:30 AM (hour == 9 and minute == 30). This is used to reset the cumulative value at the beginning of each trading session.
End Hour: It also checks if the current bar's time is 4:00 PM (hour == 16). However, this condition is used to prevent further accumulation after the session ends.
Cumulative Value Management:
Reset: When the start hour condition is met (startHour), the cumulative value (cumulative) is reset to zero. This ensures that each trading session starts with a clean slate.
Accumulation: For all bars that are not at the end hour (not endHour), the tick value is added to the cumulative total. This process continues until the end of the trading session.
Histogram Visualization:
The cumulative value is plotted as a histogram using plot.style_histogram. The color of the histogram changes based on whether the cumulative value is positive (green) or negative (red).
Usage
This script is useful for analyzing intraday market activity by visualizing the accumulation of tick data over a trading session. It helps traders identify trends or patterns within each session, which can be valuable for making informed trading decisions.
Auto Gap DetectorThis indicator uses previous sessions open/close (whichever is closest) and the new sessions open to automatically detect both a gap up or gap down on any timeframe but is intended for use on on the daily timeframe ONLY. This is not the traditional definition of a gap but the one that i use for my strategy and has been more consistent and conservative than others.
We have also provided instructions on how to create alerts for these indicators below.
Happy Trading!
White Boxes: indicate an overnight gap up/down that is incomplete or not filled.
Green Boxes: When a gap fill is complete the white box will be changed to a green box so that it may still be used as a reference for support and resistance on following sessions.
*Color, transparency and borders of boxes can be customized in settings.
Set Up Alerts
Now, let’s make sure you get notified when a gap has occurred and when it has been filled happens:
Open the Alerts Menu
On the chart, click the bell icon (top right of the screen) to create an alert.
Configure the Auto Gap indicator
In the “Condition” dropdown, select “Auto Gap indicator".
Below that, select “Overnight Gap Detected or Overnight Gap Filled.”
*Note: if you want to detect when both a gap has been detected and when it has been filled you must create two separate alerts.
Set “Once Per Bar Close” in the next dropdown (this ensures it only triggers after the period ends, avoiding false signals mid-bar).
Choose how you want to be notified (e.g., popup, email, or phone app—set this under “Notifications”).
Configure the Auto Gap Alert
Click the bell icon again to create a second alert.
Feel free to leave comments requesting any upgrades or potential bugs. Thank you!
SemaforThis is the 4 Level Semafor indicator with Daily Open Line and Average Session Range. Also on the chart is the EMA Ribbon indicator.
Credit to:
Devlucem for the Semafor indicator
Quantvue for the Average Session Range
Shusterivi for the Daily Open Line
MYNAMEISBRANDON for the EMA Ribbon
The Semafors are based on the ZigZag indicator and show higher highs/lower lows of a specified period, determined by the user and applied in settings.
The default periods I use are:
10 period (hidden on this chart)
50 period-blue dots
250 period-white dots
615 period-black dots
Just as the ZigZag indicator will recalculate so to will the semafors, as additional candles are built. The semafor indicator is never to be used as a stand alone signal. It must be combined with other indicators to be used effectively. What we look for are the semafor patterns of a large white dot followed by a 1st blue dot opposite of the white. Then a 2nd blue dot in agreement with the white dot. In theory, the 2nd blue dot is seen as confirmation of the establishment of the white semafor..
When combined with Daily Open Line, ADR (Average Sessions Range), EMA cross and VWAP anchored to your 250 semafors, your odds are greatly increased. Add to that the knowledge of basic market structure and the wisdom that comes from patience and you have a very powerful weapon.
The Daily Open...I trade the M1 chart and also draw a H4 Open Line on my chart for the smaller time frames. Price will tend to trade away from the Daily Open Line. In many cases until it reaches certain levels...Fib, Gann, ADR, etc., then runs through a pullback cycle. I like the ADR levels. The ADR can give clues when entering a consolidation phase, ie trading between the buy side and sell side 15% levels. Trading away from the Daily Open(or H4 open) along with breaking the 15% level, while in agreement with a semafor pattern is a good sign.
Add to that confluence the agreement of your MA cross and the 250 semafor Anchored VWAP and you have a solid signal to help determine your actions. This trend following layout will work on any time frame. I just really like the M1 for its precision, not for crazy back and forth all day. With the exception of some strong pull back signals, I don't enter any more trades on the M1 than on M5, 15 or 30.
This is based on and follows the teachings of Xard and his trading strategy. Just as I don't want to take anyone's credit for these indicators, I won't take credit for what I have been taught either.
The trader can obviously use their favorite MA cross indicator. But this one is visually beautiful AND displays the current time frame and 1 time frame higher on the chart...awesome!
Of note, I do run into trouble at times with the 615 period semafor. I have been told it is because TradingView has trouble with extended period indicators. As a matter of fact, I would like a much higher period for my biggest semafor. I would like it set at 1250, but that seems to be a no starter. If anyone has a solution, that would be welcomed news.
NUPL Z-Score | Vistula LabsWhat is NUPL?
NUPL (Net Unrealized Profit/Loss) is a fundamental on-chain metric used to evaluate the profit or loss state of a cryptocurrency's market participants, such as Bitcoin (BTC) and Ethereum (ETH). It compares the current market capitalization—the total value of all coins at their current price—to the realized capitalization, which represents the average price at which all coins were last transacted on-chain.
Market Capitalization: Current price × circulating supply.
Realized Capitalization: The sum of the value of all coins based on the price at their last on-chain movement.
For Bitcoin (BTC):
NUPL = (Market Cap - Realized Cap) / Market Cap * 100
For Ethereum (ETH):
NUPL = (Market Cap - Realized Cap) / Market Cap
A positive NUPL indicates that the market holds unrealized profits, meaning the current value exceeds the price at which coins were last moved. A negative NUPL signals unrealized losses. Extreme NUPL values—high positives or low negatives—can suggest overvaluation (potential market tops) or undervaluation (potential market bottoms), respectively.
How NUPL is Calculated for BTC & ETH
This indicator calculates NUPL using data sourced from Glassnode and CoinMetrics:
For Bitcoin:
Market Cap: GLASSNODE:BTC_MARKETCAP
Realized Cap: COINMETRICS:BTC_MARKETCAPREAL
Formula: ((btc_market_cap - btc_market_cap_real) / btc_market_cap) * 100
For Ethereum:
Market Cap: GLASSNODE:ETH_MARKETCAP
Realized Cap: COINMETRICS:ETH_MARKETCAPREAL
Formula: ((eth_market_cap - eth_market_cap_real) / eth_market_cap) * 100
The indicator then transforms these NUPL values into a Z-Score, which measures how many standard deviations the current NUPL deviates from its historical average. The Z-Score calculation incorporates:
A customizable moving average of NUPL (options: SMA, EMA, DEMA, RMA, WMA, VWMA) over a user-defined length (default: 220 periods).
The standard deviation of NUPL over a specified lookback period (default: 200 periods).
Z-Score Formula:
Z-Score = (Current NUPL - Moving Average of NUPL) / Standard Deviation of NUPL
This normalization allows the indicator to highlight extreme market conditions regardless of the raw NUPL scale.
How This Indicator Can Be Used
Trend Following
The NUPL Z-Score indicator employs a trend-following system with adjustable thresholds to generate trading signals:
Long Signals: Triggered when the Z-Score crosses above the Long Threshold (default: 0.26).
Short Signals: Triggered when the Z-Score crosses below the Short Threshold (default: -0.62).
Visual Representations:
Green up-triangles: Indicate long entry points (plotted below the bar).
Red down-triangles: Indicate short entry points (plotted above the bar).
Color-coded elements:
Candles and Z-Score plot turn teal (#00ffdd) for long positions.
Candles and Z-Score plot turn magenta (#ff00bf) for short positions.
These signals leverage historical NUPL trends to identify potential momentum shifts, aiding traders in timing entries and exits.
Overbought/Oversold Conditions
The indicator flags extreme market states using additional thresholds:
Overbought Threshold (default: 3.0): When the Z-Score exceeds this level, the market may be significantly overvalued, hinting at potential selling pressure. Highlighted with a light magenta background (#ff00bf with 75% transparency).
Oversold Threshold (default: -2.0): When the Z-Score drops below this level, the market may be significantly undervalued, suggesting buying opportunities. Highlighted with a light teal background (#00ffdd with 75% transparency).
These extreme Z-Score levels have historically aligned with major market peaks and troughs, making them useful for medium- to long-term position management.
Customization Options
Traders can tailor the indicator to their preferences:
Cryptocurrency Source: Choose between BTC or ETH.
Moving Average Type: Select from SMA, EMA, DEMA, RMA, WMA, or VWMA.
Moving Average Length: Adjust the period for the NUPL moving average (default: 220).
Z-Score Lookback Period: Set the historical window for Z-Score calculation (default: 200).
Thresholds: Fine-tune values for: Long Threshold (default: 0.26), Short Threshold (default: -0.62), Overbought Threshold (default: 3.0), Oversold Threshold (default: -2.0)
These options enable users to adapt the indicator to various trading strategies and risk profiles.
Alerts
The indicator supports four alert conditions to keep traders informed:
NUPL Long Opportunity: Alerts when a long signal is triggered.
NUPL Short Opportunity: Alerts when a short signal is triggered.
NUPL Overbought Condition: Alerts when the Z-Score exceeds the overbought threshold.
NUPL Oversold Condition: Alerts when the Z-Score falls below the oversold threshold.
These alerts allow traders to monitor key opportunities without constantly watching the chart.
leo.usdt RSIThis is a custom RSI-based indicator enhanced with Bollinger Band logic to give early visual signals and potential trading alerts. It’s designed to help traders identify:
• Overbought/oversold conditions
• Potential reversals
• Areas of market neutrality or retracement
• Strong or weak trade signal zones
• RSI-based alerts in combination with price volatility (via Bollinger Bands)
⸻
Key Components:
1. RSI Calculation
• Standard Relative Strength Index (RSI) with a default length of 21.
• Source: close price.
• Output RSI is color-coded:
• Red if RSI > 62 (overbought)
• Blue if RSI < 24 (oversold)
• Green otherwise
2. RSI Zones and Visual Labels
• Horizontal lines mark 6 key RSI zones:
• 80 = Upper Bound (extreme overbought)
• 62 = Strong Sell
• 50 = Possible Retrace
• 38 = Neutral
• 24 = Possible Reversal
• 16 = Strong Buy
• Backgrounds between these zones are color-shaded to visually differentiate them.
• Optional labels (controlled via checkbox) appear on the RSI chart to show zone names.
3. Bollinger Bands Logic
• Bollinger Bands use:
• Length = 20 (default)
• Multiplier = 2.0 (default)
• The BB logic categorizes price position relative to bands:
• BB = 71: Price above upper band
• BB = 56: Price in upper half
• BB = 44: Price in middle
• BB = 31: Price in lower half
• BB = 20: Price below lower band
4. Combined RSI + BB Signal Circles
• Two types of visual circles appear on the RSI chart:
• Small Signal (line width = 2):
• RSI > 50 and price > BB upper band → small sell signal (red)
• RSI < 38 and price < BB lower band → small buy signal (blue)
• Strong Signal (line width = 4):
• RSI > 62 and price > BB upper band → strong sell
• RSI < 24 and price < BB lower band → strong buy
5. Alerts
This script includes 4 alert conditions:
• Small Sell: RSI > 50 and price above BB upper band
• Small Buy: RSI < 38 and price below BB lower band
• Strong Sell: RSI > 62 and price above BB upper band
• Strong Buy: RSI < 24 and price below BB lower band
⸻
User Controls:
• Change RSI length.
• Change Bollinger Band length and multiplier.
• Toggle signals (circles) on/off.
• Toggle RSI zone labels on/off.
• Optional RSI zone background shading for easy visualization.
⸻
Use Case:
This script is ideal for:
• Traders looking to combine momentum (RSI) with volatility (BB) for better signal accuracy.
• Spotting potential trend reversals, retracement zones, and extreme conditions.
• Getting visual and audible alerts to act faster during key moments.
TimeMapTimeMap is a visual price-reference indicator designed to help traders rapidly visualize how current price levels relate to significant historical closing prices. It overlays your chart with reference lines representing past weekly, monthly, quarterly (3-month), semi-annual (6-month), and annual closing prices. By clearly plotting these historical price references, TimeMap helps traders quickly gauge price position relative to historical market structure, aiding in the identification of trends, support/resistance levels, and potential reversals.
How it Works:
The indicator calculates the precise number of historical bars corresponding to weekly, monthly, quarterly, semi-annual, and annual intervals, dynamically adjusting according to your chart’s timeframe (intraday, daily, weekly, monthly) and chosen market type (Stocks US, Crypto, Forex, or Futures). Historical closing prices from these periods are plotted directly on your chart as horizontal reference lines.
For intraday traders, the script accurately calculates historical offsets considering regular and extended trading sessions (e.g., pre-market and after-hours sessions for US stocks), ensuring correct positioning of historical lines.
User-Configurable Inputs Explained in Detail:
Market Type:
Allows you to specify your trading instrument type, automatically adjusting calculations for:
- Stocks US (default): 390 minutes per regular session (780 minutes if extended hours enabled), 5 trading days/week.
- Crypto: 1440 minutes/day, 7 trading days/week.
- Forex: 1440 minutes/day, 5 trading days/week.
- Futures: 1320 minutes/day, 5 trading days/week.
Show Weekly Close:
When enabled, plots a line at the exact closing price from one week ago. Provides short-term context and helps identify recent price momentum.
Show Monthly Close:
When enabled, plots a line at the exact closing price from one month ago. Helpful for evaluating medium-term price positioning and monthly trend strength.
Show 3-Month Close:
When enabled, plots a line at the exact closing price from three months ago. Useful for assessing quarterly market shifts, intermediate trend changes, and broader market sentiment.
Show 6-Month Close:
When enabled, plots a line at the exact closing price from six months ago. Useful for identifying semi-annual trends, significant price pivots, and longer-term support/resistance levels.
Show 1-Year Close:
When enabled, plots a line at the exact closing price from one year ago. Excellent for assessing long-term market direction and key annual price levels.
Enable Smoothing:
Activates a Simple Moving Average (SMA) smoothing of historical reference lines, reducing volatility and providing clearer visual references. Recommended for traders preferring less volatile reference levels.
Smoothing Length:
Determines the number of bars used in calculating the SMA smoothing of historical lines. Higher values result in smoother but slightly delayed reference lines; lower values offer more immediate yet more volatile levels.
Use Extended Hours (Intraday Only):
When enabled (only applicable for Stocks US), it accounts for pre-market and after-hours trading sessions, providing accurate intraday historical line calculations based on extended sessions (typically 780 minutes/day total).
Important Notes and Compliance:
- This indicator does not provide trading signals, recommendations, or predictions. It serves purely as a visual analytical tool to supplement traders’ existing methods.
- Historical lines plotted are strictly based on past available price data; the indicator never accesses future data or data outside the scope of Pine Script’s standard capabilities.
- The script incorporates built-in logic to avoid runtime errors if insufficient historical data exists for a selected timeframe, ensuring robustness even with limited historical bars.
- TimeMap is original work developed exclusively by Julien Eche (@Julien_Eche). It does not reuse or replicate third-party or existing open-source scripts.
Recommended Best Practices:
- Use TimeMap as a complementary analytical reference, not as a standalone strategy or trade decision-making tool.
- Adapt displayed historical periods and smoothing settings based on your trading style and market approach.
- Default plot colors are optimized for readability on dark-background charts; adjust as necessary according to your preference and chart color scheme.
This script is published open-source to benefit the entire TradingView community and fully complies with all TradingView script publishing rules and guidelines.
Low Liquidity Zones [PhenLabs]📊 Low Liquidity Zones
Version: PineScript™ v6
📌 Description
Low Liquidity Zones identifies and highlights periods of unusually low trading volume on your chart, marking areas where price movement occurred with minimal participation. These zones often represent potential support and resistance levels that may be more susceptible to price breakouts or reversals when revisited with higher volume.
Unlike traditional volume analysis tools that focus on high volume spikes, this indicator specializes in detecting low liquidity areas where price moved with minimal resistance. Each zone displays its volume delta, providing insight into buying vs. selling pressure during these thin liquidity periods. This combination of low volume detection and delta analysis helps traders identify potential price inefficiencies and weak structures in the market.
🚀 Points of Innovation
• Identifies low liquidity zones that most volume indicators overlook but which often become significant technical levels
• Displays volume delta within each zone, showing net buying/selling pressure during low liquidity periods
• Dynamically adjusts to different timeframes, allowing analysis across multiple time horizons
• Filters zones by maximum size percentage to focus only on precise price levels
• Maintains historical zones until they expire based on your lookback settings, creating a cumulative map of potential support/resistance areas
🔧 Core Components
• Low Volume Detection: Identifies candles where volume falls below a specified threshold relative to recent average volume, highlighting potential liquidity gaps.
• Volume Delta Analysis: Calculates and displays the net buying/selling pressure within each low liquidity zone, providing insight into the directional bias during low participation periods.
• Dynamic Timeframe Adjustment: Automatically scales analysis periods to match your selected timeframe preference, ensuring consistent identification of low liquidity zones regardless of chart settings.
• Zone Management System: Creates, tracks, and expires low liquidity zones based on your configured settings, maintaining visual clarity on the chart.
🔥 Key Features
• Low Volume Identification: Automatically detects and highlights candles where volume falls below your specified threshold compared to the moving average.
• Volume Delta Visualization: Shows the net volume delta within each zone, providing insight into whether buyers or sellers were dominant despite the low overall volume.
• Flexible Timeframe Analysis: Analyze low liquidity zones across multiple predefined timeframes or use a custom lookback period specific to your trading style.
• Zone Size Filtering: Filters out excessively large zones to focus only on precise price levels, improving signal quality.
• Automatic Zone Expiration: Older zones are automatically removed after your specified lookback period to maintain a clean, relevant chart display.
🎨 Visualization
• Volume Delta Labels: Each zone displays its volume delta with “+” or “-” prefix and K/M suffix for easy interpretation, showing the strength and direction of pressure during the low volume period.
• Persistent Historical Mapping: Zones remain visible for your specified lookback period, creating a cumulative map of potential support and resistance levels forming under low liquidity conditions.
📖 Usage Guidelines
Analysis Timeframe
Default: 1D
Range/Options: 15M, 1HR, 3HR, 4HR, 8HR, 16HR, 1D, 3D, 5D, 1W, Custom
Description: Determines the historical period to analyze for low liquidity zones. Shorter timeframes provide more recent data while longer timeframes offer a more comprehensive view of significant zones. Use Custom option with the setting below for precise control.
Custom Period (Bars)
Default: 1000
Range: 1+
Description: Number of bars to analyze when using Custom timeframe option. Higher values show more historical zones but may impact performance.
Volume Analysis
Volume Threshold Divisor
Default: 0.5
Range: 0.1-1.0
Description: Maximum volume relative to average to identify low volume zones. Example: 0.5 means volume must be below 50% of the average to qualify as low volume. Lower values create more selective zones while higher values identify more zones.
Volume MA Length
Default: 15
Range: 1+
Description: Period length for volume moving average calculation. Shorter periods make the indicator more responsive to recent volume changes, while longer periods provide a more stable baseline.
Zone Settings
Zone Fill Color
Default: #2196F3 (80% transparency)
Description: Color and transparency of the low liquidity zones. Choose colors that stand out against your chart background without obscuring price action.
Maximum Zone Size %
Default: 0.5
Range: 0.1+
Description: Maximum allowed height of a zone as percentage of price. Larger zones are filtered out. Lower values create more precise zones focusing on tight price ranges.
Display Options
Show Volume Delta
Default: true
Description: Toggles the display of volume delta within each zone. Enabling this provides additional insight into buying vs. selling pressure during low volume periods.
Delta Text Position
Default: Right
Options: Left, Center, Right
Description: Controls the horizontal alignment of the delta text within zones. Adjust based on your chart layout for optimal readability.
✅ Best Use Cases
• Identifying potential support and resistance levels that formed during periods of thin liquidity
• Spotting price inefficiencies where larger players may have moved price with minimal volume
• Finding low-volume consolidation areas that may serve as breakout or reversal zones when revisited
• Locating potential stop-hunting zones where price moved on minimal participation
• Complementing traditional support/resistance analysis with volume context
⚠️ Limitations
• Requires volume data to function; will not work on symbols where the data provider doesn’t supply volume information
• Low volume zones don’t guarantee future support/resistance - they simply highlight potential areas of interest
• Works best on liquid instruments where volume data has meaningful fluctuations
• Historical analysis is limited by the maximum allowed box count (500) in TradingView
• Volume delta in some markets may not perfectly reflect buying vs. selling pressure due to data limitations
💡 What Makes This Unique
• Focus on Low Volume: Unlike some indicators that highlight high volume events particularly like our very own TLZ indicator, this tool specifically identifies potentially significant price zones that formed with minimal participation.
• Delta + Low Volume Integration: Combines volume delta analysis with low volume detection to reveal directional bias during thin liquidity periods.
• Flexible Lookback System: The dynamic timeframe system allows analysis across any timeframe while maintaining consistent zone identification criteria.
• Support/Resistance Zone Generation: Automatically builds a visual map of potential technical levels based on volume behavior rather than just price patterns.
🔬 How It Works
1. Volume Baseline Calculation:
The indicator calculates a moving average of volume over your specified period to establish a baseline for normal market participation. This adaptive baseline accounts for natural volume fluctuations across different market conditions.
2. Low Volume Detection:
Each candle’s volume is compared to the moving average and flagged when it falls below your threshold divisor. The indicator also filters zones by maximum size to ensure only precise price levels are highlighted.
3. Volume Delta Integration:
For each identified low volume candle, the indicator retrieves the volume delta from a lower timeframe. This delta value is formatted with appropriate scaling (K/M) and displayed within the zone.
4. Zone Management:
New zones are created and tracked in a dynamic array, with each zone extending rightward until it expires. The system automatically removes expired zones based on your lookback period to maintain a clean chart.
💡 Note:
Low liquidity zones often represent areas where price moved with minimal participation, which can indicate potential market inefficiencies. These zones frequently become important support/resistance levels when revisited, especially if approached with higher volume. Consider using this indicator alongside traditional technical analysis tools for comprehensive market context. For best results, experiment with different volume threshold settings based on the specific instrument’s typical volume patterns.
Majors Sync | QuantEdgeBIntroducing MajorsSyn c by QuantEdgeB
🔹 Overview
🚀 Dynamic Rotation System for BTC, ETH & SOL
MajorsSync is a powerful, rotation-based strategy designed to systematically identify the leading cryptocurrency among the top three majors: Bitcoin (BTC), Ethereum (ETH), and Solana (SOL).
By analyzing inter-market strength, pairwise trend dominance, and individual trend quality, MajorsSync dynamically shifts exposure toward the asset with the highest potential for outperformance, while de-risking during unfavorable conditions.
✨ Core Objective
📌 To allocate capital to the strongest-performing major—BTC, ETH, or SOL—while avoiding underperformers and unnecessary exposure during uncertain market phases.
🧠 How It Works
Majors Sync uses a multi-tiered decision structure:
🔹 1. Individual Asset Trend Evaluation
Each asset is scored using a Trend Performance Index (TPI). These are proprietary models capturing medium-term momentum and structure for:
• BTC
• ETH
• SOL
🔹 2. Pairwise Relative Strength Matrix
Compute TPI values between the asset pairs:
• ETHBTC → Is ETH stronger than BTC?
• SOLETH → Is SOL stronger than ETH?
• SOLBTC → Is SOL stronger than BTC?
These relative TPI readings help construct a score matrix to rank assets 0–2.
🔹 3. Signal Confirmation
Only when the top-ranked asset has a positive TPI, a Long signal is triggered on that asset.
Otherwise, if no asset meets the threshold, the system remains in Cash/Neutral mode to protect capital.
🧮 Capital Allocation Logic
📊 Allocation always rotates to:
• ✅ The strongest asset with a positive trend
• 🛑 Otherwise, goes neutral/cash (no trade)
This ensures capital is placed in high-probability zones only.
💼 Equity System
🧮 An internal equity engine simulates dynamic capital rotation by reallocating to the top-performing major (BTC, ETH, or SOL) at each bar. This allows for transparent tracking of historical strategy performance.
• 💡 If BTC is the top asset → System follows BTC's price change
• 💡 If ETH becomes dominant → It reallocates to ETH
• 💡 If SOL takes over → Position shifts to SOL
• 📉 No asset qualified? → Strategy holds cash
You also get a Buy & Hold BTC benchmark for direct comparison.
⚠️ This simulation reflects past behavior and is not indicative of future results.
📊 Dashboard & Visuals
The built-in dashboard table displays:
• 🧠 Asset Trends (BTC, ETH, SOL)
• 🧩 Matrix values (e.g., ETH vs BTC, SOL vs ETH)
• 🏁 Final Signal Output (which asset is selected)
• 🔁 Real-time Strategy Equity vs Buy & Hold
💪 Why It Works
Majors Sync blends:
• ✅ Inter-market structure (pairwise dominance)
• ✅ Intra-asset momentum (standalone TPI)
• ✅ Position filtering (only acts on positive signals)
• ✅ Capital efficiency (rotates rather than overtrades)
This design reduces drawdowns, avoids stagnation, and seeks to capture medium-term leadership shifts among the top crypto majors.
📊 MajorSync Backtest Metrics
🔹 Sharpe Ratio
Shows the risk-adjusted return by comparing the strategy's return to its overall volatility. Higher is better — it means you're getting more reward per unit of risk.
🔹 Sortino Ratio
Similar to Sharpe, but focuses only on downside volatility (the bad kind). This makes it a better reflection of how the system handles losses specifically.
🔹 Omega Ratio (Ω)
Measures how often the system generates profitable returns versus unprofitable ones. A value above 1 means it wins more than it loses — and the higher it goes, the better.
🔹 Equity Max Drawdown (Eq.Max DD)
This is the deepest decline from peak equity during the test. Lower drawdown means less risk of big losses.
📌 Disclaimer: Backtest results are based on historical data and past market behavior. Performance is not indicative of future results and should not be considered financial advice. Always conduct your own backtests and research before making any investment decisions. 🚀
🚀 Key Benefits
✔️ Trend-Following + Relative Strength Hybrid
✔️ Rotational Capital Efficiency
✔️ De-risking in Weak Conditions
✔️ Optimized for Swing and Medium-Term Positioning
✔️ Visual Clarity + Smart Allocation
🔧 Settings Overview
• Color Mode – Switch visual palette for the base Trend
• Trend Color – Toggle trend-based bar coloring
• Enable Backtest Table – Show historical performance metrics
• Start Date – Control backtest window
🏁 Conclusion
Majors Sync is your intelligent rotation engine for crypto majors.
Instead of guessing which coin to hold, let the system rotate for you—objectively, consistently, and visually.
📈 Be in BTC when it leads. Switch to ETH or SOL when strength shifts. Sit in cash when needed.
📌 Master the market with precision and confidence | QuantEdgeB
🔹 Disclaimer: Past performance is not indicative of future results. No trading strategy can guarantee success in financial markets.
🔹 Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.
HEMA Trend Levels [AlgoAlpha]OVERVIEW
This script plots two Hull-EMA (HEMA) curves to define a color-coded dynamic trend zone and generate context-aware breakout levels, allowing traders to easily visualize prevailing momentum and identify high-probability breakout retests. The script blends smoothed price tracking with conditional box plotting, delivering both trend-following and mean-reversion signals within one system. It is designed to be simple to read visually while offering nuanced trend shifts and test confirmations.
█ CONCEPTS
The Hull-EMA (HEMA) is a hybrid moving average combining the responsiveness of short EMAs with the smoothness of longer ones. It applies layered smoothing: first by subtracting a full EMA from a half-length EMA (doubling the short EMA's weight), and then by smoothing the result again with the square root of the original length. This process reduces lag while maintaining clarity in direction changes. In this script, two HEMAs—fast and slow—are used to define the trend structure and trigger events when they cross. These crossovers generate "trend shift boxes"—temporary support or resistance zones drawn immediately after trend transitions—to detect price retests in the new direction. When price cleanly retests these levels, the script marks them as confirmations with triangle symbols, helping traders isolate better continuation setups. Color-coded bars further enhance visual interpretation: bullish bars when price is above both HEMAs, bearish when below, and neutral (gray) when indecisive.
█ FEATURES
Bullish and bearish bar coloring based on price and HEMA alignment.
Box plotting at each crossover (bullish or bearish) to create short-term decision zones.
Real-time test detection: price must cleanly test and bounce from box levels to be considered valid.
Multiple alert conditions: crossover alerts, test alerts, and trend continuation alerts.
█ USAGE
Use this indicator on any time frame and asset. Adjust HEMA lengths to match your trading style—shorter lengths for scalping or intraday, longer for swing trading. The shaded area between HEMAs helps visually define the current trend. Watch for crossovers: a bullish crossover plots a green support box just below price, and a bearish one plots a red resistance box just above. These zones act as short-term decision points. When price returns to test a box and confirms with strong rejection (e.g., closes above for bullish or below for bearish), a triangle symbol is plotted. These tests can signal strong trend continuation. For traders looking for clean entries, combining the crossover with a successful retest improves reliability. Alerts can be enabled for all key signals: trend shift, test confirmations, and continuation conditions, making it suitable for automated setups or discretionary traders tracking multiple charts.
Dynamic Momentum Bands | AlphaAlgosDynamic Momentum Bands | AlphaAlgos
Overview
The Dynamic Momentum Bands indicator is an advanced technical analysis tool that combines multiple analytical techniques to provide a comprehensive view of market momentum and trend dynamics. By integrating RSI (Relative Strength Index), volatility analysis, and adaptive moving averages, this indicator offers traders a nuanced perspective on market conditions.
Key Features
Adaptive band calculation based on price momentum
Integrated RSI-driven volatility scaling
Multiple moving average type options (EMA, SMA, VWMA)
Smooth, gradient-based band visualization
Optional price bar coloring for trend identification
Technical Methodology
The indicator employs a sophisticated approach to market analysis:
1. Momentum Calculation
Calculates RSI using a customizable length
Uses RSI to dynamically adjust band volatility
Scales band width based on distance from the 50 RSI level
2. Band Construction
Applies a selected moving average type to the price source
Calculates deviation using ATR (Average True Range)
Smooths band edges for improved visual clarity
Configuration Options
Core Settings:
Price Source: Choose the price data used for calculations
RSI Length: Customize the RSI calculation period (1-50)
Band Length: Adjust the moving average period (5-100)
Volatility Multiplier: Fine-tune band width
Band Type: Select between EMA, SMA, and VWMA
Visual Settings:
Bar Coloring: Toggle color-coded price bars
Gradient-based band visualization
Smooth color transitions for trend representation
Trend Identification
The indicator provides trend insights through:
Color-coded bands (blue for bullish, pink for bearish)
Smooth gradient visualization
Optional price bar coloring
Trading Applications
Trend Following:
- Use band position relative to price as trend indicator
- Identify momentum shifts through color changes
- Utilize gradient zones for trend strength assessment
Volatility Analysis:
Observe band width changes
Detect potential breakout or consolidation periods
Use RSI-driven volatility scaling for market context
Best Practices
Adjust RSI length to match trading timeframe
Experiment with different moving average types
Use in conjunction with other technical indicators
Consider volatility multiplier for different market conditions
This indicator is provided for informational purposes only. Always use proper risk management when trading. Past performance is not indicative of future results. Not financial Advise
Advanced ORB IndicatorAdvanced ORB (Opening Range Breakout) Indicator
Overview
The Advanced ORB Indicator is a sophisticated trading tool designed to capture high-probability breakout opportunities across multiple markets. By identifying the opening range of a trading session and detecting meaningful breakouts, this indicator helps traders enter trending moves with strong momentum while filtering out false signals.
Core Concept
The Opening Range Breakout strategy is based on the principle that the initial trading range of a session often defines key support and resistance levels. When price breaks convincingly beyond this range with proper confirmation, it frequently indicates the beginning of a directional move that can persist throughout the session.
Key Features
### Intelligent Market Detection
- Automatically identifies market type (US Stocks, Forex, Crypto, EU/Asia Stocks)
- Applies optimal default timings based on market characteristics
- Configurable time zones (Exchange, UTC, Local) for precise session timing
Customizable Session Settings
- Adjustable opening range duration (15-240 minutes)
- Flexible reset periods (Daily, Weekly, Monthly, or Never)
- Custom session start times to match specific market opens or pre-market periods
Advanced Signal Filtering
- Multi-factor confirmation system requiring strong candle bodies, proper wick ratios, and minimum breakout percentages
- Smart cooldown periods preventing clustered signals
- Retracement detection that resets signals after meaningful pullbacks
Quality Control Mechanisms
- Volume threshold filter for stronger conviction entries
- RSI-based filters to avoid overbought/oversold conditions
- Trend alignment validation using EMA and directional analysis
- Consecutive candle confirmation for higher reliability
Visual Clarity
- Clear high/low boundary visualization
- Comprehensive status panel showing current levels, trend status, and filter conditions
- Clean, non-repainting signal triangles at breakout points
Trading Applications
Stocks & ETFs
Perfect for capturing morning momentum after market open, especially effective on US equities where the first 30-60 minutes often set the tone for the day. Excellent for gap fills, trend continuations, and reversal confirmations.
Forex & Futures
Ideal for session-based strategies around London/New York opens, capturing institutional order flow as major players enter the market. Can be configured for H4/H1 longer-term breakouts in 24-hour markets.
Cryptocurrency
Powerful for identifying key breakout levels in volatile crypto markets, with adjustable parameters to filter out noise while catching significant moves. Especially effective during high-volume periods following consolidation.
Strategic Implementation
The indicator excels when used as part of a complete trading system. Consider these approaches:
1. Pure Momentum Strategy: Enter on signal, exit at fixed R:R or end of session
2. Trend Continuation: Only take signals in the direction of the higher timeframe trend
3. Support/Resistance Validation: Combine with key S/R levels for higher probability entries
4. Volume Profile Confirmation: Use in conjunction with volume profile to verify breakout significance
Optimization Tips
- Adjust Opening Range Duration based on market volatility (shorter for choppy markets, longer for trending)
- Increase filter requirements during uncertain market conditions
- Loosen filters during strong trending environments
- Use longer durations (120+ minutes) for swing trading setups
- Consider Weekly/Monthly reset periods for positional trading approaches
Performance Notes
The Advanced ORB Indicator is designed to produce fewer, higher-quality signals rather than frequent low-conviction entries. The multiple confirmation requirements mean you'll catch fewer false breakouts at the expense of occasionally later entries.
For best results, combine with proper risk management, position sizing, and an understanding of the broader market context.
*This indicator works on all timeframes but performs optimally on 1-minute to 15-minute charts for intraday trading and 1-hour to 4-hour charts for swing trading opportunities.*
// @version=5
indicator("Advanced ORB Indicator", overlay=true)
// ===================================================================
// SIGNAL REQUIREMENTS DOCUMENTATION
// ===================================================================
//
// BULL SIGNAL REQUIREMENTS:
// - ORB period must be completed (not in the opening range duration anymore)
// - Price must close above the ORB high (if waitForClose is enabled)
// - Candle must have a strong body (body to range ratio >= minBodyToRangeRatio)
// - Valid upper wick (upper wick to body ratio <= wickThreshold)
// - Bullish candle (close > open)
// - Consecutive candle confirmation (if enabled, requires multiple candles meeting criteria)
// - Volume filter (if enabled, volume > average volume * threshold)
// - RSI filter (if enabled, RSI must not be overbought)
// - EMA filter (if enabled, price must be above short EMA)
// - Trend filter (if enabled, must be in an uptrend)
// - Cooldown period satisfied (minimum bars between signals)
// - Not already signaled a bull breakout for this ORB (unless reset by retracement)
//
// BEAR SIGNAL REQUIREMENTS:
// - ORB period must be completed (not in the opening range duration anymore)
// - Price must close below the ORB low (if waitForClose is enabled)
// - Candle must have a strong body (body to range ratio >= minBodyToRangeRatio)
// - Valid lower wick (lower wick to body ratio <= wickThreshold)
// - Bearish candle (close < open)
// - Consecutive candle confirmation (if enabled, requires multiple candles meeting criteria)
// - Volume filter (if enabled, volume > average volume * threshold)
// - RSI filter (if enabled, RSI must not be oversold)
// - EMA filter (if enabled, price must be below short EMA)
// - Trend filter (if enabled, must be in a downtrend)
// - Cooldown period satisfied (minimum bars between signals)
// - Not already signaled a bear breakout for this ORB (unless reset by retracement)
//
// SIGNAL RESET CONDITIONS (for both bull and bear):
// - A significant price retracement happens (determined by retracePercent)
// - Cooldown period expires (minimum bars between signals)
// ===================================================================
// ===================================================================
// SETTINGS GUIDE - DETAILED EXPLANATION
// ===================================================================
//
// MARKET SETTINGS
// ---------------------------------------------------------------------
// Market Type: Select your market or use auto-detection
// - US Stocks: NYSE, NASDAQ, etc. (9:30 AM default open)
// - Forex: Currency pairs (uses midnight or London open)
// - Crypto: Digital currencies (uses midnight UTC)
// - EU Stocks: European exchanges (9:00 AM default)
// - Asia Stocks: Asian exchanges (9:00 AM default)
// - Custom: Manually set your preferred session time
//
// Auto-Detect Market Type: Automatically identifies the market from symbol
// - Enable for convenience when switching between different markets
// - Disable to manually set your preferred market type
//
// Use Market Default Timing: Applies optimal session start times for selected market
// - Enable to use proven default timings for the market
// - Disable to set custom session start times
//
// Time Zone: Sets the reference time zone for session calculations
// - Exchange: Uses the exchange's native time zone (recommended)
// - UTC: Uses Coordinated Universal Time
// - Local: Uses your local computer's time zone
//
// TIME SETTINGS
// ---------------------------------------------------------------------
// Session Start Hour/Minute: Sets when the opening range begins
// - Only active when "Use Market Default Timing" is disabled
// - US Stocks typically use 9:30 AM
// - For pre-market analysis, try 4:00 AM (US) or 8:00 AM (EU)
//
// Opening Range Duration: How long to measure the initial range (minutes)
// - 30-60 mins: Standard for daily ORB strategies
// - 15 mins: More responsive, good for volatile markets
// - 120 mins: More stable, fewer false signals
//
// Reset Period: When to calculate a new opening range
// - Daily: Most common, resets each trading day
// - Weekly: Weekly opening range breakout strategy
// - Monthly: Long-term support/resistance levels
// - Never: Continuous tracking without resetting
//
// SIGNAL QUALITY SETTINGS
// ---------------------------------------------------------------------
// Minimum Bars Between Signals: Prevents clustering of multiple signals
// - Higher values (8-10): Fewer signals, better quality
// - Lower values (3-5): More signals, requires more filtering
//
// Required Retracement % Before New Signal: How far price must pull back
// - Higher values (50-60%): Only signals after significant pullbacks
// - Lower values (20-30%): More signals, may include false breakouts
//
// Minimum Breakout % Required: Strength needed for valid breakout
// - Higher values (0.5-1.0%): Stronger confirmation, fewer false breakouts
// - Lower values (0.1-0.3%): More sensitive, good for low-volatility
//
// Minimum Body to Range Ratio %: Requires strong candles for signals
// - Higher values (70-80%): Only strong momentum candles trigger signals
// - Lower values (40-50%): More signals, includes weaker breakouts
//
// BREAKOUT SETTINGS
// ---------------------------------------------------------------------
// Max Wick to Body Ratio: Controls acceptable candle shape
// - Lower values (0.2-0.3): Only clean breakout candles
// - Higher values (0.5-0.6): More signals, includes wicks
//
// Use Close Price: Uses close instead of High/Low for breakouts
// - Enable for more reliable but delayed confirmation
// - Disable for earlier signals using High/Low prices
//
// Wait for Candle Close: Only signals after candle completes
// - Enable to avoid false breakouts (recommended)
// - Disable for earlier entry but higher risk
//
// FILTER SETTINGS
// ---------------------------------------------------------------------
// Filter Signals Based on Trend: Aligns signals with the overall trend
// - Enable to filter out counter-trend signals (recommended)
// - Disable for range-bound markets or counter-trend strategies
//
// Trend Detection Period: Lookback period for trend calculation
// - Longer periods (50-100): Identifies major trends
// - Shorter periods (20-30): More responsive to recent price action
//
// Trend Strength Threshold: How strong trend must be
// - Higher values (0.7-0.8): Only strong trends generate signals
// - Lower values (0.5-0.6): More signals in choppy markets
//
// Use Volume Filter: Requires above-average volume for signals
// - Enable for stocks and futures (recommended)
// - May disable for some forex pairs with unreliable volume data
//
// Volume Threshold: How much above average volume is required
// - Higher values (2.0-3.0x): Only significant volume spikes
// - Lower values (1.2-1.5x): More signals, less volume confirmation
//
// Use RSI Filter: Prevents signals in overbought/oversold conditions
// - Enable to avoid exhausted moves
// - Disable for strong trend following
//
// Use EMA Alignment Filter: Ensures price is in the right direction
// - Enable for trend confirmation (recommended)
// - Disable for early reversal signals
//
// Require Consecutive Candle Confirmation: Needs multiple confirming candles
// - Enable for higher quality signals
// - Disable for faster but riskier entries
//
// DISPLAY SETTINGS
// ---------------------------------------------------------------------
// Show Label with Values: Displays current ORB levels and status
// Show Range Boundaries: Displays high/low lines on chart
// High/Low Boundary Color: Customize appearance
//
// ===================================================================
// RECOMMENDED SETTINGS BY MARKET TYPE
// ===================================================================
//
// US STOCKS - STANDARD
// ---------------------------------------------------------------------
// - Market Type: US Stocks
// - Opening Range Duration: 30 minutes
// - Reset Period: Daily
// - Wait for Candle Close: Enabled
// - Use Volume Filter: Enabled (Volume Threshold: 1.5-2.0x)
// - Use Trend Filter: Enabled
// - Minimum Breakout %: 0.3-0.5%
//
// US STOCKS - EARNINGS/HIGH VOLATILITY
// ---------------------------------------------------------------------
// - Opening Range Duration: 60 minutes (more stable)
// - Minimum Breakout %: 0.7-1.0% (stronger moves required)
// - Minimum Bars Between Signals: 8-10 (avoid whipsaws)
// - Required Retracement %: 40-50% (deeper pullbacks)
// - Volume Threshold: 2.5-3.0x (higher volume confirmation)
//
// CRYPTO
// ---------------------------------------------------------------------
// - Market Type: Crypto
// - Opening Range Duration: 120 minutes (crypto needs longer)
// - Reset Period: Daily
// - Minimum Breakout %: 1.0-1.5% (higher volatility needs stronger breakouts)
// - Volume Threshold: 2.0-2.5x
// - Consider disabling RSI Filter (trending crypto often stays overbought/oversold)
//
// FOREX - MAJOR PAIRS
// ---------------------------------------------------------------------
// - Market Type: Forex
// - Session Start: Consider 8:00 AM (London open) or 5:00 PM (Asian open)
// - Opening Range Duration: 60-120 minutes
// - Min Body to Range Ratio: 50-60% (forex can have smaller bodies)
// - Consider disabling Volume Filter (unreliable on some platforms)
// - Trend Strength Threshold: 0.6-0.7 (forex tends to trend well)
//
// EU STOCKS
// ---------------------------------------------------------------------
// - Market Type: EU Stocks
// - Opening Range Duration: 60 minutes
// - Reset Period: Daily
// - Use EMA Alignment: Enabled
// - Use Volume Filter: Enabled
//
// SMALL CAP/VOLATILE STOCKS
// ---------------------------------------------------------------------
// - Opening Range Duration: 15-30 minutes (captures early moves)
// - Minimum Breakout %: 1.0-2.0% (needs stronger breakouts)
// - Volume Threshold: 3.0x (needs significant volume)
// - Max Wick to Body Ratio: 0.3 (cleaner breakouts)
// - Use Consecutive Candle Confirmation: Enabled (2-3 candles)
//
// LOW VOLATILITY ENVIRONMENT
// ---------------------------------------------------------------------
// - Opening Range Duration: 30-60 minutes
// - Minimum Breakout %: 0.2-0.3% (lower threshold for tight ranges)
// - Required Retracement %: 20-30% (smaller pullbacks)
// - Consider disabling Consecutive Candle Confirmation
//
// HIGH VOLATILITY ENVIRONMENT
// ---------------------------------------------------------------------
// - Opening Range Duration: 60-120 minutes (more stable)
// - Minimum Breakout %: 0.8-1.5% (stronger confirmation)
// - Required Retracement %: 50-60% (deeper pullbacks)
// - Minimum Bars Between Signals: 8-10 (avoid choppy signals)
// - Use Consecutive Candle Confirmation: Enabled (2-3 candles)
// ===================================================================
Trend Magnet ProTrend Magnet Pro – Advanced Adaptive Trend & Oscillator Indicator
Overview:
Trend Magnet Pro is a powerful, fully customizable indicator that combines adaptive moving averages with a dynamic oscillator to provide a comprehensive view of market trends and potential reversal points. It integrates multiple analytical layers—volatility, volume, multi-timeframe analysis, and divergence detection—to help traders make informed decisions.
Key Features & Competitive Advantages:
Adaptive Moving Average (MA):
The indicator calculates an adaptive MA by blending your chosen MA type (SMA, EMA, WMA, VWMA, KAMA, or LSMA) with Kaufman’s Adaptive Moving Average (KAMA). This hybrid approach adjusts dynamically to market volatility, ensuring smoother trend detection and reducing noise during erratic periods.
Custom Oscillator Calculation:
A separate oscillator is computed based on the difference between the closing price and a dedicated oscillator MA. This difference is normalized using an ATR-based volatility measure and then smoothed with the Hull MA. This process enhances signal precision by filtering out minor fluctuations.
ATR & Volume Integration:
Using the Average True Range (ATR) for volatility and a volume spike detection mechanism, the indicator filters out weak signals. These features ensure that only significant market moves trigger trading signals.
Multi-Timeframe Analysis:
By incorporating an oscillator analysis on a higher timeframe, Trend Magnet Pro provides an extra layer of confirmation. This multi-timeframe approach improves the reliability of signals, making it easier to identify sustained trends.
Divergence Detection:
The indicator automatically detects bullish and bearish divergences between price movements and the oscillator. These divergences can serve as early warnings for potential trend reversals, adding further depth to your market analysis.
Visual Clarity & Customization:
Trend Magnet Pro offers:
A separate oscillator panel with color-coded histograms.
Overlay plots of the adaptive MA on the price chart.
Clear visual markers for buy and sell signals.
Adjustable parameters for pivot detection and oscillator pressure thresholds.
How to Use Trend Magnet Pro:
Main MA Settings:
Choose your preferred MA type and set the MA length for the main trend analysis.
The adaptive algorithm will blend this with KAMA based on current volatility.
Oscillator Settings:
Set the oscillator’s MA type and its smoothing length.
Fine-tune the oscillator parameters to match your trading style and market conditions.
Common Settings:
Define the ATR length for volatility measurement.
Adjust the volume multiplier and volume SMA period to enable volume spike detection.
Set the low and high pressure thresholds to determine oscillator color changes, reflecting different market pressures.
Multi-Timeframe & Divergence:
Optionally, select a higher timeframe for the oscillator to provide additional confirmation.
Enable divergence detection to highlight potential trend reversals based on price and oscillator pivots.
Signal Interpretation:
Buy Signal: Triggered when the oscillator crosses above zero, accompanied by volume spikes and confirmed by both multi-timeframe analysis and price being above the adaptive MA.
Sell Signal: Triggered under opposite conditions, where the oscillator crosses below zero and the price is below the adaptive MA.
By adjusting these settings, you can tailor Trend Magnet Pro to your specific market and trading strategy, making it an invaluable tool for both trend-following and reversal trading.
Русское Описание
Trend Magnet Pro – Индикатор Адаптивного Тренда и Осциллятора
Обзор:
Trend Magnet Pro – это мощный и полностью настраиваемый индикатор, который объединяет адаптивные скользящие средние с динамическим осциллятором для комплексного анализа рыночных трендов и потенциальных точек разворота. Он интегрирует несколько аналитических слоёв — волатильность, объём, мультитаймфреймовый анализ и детекцию дивергенций — что позволяет принимать обоснованные торговые решения.
Основные преимущества и функциональные возможности:
Адаптивная Скользящая Средняя (MA):
Индикатор рассчитывает адаптивную MA, комбинируя выбранный тип (SMA, EMA, WMA, VWMA, KAMA или LSMA) с Kaufman’s Adaptive Moving Average (KAMA). Такой гибридный подход динамически подстраивается под рыночную волатильность, обеспечивая более плавное определение трендов и снижая уровень шума в нестабильные периоды.
Кастомизированный Расчёт Осциллятора:
Осциллятор вычисляется отдельно на основе разницы между ценой закрытия и специально рассчитанной MA для осциллятора. Эта разница нормализуется с использованием ATR (Average True Range) для оценки волатильности и сглаживается при помощи Hull MA, что позволяет точнее фиксировать значимые сигналы и исключать мелкие колебания.
Интеграция ATR и Объёма:
Применение ATR для измерения волатильности в сочетании с механизмом обнаружения всплесков объёма позволяет отсеивать слабые сигналы. Эти функции гарантируют, что торговые сигналы возникают только при значительных движениях рынка.
Мультитаймфреймовый Анализ:
Встроенный анализ осциллятора на старшем таймфрейме даёт дополнительное подтверждение сигналов. Такой подход повышает надёжность сигналов, помогая выявлять устойчивые тренды.
Детекция Дивергенций:
Индикатор автоматически обнаруживает бычьи и медвежьи дивергенции между движением цены и осциллятором. Эти дивергенции могут служить ранним предупреждением о потенциальном развороте тренда, что добавляет глубины вашему анализу.
Удобство Визуализации и Настройки:
Trend Magnet Pro предлагает:
Отдельную панель осциллятора с цветными гистограммами.
Наложение адаптивной MA на график цены.
Чёткие визуальные сигналы для покупки и продажи.
Настраиваемые параметры для обнаружения пивотов и уровней давления осциллятора.
Как работать с Trend Magnet Pro:
Настройки Основной MA:
Выберите предпочитаемый тип MA и установите период для анализа основного тренда.
Адаптивный алгоритм объединит выбранную MA с KAMA на основе текущей волатильности.
Настройки Осциллятора:
Задайте тип MA для осциллятора и установите период сглаживания.
Подберите параметры осциллятора, чтобы он соответствовал вашему стилю торговли и рыночным условиям.
Общие Настройки:
Определите период ATR для измерения волатильности.
Настройте множитель объёма и период SMA объёма для обнаружения всплесков.
Установите пороги низкого и высокого давления, которые будут влиять на цветовую индикацию осциллятора и отражать рыночное давление.
Мультитаймфреймовый Анализ и Дивергенции:
При необходимости выберите старший таймфрейм для осциллятора, чтобы обеспечить дополнительное подтверждение сигналов.
Включите функцию детекции дивергенций для выявления потенциальных разворотов тренда на основе пивотов цены и осциллятора.
Интерпретация Сигналов:
Сигнал на покупку: Формируется, когда осциллятор пересекает ноль снизу вверх, подтверждаясь всплеском объёма, анализом на старшем таймфрейме и положением цены выше адаптивной MA.
Сигнал на продажу: Формируется при обратных условиях – когда осциллятор пересекает ноль сверху вниз, а цена находится ниже адаптивной MA.
Настройка параметров позволяет адаптировать Trend Magnet Pro под конкретный рынок и торговую стратегию, делая его незаменимым инструментом как для трендового анализа, так и для поиска разворотных сигналов.
Multi-Anchored Linear Regression Channels [TANHEF]█ Overview:
The 'Multi-Anchored Linear Regression Channels ' plots multiple dynamic regression channels (or bands) with unique selectable calculation types for both regression and deviation. It leverages a variety of techniques, customizable anchor sources to determine regression lengths, and user-defined criteria to highlight potential opportunities.
Before getting started, it's worth exploring all sections, but make sure to review the Setup & Configuration section in particular. It covers key parameters like anchor type, regression length, bias, and signal criteria—essential for aligning the tool with your trading strategy.
█ Key Features:
⯁ Multi-Regression Capability:
Plot up to three distinct regression channels and/or bands simultaneously, each with customizable anchor types to define their length.
⯁ Regression & Deviation Methods:
Regressions Types:
Standard: Uses ordinary least squares to compute a simple linear trend by averaging the data and deriving a slope and endpoints over the lookback period.
Ridge: Introduces L2 regularization to stabilize the slope by penalizing large coefficients, which helps mitigate multicollinearity in the data.
Lasso: Uses L1 regularization through soft-thresholding to shrink less important coefficients, yielding a simpler model that highlights key trends.
Elastic Net: Combines L1 and L2 penalties to balance coefficient shrinkage and selection, producing a robust weighted slope that handles redundant predictors.
Huber: Implements the Huber loss with iteratively reweighted least squares (IRLS) and EMA-style weights to reduce the impact of outliers while estimating the slope.
Least Absolute Deviations (LAD): Reduces absolute errors using iteratively reweighted least squares (IRLS), yielding a slope less sensitive to outliers than squared-error methods.
Bayesian Linear: Merges prior beliefs with weighted data through Bayesian updating, balancing the prior slope with data evidence to derive a probabilistic trend.
Deviation Types:
Regressive Linear (Reverse): In reverse order (recent to oldest), compute weighted squared differences between the data and a line defined by a starting value and slope.
Progressive Linear (Forward): In forward order (oldest to recent), compute weighted squared differences between the data and a line defined by a starting value and slope.
Balanced Linear: In forward order (oldest to newest), compute regression, then pair to source data in reverse order (newest to oldest) to compute weighted squared differences.
Mean Absolute: Compute weighted absolute differences between each data point and its regression line value, then aggregate them to yield an average deviation.
Median Absolute: Determine the weighted median of the absolute differences between each data point and its regression line value to capture the central tendency of deviations.
Percent: Compute deviation as a percentage of a base value by multiplying that base by the specified percentage, yielding symmetric positive and negative deviations.
Fitted: Compare a regression line with high and low series values by computing weighted differences to determine the maximum upward and downward deviations.
Average True Range: Iteratively compute the weighted average of absolute differences between the data and its regression line to yield an ATR-style deviation measure.
Bias:
Bias: Applies EMA or inverse-EMA style weighting to both Regression and/or Deviation, emphasizing either recent or older data.
⯁ Customizable Regression Length via Anchors:
Anchor Types:
Fixed: Length.
Bar-Based: Bar Highest/Lowest, Volume Highest/Lowest, Spread Highest/Lowest.
Correlation: R Zero, R Highest, R Lowest, R Absolute.
Slope: Slope Zero, Slope Highest, Slope Lowest, Slope Absolute.
Indicator-Based: Indicators Highest/Lowest (ADX, ATR, BBW, CCI, MACD, RSI, Stoch).
Time-Based: Time (Day, Week, Month, Quarter, Year, Decade, Custom).
Session-Based: Session (Tokyo, London, New York, Sydney, Custom).
Event-Based: Earnings, Dividends, Splits.
External: Input Source Highest/Lowest.
Length Selection:
Maximum: The highest allowed regression length (also fixed value of “Length” anchor).
Minimum: The shortest allowed length, ensuring enough bars for a valid regression.
Step: The sampling interval (e.g., 1 checks every bar, 2 checks every other bar, etc.). Increasing the step reduces the loading time, most applicable to “Slope” and “R” anchors.
Adaptive lookback:
Adaptive Lookback: Enable to display regression regardless of too few historical bars.
⯁ Selecting Bias:
Bias applies separately to regression and deviation.
Positive values emphasize recent data (EMA-style), negative invert, and near-zero maintains balance. (e.g., a length 100, bias +1 gives the newest price ~7× more weight than the oldest).
It's best to apply bias to both (regression and deviation) or just the deviation. Biasing only regression may distort deviation visually, while biasing both keeps their relationship intuitive. Using bias only for deviation scales it without altering regression, offering unique analysis.
⯁ Scale Awareness:
Supports linear and logarithmic price scaling, the regression and deviations adjust accordingly.
⯁ Signal Generation & Alerts:
Customizable entry/exit signals and alerts, detailed in the dedicated section below.
⯁ Visual Enhancements & Real-World Examples:
Optional on-chart table display summarizing regression input criteria (display type, anchor type, source, regression type, regression bias, deviation type, deviation bias, deviation multiplier) and key calculated metrics (regression length, slope, Pearson’s R, percentage position within deviations, etc.) for quick reference.
█ Understanding R (Pearson Correlation Coefficient):
Pearson’s R gauges data alignment to a straight-line trend within the regression length:
Range: R varies between –1 and +1.
R = +1 → Perfect positive correlation (strong uptrend).
R = 0 → No linear relationship detected.
R = –1 → Perfect negative correlation (strong downtrend).
This script uses Pearson’s R as an anchor, adjusting regression length to target specific R traits. Strong R (±1) follows the regression channel, while weak R (0) shows inconsistency.
█ Understanding the Slope:
The slope is the direction and rate at which the regression line rises or falls per bar:
Positive Slope (>0): Uptrend – Steeper means faster increase.
Negative Slope (<0): Downtrend – Steeper means sharper drop.
Zero or Near-Zero Slope: Sideways – Indicating range-bound conditions.
This script uses highest and lowest slope as an anchor, where extremes highlight strong moves and trend lines, while values near zero indicate sideways action and possible support/resistance.
█ Setup & Configuration:
Whether you’re new to this script or want to quickly adjust all critical parameters, the panel below shows the main settings available. You can customize everything from the anchor type and maximum length to the bias, signal conditions, and more.
Scale (select Log Scale for logarithmic, otherwise linear scale).
Display (regression channel and/or bands).
Anchor (how regression length is determined).
Length (control bars analyzed):
• Max – Upper limit.
• Min – Prevents regression from becoming too short.
• Step – Controls scanning precision; increasing Step reduces load time.
Regression:
• Type – Calculation method.
• Bias – EMA-style emphasis (>0=new bars weighted more; <0=old bars weighted more).
Deviation:
• Type – Calculation method.
• Bias – EMA-style emphasis (>0=new bars weighted more; <0=old bars weighted more).
• Multiplier - Adjusts Upper and Lower Deviation.
Signal Criteria:
• % (Price vs Deviation) – (0% = lower deviation, 50% = regression, 100% = upper deviation).
• R – (0 = no correlation, ±1 = perfect correlation; >0 = +slope, <0 = -slope).
Table (analyze table of input settings, calculated results, and signal criteria).
Adaptive Lookback (display regression while too few historical bars).
Multiple Regressions (steps 2 to 7 apply to #1, #2, and #3 regressions).
█ Signal Generation & Alerts:
The script offers customizable entry and exit signals with flexible criteria and visual cues (background color, dots, or triangles). Alerts can also be triggered for these opportunities.
Percent Direction Criteria:
(0% = lower deviation, 50% = regression line, 100% = upper deviation)
Above %: Triggers if price is above a specified percent of the deviation channel.
Below %: Triggers if price is below a specified percent of the deviation channel.
(Blank): Ignores the percent‐based condition.
Pearson's R (Correlation) Direction Criteria:
(0 = no correlation, ±1 = perfect correlation; >0 = positive slope, <0 = negative slope)
Above R / Below R: Compares the correlation to a threshold.
Above│R│ / Below│R│: Uses absolute correlation to focus on strength, ignoring direction.
Zero to R: Checks if R is in the 0-to-threshold range.
(Blank): Ignores correlation-based conditions.
█ User Tips & Best Practices:
Choose an anchor type that suits your strategy, “Bar Highest/Lowest” automatically spots commonly used regression zones, while “│R│ Highest” targets strong linear trends.
Consider enabling or disabling the Adaptive Lookback feature to ensure you always have a plotted regression if your chart doesn’t meet the maximum-length requirement.
Use a small Step size (1) unless relying on R-correlation or slope-based anchors as the are time-consuming to calculate. Larger steps speed up calculations but reduce precision.
Fine-tune settings such as lookback periods, regression bias, and deviation multipliers, or trend strength. Small adjustments can significantly affect how channels and signals behave.
To reduce loading time , show only channels (not bands) and disable signals, this limits calculations to the last bar and supports more extreme criteria.
Use the table display to monitor anchor type, calculated length, slope, R value, and percent location at a glance—especially if you have multiple regressions visible simultaneously.
█ Conclusion:
With its blend of advanced regression techniques, flexible deviation options, and a wide range of anchor types, this indicator offers a highly adaptable linear regression channeling system. Whether you're anchoring to time, price extremes, correlation, slope, or external events, the tool can be shaped to fit a variety of strategies. Combined with customizable signals and alerts, it may help highlight areas of confluence and support a more structured approach to identifying potential opportunities.
LinearRegressionLibrary "LinearRegression"
Calculates a variety of linear regression and deviation types, with optional emphasis weighting. Additionally, multiple of slope and Pearson’s R calculations.
calcSlope(_src, _len, _condition)
Calculates the slope of a linear regression over the specified length.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The length of the lookback period for the linear regression.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast for efficiency.
Returns: (float) The slope of the linear regression.
calcReg(_src, _len, _condition)
Calculates a basic linear regression, returning y1, y2, slope, and average.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) An array of 4 values: .
calcRegStandard(_src, _len, _emphasis, _condition)
Calculates an Standard linear regression with optional emphasis.
Parameters:
_src (float) : (series float) The source data series.
_len (int) : (int) The length of the lookback period.
_emphasis (float) : (float) The emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegRidge(_src, _len, lambda, _emphasis, _condition)
Calculates a ridge regression with optional emphasis.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
lambda (float) : (float) The ridge regularization parameter.
_emphasis (float) : (float) The emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegLasso(_src, _len, lambda, _emphasis, _condition)
Calculates a Lasso regression with optional emphasis.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
lambda (float) : (float) The Lasso regularization parameter.
_emphasis (float) : (float) The emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcElasticNetLinReg(_src, _len, lambda1, lambda2, _emphasis, _condition)
Calculates an Elastic Net regression with optional emphasis.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
lambda1 (float) : (float) L1 regularization parameter (Lasso).
lambda2 (float) : (float) L2 regularization parameter (Ridge).
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegHuber(_src, _len, delta, iterations, _emphasis, _condition)
Calculates a Huber regression using Iteratively Reweighted Least Squares (IRLS).
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
delta (float) : (float) Huber threshold parameter.
iterations (int) : (int) Number of IRLS iterations.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegLAD(_src, _len, iterations, _emphasis, _condition)
Calculates a Least Absolute Deviations (LAD) regression via IRLS.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
iterations (int) : (int) Number of IRLS iterations for LAD.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegBayesian(_src, _len, priorMean, priorSpan, sigma, _emphasis, _condition)
Calculates a Bayesian linear regression with optional emphasis.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
priorMean (float) : (float) The prior mean for the slope.
priorSpan (float) : (float) The prior variance (or span) for the slope.
sigma (float) : (float) The assumed standard deviation of residuals.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRFromLinReg(_src, _len, _slope, _average, _y1, _condition)
Calculates the Pearson correlation coefficient (R) based on linear regression parameters.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_average (float) : (float) The average value of the source data series.
_y1 (float) : (float) The starting point (y-intercept of the oldest bar) for the linear regression.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast for efficiency.
Returns: (float) The Pearson correlation coefficient (R) adjusted for the direction of the slope.
calcRFromSource(_src, _len, _condition)
Calculates the correlation coefficient (R) using a specified length and source data.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The length of the lookback period.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast for efficiency.
Returns: (float) The correlation coefficient (R).
calcSlopeLengthZero(_src, _len, _minLen, _step, _condition)
Identifies the length at which the slope is flattest (closest to zero).
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length to consider (minimum of 2).
_minLen (int) : (int) The minimum length to start from (cannot exceed the max length).
_step (int) : (int) The increment step for lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length at which the slope is flattest.
calcSlopeLengthHighest(_src, _len, _minLen, _step, _condition)
Identifies the length at which the slope is highest.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length at which the slope is highest.
calcSlopeLengthLowest(_src, _len, _minLen, _step, _condition)
Identifies the length at which the slope is lowest.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length at which the slope is lowest.
calcSlopeLengthAbsolute(_src, _len, _minLen, _step, _condition)
Identifies the length at which the absolute slope value is highest.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length at which the absolute slope value is highest.
calcRLengthZero(_src, _len, _minLen, _step, _condition)
Identifies the length with the lowest absolute R value.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length with the lowest absolute R value.
calcRLengthHighest(_src, _len, _minLen, _step, _condition)
Identifies the length with the highest R value.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length with the highest R value.
calcRLengthLowest(_src, _len, _minLen, _step, _condition)
Identifies the length with the lowest R value.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length with the lowest R value.
calcRLengthAbsolute(_src, _len, _minLen, _step, _condition)
Identifies the length with the highest absolute R value.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length with the highest absolute R value.
calcDevReverse(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the regressive linear deviation in reverse order, with optional emphasis on recent data.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept (oldest bar) of the linear regression.
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevForward(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the progressive linear deviation in forward order (oldest to most recent bar), with optional emphasis.
Parameters:
_src (float) : (float) The source data array, where _src is oldest and _src is most recent.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept of the linear regression (value at the most recent bar, adjusted by slope).
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevBalanced(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the balanced linear deviation with optional emphasis on recent or older data.
Parameters:
_src (float) : (float) Source data array, where _src is the most recent and _src is the oldest.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept of the linear regression (value at the oldest bar).
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevMean(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the mean absolute deviation from a forward-applied linear trend (oldest to most recent), with optional emphasis.
Parameters:
_src (float) : (float) The source data array, where _src is the most recent and _src is the oldest.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept (oldest bar) of the linear regression.
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevMedian(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the median absolute deviation with optional emphasis on recent data.
Parameters:
_src (float) : (float) The source data array (index 0 = oldest, index _len - 1 = most recent).
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept (oldest bar) of the linear regression.
_inputDev (float) : (float) The deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns:
calcDevPercent(_y1, _inputDev, _condition)
Calculates the percent deviation from a given value and a specified percentage.
Parameters:
_y1 (float) : (float) The base value from which to calculate deviation.
_inputDev (float) : (float) The deviation percentage.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevFitted(_len, _slope, _y1, _emphasis, _condition)
Calculates the weighted fitted deviation based on high and low series data, showing max deviation, with optional emphasis.
Parameters:
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The Y-intercept (oldest bar) of the linear regression.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevATR(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates an ATR-style deviation with optional emphasis on recent data.
Parameters:
_src (float) : (float) The source data (typically close).
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The Y-intercept (oldest bar) of the linear regression.
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcPricePositionPercent(_top, _bot, _src)
Calculates the percent position of a price within a linear regression channel. Top=100%, Bottom=0%.
Parameters:
_top (float) : (float) The top (positive) deviation, corresponding to 100%.
_bot (float) : (float) The bottom (negative) deviation, corresponding to 0%.
_src (float) : (float) The source price.
Returns: (float) The percent position within the channel.
plotLinReg(_len, _y1, _y2, _slope, _devTop, _devBot, _scaleTypeLog, _lineWidth, _extendLines, _channelStyle, _colorFill, _colUpLine, _colDnLine, _colUpFill, _colDnFill)
Plots the linear regression line and its deviations, with configurable styles and fill.
Parameters:
_len (int) : (int) The lookback period for the linear regression.
_y1 (float) : (float) The starting y-value of the regression line.
_y2 (float) : (float) The ending y-value of the regression line.
_slope (float) : (float) The slope of the regression line (used to determine line color).
_devTop (float) : (float) The top deviation to add to the line.
_devBot (float) : (float) The bottom deviation to subtract from the line.
_scaleTypeLog (bool) : (bool) Use a log scale if true; otherwise, linear scale.
_lineWidth (int) : (int) The width of the plotted lines.
_extendLines (string) : (string) How lines should extend (none, left, right, both).
_channelStyle (string) : (string) The style of the channel lines (solid, dashed, dotted).
_colorFill (bool) : (bool) Whether to fill the space between the top and bottom deviation lines.
_colUpLine (color) : (color) Line color when slope is positive.
_colDnLine (color) : (color) Line color when slope is negative.
_colUpFill (color) : (color) Fill color when slope is positive.
_colDnFill (color) : (color) Fill color when slope is negative.
Nef33-Volume Footprint ApproximationDescription of the "Volume Footprint Approximation" Indicator
Purpose
The "Volume Footprint Approximation" indicator is a tool designed to assist traders in analyzing market volume dynamics and anticipating potential trend changes in price. It is inspired by the concept of a volume footprint chart, which visualizes the distribution of trading volume across different price levels. However, since TradingView does not provide detailed intrabar data for all users, this indicator approximates the behavior of a footprint chart by using available volume and price data (open, close, volume) to classify volume as buy or sell, calculate volume delta, detect imbalances, and generate trend change signals.
The indicator is particularly useful for identifying areas of high buying or selling activity, imbalances between supply and demand, delta divergences, and potential reversal points in the market. It provides specific signals for bullish and bearish trend changes, making it suitable for traders looking to trade reversals or confirm trends.
How It Works
The indicator uses volume and price data from each candlestick to perform the following calculations:
Volume Classification:
Classifies the volume of each candlestick as "buy" or "sell" based on price movement:
If the closing price is higher than the opening price (close > open), the volume is classified as "buy."
If the closing price is lower than the opening price (close < open), the volume is classified as "sell."
If the closing price equals the opening price (close == open), it compares with the previous close to determine the direction:
If the current close is higher than the previous close, it is classified as "buy."
If the current close is lower than the previous close, it is classified as "sell."
If the current close equals the previous close, the classification from the previous bar is used.
Delta Calculation:
Calculates the volume delta as the difference between buy volume and sell volume (buyVolume - sellVolume).
A positive delta indicates more buy volume; a negative delta indicates more sell volume.
Imbalance Detection:
Identifies imbalances between buy and sell volume:
A buy imbalance occurs when buy volume exceeds sell volume by a defined percentage (default is 300%).
A sell imbalance occurs when sell volume exceeds buy volume by the same percentage.
Delta Divergence Detection:
Positive Delta Divergence: Occurs when the price is falling (for at least 2 bars) but the delta is increasing or becomes positive, indicating that buyers are entering despite the price decline.
Negative Delta Divergence: Occurs when the price is rising (for at least 2 bars) but the delta is decreasing or becomes negative, indicating that sellers are entering despite the price increase.
Trend Change Signals:
Bullish Signal (trendChangeBullish): Generated when the following conditions are met:
There is a positive delta divergence.
The delta has moved from a negative value (e.g., -500) to a positive value (e.g., +200) over the last 3 bars.
There is a buy imbalance.
The price is near a historical support level (approximated as the lowest low of the last 50 bars).
Bearish Signal (trendChangeBearish): Generated when the following conditions are met:
There is a negative delta divergence.
The delta has moved from a positive value (e.g., +500) to a negative value (e.g., -200) over the last 3 bars.
There is a sell imbalance.
The price is near a historical resistance level (approximated as the highest high of the last 50 bars).
Visual Elements
The indicator is displayed in a separate panel below the price chart (overlay=false) and includes the following elements:
Volume Histograms:
Buy Volume: Represented by a green histogram. Shows the volume classified as "buy."
Sell Volume: Represented by a red histogram. Shows the volume classified as "sell."
Note: The histograms overlap, and the last plotted histogram (red) takes visual precedence, meaning the sell volume may cover the buy volume if it is larger.
Delta Line:
Delta Volume: Represented by a blue line. Shows the difference between buy and sell volume.
A line above zero indicates more buy volume; a line below zero indicates more sell volume.
A dashed gray horizontal line marks the zero level for easier interpretation.
Imbalance Backgrounds:
Buy Imbalance: Light green background when buy volume exceeds sell volume by the defined percentage.
Sell Imbalance: Light red background when sell volume exceeds buy volume by the defined percentage.
Divergence Backgrounds:
Positive Delta Divergence: Lime green background when a positive delta divergence is detected.
Negative Delta Divergence: Fuchsia background when a negative delta divergence is detected.
Trend Change Signals:
Bullish Signal: Green label with the text "Bullish Trend Change" when the conditions for a bullish trend change are met.
Bearish Signal: Red label with the text "Bearish Trend Change" when the conditions for a bearish trend change are met.
Information Labels:
Below each bar, a label displays:
Total Vol: The total volume of the bar.
Delta: The delta volume value.
Alerts
The indicator generates the following alerts:
Positive Delta Divergence: "Positive Delta Divergence Detected! Price is falling, but delta is increasing."
Negative Delta Divergence: "Negative Delta Divergence Detected! Price is rising, but delta is decreasing."
Bullish Trend Change Signal: "Bullish Trend Change Signal! Positive Delta Divergence, Delta Rise, Buy Imbalance, and Near Support."
Bearish Trend Change Signal: "Bearish Trend Change Signal! Negative Delta Divergence, Delta Drop, Sell Imbalance, and Near Resistance."
These alerts can be configured in TradingView to receive real-time notifications.
Adjustable Parameters
The indicator allows customization of the following parameters:
Imbalance Threshold (%): The percentage required to detect an imbalance between buy and sell volume (default is 300%).
Lookback Period for Divergence: Number of bars to look back for detecting price and delta trends (default is 2 bars).
Support/Resistance Lookback Period: Number of bars to look back for identifying historical support and resistance levels (default is 50 bars).
Delta High Threshold (Bearish): Minimum delta value 2 bars ago for the bearish signal (default is +500).
Delta Low Threshold (Bearish): Maximum delta value in the current bar for the bearish signal (default is -200).
Delta Low Threshold (Bullish): Maximum delta value 2 bars ago for the bullish signal (default is -500).
Delta High Threshold (Bullish): Minimum delta value in the current bar for the bullish signal (default is +200).
Practical Use
The indicator is useful for the following purposes:
Identifying Trend Changes:
The trend change signals (trendChangeBullish and trendChangeBearish) indicate potential price reversals. For example, a bullish signal near a support level may be an opportunity to enter a long position.
Detecting Divergences:
Delta divergences (positive and negative) can anticipate trend changes by showing a disagreement between price movement and underlying buying/selling pressure.
Finding Key Levels:
Imbalances (green and red backgrounds) often coincide with support and resistance levels, helping to identify areas where the market might react.
Confirming Trends:
A consistently positive delta in an uptrend or a negative delta in a downtrend can confirm the strength of the trend.
Identifying Failed Auctions:
Although not detected automatically, you can manually identify failed auctions by observing a price move to new highs/lows with decreasing volume in the direction of the move.
Limitations
Intrabar Data: It does not use detailed intrabar data, making it less precise than a native footprint chart.
Approximations: Volume classification and support/resistance detection are approximations, which may lead to false signals.
Volume Dependency: It requires reliable volume data, so it may be less effective on assets with inaccurate volume data (e.g., some forex pairs).
False Signals: Divergences and imbalances do not always indicate a trend change, especially in strongly trending markets.
Recommendations
Combine with Other Indicators: Use tools like RSI, MACD, support/resistance levels, or candlestick patterns to confirm signals.
Trade on Higher Timeframes: Signals are more reliable on higher timeframes like 1-hour or 4-hour charts.
Perform Backtesting: Evaluate the indicator's accuracy on historical data to adjust parameters and improve effectiveness.
Adjust Parameters: Modify thresholds (e.g., imbalanceThreshold or supportResistanceLookback) based on the asset and timeframe you are trading.
Conclusion
The "Volume Footprint Approximation" indicator is a powerful tool for analyzing volume dynamics and anticipating price trend changes. By classifying volume, calculating delta, detecting imbalances and divergences, and generating trend change signals, it provides traders with valuable insights into market buying and selling pressure. While it has limitations due to the lack of intrabar data, it can be highly effective when used in combination with other technical analysis tools and on assets with reliable volume data.
Momentum Trend Strength (MTS) *Julian_Acunja*Momentum Trend Strength (MTS)
The Momentum Trend Strength (MTS) indicator visually represents market momentum directly on your chart. By clearly highlighting momentum direction and intensity, traders can easily recognize shifts in market sentiment and anticipate potential turning points.
Traders can easily adjust the sensitivity and smoothing parameters, making it adaptable to diverse market conditions and trading strategies.
🔹 USAGE
The Momentum Trend Strength indicator helps traders intuitively detect market momentum, enhancing their ability to anticipate and respond dynamically to changing market conditions. Traders typically interpret three main scenarios using this indicator:
🚀 Momentum Acceleration:
An expanding green line above recent price action signals increasing bullish momentum, suggesting buyers are gaining strength. Conversely, a downward-expanding red line below price action indicates stronger bearish momentum, signifying increasing selling pressure.
🔄 Momentum Reversal:
A clear shift from red to green (or vice versa) often signals potential momentum reversals, providing traders with timely indications of possible market turns or shifts in sentiment.
⚖️ Momentum Consolidation:
When the indicator remains near the price line, it suggests weak momentum and potential market consolidation. Traders might interpret this as a range-bound market environment, adjusting their strategies accordingly.
By carefully monitoring these momentum shifts, traders can gain deeper insights into the underlying market dynamics and better prepare for future price movements.
🔹 DETAILS
The indicator’s momentum visualization is presented directly over the current price action, enhancing traders' ability to rapidly interpret momentum without additional chart clutter:
✅ Green Line: Positive momentum (bullish bias).
❌ Red Line: Negative momentum (bearish bias).
The vertical distance between the Momentum Trend Strength line and price visually indicates momentum intensity:
Larger distance: Signifies stronger market momentum.
Smaller distance: Suggests weakening momentum or neutral conditions.
🔹 Interpretation
Key interpretations include:
Bullish Confirmation: Sustained green lines indicate robust buying activity and confirm bullish trends.
Bearish Confirmation: Persistent red lines suggest strong selling pressure and validate bearish market sentiment.
Early Reversal Signals: Color transitions alert traders to potential market reversals, providing early opportunities to reassess trades.
🔹 Practical Application
Traders commonly integrate Momentum Trend Strength (MTS) into their broader trading strategies by:
Confirming directional trends alongside price action analysis.
Identifying optimal trade entry and exit points during momentum shifts.
Reducing market noise through customizable smoothing, enhancing clarity of momentum signals.
🔹 SETTINGS
📌 Momentum Parameters
Length: Adjusts sensitivity for momentum detection, influencing how quickly momentum shifts are identified.
EMA Smoothing: Determines the level of noise filtering, balancing signal responsiveness and smoothness.
📌 Visualization
Automatic color adaptation clearly signals bullish or bearish momentum.
Simple default visualization settings optimize usability for traders across various markets and timeframes.
🔹 ADDITIONAL NOTES
The Momentum Trend Strength (MTS) indicator provides traders with a straightforward yet powerful visualization of momentum directly on the price chart. Its intuitive nature and adaptive settings make it a valuable addition to various trading approaches and analytical methods, helping traders confidently interpret market movements and momentum dynamics in real-time.
Forexsom MA Crossover SignalsA Trend-Following Trading Indicator for TradingView
Overview
This indicator plots two moving averages (MA) on your chart and generates visual signals when they cross, helping traders identify potential trend reversals. It is designed to be simple yet effective for both beginners and experienced traders.
Key Features
✅ Dual Moving Averages – Plots a Fast MA (default: 9-period) and a Slow MA (default: 21-period)
✅ Customizable MA Types – Choose between EMA (Exponential Moving Average) or SMA (Simple Moving Average)
✅ Clear Buy/Sell Signals – Displays "BUY" (green label) when the Fast MA crosses above the Slow MA and "SELL" (red label) when it crosses below
✅ Alerts – Get notified when new signals appear (compatible with TradingView alerts)
✅ Clean Visuals – Easy-to-read moving averages with adjustable colors
How It Works
Bullish Signal (BUY) → Fast MA crosses above Slow MA (suggests uptrend)
Bearish Signal (SELL) → Fast MA crosses below Slow MA (suggests downtrend)
Best Used For
✔ Trend-following strategies (swing trading, day trading)
✔ Confirming trend reversals
✔ Filtering trade entries in combination with other indicators
Customization Options
Adjust Fast & Slow MA lengths
Switch between EMA or SMA for smoother or more responsive signals
Why Use This Indicator?
Simple & Effective – No clutter, just clear signals
Works on All Timeframes – From scalping (1M, 5M) to long-term trading (4H, Daily)
Alerts for Real-Time Trading – Never miss a signal
Overlay Hourly Candle [odnac] * This script overlays 1-hour candlestick representations on the chart.
* It captures the open, close, high, and low prices for each hourly period.
* The script dynamically updates as new hourly candles form and adjusts the
* box and wick positions accordingly.
*
* Features:
* - Draws an hourly candle with body and wicks.
* - Colors bullish candles in green and bearish candles in red.
* - Updates dynamically as new hourly candles form.
* - Uses TradingView's box and line functions to represent candle structures.
*
* Usage:
* - Add the script to your TradingView chart as an overlay.
* - Observe how the hourly candles appear distinctly on any timeframe.
Internal BOS X FVG Algorithms - 1 Visi TraderInternal BOS X FVG Algorithms,
This strategy is based on 2 momentum combinations:
• Internal Break of Structure was formed together with Fair Value Gap (FVG)
Formula of Internal BOS X FVG Algorithms:
1. Break (Internal BOS) X Bullish FVG = Zone for BUY Setup
2. Break (Internal BOS) X Bearish FVG = Zone for SELL Setup
// ----------- Add-ons Setting ----------- //
Setting for Internal BOS X FVG Algorithms:
---------
#1: Internal Break of Structure Settings,
• Internal Swing:
The number of left and right Swing Intervals that are checked when searching for Swing Points. More Values = Less Swing Points plotted to be potential Internal BOS and Less Values = More Swing Points plotted to be potential Internal BOS.
• Internal BOS Color:
You can change the color of dotted line and text for Internal BOS ("Break") according to your favorites layout.
#2: Fair Value Gap Settings,
• FVG Min. Range (In Pips):
Input minimum range of Fair Value Gap in Pips, more value = less zone results.
• FVG Max. Range (In Pips):
Input maximum range of Fair Value Gap in Pips, less value = less zone results.
• Extended Right - FVG:
You can change the value of extended fair value gap zone according to your best preferences.
#3: FVG Color Settings,
• Bullish FVG:
Change color FVG for Bullish Fair Value Gap Zone.
• Bearish FVG:
Change color FVG for Bearish Fair Value Gap Zone.
#4: Mode FVG,
• FVG Variations:
- Global FVG = All Variations of Fair Value Gap Category
- Specific FVG = Variation based on last of 2 FVG's Candles in same color
#5: Trading Session,
• Session Hours:
You can adjust the trading hour according to the best session and volatility of pair assets that you want to trades.
---------
How to Entry (Instructions):
1. Buy Positions = Internal BOS ("Break") form together with Bullish FVG, wait for pullback on FVG Zone and then you can open positions. Set Stop Loss (SL) below FVG Zone and set Take Profit (TP) in minimum 1:2 RR - if price hit 1:1 RR you can set Breakeven for managing the trading risk.
2. Sell Positions = Internal BOS ("Break") form together with Bearish FVG, wait for pullback on FVG Zone and then you can open positions. Set Stop Loss (SL) above FVG Zone and set Take Profit (TP) in minimum 1:2 RR - if price hit 1:1 RR you can set Breakeven for managing the trading risk.
*Notes:
The best pair asset for this strategy is on Gold (XAU/USD) at NY Sessions (19.00 - 22.00 GMT+7) - Timeframe M1 (1 Minute).
--------
Best Regards,
- 1 VISI TRADER
Trading for Prosperity!
--------
DISCLAIMER: No reselling or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.*