suneetk/tradingview_indicators huggingface dataset:
# Coppock Curve

#### Definition

The Coppock Curve is a price momentum indicator to determine major lows in the stock market and is calculated as a moving average. The Coppock Curve is said to have been developed for long-term strategies involving indexes, ETFs, and other liquid instruments rather than intraday trading. The indicator can be used to identify major market trends, determine trend direction, and guide long-term investing or trading strategies.

#### History 

The formula used for the Coppock Curve was developed in 1962 by Edwin S. Coppock in that year’s edition of Barron’s. The indicator was originally introduced as a long-term buy or sell indicator for major indices. It was first implemented this way to allow for indices to identify and target large trends.

#### Takeaways

The Coppock Curve is an oscillating trendline that ranges both higher and lower than zero, incorporating two rates of change in its calculations:

1.  11-period change;
2.  14-period change.

The curve reviews the rate of change for these periods and then derives a signal line indicator that is extrapolated from this data, by using a 10-month weighted moving average. When using the curve, traders, investors, and technical analysts can look to the signal line indicator to help analyze and come to their own investment conclusions based on their findings for medium/long-term trades.

#### What to look for

Just apply the Coppock Curve to a chart and then use trend analysis to analyze the bigger picture looking for where the Coppock Curve is above or below the zero line.

#### Summary

The Coppock Curve was created by an economist for medium to long-term trend analysis in indexes, ETFs, and other liquid instruments. It measures the rate of change and looks to present a clear trend for the medium and long-term.
# Crypto Open Interest

Open Interest is the total number of outstanding derivative contracts that have not been settled.

It is important to understand that since this is the number of open positions, the value can both increase and decrease during the day.

On the chart, open interest data for crypto derivatives is available as the "Crypto Open Interest" indicator in the "Financials" tab:

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43582634389/original/rlW0rZ2TM1B-abfel1SVwP4himY41hE-YQ.png?1758796958)

Values may be presented in base currency, quote currency, or contracts, depending on the exchange and crypto derivative.

List of exchanges where open interest is available for crypto derivatives: BINANCE, BITGET, BITMEX, BYBIT, COINBASE, DERIBIT, KRAKEN, HTX, OKX
# Cumulative Volume Index (CVI)

#### Definition

The Cumulative Volume Index (CVI) is a running total of the difference between the number of stocks advancing and number of stocks declining. Think of it like a running scoreboard, tracking the entire market and its outperformance or underperformance, on a cumulative basis. 

#### Calculations

The Cumulative Volume Index is calculated as follows: 

CVI = Previous Period CVI  + (Advancing stocks - Declining stocks)

#### Definitions:

Advancing stocks - The number of advancing stocks in the current period

Declining stocks - The number of declining stocks in the current period

#### Takeaways

It’s good to use the Cumulative Volume Index with other indicators and technical analysis tools, rather than on its own. The CVI is not comprehensive enough to paint a clear trading or investing signal. Instead it is a broad market tool to measure breadth. 

The CVI helps to confirm whether or not market capital is moving in or out of an index. If the CVI trends lower, it is often assumed that a trend has lost some of its momentum and a possible reversal can be seen in the future. If the CVI is trending higher, however, this could signal the opposite - that a trend is gaining momentum. This could be a signal for traders to start making trades in congruence with the trend.

#### What to look for

The CVI can be used to follow the broad markets and its overall strength throughout a period of time. While the CVI is helpful for gauging market breadth, it can also be used to examine the underlying trend to determine if more stocks are advancing than declining over time.

#### Summary

The Cumulative Volume Index is an indicator best known for tracking price trends in and outside of the stock market. With the addition of other indicators, the analyzed pattern can help determine when a trend is weakening or generally trending lower, as well as when it is strengthening or generally moving higher. It’s important to remember that the number isn’t as important here, rather the pattern and general trend analyzed by the CVI.
# Detrended Price Oscillator (DPO)

#### Definition

The [Detrended Price Oscillator indicator (DPO)](https://www.tradingview.com/scripts/detrendedpriceoscillator/) is used to remove trend from price. This is done in order to identify and isolate short-term cycles. DPO is not typically aligned with the most current prices. It is offset to the left (the past) which helps to remove current trend. Because it is offset to the past, the DPO is not considered a momentum oscillator. It only measures past prices against a Simple Moving Average as a way to gauge a cycle's high/low range as well as typical duration.

#### Calculation

(Price of (N/2 + 1) periods ago) - (N Period SMA) = DPO
N = The user defined look-back period

#### The basics

The Detrended Price Oscillator indicator (DPO) compares past prices to a displaced (shifted to the past) Simple Moving Average. The SMA is displayed a Zero Line, with DPO fluctuating between positive (above the line) and negative (below the line) values. Simply put, a positive values means that price was above the SMA and a negative value means price was below the SMA.

#### What to look for

The main purpose of the DPO is to analyze historical data in order to observe cycle's in a market's movement. DPO can give the technical analyst a better sense of a cycle's typical high/low range as well as its duration.

##### Cycle High/Low Range

##### Cycle Duration

#### Summary

The Detrended Price Oscillator (DPO)is not necessarily intended to be a signal-generating indicator. Instead it is best served as a way for a technical analyst to build confidence when identifying the characteristics of a trading instrument's typical cycle. Because of this, it would be prudent to use the DPO alongside additional indicators which are designed to gauge trend or momentum.

#### Inputs

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43586537314/original/McF25flI4hIeTxE2pYEo2mtvXaS8B4NuBA.png?1760615712)

##### Period

The time period to be used in calculating the DPO.

##### Centered

When the DPO is centered, the DPO line stays offset towards the left. When it is not centered, it shifts back to the right to match current price.

#### Style

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43586537360/original/7zMxd2C8AmqkagaDpfr39X_5-ZPsocHAEg.png?1760615726)

##### Detrended Price Oscillator

Can toggle the visibility of the DPO as well as the visibility of a price line showing the actual current value of the DPO. Can also select the DPO Line's color, line thickness and visual style (Line is the Default).

##### Zero Line

Can toggle the visibility of the Zero Line. Can also select the line’s value, line thickness, value and visual type (dashes is the default).

##### Precision

Sets the number of decimal places to be left on the indicator's value before rounding up. The higher this number, the more decimal points will be on the indicator's value.
# Divergence

#### Definition

A divergence occurs when an asset’s price is moving opposite to a specific technical indicator or is moving in a different direction from other relevant data. The divergence indicator warns traders and technical analysts of changes in a price trend, oftentimes that it is weakening or changing direction.

Divergence can be either positive, signifying the possibility of a move that is higher in the asset’s price, or it can be negative, signifying the possibility of a move that is lower in the asset’s price.

#### Takeaways

Divergence often works with other indicators and data. It is usually used by technical analysts and traders when the asset’s price is moving counter to the direction of another indicator.

As mentioned above, positive divergence indicates that the price could start rising and usually occurs when the price is moving lower, but while another indicator counters this direction by moving higher. In other words, showing bullish signals.

Negative divergence indicates that the price could start declining and usually occurs when the price is moving higher, while another indicator moves lower as well. In other words, showing bearish signals.

#### What to look for

Divergence is most often used to track and analyze the momentum in an asset’s price and the odds of a price reversal within the current trend. While using divergence, traders and analysts can decide on whether or not they would like to exit the position or set a stop loss in the case the divergence is negative and prices begin to fall.

#### Limitations

It is best to use divergence with the aid of other indicators and analysis tools in order to help identify and confirm trend reversals and major market patterns. Divergence should not be relied on by itself to tell you the pertinent information you need to know as an investor. Risk control is key in your analysis and the fact that divergence is not always present in price reversals should definitely be what pushes you to combine it with other tools and indicators.

Additionally, divergence can reflect long-term or short-term changes. When making snap decisions, acting on divergence alone could prove detrimental to your trading. Make sure you have other risk factors applied to your charting and general market analysis.

#### Summary

The divergence indicator helps traders assess changes in the price trend and indicates when price will move with or against the direction of another indicator. It can be either positive or negative, but it is important to note its limitations and that it should be used with other indicators that can also monitor price trends.
# Funding Rate

The periodic cash flow that equilibrates perpetual futures (unlike traditional futures) with the underlying spot index. The funding rate can be positive or negative, depending on market conditions. A positive rate – perpetual trading at a premium (contango) – requires longs to pay shorts; a negative rate – perpetual at a discount (backwardation) – requires shorts to pay longs.

The funding rate is typically calculated as Funding Rate = Interest Rate + Premium Index, where:

*   Interest Rate is a fixed component reflecting the cost of capital, usually set by the exchange
*   Premium Index represents the difference between the perpetual contract price and the spot price.

Some exchanges may apply proprietary adjustments to this formula.

On the chart, funding rate data is available as the "Funding Rate" indicator in the "Financials" tab.

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43578098399/original/5g5U-NPUclH-nk5YOUFpvxrw0K3P6XaTug.png?1756727243)

Values are presented in percentages.

"Funding Rate" is available for crypto derivatives of the following exchanges: BINANCE, BITGET, BITMEX, BYBIT, COINBASE, DERIBIT, HTX, KRAKEN, OKX.
# Hull Moving Average

#### Definition

There are several moving average types, many of which you surely have come across, such as the Simple Moving Average (SMA) and the Exponential Moving Average (EMA). The latter of the two, along with the Weighted Moving Average (WMA), were introduced to analyze price lag by putting more of an emphasis on more recent data. The Hull Moving Average (HMA) is a quick and smooth moving average that is distinct in its own nature. The HMA attempts to remove lag in its entirety, while simultaneously improving upon smoothing.

#### History

The Hull Moving Average was developed and first introduced by Alan Hull as a new moving average that focuses on smoothness, efficiency, and lag elimination. 

#### Calculations

To calculate the Hull Moving Average, follow the steps below.

1.  Begin by calculating a Weighted Moving Average with period n / 2 and then multiply this value by 2.
2.  Next, go ahead and calculate another Weighted Moving Average for period n and then subtract this value from the result in Step 1.
3.  Finally, calculate a Weighted Moving Average with period sqrt(n)by using the data you’ve collected from the results of Step 2.

Another version of this calculation can be found below.

HMA = WMA(2\*WMA(n/2) − WMA(n)),sqrt(n))

#### Takeaways and what to look for

A Hull Moving Average (HMA) used to analyze a longer period may be best suited to identify a market trend. To further analyze, it can be determined that if the HMA value is rising and the trend is rising as well, then it would be ideal to enter long positions for your trade. In contrast, if the HMA is falling and the trend is also falling, it would then be ideal to consider entering short positions.

#### Summary

The Hull Moving Average (HMA) is quick and smooth, setting it apart from its moving average counterparts. The HMA seeks to eliminate lag, while providing smooth results at the same time. The HMA follows the movement of the market trend and is calculated quite differently from its counterparts and widely used moving averages like the SMA and EMA.
# Linear Regression

#### Definition

The Linear Regression indicator visualizes the general price trend of a specific part of the chart based on the Linear Regression calculation. The central line of the indicator is the linear regression calculation itself, and the lines above or below it are X number of standard deviations removed from the main one. This is a good tool to use to determine when a price is unusually far away from its baseline.

The bands indicate support and resistance; when the prices stay outside the channel for a significant period of time, the reversal might be expected ahead.

#### Inputs

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43586569728/original/Aq02lXY3B081WfomDc8Sp6onc7krcd1Mwg.png?1760623163)

##### Upper Deviation

Determines the number of standard deviations away from the base to set the upper channel. Essentially this sets the distance between the center base and the edge of the upper channel.

##### Lower Deviation

Determines the number of standard deviations away from the base to set the lower channel. Essentially this sets the distance between the center base and the edge of the lower channel.

##### Use Upper Deviation

Toggles the use/visibility of the upper channel.

##### Use Lower Deviation

Toggles the use/visibility of the lower channel.

##### Count

The number of bars linear regression uses for its calculations: i.e. if the number is 100, the channel will be calculated on the last 100 bars.

##### Source

Sets the price source to calculate the channel position.
# Least Squares Moving Average

#### Definition

Least Squares Moving Average is a curve showing linear regression calculations. On each bar, the indicator displays a linear regression based on the prices for a period that is specified by the Length value in settings.

#### Calculations

##### Pine Script

//@version=5
indicator(title = "Least Squares Moving Average", shorttitle="LSMA", overlay=true, timeframe="", timeframe\_gaps=true)
length = input(title="Length", defval=25)
offset = input(title="Offset", defval=0)
src = input(close, title="Source")
lsma = ta.linreg(src, length, offset)
plot(lsma)

#### Summary

The Least Squares Moving Average can be used as a trend indicator and reversal indicator. It is used as an alternative to other traditional indicators like the moving average or exponential moving average. The Least Squares Moving Average has a different calculation than both of those moving averages. The indicator displays a linear regression based on the prices for a specific period of time. This period of time can be defined in the indicator settings.
# Liquidations

Liquidations refer to the automatic closure of leveraged positions when a trader's margin falls below the required maintenance level.

To prevent further losses, the exchange forcefully closes the position. These liquidation events often appear as trades on the order book, but they are not initiated by users — they are forced executions triggered by the system.

For example, a buy-side liquidation means a short position was forcibly closed by buying back the asset; a sell-side liquidation indicates a forced closure of a long position.

On the chart, Liquidations data is available as the "Liquidations" indicator in the "Financials" tab.

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43578101008/original/6hdmT7h5LVWJW9UNv4GbXX9MnYNDSVVe7A.png?1756727973)

Values may be presented in base or quote currency, depending on the exchange and crypto derivative. 

"Liquidations" is available for crypto derivatives of the following exchanges: BINANCE, BITMEX, BYBIT, DERIBIT, HTX, OKX.
# Long / Short Ratio Accounts

A trader sentiment metric that shows the proportion of accounts holding long versus short positions for a specific trading pair or symbol. This metric reflects the number of accounts with a net position — not the trade volume or position size. If an account holds a net long position, it is counted as one long account, regardless of how large the position is; the same applies to accounts with a net short position.

The ratio is calculated as Long/Short Ratio = Number of Long Accounts / Number of Short Accounts.

On the chart, the data is available as the "Long / Short Ratio Accounts" indicator in the "Financials" tab.

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43578103235/original/VAXiy589-j9vNly15Q2e_bn4j6Y_lPY6pQ.png?1756728557)

"Long / Short Ratio Accounts" is available for crypto derivatives of the following exchanges: BYBIT, BINANCE.
# Long Short Accounts %

A metric used to assess the ratio between the number of traders opening long and short positions.

*   Long Accounts % – the share of traders holding long positions (expecting the price to rise)
*   Short Accounts % – the share of traders holding short positions (expecting the price to fall)

Both metrics typically add up to 100%.

On the chart, data is available as the "Long Short Accounts %" indicator in the "Financials" tab.

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43578102233/original/5hKq8GAZniHwAE7PR_XZ4nfxa91x1PrgKQ.png?1756728301)

"Long Short Accounts %" is available for crypto derivatives of the following exchanges: BYBIT, BINANCE
# MA Cross

#### Definition

This indicator calculates and plots two moving averages, MA9 and MA21, and highlights the bar where they cross. It is an indicator that shows when a trend is changing in the short-term and getting either weaker or stronger.

#### Summary

The Moving Average cross indicator is as simple as it sounds. It measures two moving averages and detects moments when they cross. The two moving averages being measured are the MA9 and MA21. A cross means that either the MA9 is now higher than the MA21 or vice versa. The indicator can be used alongside other moving averages or trend following indicators to create a better picture of momentum.
# Mass Index

#### Definition

Mass index is a technical analysis indicator that is used to examine the differences between high and low stock prices over a specific period of time. The index proposes that a trend reversal may be imminent when there is a larger difference between stock prices, and then this difference recedes.

#### History

The mass index was developed and introduced by Donald Dorsey in the beginning of the 1990s. Dorsey initially thought that when the calculation resulted in a figure above 27 and then dropped a point and a half below (to 26.5), the stock would be ready to change direction. This result would create a “bulge” of sorts. It has been determined that an index of 27 showcases stock volatility, causing some traders to lower their baseline when expecting a price bulge.

#### Calculations

To calculate the mass index, check the formula below.

25
∑  9 − Day EMA of a 9 − Day EMA of (High − Low) / 9 − Day EMA of (High − Low)
1

The steps for calculation are as follows.

1.  Begin by calculating the nine-day Exponential Moving Average (EMA) of the difference between high and low stock prices for a specific period of time. This is usually determined as 25 days.
2.  Continue by dividing this result by the nine-day Exponential Moving Average of the moving average that is displayed in the numerator of the equation (shown above).

#### Takeaways and what to look for

While it is common to use indicators like standard deviation to measure volatility within the market, the mass index also has a lot to offer. Using the mass index’s reversal bulge function can shed some light on market conditions and can also be used to trade continuations of a trend.

Great for short-term trades, the mass index can be easily modified for sensitivity or based on specific periods in relation to market volatility depending on the stock.

#### Summary

The mass index is a tool for technical analysis that examines the range of difference between high and low stock prices over a particular period of time. A reverse in market trend may be clear if the range expands and then recedes to a different point.