SD Median NUPL-Z🧠 Overview
SD Median NUPL-Z is a trend-following indicator that leverages a normalized version of Bitcoin’s Net Unrealized Profit/Loss (NUPL) metric, filtered through a median-based volatility band. Unlike traditional NUPL which is often used to spot extremes, this indicator is designed to identify sustained directional trends — entering only when both on-chain momentum and price structure align.
🧩 Key Features
Z-Scored NUPL Trend Engine: Normalizes NUPL using rolling mean and standard deviation to create a smoothed trend signal.
Price Structure Filter: Implements a median-based price band to avoid false entries during short-term volatility.
Custom Thresholds: User-defined thresholds determine when the trend signal is strong enough to justify a long or short directional bias.
Directional Candle Coloring: Reinforces current trend regime visually with aqua (bullish) and red (bearish) plots and candles.
Optimized for BTC: Uses Bitcoin’s Market Cap and Realized Cap to construct the NUPL input.
🔍 How It Works
On-Chain Core: NUPL is calculated as the percentage of unrealized profit in the market: (Market Cap - Realized Cap) / Market Cap * 100.
Z-Score Transformation: The raw NUPL value is normalized using a rolling average and standard deviation over a set window (default 134 days), producing the NUPL-Z series.
Median-Based Price Filter: A rolling 50th percentile (median) of price is used alongside its own standard deviation to create upper and lower bounds.
These bounds define a "volatility corridor" around price; the trend signal is only acted upon if price confirms by staying outside these bands.
Signal Logic:
A Long signal is triggered when NUPL-Z rises above the long threshold and price is not below the lower band.
A Short signal is triggered when NUPL-Z falls below the short threshold.
State Variable (CD): Tracks the current market regime, used to control plotting and color changes.
🔁 Use Cases & Applications
Momentum-Based Trend Following: Helps traders align with directional moves backed by both on-chain sentiment and supportive price structure.
Filtered Entry Timing: Reduces premature or noise-based entries by requiring price confirmation before committing to NUPL-based signals.
Best Suited for BTC: This tool is designed specifically around Bitcoin’s on-chain metrics and is not intended for altcoins or low-volume assets.
✅ Conclusion
SD Median NUPL-Z repurposes a traditionally cyclical valuation tool into a modern trend-following signal by combining statistical normalization with dynamic price structure filtering. It offers a more robust way to participate in high-conviction directional trends, reducing the likelihood of entering during short-lived counter moves.
⚠️ Disclaimer
The content provided by this indicator is for educational and informational purposes only. Nothing herein constitutes financial or investment advice. Trading and investing involve risk, including the potential loss of capital. Always backtest and apply risk management suited to your strategy.
ON
NUPL-Z For Loop🧠 Overview
NUPL-Z For Loop is a trend-following indicator built on Bitcoin’s on-chain Net Unrealized Profit/Loss (NUPL) metric. It uses a Z-scored transformation of NUPL and a custom loop-based scoring system to measure the consistency of directional movement. Rather than identifying tops and bottoms, this tool is designed to track sustained trends and filter out short-term noise, making it ideal for momentum-aligned strategies.
🧩 Key Features
Loop-Based Trend Logic: Assesses trend strength by summing the number of upward vs. downward moves in Z-scored NUPL across a custom lookback.
Z-Score Normalization: Applies long-term statistical normalization to NUPL to emphasize deviation from average behavior over time.
Threshold-Based Regime Shifts: Custom input thresholds define when trend strength is significant enough to trigger long or short signals.
Directional Market State Tracking: Internally tracks bullish, bearish, or neutral conditions to guide trend entries.
BTC-Focused On-Chain Analysis: Tailored specifically for Bitcoin using Market Cap and Realized Cap inputs.
🔍 How It Works
NUPL Calculation: Derived as the percentage of net unrealized profit relative to market cap: (MC - RMC) / MC * 100.
Z-Scoring: NUPL is normalized using a rolling mean and standard deviation over a long window (default 1300 days) to create a smoothed trend signal.
Directional Loop: A custom loop iterates from the start_loop to the end_loop, comparing the current Z-score to past values.
Each instance where NUPL_Z > NUPL_Z adds +1 to the score; otherwise, it subtracts -1.
This cumulative score reflects how consistently NUPL-Z has been trending.
Signal Logic:
Long signal when loop score exceeds long_threshold.
Short signal when score falls below short_threshold.
CD State Engine: Maintains the current trend regime (1 for long, -1 for short), which drives plot coloring and overlays.
🔁 Use Cases & Applications
Momentum Trend Filter: Detects and confirms sustained directional strength in BTC’s profit/loss positioning.
Noise Suppression: Avoids reactive signals from one-off spikes or dips in NUPL by requiring a consistent trend before confirming bias.
Best Suited for BTC: Designed specifically for Bitcoin’s price and on-chain structure, using its unique NUPL dynamics.
✅ Conclusion
NUPL-Z For Loop transforms a traditionally mean-reverting indicator into a trend-following signal engine. By scoring the consistency of movement in normalized NUPL, this tool identifies trend strength rather than reversal potential — providing more reliable context for momentum-aligned trades on Bitcoin.
⚠️ Disclaimer
The content provided by this indicator is for educational and informational purposes only. Nothing herein constitutes financial or investment advice. Trading and investing involve risk, including the potential loss of capital. Always backtest and apply risk management suited to your strategy.
SD Median MVRV-Z🧠 Overview
SD Median MVRV-Z is a trend-following indicator that uses on-chain valuation signals as a supportive filter. It blends the momentum of the MVRV Z-score with a dynamic median-based price structure to provide cleaner, more reliable directional signals. This tool is designed to identify when price and trend align with favorable broader context — not to pinpoint overbought or oversold extremes.
🧩 Key Features
Trend-Following Core: Signals are built around directional strength, not reversion.
MVRV Z-Score Momentum: Utilizes the statistical momentum of Market Cap vs Realized Cap as a macro trend driver.
Rolling Median Filter: Applies a price-based condition to ensure trend signals are not triggered during short-term counter-moves or noise.
Threshold Customization: Input controls allow traders to define the strength required to trigger long or short signals.
Dynamic Visualization: Candle coloring and filled zones provide instant feedback on current market regime.
🔍 How It Works
Trend Signal: The MVRV ratio is normalized via Z-scoring to produce a momentum-like signal based on how far current valuation deviates from its rolling average.
Price Filter: A rolling median and standard deviation of price define an upper and lower band. These serve to filter out MVRV-Z signals that occur when price is moving against the perceived direction.
Signal Logic:
Long signal = MVRV-Z above threshold and price is not in the lower volatility band.
Short signal = MVRV-Z below threshold, regardless of price band (more aggressive condition).
Directional Engine (CD): Encodes the market regime state (1 for long, -1 for short, 0 for neutral), and drives all visual outputs.
🔁 Use Cases & Applications
Momentum Confirmation: Identify when on-chain momentum and price structure both confirm a trend direction.
Reduced Whipsawing: Filter out weak or conflicting trend signals that would otherwise lead to false entries.
Best Suited for BTC: This indicator is specifically tailored for Bitcoin, using BTC’s Market Cap and Realized Cap data from on-chain sources.
✅ Conclusion
SD Median MVRV-Z is a trend-centric tool that ensures directional conviction by requiring agreement between price structure and underlying market momentum. It is not meant to detect tops or bottoms, but instead to help traders participate in sustainable moves with greater confidence.
⚠️ Disclaimer
The content provided by this indicator is for educational and informational purposes only. Nothing herein constitutes financial or investment advice. Trading and investing involve risk, including the potential loss of capital. Always backtest and apply risk management suited to your strategy.
MVRV-Z For Loop🧠 Overview
MVRV-Z For Loop is a trend-following indicator that applies a custom directional for-loop logic to the MVRV Z-score. By evaluating the number of consecutive Z-score improvements or deteriorations over time, it identifies sustained directional pressure in Bitcoin’s on-chain trend — helping traders align with prevailing market strength rather than reacting to single-point extremes.
🧩 Key Features
Loop-Based Trend Filter: Applies a running comparison loop to assess whether MVRV-Z has been consistently strengthening or weakening.
Directional Scoring System: Each upward movement contributes positively, and each downward movement negatively, producing a cumulative trend score.
Z-Scored MVRV: Leverages on-chain valuation via the Market Cap to Realized Cap ratio, normalized using a long-term rolling average and standard deviation.
Custom Thresholds: User-defined thresholds for long and short signals based on trend score magnitude.
Dynamic Candle Coloring: Visually reinforces trend state with aqua for bullish and red for bearish environments.
🔍 How It Works
Z-score Transformation: The MVRV ratio is normalized over a long lookback (default 1050 days), creating a standardized valuation signal.
For-Loop Engine: A directional loop compares the current MVRV-Z value to previous values within a defined range (start to end).
If today’s value is higher than ma , it adds +1 to the score; otherwise, it subtracts -1.
This loop effectively measures momentum consistency rather than magnitude alone.
Signal Logic:
A Long signal is triggered when the cumulative trend score exceeds the long_threshold.
A Short signal is triggered when the score drops below the short_threshold.
State Variable (CD): Tracks the market regime (1 = long, -1 = short), updating only when a valid condition is met.
🔁 Use Cases & Applications
Trend Confirmation Tool: Helps traders assess whether a directional move has been sustained over time before committing.
Momentum Alignment: Filters out short-term noise by scoring consistency in MVRV-Z movement rather than relying on single-bar reversals.
Best Suited for BTC: This indicator is specifically built using Bitcoin’s Market Cap and Realized Cap metrics, making it ideal for BTC trend tracking.
✅ Conclusion
MVRV-Z For Loop transforms the traditional MVRV Z-score into a trend-following signal using a cumulative scoring approach. It excels in highlighting sustained directional strength and avoids premature entries during valuation whipsaws. This makes it a strong tool for traders looking to stay on the right side of the trend without overreacting to short-term fluctuations.
⚠️ Disclaimer
The content provided by this indicator is for educational and informational purposes only. Nothing herein constitutes financial or investment advice. Trading and investing involve risk, including the potential loss of capital. Always backtest and apply risk management suited to your strategy.
OBVX Conviction Bias🧮 The OBVX Conviction Bias overlay tracks the flow of directional volume using the classic On-Balance Volume calculation, then filters it through a layered moving average system to expose crowd commitment , pressure transitions , and momentum fatigue . The tool applies two smoothed averages to the OBV line—a fast curve and a longer-term baseline scaled using Euler’s constant (2.718)—and visualizes their relationship using a color-coded crossover ribbon and pressure fills. When used correctly, it reveals whether a move is being supported by meaningful volume, or whether the crowd is starting to disengage.
🚦 The core signal compares OBV to its fast moving average. When OBV climbs above the short average, it fills green—suggesting real directional effort. When OBV sinks below, the fill turns maroon—flagging fading conviction or pullback potential. A second fill between the short and long OBV moving averages captures the broader trend of volume intention. If the short is above the long, this space fills greenish, showing constructive pressure. If it flips, the fill fades red, signaling crowd hesitation, rotation, or early exhaustion.
⚖️ All smoothing is user-selectable, defaulting to VWMA for effort-sensitive structure. The long-term average is auto-scaled using the natural exponential multiplier (2.718), offering rhythm that reflects the curve of participation. OBVX Conviction Bias isn’t trying to predict—it’s trying to show you where the crowd is leaning , and whether that lean is gaining traction or losing strength.
🧐 Ideal Use-Cases:
• Detect divergence between volume flow and price action
• Confirm breakout validity with volume alignment
• Fade breakouts where OBV fails to follow through
• Time pullback entries when OBV pressure resumes in trend direction
🍷 Recommended Pairings:
• ZVOL to measure whether volume is statistically significant or just noise (as shown)
• RVOL Effort Matrix to validate crowd effort by tier and structure zone
• SUPeR TReND 2.718 and/or MA Ribbons for directional confluence
• ATR Turbulence to track volatility-phase alignment with volume intention
[GOG] Risk-Appetite IndicatorOverall tradfi risk appetite indicator. Plotting ARKK/SPX and ARKW/SPX. Look for divergences to your risk assets to look for entries and exits. Also generally useful to compare to past peaks to spot euphoria.
Bitcoin Halving CountdownJust a simple Bitcoin halving countdown
Set up for the 2028 halving with the block height set at 1050000
Block height can be setup in the script settings for future halving
We don't have real time on-chain data on TradingView, so the script will update only once a day with a lag of one day (GLASSNODE data) until we get live data.
If you have any suggestions/questions leave a comment :)
Mescu
Reverse Stoch [BApig Gift] - on PanelMssive credit to Motgench, Balipour and Wugamlo for this script. This script is all of their good work.
It is basically just the non-on chart version which I've slightly tweaked off their script. This can be useful to reduce the clutter on the chart itself. Releasing it in the hope that it can be useful for the community
Enjoy!
Supply Weighted Moving Average: OnchinUse this Onchain Channel in Weekly Timeframe - on BTCUSD BUTSTAMP Chart:
This Moving average channel is weighted based on BTC's new Supply:
I believe the slope of the Bitcoin trend line is correlated to the new supply and the issue of Halving.
The chart below shows this:
In fact, after each Halving, the supply is halved. Halving the supply increases the demand-for-supply ratio and increases the price. But the uptrend slope also halves after each halving.
Therefore, the slope of the bitcoin trend is correlated with the new supply rate. This is the logic of this new metric.
Accordingly, the moving average is weighted based on the new supply. This new channel can identify where bitcoin is too cheap or too expensive in the historical chart. It has also marked support/resistance Supply Weighted Moving Average.
BTC New Supply: OnchainThis Onchain Metric shows the sum of newly issued coins.
This metric is very useful for finding new bull run cycles in the market. The new bull run is accompanied by a significant drop in the new supply.
BTC Supply weighted channel: OnchainUse this oscillator in the weekly time frame and then draw the above linear channel
The premise of this idea is that the trend slope of the bitcoin price correlates with the bitcoin supply chart, which shows the total amount of bitcoin ever created/issued.
Therefore, Bitcoin price is weighted based on Bitcoin supply.
As a result, the above channel has been created, which is a linear channel, and it seems that it can be an oscillator to determine the bitcoin trend, as well as the tops and bottoms of the market.
Bitcoin seems to respect the bottom and top lines of this channel as well as its midline
Glassnode BTC SOPR ToolkitSOPR stand for Spent Output Profit Ratio. It’s a Bitcoin on-chain metric that shows whether Bitcoin spent outputs (UTXO’s) are being realized in profit or loss. It’s calculated by dividing realized value by the value at creation (price sold / price paid).
The SOPR metric traditionally uses a baseline of 1 instead of 0. For the purposes of the script, I've changed the baseline to 0.
SOPR signals > 0 show the overall market is transaction at a profit.
SOPR signals < 0 show the overall market is transacting at a loss.
SOPR servers as a great short/mid-term indicator.
SOPR Toolkit Features
- Smoothed SOPR
- SOPR Spikes
Smoothed SOPR
By default, ‘Smoothed SOPR’ is shown which applies a smoothing function to SOPR. This helps to visualize the broader SOPR trend.
Smoothed SOPR is calculated by taking the difference between positive and negative SOPR values.
SOPR is split into separate arrays based on if it's above or below the baseline A moving average is then applied to each array, then subtracted to get the difference.
You can also change whether or not a SMA, EMA, or Volume Weighted Simple/Exponential moving average is used. The VWMA is calculated using Glassnode’s BTC Total Transfer Volume metric.
SOPR Spikes
Shows relevant SOPR spikes.
SOPR spikes is calculated by applying a Bollinger Band to SOPR. Only values spike outside the bands are shown.
Adjust the StdDev to show more/less relevant spikes.
Enjoy :)
Stepping MAInput desired timeframe and etc
Ex: Timeframe Daily
Input 100
Will display daily moving of 100 on every timeframe
Multi ROIThis is really, really, really basic.
Its just 10 ROIs - Return On Investment- plots for the following periods:
1 week
1 month
1/2 year
1 year
2 year
3 year
4 year
5 year
6 year
7 year
It is meant for 1 day bars. Of course it will work anywhere and you can change the settings to fit your purposes but I thought these were the most useful periods.
STRATEGY TESTER ENGINE - ON CHART DISPLAY - PLUG & PLAYSo i had this idea while ago when @alexgrover published a script and dropped a nugget in between which replicates the result of strategy tester on chart as an indicator.
So it seemed fair to use one of his strategy to display the results.
This strategy tester can now be used in replay mode like an indicator and you can see what happen at a particular section of the chart which was is not possible in default strategy tester results of TV.
Please read how each result is calculated so you will know what you are using.
This engine shows most common results of strategy tester in a single screen, which are as follows:
1. Starting Capital
2. Current Profit Percentage
3. Max Profit Percentage
4. Gross Profit
5. Gross Loss
6. Total Closed Trades
7. Total Trades Won
8. Total Trades Lost
9. Percentage Profitable
10. Profit Factor
11. Current Drawdown
12. Max Drawdown
13. Liquidation
So elaborating on what is what:
1. Starting Capital - This stays 0, which signifies your starting balance as 0%. It is set to 0 so we can compare all other results without any change in variables. If set to 100, then all the results will be increased by 100. Some users might find it useful to set it to 100, then they can change code on line 41 from to and it should show starting balance as 100%.
2. Current Profit Percentage - This shows your current profit adjusted to current price of the candle, not like TV which shows after candle is close. There is a comment on the line 38 which can be removed and your can see unrealized profit as well in this section. Please note that this will affect Draw-down calculations later in this section.
3. Max Profit Percentage - This will show you your max profit achieved during your strategy run, which was not possible yet to see via strategy tester. So, now you can see how much profit was achieved by your strategy during the run and you can compare it with chart to see what happens during bull-run or bear-run, so you can further optimize your strategy to best suit your desired results.
4. Gross Profit - This is total percentage of profit your strategy achieved during entire run as if you never had any losses.
5. Gross Loss - This is total percentage of loss your strategy achieved during entire run as if you never had any profits.
6. Total Closed Trades - This is total number of trades that your strategy has executed so far.
7. Total Trades Won - This is the total number of trades that your strategy has executed that resulted in positive increase in equity.
8. Totals Trades Lost - This is the total number of trades that your strategy has executed that resulted in decrease in equity.
9. Percentage Profitable - This is the ratio between your current total winning trades divided by total closed trades, and finally multiplied by 100 to get percentage results.
10. Profit Factor - This is the ratio between Gross Profit and Gross Loss, so if profit factor is 2, then it indicates that you are set to gain 2 times per your risk per trade on average when total trades are executed.
11. Current Drawdown - This is important section and i want you to read this carefully. Here draw-down is calculated very differently than what TV shows. TV has access to candle data and calculates draw-down accordingly as per number of trades closed, but here DD is calculated as difference between max profit achieved and current profit. This way you can see how much percentage you are down from max peak of equity at current point in time. You can do back-test of the data and see when peak was achieved and how much your strategy did a draw-down candle by candle.
12. Max Drawdown - This is also calculated differently same as above, current draw-down. Here you can see how much max DD your strategy did from a peak profit of equity. This is not set as max profit percentage is set because you will see single number on display, while idea is to keep it custom. I will explain.
So lets say, your max DD on TV is 30%. Here this is of no use to see Max DD , as some people might want to see what was there max DD 1000 candles back or 10 candle back. So this will show you your max DD from the data you select. TV shows 25000 candle data in a chart if you go back, you can set the counter to 24999 and it will show you max DD as shown on TV, but if you want custom section to show max DD , it is now possible which was not possible before.
Also, now let's say you put DD as 24999 and open a chart of an asset that was listed 1 week ago, now on 1H chart max DD will never show up until you reach 24999 candle in data history, but with this you can now enter a manual number and see the data.
13. Liquidation - This is an interesting feature, so now when your equity balance is less than 0 and your draw-down goes to -100, it will show you where and at what point in time you got liquidated by adding a red background color in the entire section. This is the most fun part of this script, while you can only see max DD on TV.
------------------------------------------------------------------------------
How to Use -
1 word, plug and play. Yes. Actual codes start from line 33.
select overlay=false or remove it from the title in your strategy on first line,
Just copy the codes from line 33 to 103,
then go to end section of your strategy and paste the entire code from line 33 to line 103,
see if you have any duplicate variable, edit it,
Add to chart.
What you see above is very contracted view. Here is how it looks when zoomed in.
imgur.com
----------------------------------------------------------------------------------
Feel free to edit and share and use. If you use it in your scripts, drop me tag. Cheers.
BTC exchange trade vol / on-chain transaction volThis Bitcoin indicator shows the percentage that the exchange traded volume is from the sum of the exchange traded volume + on-chain transaction volume.
The thin red line is the non-smoothed value calculated from daily volumes.
The thick black line is the 7-day EMA-smoothed value.
The exchange traded volume and the on-chain transaction volume are reported by Quandl and have a 1D resolution - so it is best to use this indicator on the daily time frame.
When the value is high, it shows the the interest of traders is high and they are intensely trading BTC. When the indicator is low, it means that BTC is "dormant": it is used for transfers, but not so much for trading - traders forgot about it for a while - which may be a good time to accumulate if the economy is in a general bull market.
Relative Strength Index on TranquilizersSome weeks ago, I had a patient in my practice who suffered from internal stability disorders.
Certainly not a case of disordered thinking or schizophrenic behaviour, because his general sense of direction wasn’t the problem.
He just couldn’t find the right overall balance, an ailment he struggled with for years.
Straight away I could diagnose that surgery wasn’t an option, so I gave him a medicine he would clearly benefit from.
I never heard from him again…. He must be doing just fine.
Cheers, Indicat...