Indicator · Pine Script v5 · Own pane

Blockchain Fundamentals: Active Address Sentiment Oscillator [CR]

by regalouisei· code credited to theheirophant

This indicator tracks Bitcoin market sentiment by comparing 28-day price changes against 28-day percentage changes in unique active addresses retrieved via Quandl.

View on GitHub

GitHub stars2on the repository
Pine versionv5runs as is
Lines of code79
Settings6inputs
LicenceNone statedfile: MPL-2.0
Last update8 months ago25 Feb 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

79 lines of Pine Script v5 from pinescript/editors_picks/blockchain-fundamentals-active-address-sentiment-osc-cr.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

blockchain-fundamentals-active-address-sentiment-osc-cr.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © theheirophant
//@version=5

/////////////////////////////////////////////////////////////////////////////////////////\
///////////////////////////////////ALERT//////////////////////////////////////////////////\
//use only on DAILY timeframe I did not implement MTF functions for the calculations yet///|>
///////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
indicator("Blockchain Fundamentals: Active Address Sentiment Oscillator [CR]")

//choose MA function
getMA(src, length, maSelect) =>
    ma = 0.0
    if maSelect == "EMA"
        ma := ta.ema(src, length)
        ma
    if maSelect == "SMA"
        ma := ta.sma(src, length)
        ma
    if maSelect == "VWMA"
        ma := ta.vwma(src, length)
        ma
    if maSelect == "WMA"
        ma := ta.wma(src, length)
        ma
    if maSelect == "RMA"
        ma := ta.rma(src, length)
        ma
    if maSelect == "ALMA"
        ma := ta.alma(src, length, 0.85, 6)
        ma
    if maSelect == "SWMA"
        ma := ta.swma(src)
        ma
    if maSelect == "HMA"
        ma := ta.hma(src, length)
        ma    
    ma

//are you naughty traders on the daily chart or not?
daily = timeframe.isdaily
if not daily 
    runtime.error("USE DAILY CHART =)")
    
//data
numuniqaddr   = request.security('quandl:bchain/naddu', 'D', close)
pnumuniqaddr  = request.security('quandl:bchain/naddu', 'D', close[28])
price         = request.security('BITSTAMP:BTCUSD', 'D', close)
pprice        = request.security('BITSTAMP:BTCUSD', 'D', close[28])

//inputs
maSelect      = input.session(title="Standard Deviation Bands MA Type (SMA is default)", defval="SMA", options=["EMA", "SMA", "VWMA", "WMA", "HMA", "RMA", "ALMA", "SWMA"], group = "SD Settings")
length2       = input.int(28, minval=2, title='Standard Deviation Bands MA Length (28 is default)', group = "SD Settings")
multi         = input.float(2, minval=0.1, title='Standard Deviation Bands Multi (2 is default)', group = "SD Settings")
//conditionals
tru           = input.bool(false, "Plot background coloration for over/under valued?", group = "Settings")
tru2          = input.bool(false, "Plot candle coloration for over/under valued?", group = "Settings")
tru3          = input.bool(true, "Apply smoothing to Price Change plot? (WMA - 3 period)", group = "Settings")

//calculation
priceMA  = tru3 ? ta.wma((price - pprice) / pprice, 3) : (price - pprice) / pprice
daa      = (numuniqaddr - pnumuniqaddr) / pnumuniqaddr
bandU    = getMA(daa + (multi * ta.stdev(daa, 20)),length2, maSelect)
bandL    = getMA(daa - (multi * ta.stdev(daa, 20)),length2, maSelect)
colorBG  = priceMA > bandU ? color.new(color.lime, 90) : priceMA < bandL ? color.new(color.red,90) : color.new(color.yellow,100)
colorBG2 = priceMA > .40 or priceMA < -.30 ? color.new(color.white, 0) : priceMA > bandU ? color.new(color.lime, 0) : priceMA < bandL ? color.new(color.red, 0) : color.new(color.yellow,100)
colorBG3 = priceMA > .40 or priceMA < -.30 ? color.new(color.white, 90) : color.new(color.yellow,100)


//plots
bgcolor(tru ? colorBG : na)
bgcolor(tru ? colorBG3 : na)
barcolor(tru2 ? colorBG2 : na)

plot(daa*100, 'DAA Change', color=color.new(color.gray, 30))
plot(priceMA*100, 'Price Change', color=color.new(color.yellow, 0))
plot(bandU*100, 'Upper Band', color=color.new(color.red, 0))
plot(bandL*100, 'Lower Band', color=color.new(color.lime, 0))

Overview

Blockchain Fundamentals: Active Address Sentiment Oscillator [CR] plots the daily active address rate of change alongside price momentum and surrounds it with standard deviation bands in a separate pane. Users can adjust the moving average type, band multiplier, and smoothing, as well as toggle background and candle coloration for overvalued or undervalued conditions. The script is restricted exclusively to daily charts.

Details

Published by

regalouisei on GitHub

Code credit

theheirophant, as written in the script's header

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Oscillators & momentum, Volatility & bands

Markets

Crypto

Timeframes

H4 and above

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Standard Deviation Bands MA Type (SMA is default)sessionSMAmaSelect
Standard Deviation Bands MA Length (28 is default)int28length2
Standard Deviation Bands Multi (2 is default)float2multi
Plot background coloration for over/under valued?boolfalsetru
Plot candle coloration for over/under valued?boolfalsetru2
Apply smoothing to Price Change plot? (WMA - 3 period)booltruetru3
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

TTM Squeeze

by Alorse
330 stars

This indicator plots a TTM Squeeze momentum oscillator in a separate pane. It compares a Bollinger Band offset to a Keltner Channel offset and marks the zero line white when the difference is non-negative and black when the bands are inside the channel. A line

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of TTM Squeeze

Function - Logistic Equation

by ricardosantos79
261 stars

Calculates dynamic modeling values by applying a mathematical logistic differential equation to price change over a specified lookback length. It measures price momentum relative to the recent high-low price range. The script plots positive and negative logist

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of Function - Logistic Equation

MACD-V

by harryguiacorn
219 stars

MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of MACD-V
218 stars

This indicator detects a Bollinger Band squeeze when the bands sit inside Keltner Channels, marking low volatility. It plots red dots during a squeeze and green dots when the bands are outside, in a separate pane. An optional histogram shows momentum as the cl

Indicator v6 Volatility & bandsOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Bollinger Band Squeeze Detector
147 stars

This indicator generates trade entry signals and target levels optimized for 1-hour timeframes, designed for external signal extraction. It calculates 7-period and 16-period EMAs alongside 10-period RSI and ATR filters. Long signals occur when the fast EMA cro

Indicator v5 TrendOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of Signal Strategy 100 Candles of 1H Timeframe

Bubbles Indicator

by capissimo
114 stars

The Bubbles Indicator measures volatility squeezes and expansion bursts using Bollinger Bands combined with a sinusoid oscillator and RSI divergence. It processes price data through scaled Bollinger Bands to highlight volatility changes while confirming trend

Indicator v4 Volatility & bandsOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Bubbles Indicator

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers