Indicator · Pine Script v4 · Own pane

Bitcoin Difficulty (QUANDL:BCHAIN/DIFF)

by datacrypto-analytics

This indicator plots Bitcoin mining difficulty from the Quandl BCHAIN/DIFF dataset.

View on GitHub

GitHub stars3on the repository
Pine versionv4older, still runs
Lines of code9
Settings0inputs
LicenceApache-2.0
Last update3 years ago15 Oct 2023

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

9 lines of Pine Script v4 from bitcoin_difficulty_mining.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

bitcoin_difficulty_mining.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © DataCryptoAnalytics

//@version=4
study("Bitcoin Difficulty (QUANDL:BCHAIN/DIFF)")

difficulty = quandl("BCHAIN/DIFF", barmerge.gaps_off, 0)

plot(difficulty, color=color.black)

Overview

The script calculates the difficulty metric using the quandl function and displays it as a line plot in a separate pane. It provides historical data on mining difficulty levels over time. The main setting uses the Quandl data source with no custom inputs. This tool helps analyze Bitcoin mining trends but relies on external data feeds.

Details

Published by

datacrypto-analytics on GitHub

Type

Indicator, Pine Script v4

Draws

Separate pane below the chart

Category

Volatility & bands, Support & resistance

Markets

Crypto

Timeframes

Any timeframe

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.

Topics

cryptotradingtradingviewtradingview-pine-scripts

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

CCI DC

by be-thomas
65 stars

This indicator plots the Commodity Channel Index in a separate pane and surrounds it with a Donchian channel whose lookback length changes with volatility. It measures volatility as a ratio of short and long ATR values, then ranks that ratio and shortens or le

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 days ago · GPL-3.0 GitHub repository of CCI DC

Trailing Drawdown

by palitojendthen
20 stars

The Trailing Drawdown indicator calculates and visualizes the percentage drop of a price series from its peak over a user-specified lookback period. It tracks maximum price levels within a rolling window and measures the current deviation from those peaks. Tra

Indicator v5 Volatility & bandsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Trailing Drawdown

Market Pressure Scale plots two oscillator curves in a separate pane. Setup pressure combines ATR and Bollinger compression, support and resistance proximity, and drying volume. Impulse pressure combines range expansion, volume, and candle body size. A range-c

Indicator v6 Oscillators & momentumVolatility & bands
Updated yesterday · MIT GitHub repository of Market Pressure Scale [WavesUnchained]

QFA Pro Elite Refined

by JasonTeixeira
9 stars

This indicator plots a smoothed fear index in a separate pane. It measures how far the current low sits below the highest close over a lookback, scales that reading by an ATR percentile, and smooths it with a zero-lag EMA. A volatility regime raises or lowers

Indicator v6 Oscillators & momentumVolatility & bands
Updated 12 days ago · Custom licence GitHub repository of QFA Pro Elite Refined
7 stars

The Per Bak Self-Organized Criticality indicator calculates a composite fragility score by blending weights for tail risk from the SKEW index, volatility regimes from VIX terms, credit stress from HYG and LQD, and positioning from short volume data. It plots t

Indicator v5 Volatility & bandsSupport & resistance
Updated 3 months ago · None stated GitHub repository of Per Bak Self-Organized Criticality

MACD Breakout

by jerryinyang
5 stars

This indicator plots a higher-timeframe MACD breakout setup on the price chart and combines it with linear regression channels. It marks support and resistance zones from MACD histogram sensitivity, then filters them with the MACD zero line, a linear regressio

Indicator v4 Oscillators & momentumBreakout
Updated 2 years ago · None stated GitHub repository of MACD Breakout

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