OPEN-SOURCE SCRIPT
Atualizado Smart Disparity Index

The Smart Disparity Index (SDI) is an optimized version of the Disparity Index indicator invented by Steve Nison (book "Beyond Candlesticks").
According to Steve Nison, "The disparity index (or disparity ratio), compares, as a percentage, the latest close to a chosen moving average", which means that the indicator gives the difference in % between the closing price and a simple moving average.
The calculation formula is therefore as follows:
Disparity Index = 100 x (closing_price - simple_moving_average) / simple_moving_average
In order to optimize the calculation, I replaced the closing price with the 6-period exponential moving average (EMA6) which, according to many years of experience, allows prices to be smoothed by eliminating excesses.
Formula for calculating the Smart Disparity Index:
SDI = 100 x (EMA6 - simple_moving_average) / simple_moving_average
The provided script displays the SDI for the 20, 50, 100 and 200 periods.
From my point of view, I recommend using the SDI50 as a priority:
SDI50 = 100 x (EMA6 - SMA50) / SMA50
In the chart, we can see the SDI50 (in purple) is on a long-term support (in green), this indicates a probability of a Bitcoin rise in the coming months.
The SDI can also be used as a momentum type indicator.
According to Steve Nison, "The disparity index (or disparity ratio), compares, as a percentage, the latest close to a chosen moving average", which means that the indicator gives the difference in % between the closing price and a simple moving average.
The calculation formula is therefore as follows:
Disparity Index = 100 x (closing_price - simple_moving_average) / simple_moving_average
In order to optimize the calculation, I replaced the closing price with the 6-period exponential moving average (EMA6) which, according to many years of experience, allows prices to be smoothed by eliminating excesses.
Formula for calculating the Smart Disparity Index:
SDI = 100 x (EMA6 - simple_moving_average) / simple_moving_average
The provided script displays the SDI for the 20, 50, 100 and 200 periods.
From my point of view, I recommend using the SDI50 as a priority:
SDI50 = 100 x (EMA6 - SMA50) / SMA50
In the chart, we can see the SDI50 (in purple) is on a long-term support (in green), this indicates a probability of a Bitcoin rise in the coming months.
The SDI can also be used as a momentum type indicator.
Notas de Lançamento
The new script now allows to display each SDI with its original Disparity Index.Notas de Lançamento
SDI Filling added.Notas de Lançamento
Inputs setting added.Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.