Volume Profile Grid [Alpha Extract]A sophisticated volume distribution analysis system that transforms market activity into institutional-grade visual profiles, revealing hidden support/resistance zones and market participant behavior. Utilizing advanced price level segmentation, bullish/bearish volume separation, and dynamic range analysis, the Volume Profile Grid delivers comprehensive market structure insights with Point of Control (POC) identification, Value Area boundaries, and volume delta analysis. The system features intelligent visualization modes, real-time sentiment analysis, and flexible range selection to provide traders with clear, actionable volume-based market context.
🔶 Dynamic Range Analysis Engine
Implements dual-mode range selection with visible chart analysis and fixed period lookback, automatically adjusting to current market view or analyzing specified historical periods. The system intelligently calculates optimal bar counts while maintaining performance through configurable maximum limits, ensuring responsive profile generation across all timeframes with institutional-grade precision.
// Dynamic period calculation with intelligent caching
get_analysis_period() =>
if i_use_visible_range
chart_start_time = chart.left_visible_bar_time
current_time = last_bar_time
time_span = current_time - chart_start_time
tf_seconds = timeframe.in_seconds()
estimated_bars = time_span / (tf_seconds * 1000)
range_bars = math.floor(estimated_bars)
final_bars = math.min(range_bars, i_max_visible_bars)
math.max(final_bars, 50) // Minimum threshold
else
math.max(i_periods, 50)
🔶 Advanced Bull/Bear Volume Separation
Employs sophisticated candle classification algorithms to separate bullish and bearish volume at each price level, with weighted distribution based on bar intersection ratios. The system analyzes open/close relationships to determine volume direction, applying proportional allocation for doji patterns and ensuring accurate representation of buying versus selling pressure across the entire price spectrum.
🔶 Multi-Mode Volume Visualization
Features three distinct display modes for bull/bear volume representation: Split mode creates mirrored profiles from a central axis, Side by Side mode displays sequential bull/bear segments, and Stacked mode separates volumes vertically. Each mode offers unique insights into market participant behavior with customizable width, thickness, and color parameters for optimal visual clarity.
// Bull/Bear volume calculation with weighted distribution
for bar_offset = 0 to actual_periods - 1
bar_high = high
bar_low = low
bar_volume = volume
// Calculate intersection weight
weight = math.min(bar_high, next_level) - math.max(bar_low, current_level)
weight := weight / (bar_high - bar_low)
weighted_volume = bar_volume * weight
// Classify volume direction
if bar_close > bar_open
level_bull_volume += weighted_volume
else if bar_close < bar_open
level_bear_volume += weighted_volume
else // Doji handling
level_bull_volume += weighted_volume * 0.5
level_bear_volume += weighted_volume * 0.5
🔶 Point of Control & Value Area Detection
Implements institutional-standard POC identification by locating the price level with maximum volume accumulation, providing critical support/resistance zones. The Value Area calculation uses sophisticated sorting algorithms to identify the price range containing 70% of trading volume, revealing the market's accepted value zone where institutional participants concentrate their activity.
🔶 Volume Delta Analysis System
Incorporates real-time volume delta calculation with configurable dominance thresholds to identify significant bull/bear imbalances. The system visually highlights price levels where buying or selling pressure exceeds threshold percentages, providing immediate insight into directional volume flow and potential reversal zones through color-coded delta indicators.
// Value Area calculation using 70% volume accumulation
total_volume_sum = array.sum(total_volumes)
target_volume = total_volume_sum * 0.70
// Sort volumes to find highest activity zones
for i = 0 to array.size(sorted_volumes) - 2
for j = i + 1 to array.size(sorted_volumes) - 1
if array.get(sorted_volumes, j) > array.get(sorted_volumes, i)
// Swap and track indices for value area boundaries
// Accumulate until 70% threshold reached
for i = 0 to array.size(sorted_indices) - 1
accumulated_volume += vol
array.push(va_levels, array.get(volume_levels, idx))
if accumulated_volume >= target_volume
break
❓How It Works
🔶 Weighted Volume Distribution
Implements proportional volume allocation based on the percentage of each bar that intersects with price levels. When a bar spans multiple levels, volume is distributed proportionally based on the intersection ratio, ensuring precise representation of trading activity across the entire price spectrum without double-counting or volume loss.
🔶 Real-Time Profile Generation
Profiles regenerate on each bar close when in visible range mode, automatically adapting to chart zoom and scroll actions. The system maintains optimal performance through intelligent caching mechanisms and selective line updates, ensuring smooth operation even with maximum resolution settings and extended analysis periods.
🔶 Market Sentiment Analysis
Features comprehensive volume analysis table displaying total volume metrics, bullish/bearish percentages, and overall market sentiment classification. The system calculates volume dominance ratios in real-time, providing immediate insight into whether buyers or sellers control the current price structure with percentage-based sentiment thresholds.
🔶 Visual Profile Mapping
Provides multi-layered visual feedback through colored volume bars, POC line highlighting, Value Area boundaries, and optional delta indicators. The system supports profile mirroring for alternative perspectives, line extension for future reference, and customizable label positioning with detailed price information at critical levels.
Why Choose Volume Profile Grid
The Volume Profile Grid represents the evolution of volume analysis tools, combining traditional volume profile concepts with modern visualization techniques and intelligent analysis algorithms. By integrating dynamic range selection, sophisticated bull/bear separation, and multi-mode visualization with POC/Value Area detection, it provides traders with institutional-quality market structure analysis that adapts to any trading style. The comprehensive delta analysis and sentiment monitoring system eliminates guesswork while the flexible visualization options ensure optimal clarity across all market conditions, making it an essential tool for traders seeking to understand true market dynamics through volume-based price discovery.
BTC
BTC Power Law Valuation BandsBTC Power Law Rainbow
A long-term valuation framework for Bitcoin based on Power Law growth — designed to help identify macro accumulation and distribution zones, aligned with long-term investor behavior.
🔍 What Is a Power Law?
A Power Law is a mathematical relationship where one quantity varies as a power of another. In this model:
Price ≈ a × (Time)^b
It captures the non-linear, exponentially slowing growth of Bitcoin over time. Rather than using linear or cyclical models, this approach aligns with how complex systems, such as networks or monetary adoption curves, often grow — rapidly at first, and then more slowly, but persistently.
🧠 Why Power Law for BTC?
Bitcoin:
Has finite supply and increasing adoption.
Operates as a monetary network , where Metcalfe’s Law and power laws naturally emerge.
Exhibits exponential growth over logarithmic time when viewed on a log-log chart .
This makes it uniquely well-suited for power law modeling.
🌈 How to Use the Valuation Bands
The central white line represents the modeled fair value according to the power law.
Colored bands represent deviations from the model in logarithmic space, acting as macro zones:
🔵 Lower Bands: Deep value / Accumulation zones.
🟡 Mid Bands: Fair value.
🔴 Upper Bands: Euphoria / Risk of macro tops.
📐 Smart Money Concepts (SMC) Alignment
Accumulation: Occurs when price consolidates near lower bands — often aligning with institutional positioning.
Markup: As price re-enters or ascends the bands, we often see breakout behavior and trend expansion.
Distribution: When price extends above upper bands, potential for exit liquidity creation and distribution events.
Reversion: Historically, price mean-reverts toward the model — rarely staying outside the bands for long.
This makes the model useful for:
Cycle timing
Long-term DCA strategy zones
Identifying value dislocations
Filtering short-term noise
⚠️ Disclaimer
This tool is for educational and informational purposes only . It is not financial advice. The power law model is a non-predictive, mathematical framework and does not guarantee future price movements .
Always use additional tools, risk management, and your own judgment before making trading or investment decisions.
Ultron Indicator BTCUSDT Ultron BTCUSDT Indicator (invite-only).
• Clear trend & reversion signals
• Next-bar execution parity and frozen TSL visuals
• Run on 4hr Binance BTCUSDT chart
• Risk sizing that uses your equity input
Usage: Add to chart → Settings → Inputs → set “Your Current Trading Equity (USD)”.
⚠️ Software tool for educational/informational use only. Not financial advice.
Past performance is not indicative of future results. You are responsible for your trades.
[c3s] CWS - M2 Global Liquidity Index & BTC Correlation CWS - M2 Global Liquidity Index with Offset BTC Correlation
This custom indicator visualizes and analyzes the relationship between the global M2 money supply and Bitcoin (BTC) price movements. It calculates the correlation between these two variables to provide insights into how changes in global liquidity may impact Bitcoin’s price over time.
Key Features:
Global M2 Liquidity Index Calculation:
Fetches M2 money supply data from multiple economies (China, US, EU, Japan, UK) and normalizes using currency exchange rates (e.g., CNY/USD, EUR/USD).
Combines all M2 data points and normalizes by dividing by 1 trillion (1e12) for easier visualization.
Offset for M2 Data:
The offset parameter allows users to shift the M2 data by a specified number of days, helping track the influence of past global liquidity on Bitcoin.
BTC Price Correlation:
Computes the correlation between shifted global M2 liquidity and Bitcoin (BTC) price, using a 52-day lookback period by default.
Correlation Quality Display:
Categorizes correlation quality as:
Excellent : Correlation >= 0.8
Good : Correlation >= 0.6 and < 0.8
Weak : Correlation >= 0.4 and < 0.6
Very Weak : Correlation < 0.4
Displays correlation quality as a label on the chart for easy assessment.
Visual Enhancements:
Labels : Displays dynamic labels on the chart with metrics like M2 value and correlation.
Plot Shapes : Uses shapes to indicate data availability for global M2 and correlation.
Data Table : Optionally shows a data table in the top-right corner summarizing:
Global M2 value (in trillions)
The correlation between global M2 and BTC
The correlation quality
Optional Debugging:
Debug plots help identify when data is missing for M2 or correlation, ensuring transparency and accurate functionality.
Inputs:
Offset: Shift the M2 data (in days) to see past liquidity effects on Bitcoin.
Lookback Period: Number of periods (default 52) used to calculate the correlation.
Show Labels: Toggle to show or hide labels for M2 and correlation values.
Show Table: Toggle to show or hide the data table in the top-right corner.
Usage:
Ideal for traders and analysts seeking to understand the relationship between global liquidity and Bitcoin price. The offset and lookback period can be adjusted to explore different timeframes and correlation strengths, aiding more informed trading decisions.
BTC CME Futures Gaps (BTCGapHunt_CME)BTC CME Futures Gaps Indicator
Overview
This indicator visualises price gaps between the daily close and open of Bitcoin CME futures (CME:BTC1!). These gaps are often revisited ("filled") by market price action and may serve as technical targets.
Thanks
... to Maven and the Blockchain Masons (x.com/Masons_DAO) to push me on this topic.
What Is a CME Gap?
CME Bitcoin Futures do not trade 24/7. Gaps form when the market reopens at a different price than where it last closed.
Gaps are often used as support/resistance or liquidity targets.
This indicator tracks, visualises, and alerts on these gaps.
Key Features
Automatic gap detection using daily open/close on CME:BTC1!
Dynamic gap size threshold based on ATR (Average True Range)
Highlight unfilled gaps and track partial fills visually
Alerts for gap formation and fill events
Parameter overlay showing real-time settings
Supported and Overrideable Parameters
ATR Length: Defines the lookback period for ATR calculation (default: 14)
Gap Size Multiplier: Multiplies the ATR to set the dynamic gap threshold (default: 1.0)
Proximity Threshold: Price distance from gap edge to consider it filled (default: 100 USD)
Max Gaps Tracked: Maximum number of concurrent gaps shown (default: 50)
Alerts Enabled: Toggle alerts for gap formation and gap fill events
How the Gap Size Is Calculated
Minimum Gap Size = ATR(14) * Gap Size Multiplier
ATR Length and Gap Size Multiplier are configurable.
Gap threshold adjusts dynamically with market volatility.
Visual Guide
Red Box: Fully unfilled gap
Lemon Yellow Box: Partially filled gap
Right Margin Boxes: Snapshot of unfilled gaps for quick access
Top-Right Panel: Current ATR, Gap Size, Thresholds, etc.
Alerts
Gap Formed: A new gap is detected.
Gap Filled: The gap is either partially or fully filled.
Recommended Timeframes
1H, 4H, 1D (best resolution)
Designed for BTC spot/perpetual charts (e.g., BTCUSD, BTCUSDT)
How To Use
Add the script to your BTC chart.
Monitor red/yellow boxes for unfilled gaps.
Check config panel for current threshold and settings.
Enable alerts via TradingView for real-time updates.
Notes
Up to 50 gaps are tracked (adjustable).
Data source: CME futures via request.security.
All visuals and alerts are time-synced with your chart.
Disclaimer
This script is for educational purposes only. Trade at your own risk.
M2 Global Liquidity Index [Extended + Empirical BTC Offset]M2 Global Liquidity Index
This script visualizes global M2 liquidity based on major economic zones (USA, China, Eurozone, Japan, UK), with the option to include extended countries such as Switzerland, Canada, India, Russia, Brazil, South Korea, Mexico, and South Africa.
The indicator includes an empirically derived offset to reflect how Bitcoin historically reacts with a time lag—typically around 12 weeks—after shifts in global liquidity.
Features:
Predefined empirical offset options ranging from 12 to 120 days
Automatic offset adjustment when applied to the weekly chart
Optional inclusion of extended global M2 sources
Important:
This indicator is intended only for use on the weekly chart. It provides meaningful and accurate results exclusively in this time frame, due to the nature of the offset-based correlation logic.
Use cases:
Macro-level analysis of Bitcoin’s price movements
Identifying early signs of potential market tops or bottoms in relation to liquidity flows
LTPI BTC | JeffreyTimmermansLong-Term Trend Probability Indicator
The "Long-Term Trend Probability Indicator" on BTC is a custom-built tool designed to analyze BTC from a long-term perspective. Unlike short-term indicators that react to price volatility, LTPI focuses on major trend shifts on BTC, and therefore across the entire crypto market, helping to identify major trend shifts early.
This version of the LTPI is applied to BTC, making it a BTC specific trend following tool, but very broad (crypto wise), because BTC is the biggest asset.
Key Features
Long-Term Focus:
Designed for macro market analysis with less sensitivity to short-term noise.
8 Input Signals:
Combines 8 carefully selected inputs (trend following indicators) into a single score that reflects the overall market condition.
Market Regimes:
Classifies the BTC trend into:
Bullish: Strong uptrend, expansion phase
Bearish: Strong downtrend, contraction phase
Neutral: Transitional or uncertain
Visual Background:
Background colors clearly display which regime is active.
Comprehensive Dashboard:
The panel at the bottom shows each input’s state, the composite LTPI score, and the resulting market trend.
How It Works
Inputs Analysis:
Each of the 8 inputs outputs one of three states:
+1 (Bullish)
-1 (Bearish)
0 (Neutral)
Score Calculation:
The total score is the sum of all 8 input signals divided by 8.
Score > 0.1 = Bullish
Score < -0.1 = Bearish
Between -0.1 and 0.1 = Neutral
Background Coloring:
Background colors dynamically adjust to reflect the long-term market regime.
Use Cases
Long-Term Positioning:
Identify periods of global expansion or contraction to position yourself accordingly.
Macro Confirmation:
Use LTPI in combination with medium-term (MTPI) and short-term tools for multi-timeframe confirmation.
Market Timing:
Alerts when LTPI crosses key thresholds help highlight the start of major bullish or bearish phases.
Dynamic Alerts:
Bullish Entry: LTPI score crosses above 0.1
Bearish Entry: LTPI score crosses below -0.1
Neutral Zone: Score moves back between -0.1 and 0.1
Conclusion
The Long-Term Trend Probability Indicator (LTPI – BTC) is a powerful tool for identifying long-term market phases across the entire crypto ecosystem. By focusing on long term trends and combining 8 inputs into a single probability score, it provides a clear macro trend perspective for strategic decision-making.
TFPS - TradFi-Pressure-Score (Adaptive)The data-driven answer to an irreversible market reality.
This indicator quantifies the combined pressure from the S&P 500, VIX, DXY, and US10Y, whose correlation to crypto has reached peak values of 0.87. Your decisive macro edge, in real-time.
This indicator is built on a fundamental analysis of market data from the last five years. The analysis proves an irreversible transformation: The crypto market has evolved into a high-beta risk asset, its fate inextricably linked to Traditional Finance (TradFi).
The empirical data is clear:
Bitcoin increasingly behaves like a leveraged version of the S&P 500.
The correlation to stock indices, with peak values of up to 0.87, is statistically highly significant.
The "digital gold" safe-haven narrative is refuted by the data; the correlation to gold (0.04) is virtually non-existent and statistically insignificant.
This means: Standard indicators like RSI or MACD are insufficient for today's market conditions. They only see price, ignoring the powerful external context that now dominates price action.
The TradFi Pressure Score (TFPS) is the answer to this data-driven reality. It's your institutional-grade macro dashboard, aggregating the four most dominant external forces into a single, actionable score:
S&P 500 (SPY): The pulse of global risk appetite. A rising S&P signals a "risk-on" environment, fueling capital flows into crypto.
VIX: The market's "Fear Gauge". A rising VIX signals a "risk-off" flight to safety, draining liquidity from crypto.
DXY (US-Dollar Index): The counter-pole to risk assets. A strong Dollar (rising DXY) tightens global liquidity, creating significant headwinds for Bitcoin.
US 10Y Yield: The opportunity cost of capital. Rising yields make risk-free assets more attractive, pulling capital away from non-yielding assets like crypto.
What makes TFPS truly unique?
Dynamic Weighting (its secret weapon): Which factor matters most today? The DXY or the VIX? TFPS continuously analyzes the correlation of all four factors to your chosen asset (e.g., Bitcoin) and automatically adjusts their weight in real-time. This ensures you're always focused on what's currently driving the market.
Adaptive Engine : What drives a 15-minute chart is different from a daily chart. The TFPS engine automatically adapts its lookback periods and calculations to your chosen timeframe for optimal relevance.
Clear, Actionable Signals Designed for Traders:
Pressure Line (>0 or <0): Instantly see if the world's largest financial forces are providing a tailwind or a headwind for your trade.
Z-Score (Extreme Readings) : Get early warnings of extreme macro "Greed" or "Fear". Readings above +2 or below -2 have historically pinpointed moments of market exhaustion that often precede major trend reversals.
Regime Change : A fundamental shift in the nature of TradFi pressure is visualized with a clear signal, providing unambiguous macro insights.
Lead/Lag Status : Gain a critical edge by knowing who's in the driver's seat. The dashboard tells you if TradFi is LEADING the price action or if crypto is moving independently, allowing you to focus on the right information source.
This is a private beta. I am granting exclusive access to a limited number of traders who understand this new market reality. In exchange for your valuable feedback, you will be among the first to leverage what I believe is the new standard for macro analysis in crypto trading.
Request access to trade with the full context.
BTC PL Trend + Floor - Log PilotBTC Power Law Trend + Floor with forward projection.
Sky blue for the trend. Neon orange for the floor. Both project forward in dotted green.
Tracks Bitcoin’s long-term arc and structural support through time since Genesis.
Test protectedPrepare to challenge conventional analysis with Testing Bang, a bold script tailored for AAPL’s battlefield. This strategy doesn’t play defense—it takes decisive action. Triggered at a pivotal moment in Apple’s historical price path, it demonstrates how surgical precision and daring risk management converge to test reversal points with confidence. Built using Pine Script v6, the code aligns stop-loss logic with targeted entry behavior on bar index 10381.
Whether you’re exploring script mechanics or sharpening your backtest instincts, Testing Bang shows how even a single trade can reveal the psychological layers behind price movement. With the bar magnifier disabled, traders witness raw market behavior—a powerful lens for those who dare to refine strategy in the wild. Step in, test your edge, and see if your timing can match Apple’s thunder.
Engineer_Invest Support BTCDescription of the "Engineer_Invest Support BTC" indicator
The indicator is designed to highlight a dynamic support level using a combination of a smoothed trend and an assessment of market volatility. Its key features are:
1. Calculating the baseline using the EMA:
The script calculates an exponential moving average (EMA) of the opening price with a configurable period (200 by default). This allows you to create a reliable basis for interpreting price movements, minimizing the impact of short-term fluctuations.
2. Volatility assessment via ATR:
To analyze market variability, the method of calculating the average true range (ATR) multiplied by a given coefficient (default is 5) is used. This approach helps accurately reflect the current market volatility by adjusting the support level depending on the intensity of price fluctuations.
3. Fixed estimated timeframe:
The main calculation is performed on a fixed 3-day interval, which guarantees the stability of the plotted lines regardless of the selected base time interval of the graph. This avoids the undesirable effects of short-term "noise" and ensures the consistency of analytics, especially in highly volatile markets such as cryptocurrencies.
4. Dynamic line formation:
Based on the calculated values of EMA and ATR, the lower boundary of the channel is determined, which is drawn with a bold green line – it serves as a dynamic support zone. At the same time, the ATR value from the previous bar is used to increase the stability of the calculation, which helps smooth out extreme market surges.
5. Flexibility and customization:
Indicator parameters such as the ATR period, the ATR Multiplier coefficient, and a fixed estimated timeframe are available for change. This allows traders to adapt the script to individual strategies and features of the analyzed asset.
Practical application:
- Determining support levels: The indicator helps to identify potential areas where the asset price may find support in a decline.
- Adaptability to market conditions: Using ATR makes it possible to take into account volatility, which is especially important for active markets, for example, for BTC.
- Stability of signals on any timeframe: Due to the fixed 3-day calculation interval, the support line remains unchanged even when the base graphical interval is changed.
The "Engineer_Invest Support BTC" indicator is a well-thought-out analytical solution for technical analysis, combining elements of trend smoothing and a volatility filter. It can be used as an independent tool to find key support levels, or combined with other analysis methods to form a more complete picture of market dynamics.
Important!
This indicator is designed and optimized exclusively for working with BTC. His calculations take into account the unique features of bitcoin's market dynamics and volatility, which provides the most reliable determination of support levels for this particular asset. The use of this instrument in other markets may not provide the expected signal accuracy.
BTC Spot/Perp Price DeltaThe indicator gathers price from 3 btc spot pairs (largest by volume) and 3 btc perp pairs (also largest by volume).
The average Spot and Perp prices are then derived.
The indicator plots the price difference between the Spot average and the Perps average (Spot minus Perps).
Green plot above the zero line means Spot price is higher than the Perp price at a candle close - Contango.
Red plot below the zero line means Spot Price is lower than the Perp price at a candle close - Backwardation.
The orange line is the EMA. Default value is 100 periods. Changeable by User.
Use cases:
1. Perp market is way larger than the Spot market, measured by traded Volume. We may say that the Perps market is more "stable", because it is more liquid. When Spot price deviates a lot from the Perps price, in both positive and negative directions, we may expect a mean reversion.
High Green or Red indicator values = expect price reversion.
2. Helps to observe absorption. If the indicator values are high (in both directions), but the price is barely moving, we can come to a conclusion that the opposite side Limit orders are being deployed to absorb Spot market orders.
Typically, this also indicates mean reversion.
3. You are welcome to use the indicator and perhaps find your own use cases.
Any suggestions on how to improve this indicator are welcome.
Spent Output Profit Ratio Z-Score | Vistula LabsOverview
The Spent Output Profit Ratio (SOPR) Z-Score indicator is a sophisticated tool designed by Vistula Labs to help cryptocurrency traders analyze market sentiment and identify potential trend reversals. It leverages on-chain data from Glassnode to calculate the Spent Output Profit Ratio (SOPR) for Bitcoin and Ethereum, transforming this metric into a Z-Score for easy interpretation.
What is SOPR?
Spent Output Profit Ratio (SOPR) measures the profit ratio of spent outputs (transactions) on the blockchain:
SOPR > 1: Indicates that, on average, coins are being sold at a profit.
SOPR < 1: Suggests that coins are being sold at a loss.
SOPR = 1: Break-even point, often seen as a key psychological level.
SOPR provides insights into holder behavior—whether they are locking in profits or cutting losses—making it a valuable gauge of market sentiment.
How It Works
The indicator applies a Z-Score to the SOPR data to normalize it relative to its historical behavior:
Z-Score = (Smoothed SOPR - Moving Average of Smoothed SOPR) / Standard Deviation of Smoothed SOPR
Smoothed SOPR: A moving average (e.g., WMA) of SOPR over a short period (default: 30 bars) to reduce noise.
Moving Average of Smoothed SOPR: A longer moving average (default: 180 bars) of the smoothed SOPR.
Standard Deviation: Calculated over a lookback period (default: 200 bars).
This Z-Score highlights how extreme the current SOPR is compared to its historical norm, helping traders spot significant deviations.
Key Features
Data Source:
Selectable between BTC and ETH, using daily SOPR data from Glassnode.
Customization:
Moving Average Types: Choose from SMA, EMA, DEMA, RMA, WMA, or VWMA for both smoothing and main averages.
Lengths: Adjust the smoothing period (default: 30) and main moving average length (default: 180).
Z-Score Lookback: Default is 200 bars.
Thresholds: Set levels for long/short signals and overbought/oversold conditions.
Signals:
Long Signal: Triggered when Z-Score crosses above 1.02, suggesting potential upward momentum.
Short Signal: Triggered when Z-Score crosses below -0.66, indicating potential downward momentum.
Overbought/Oversold Conditions:
Overbought: Z-Score > 2.5, signaling potential overvaluation.
Oversold: Z-Score < -2.0, indicating potential undervaluation.
Visualizations:
Z-Score Plot: Teal for long signals, magenta for short signals.
Threshold Lines: Dashed for long/short, solid for overbought/oversold.
Candlestick Coloring: Matches signal colors.
Arrows: Green up-triangles for long entries, red down-triangles for short entries.
Background Colors: Magenta for overbought, teal for oversold.
Alerts:
Conditions for Long Opportunity, Short Opportunity, Overbought, and Oversold.
Usage Guide
Select Cryptocurrency: Choose BTC or ETH.
Adjust Moving Averages: Customize types and lengths for smoothing and main averages.
Set Thresholds: Define Z-Score levels for signals and extreme conditions.
Monitor Signals: Use color changes, arrows, and background highlights to identify opportunities.
Enable Alerts: Stay informed without constant chart watching.
Interpretation
High Z-Score (>1.02): SOPR is significantly above its historical mean, potentially indicating overvaluation or strong bullish momentum.
Low Z-Score (<-0.66): SOPR is below its mean, suggesting undervaluation or bearish momentum.
Extreme Conditions: Z-Scores above 2.5 or below -2.0 highlight overbought or oversold markets, often preceding reversals.
Conclusion
The SOPR Z-Score indicator combines on-chain data with statistical analysis to provide traders with a clear, actionable view of market sentiment. Its customizable settings, visual clarity, and alert system make it an essential tool for both novice and experienced traders seeking an edge in the cryptocurrency markets.
Supply In Profit Z-Score | Vistula LabsOverview
The Supply In Profit Z-Score indicator is a Pine Script™ tool developed by Vistula Labs for technical analysis of cryptocurrencies, specifically Bitcoin (BTC) and Ethereum (ETH). It utilizes on-chain data from IntoTheBlock to calculate the difference between the percentage of addresses in profit and those in loss, transforming this metric into a Z-Score. This indicator helps traders identify market sentiment, trend-following opportunities, and overbought or oversold conditions.
What is Supply In Profit?
Supply In Profit is defined as the net difference between the percentage of addresses in profit and those in loss:
Profit Percentage: The proportion of addresses where the current value of holdings exceeds the acquisition price.
Loss Percentage: The proportion of addresses where the current value is below the acquisition price.
A positive value indicates more addresses are in profit, suggesting bullish sentiment, while a negative value indicates widespread losses, hinting at bearish sentiment.
How It Works
The indicator computes a Z-Score to normalize the Supply In Profit data relative to its historical behavior:
Z-Score = (Current Supply In Profit - Moving Average of Supply In Profit) / Standard Deviation of Supply In Profit
Current Supply In Profit: The latest profit-minus-loss percentage.
Moving Average: A customizable average (e.g., EMA, SMA) over a default 180-bar period.
Standard Deviation: Calculated over a default 200-bar lookback period.
Key Features
Data Source:
Selectable between BTC and ETH, pulling daily profit/loss percentage data from IntoTheBlock.
Customization:
Moving Average Type: Options include SMA, EMA, DEMA, RMA, WMA, or VWMA (default: EMA).
Moving Average Length: Default is 180 bars.
Z-Score Lookback: Default is 200 bars.
Thresholds: Adjustable for long/short signals and overbought/oversold levels.
Signals:
Long Signal: Z-Score crosses above the Long Threshold (default: 1.0).
Short Signal: Z-Score crosses below the Short Threshold (default: -0.64).
Overbought/Oversold Conditions:
Overbought: Z-Score > 3.0.
Oversold: Z-Score < -2.0.
Visualizations:
Z-Score Plot: Teal for long signals, magenta for short signals.
Threshold Lines: Dashed lines for long/short, solid lines for overbought/oversold.
Candlestick Coloring: Matches signal colors (teal/magenta).
Arrows: Green up-triangles for long entries, red down-triangles for short entries.
Background Colors: Magenta for overbought, teal for oversold.
Alerts:
Conditions for Long Opportunity, Short Opportunity, Overbought, and Oversold.
Usage Guide
Trend Following
Long Entry: When Z-Score crosses above 1.0, indicating potential upward momentum.
Short Entry: When Z-Score crosses below -0.64, suggesting potential downward momentum.
Overbought/Oversold Analysis
Overbought (Z-Score > 3.0): Consider profit-taking or preparing for a reversal.
Oversold (Z-Score < -2.0): Look for buying opportunities or exiting shorts.
Timeframe
Uses daily IntoTheBlock data, ideal for medium to long-term analysis.
Interpretation
High Z-Score: Indicates Supply In Profit is significantly above its historical mean, potentially signaling overvaluation.
Low Z-Score: Suggests Supply In Profit is below its mean, indicating possible undervaluation.
Signals and thresholds help traders act on shifts in market sentiment or extreme conditions.
Conclusion
The Supply In Profit Z-Score indicator provides a robust, data-driven approach to analyzing cryptocurrency market trends and sentiment. By combining on-chain metrics with statistical normalization, it empowers traders to make informed decisions based on historical context and current market dynamics.
BTC Dominance Excluding StablecoinsBTC Dominance Excluding Stablecoins
Description:
The "BTC Dominance Excluding Stablecoins" indicator calculates Bitcoin's dominance as a percentage of the total cryptocurrency market capitalization, excluding the market caps of major stablecoins (USDT and USDC). Unlike the standard BTC.D ticker, which includes stablecoins in the total market cap, this indicator provides a clearer view of Bitcoin’s dominance relative to the "non-stable" crypto market. This can be useful for traders and analysts who want to assess Bitcoin’s strength without the influence of stablecoin market caps, which often skew dominance metrics during periods of high stablecoin usage.
How It Works:
Bitcoin Market Cap: Fetches Bitcoin’s market capitalization using CRYPTOCAP:BTC.
Total Market Cap: Retrieves the total cryptocurrency market cap via CRYPTOCAP:TOTAL.
Stablecoin Adjustment: Subtracts the market caps of USDT (CRYPTOCAP:USDT) and USDC (CRYPTOCAP:USDC) from the total market cap.
Dominance Calculation: Computes Bitcoin’s dominance as (BTC Market Cap / Adjusted Total Market Cap) * 100, where the adjusted total excludes stablecoins.
Output: Plots the resulting dominance percentage as a line chart.
Features:
Displays Bitcoin dominance excluding stablecoins on any timeframe.
Customizable line color and thickness for better visualization.
Provides a more accurate representation of Bitcoin’s market share in the volatile, non-stablecoin crypto ecosystem.
Usage:
Add this indicator to your TradingView chart to compare Bitcoin’s dominance against the broader altcoin market, free from stablecoin distortions. Use it alongside other indicators like BTC.D or price charts to analyze market trends, especially during periods of high stablecoin inflows or outflows.
Notes:
The indicator currently excludes USDT and USDC, the two largest stablecoins by market cap. Additional stablecoins (e.g., DAI, BUSD) can be added by modifying the script if desired.
Data is sourced from TradingView’s CRYPTOCAP symbols, which may have slight delays or variations depending on exchange data feeds.
Best used on daily or higher timeframes for smoother, more reliable results.
Author:
Created by K Du₿
Version:
Pine Script v5
Breaking Structures (javieresfeliz)This TradingView script is designed to identify market structure changes, using a break of highs and lows approach, as well as technical indicators such as ATR, RSI, and EMAs (Exponential Moving Averages). It is aimed at detecting bullish and bearish trends, signaling possible entry and exit points based on various factors. It also offers additional confirmations to avoid false signals and provides a clear visualization of buy and sell signals.
Main Features:
Indicators Used:
ATR (Average True Range): Used to calculate a volatility range, which helps set stop-loss levels and price targets based on the current market volatility.
EMAs (50 and 200): Exponential Moving Averages (EMAs) are used to determine the short-term and long-term trends. The 50-period EMA is used to identify the short-term trend, while the 200-period EMA is used to identify the long-term trend.
RSI (Relative Strength Index): Used to identify overbought or oversold conditions in the market, providing additional buy or sell signals.
Volume: Used to confirm the validity of a signal. An increase in volume can confirm a structure break and provide more reliability to the signal.
Break of Structure Detection (BOS):
Bullish Break: Generated when the price surpasses previous highs.
Bearish Break: Generated when the price falls below previous lows.
Change of Character (CHOCH):
Bullish Trend: Defined by a close above the open and above the 50 EMA.
Bearish Trend: Defined by a close below the open and below the 50 EMA.
Buy and Sell Conditions:
Buy (Long): Activated when several conditions are met, including a bullish change of character, a bullish structure break, the price closing above the previous value plus a multiple of the ATR, and additional confirmations from RSI and volume.
Sell (Short): Activated when several conditions are met, including a bearish change of character, a bearish structure break, the price closing below the previous value minus a multiple of the ATR, with additional confirmations from RSI and volume.
Entry and Exit Signals:
Long Entry (Buy): Executed when the buy conditions are met.
Short Entry (Sell): Executed when the sell conditions are met.
Position Close: Positions are closed when the price crosses below (for long positions) or above (for short positions) the 50 EMA.
Historical Highs and Lows Lines:
The script draws lines of historical highs and lows from the last 288 and 60 periods to show key support and resistance levels on the chart.
Signal Table Across Multiple Timeframes:
The script displays a table in the top-right corner of the chart with indicators like the EMA trend, RSI value, and MACD histogram for timeframes of 1 minute, 5 minutes, 30 minutes, 1 hour, 4 hours, daily, and weekly.
Precautions:
Does not guarantee profits: Although the script is designed to detect structure breaks and possible trend changes, it does not guarantee 100% profitable signals. The market is always subject to risk and unpredictable volatility.
Requires adjustments for each asset: Parameters such as ATR length and EMA lengths should be adjusted according to the asset being analyzed and market conditions.
Use of additional confirmations: To reduce false signals, the script uses additional confirmations like RSI and volume, but it is always recommended to perform additional analysis before making trading decisions.
Changing trends: The change of character (CHOCH) can be a useful indicator, but it can give false signals in highly volatile markets or during prolonged consolidations.
Relies on historical data: This script relies on historical data to identify highs and lows. It does not consider fundamental events that may significantly impact the market.
Requires constant monitoring: Although the signals are automated, it is important to monitor open positions and make adjustments if market conditions change.
Risk of false signals: In low liquidity markets or consolidations, structure breaks can be false, so it’s recommended to pay attention to any additional confirmation signals or use a proper risk management strategy.
Volumen trend indicator 5MVOLUMEN TREND INDICATOR
Introduction
This indicator on TradingView provides a combination of technical analysis through a data table and visual elements on the chart. Its purpose is to provide a comprehensive view of the analyzed asset, facilitating decision-making.
How It Works
The indicator operates on two levels:
Data Table:
Displays key information about the asset's trend.
Includes metrics such as the current price, percentage change, volatility, and other relevant variables.
Can be customized to include additional indicators as needed.
Provides a quick analysis without the need to interpret complex charts.
Technical Elements on the Chart:
Incorporates dynamic support and resistance lines.
Can include moving averages, Bollinger Bands, RSI, or other custom indicators.
Offers visual alerts for significant changes in the asset's trend.
Facilitates detailed technical analysis through direct observation of patterns and signals.
Default Technical Indicators
The indicator comes with the following default pre-configured technical indicators:
Exponential Moving Average (EMA) 9:
This EMA responds more quickly to price movements, making it ideal for identifying short-term trends. It is generally used to detect crossovers with other EMAs or prices and is considered an entry or exit signal.
Exponential Moving Average (EMA) 21:
The 21-period EMA is used to identify medium-term trends. Its interaction with the 9 EMA is key to confirming buy or sell signals when both cross.
RSI (Relative Strength Index):
It is used to measure the magnitude of recent gains and losses of an asset, helping to identify overbought or oversold conditions.
Bollinger Bands:
These bands help identify volatility levels and potential reversal points. Price touching the upper or lower bands can be an important signal of trend change or continuation.
Customization
The user can modify several aspects of the indicator, such as:
Colors and styles of visual elements on the chart.
Types of indicators to include in the table.
Configuration of alerts and notifications.
Time interval for calculations and data updates.
EMA values (the periods can be changed if other configurations are desired).
Recommended Usage
To make the most of the indicator:
Use the data table to get an overview of the asset.
Analyze the technical elements on the chart to confirm trends.
Set alerts to avoid missing key opportunities.
Compare the information with other indicators and data sources before making decisions.
Precautions and Best Practices
Avoid relying solely on the indicator: Complement it with other technical and fundamental analysis.
Adjust the settings according to the asset's volatility: Not all strategies work the same across different markets.
Don’t overload the chart with too many elements: This can create visual noise and confusion in interpretation.
Test it on a demo account before trading live: To familiarize yourself with the indicator's functionality and adjustments.
----------------------------------------------
Remember that no system is perfect, keep these considerations in mind for this indicator:
Do not trade when a signal appears during an opposite trend:
Do not trade when the market is uncertain in its direction or within a parallel channel:
Fuzzy SMA with DCTI Confirmation[FibonacciFlux]FibonacciFlux: Advanced Fuzzy Logic System with Donchian Trend Confirmation
Institutional-grade trend analysis combining adaptive Fuzzy Logic with Donchian Channel Trend Intensity for superior signal quality
Conceptual Framework & Research Foundation
FibonacciFlux represents a significant advancement in quantitative technical analysis, merging two powerful analytical methodologies: normalized fuzzy logic systems and Donchian Channel Trend Intensity (DCTI). This sophisticated indicator addresses a fundamental challenge in market analysis – the inherent imprecision of trend identification in dynamic, multi-dimensional market environments.
While traditional indicators often produce simplistic binary signals, markets exist in states of continuous, graduated transition. FibonacciFlux embraces this complexity through its implementation of fuzzy set theory, enhanced by DCTI's structural trend confirmation capabilities. The result is an indicator that provides nuanced, probabilistic trend assessment with institutional-grade signal quality.
Core Technological Components
1. Advanced Fuzzy Logic System with Percentile Normalization
At the foundation of FibonacciFlux lies a comprehensive fuzzy logic system that transforms conventional technical metrics into degrees of membership in linguistic variables:
// Fuzzy triangular membership function with robust error handling
fuzzy_triangle(val, left, center, right) =>
if na(val)
0.0
float denominator1 = math.max(1e-10, center - left)
float denominator2 = math.max(1e-10, right - center)
math.max(0.0, math.min(left == center ? val <= center ? 1.0 : 0.0 : (val - left) / denominator1,
center == right ? val >= center ? 1.0 : 0.0 : (right - val) / denominator2))
The system employs percentile-based normalization for SMA deviation – a critical innovation that enables self-calibration across different assets and market regimes:
// Percentile-based normalization for adaptive calibration
raw_diff = price_src - sma_val
diff_abs_percentile = ta.percentile_linear_interpolation(math.abs(raw_diff), normLookback, percRank) + 1e-10
normalized_diff_raw = raw_diff / diff_abs_percentile
normalized_diff = useClamping ? math.max(-clampValue, math.min(clampValue, normalized_diff_raw)) : normalized_diff_raw
This normalization approach represents a significant advancement over fixed-threshold systems, allowing the indicator to automatically adapt to varying volatility environments and maintain consistent signal quality across diverse market conditions.
2. Donchian Channel Trend Intensity (DCTI) Integration
FibonacciFlux significantly enhances fuzzy logic analysis through the integration of Donchian Channel Trend Intensity (DCTI) – a sophisticated measure of trend strength based on the relationship between short-term and long-term price extremes:
// DCTI calculation for structural trend confirmation
f_dcti(src, majorPer, minorPer, sigPer) =>
H = ta.highest(high, majorPer) // Major period high
L = ta.lowest(low, majorPer) // Major period low
h = ta.highest(high, minorPer) // Minor period high
l = ta.lowest(low, minorPer) // Minor period low
float pdiv = not na(L) ? l - L : 0 // Positive divergence (low vs major low)
float ndiv = not na(H) ? H - h : 0 // Negative divergence (major high vs high)
float divisor = pdiv + ndiv
dctiValue = divisor == 0 ? 0 : 100 * ((pdiv - ndiv) / divisor) // Normalized to -100 to +100 range
sigValue = ta.ema(dctiValue, sigPer)
DCTI provides a complementary structural perspective on market trends by quantifying the relationship between short-term and long-term price extremes. This creates a multi-dimensional analysis framework that combines adaptive deviation measurement (fuzzy SMA) with channel-based trend intensity confirmation (DCTI).
Multi-Dimensional Fuzzy Input Variables
FibonacciFlux processes four distinct technical dimensions through its fuzzy system:
Normalized SMA Deviation: Measures price displacement relative to historical volatility context
Rate of Change (ROC): Captures price momentum over configurable timeframes
Relative Strength Index (RSI): Evaluates cyclical overbought/oversold conditions
Donchian Channel Trend Intensity (DCTI): Provides structural trend confirmation through channel analysis
Each dimension is processed through comprehensive fuzzy sets that transform crisp numerical values into linguistic variables:
// Normalized SMA Deviation - Self-calibrating to volatility regimes
ndiff_LP := fuzzy_triangle(normalized_diff, norm_scale * 0.3, norm_scale * 0.7, norm_scale * 1.1)
ndiff_SP := fuzzy_triangle(normalized_diff, norm_scale * 0.05, norm_scale * 0.25, norm_scale * 0.5)
ndiff_NZ := fuzzy_triangle(normalized_diff, -norm_scale * 0.1, 0.0, norm_scale * 0.1)
ndiff_SN := fuzzy_triangle(normalized_diff, -norm_scale * 0.5, -norm_scale * 0.25, -norm_scale * 0.05)
ndiff_LN := fuzzy_triangle(normalized_diff, -norm_scale * 1.1, -norm_scale * 0.7, -norm_scale * 0.3)
// DCTI - Structural trend measurement
dcti_SP := fuzzy_triangle(dcti_val, 60.0, 85.0, 101.0) // Strong Positive Trend (> ~85)
dcti_WP := fuzzy_triangle(dcti_val, 20.0, 45.0, 70.0) // Weak Positive Trend (~30-60)
dcti_Z := fuzzy_triangle(dcti_val, -30.0, 0.0, 30.0) // Near Zero / Trendless (~+/- 20)
dcti_WN := fuzzy_triangle(dcti_val, -70.0, -45.0, -20.0) // Weak Negative Trend (~-30 - -60)
dcti_SN := fuzzy_triangle(dcti_val, -101.0, -85.0, -60.0) // Strong Negative Trend (< ~-85)
Advanced Fuzzy Rule System with DCTI Confirmation
The core intelligence of FibonacciFlux lies in its sophisticated fuzzy rule system – a structured knowledge representation that encodes expert understanding of market dynamics:
// Base Trend Rules with DCTI Confirmation
cond1 = math.min(ndiff_LP, roc_HP, rsi_M)
strength_SB := math.max(strength_SB, cond1 * (dcti_SP > 0.5 ? 1.2 : dcti_Z > 0.1 ? 0.5 : 1.0))
// DCTI Override Rules - Structural trend confirmation with momentum alignment
cond14 = math.min(ndiff_NZ, roc_HP, dcti_SP)
strength_SB := math.max(strength_SB, cond14 * 0.5)
The rule system implements 15 distinct fuzzy rules that evaluate various market conditions including:
Established Trends: Strong deviations with confirming momentum and DCTI alignment
Emerging Trends: Early deviation patterns with initial momentum and DCTI confirmation
Weakening Trends: Divergent signals between deviation, momentum, and DCTI
Reversal Conditions: Counter-trend signals with DCTI confirmation
Neutral Consolidations: Minimal deviation with low momentum and neutral DCTI
A key innovation is the weighted influence of DCTI on rule activation. When strong DCTI readings align with other indicators, rule strength is amplified (up to 1.2x). Conversely, when DCTI contradicts other indicators, rule impact is reduced (as low as 0.5x). This creates a dynamic, self-adjusting system that prioritizes high-conviction signals.
Defuzzification & Signal Generation
The final step transforms fuzzy outputs into a precise trend score through center-of-gravity defuzzification:
// Defuzzification with precise floating-point handling
denominator = strength_SB + strength_WB + strength_N + strength_WBe + strength_SBe
if denominator > 1e-10
fuzzyTrendScore := (strength_SB * STRONG_BULL + strength_WB * WEAK_BULL +
strength_N * NEUTRAL + strength_WBe * WEAK_BEAR +
strength_SBe * STRONG_BEAR) / denominator
The resulting FuzzyTrendScore ranges from -1.0 (Strong Bear) to +1.0 (Strong Bull), with critical threshold zones at ±0.3 (Weak trend) and ±0.7 (Strong trend). The histogram visualization employs intuitive color-coding for immediate trend assessment.
Strategic Applications for Institutional Trading
FibonacciFlux provides substantial advantages for sophisticated trading operations:
Multi-Timeframe Signal Confirmation: Institutional-grade signal validation across multiple technical dimensions
Trend Strength Quantification: Precise measurement of trend conviction with noise filtration
Early Trend Identification: Detection of emerging trends before traditional indicators through fuzzy pattern recognition
Adaptive Market Regime Analysis: Self-calibrating analysis across varying volatility environments
Algorithmic Strategy Integration: Well-defined numerical output suitable for systematic trading frameworks
Risk Management Enhancement: Superior signal fidelity for risk exposure optimization
Customization Parameters
FibonacciFlux offers extensive customization to align with specific trading mandates and market conditions:
Fuzzy SMA Settings: Configure baseline trend identification parameters including SMA, ROC, and RSI lengths
Normalization Settings: Fine-tune the self-calibration mechanism with adjustable lookback period, percentile rank, and optional clamping
DCTI Parameters: Optimize trend structure confirmation with adjustable major/minor periods and signal smoothing
Visualization Controls: Customize display transparency for optimal chart integration
These parameters enable precise calibration for different asset classes, timeframes, and market regimes while maintaining the core analytical framework.
Implementation Notes
For optimal implementation, consider the following guidance:
Higher timeframes (4H+) benefit from increased normalization lookback (800+) for stability
Volatile assets may require adjusted clamping values (2.5-4.0) for optimal signal sensitivity
DCTI parameters should be aligned with chart timeframe (higher timeframes require increased major/minor periods)
The indicator performs exceptionally well as a trend filter for systematic trading strategies
Acknowledgments
FibonacciFlux builds upon the pioneering work of Donovan Wall in Donchian Channel Trend Intensity analysis. The normalization approach draws inspiration from percentile-based statistical techniques in quantitative finance. This indicator is shared for educational and analytical purposes under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
Past performance does not guarantee future results. All trading involves risk. This indicator should be used as one component of a comprehensive analysis framework.
Shout out @DonovanWall
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.
IBD Style Relative Strength RatingWelcome to the IBD Style Relative Strength Rating Indicator!
A powerful tool inspired by Investor's Business Daily (IBD), this indicator helps traders evaluate stock performance relative to a benchmark. It’s perfect for identifying strong or weak stocks compared to the broader market, specifically the S&P 500 (SPY). Whether you're a beginner or an experienced investor, this guide will walk you through its features and key concepts, including the RS Line and RS Rating, and how legendary trader Mark Minervini uses similar tools.
Understanding the RS Line & RS Rating
RS Line (Relative Strength Line)
A visual representation of how a stock’s price performs relative to SPY.
Calculated by dividing the stock’s closing price by SPY’s closing price and multiplying by 100.
Rising RS Line → Stock is outperforming SPY.
Falling RS Line → Stock is underperforming SPY.
Helps identify strength or weakness compared to the market.
RS Rating
A numerical score (1-99) measuring stock performance over 252 trading days (1 year) relative to SPY.
Above 80 → Top 20% of performers.
Above 90 → Top 10% (ideal for growth investors).
Weighted average of stock’s price changes over 63, 126, 189, and 252 days.
Key Features Explained
RS Line Color Mode:
Static (default white) or Dynamic (green when rising, red when falling) for quick trend identification.
Comparative Symbol:
Default: SPY. Can be changed to NASDAQ:NDX, AAPL, or other indices/stocks.
Ensure selected symbols have sufficient historical data.
Plot RS New Highs: Marks new 250-day highs with subtle blue circles
Indicates a stock significantly outperforming SPY (potential buy signal).
Plot RS New Lows: Marks new 250-day lows with red circles
Signals underperformance (possible sell or avoid indicator).
Lookback for Display: Adjustable up to 2000 bars for historical trend analysis.
RS Rating Color Scheme
Green: Upward trend (improving RS Rating).
Orange: Neutral/mixed trend.
Red: Downward trend (declining RS Rating).
Dynamic Color Settings
Rising Line Color: Green (default), customizable.
Falling Line Color: Red (default), adjustable.
Advanced Options
Enable Replay Mode: Uses fixed percentile values for consistent RS Rating calculations in backtesting.
RS Rating Table
Displays current RS Rating and values from previous day, week, and month in the top-right corner (daily charts).
Background color reflects trend: Green (up), Orange (neutral), Red (down).
Past values appear in neutral gray for a quick performance snapshot.
How Mark Minervini Uses This Indicator
Mark Minervini, a legendary trader, emphasizes Relative Strength as a core strategy:
Looks for stocks with:
Rising RS Line.
RS Rating above 80-90 (top performers).
RS New Highs to spot breakout candidates.
Avoids stocks with:
Declining RS Line.
RS Rating below 70.
Important Information for Beginners
RS vs. SPY
The indicator compares stock performance against SPY (S&P 500).
Rising RS Line → Stock is beating SPY.
Falling RS Line → Stock is lagging.
Why Use This Indicator?
Helps find strong relative strength stocks, crucial for bullish trends.
New highs/lows on the RS Line signal significant shifts.
The RS Rating quantifies percentile-based performance.
Customization Options
Adjust colors, lookback periods, and marker sizes to match your trading style.
Default SPY comparison is ideal for U.S. traders but can be customized.
Timeframe Considerations
Optimized for daily charts.
Weekly/monthly charts may have limited data availability.
Tips for Crypto Traders (Measuring Altcoins vs. Bitcoin or Total Market Cap)
If trading cryptocurrencies, this indicator can measure altcoins vs. Bitcoin (BTC) or the total crypto market cap (TOTAL):
Comparative Symbol Setup:
Set Comparative Symbol to BTCUSD to compare an altcoin (e.g., ETHUSD) against Bitcoin.
Rising RS Line → The altcoin is outperforming Bitcoin (bullish signal).
Use TOTAL (crypto market cap index) to assess an altcoin’s strength against the total market.
High RS Rating suggests the altcoin is a market leader.
Adjust Look-back Periods:
Crypto markets are volatile, so reduce Look-back for New Highs/Lows to 50-100 bars (about 2-4 months) for shorter-term trends.
Fine-tune based on your trading strategy.
New Highs and Lows:
Watch for new RS Line highs (blue dots) to identify altcoins breaking out against BTC or TOTAL (momentum trading).
New lows (red dots) may signal weakening altcoins to avoid.
RS Rating Interpretation:
Above 80 against BTC or TOTAL → The altcoin is a strong performer.
This aligns with Minervini’s growth strategy for stocks.
Color Dynamics:
Use Dynamic RS Line Color (green for rising, red for falling) to quickly spot altcoin trends against BTC or TOTAL.
Crypto data may have gaps—test indicator settings on different timeframes (e.g., 1-hour or 4-hour charts).
Tips for Getting Started
Apply the Indicator to a stock chart and set Comparative Symbol to SPY.
Watch the RS Line:
If trending upward with new highs and RS Rating > 80, it's a strong candidate.
Use the RS Rating Table to check for trend consistency.
Adjust Opacity Settings for markers to balance visibility and clarity.
This indicator is now ready for public use as of March 18, 2025. Enjoy trading with enhanced insights, and feel free to share feedback or suggestions for future updates!
Excess Liquidity IndicatorExcess Liquidity Indicator
This script visualizes excess liquidity trends in relation to risk assets. It estimates excess liquidity by combining various macroeconomic factors such as WW M2 money supply, central bank balance sheets, and interest rates, oil, and the dollar index, and it substracts WW GDP. The tool helps traders analyze liquidity-driven market trends in a structured manner.
Note: This script is for research purposes only and does not provide financial advice.
I cannot point names cause I get banned but work is inspired by others...
Ultimate Volatility Scanner by NHBprod - Requested by Client!Hey Everyone!
I created another script to add to my growing library of strategies and indicators that I use for automated crypto and stock trading! This strategy is for BITCOIN but can be used on any stock or crypto. This was requested by a client so I thought I should create it and hopefully build off of it and build variants!
This script gets and compares the 14-day volatility using the ATR percentage for a list of cryptocurrencies and stocks. Cryptocurrencies are preloaded into the script, and the script will show you the TOP 5 coins in terms of volatility, and then compares it to the Bitcoin volatility as a reference. It updates these values once per day using daily timeframe data from TradingView. The coins are then sorted in descending order by their volatility.
If you don't want to use the preloaded set of coins, you have the option of inputting your own coins AND/OR stocks!
Let me know your thoughts.
TOTAL3/BTC This Pine Script™ code, named "TOTAL3/BTC with Arrow," is designed for cryptocurrency analysis on TradingView.
This script essentially provides a visual tool for traders to gauge when altcoins might be gaining or losing ground relative to Bitcoin through moving average analysis and color-coded trend indication.
Intention was to help the community with a script based on classic TA only.
Use it with SASDv2r indicator.
Feel free to make it better. If you did so, please let me know.
Main elements:
Data Fetching: It retrieves market cap data for all cryptocurrencies excluding Bitcoin and Ethereum (TOTAL3) and for Bitcoin (BTC).
Ratio Calculation: The script calculates the ratio of TOTAL3 to BTC market caps, which indicates how altcoins (excluding ETH) are performing relative to Bitcoin.
Plotting the Ratio: This ratio is plotted on the chart with a blue line, allowing traders to see the relative performance visually.
Moving Averages: Two Simple Moving Averages (SMA) are calculated for this ratio, one for 20 periods (ma20) and another for 50 periods (ma50), though these are not plotted in the current version of the code.
Reference Lines: Horizontal lines are added at ratios of 0.3 and 0.8 to serve as visual equilibrium points or thresholds for analysis.
Complex Moving Average: The script uses constants (len, len2, cc, smoothe) from another script, suggesting it's adapting or simplifying another's logic for multi-timeframe analysis.
Average Calculation: Two SMAs (avg and avg2) are computed using the constants defined, focusing on different lengths for trend analysis.
Direction Determination: It checks if the moving average is trending up or down by comparing the current value with its value smoothe bars earlier.
Color Coding: The color of the plotted moving average changes based on its direction (lime for up, red for down, aqua if no clear direction), aiding in quick visual interpretation of trends.
Plotting: Finally, the script plots this multi-timeframe moving average with a dynamic color to reflect the current market trend of the TOTAL3/BTC ratio, with a thicker line for visibility.