OPEN-SOURCE SCRIPT

Up Down Volume Ratio by 3iau

Diupdate
This script considers the total volume within a user specified time frame, and whether price closed higher or lower at the end of each period within that time frame.

EXAMPLE:

* If the time period of interest is 50-periods, the script considers the volume within each of those 50 periods beginning with the most recent closed period.

* SumUpVol = the sum of all volume occurring within only those periods where price closed higher than that of the previous period.

* SumDnVol = the sum of all volume occurring within only those periods where price closed lower than that of the previous period.

* Difference = the difference between SumUpVol and SumDnVol = SumUpVol - SumDnVol

* Total = the sum of SumUpVol and SumDnVol = SumUpVol + SumDnVol

* The plot will present the change in Difference divided by Total = Difference/Total = (SumUpVol - SumDnVol)/(SumUpVol + SumDnVol) occurring within those 50 periods. What will be plotted is the moving average of this value. The user can specify the moving average type and the number of period for which the average is calculated.

* The plot needs to be fitted into a range, for example, +/- 50 (default) or +/-100, by multiplying the result of Difference/Total by a user specified constant. The constant will contain the majority (not all) of the values within +/- the specified value.

* Range = the user specified constant. If Range = 50, the majority of values plotted will be fall within the range +/- 50.

* Therefore, what is plotted is the moving average of Range * Difference / Total.

* When the value = 0, accumulation = distribution over the user specified 50-periods time frame.

* When the value is positive, accumulation > distribution over the user specified 50-periods time frame.

* When the value is negative, distribution > accumulation over the user specified 50-periods time frame.

This plot allows one to see possible accumulation and distribution occurring within a particular stock. The slope of this plot must be considered, and not any single value. The selected constant (“Range” in the example above) does not have an effect on the slope of the plot.

Three values may be plotted at once, for comparison of accumulation or distribution occurring over different time frames. For example, compare Difference / Total calculated over a 50-periods timeframe with 10-periods timeframe, both time frames beginning with the most recent closed period.

In addition to the above, J. Welles Wilder’s Relative Strength Index (RSI) can be plotted over the Difference / Total.

NOTE: this script is not the same as the more commonly used Up/Down Volume Ratio defined as SumUpVol / SumDnVol over a 50-periods time frame, where SumUpVol = the sum of all volume occurring within only those periods where price closed higher than that of the previous period, and SumDnVol = the sum of all volume occurring within only those periods where price closed lower than that of the previous period.

Compare...

Up Down Volume Ratio = SumUpVol / SumDnVol

Up Down Volume Ratio by 3iau = the moving average of Range * (SumUpVol - SumDnVol) / (SumUpVol + SumDnVol)
Catatan Rilis
Added notes in the script for clarity.
Changed defaults and added the ability to change the price used for calculations: close, typical, etc.
Catatan Rilis
Reformatted settings.
Added standard deviation.
Catatan Rilis
Added notes and edited the settings.
Catatan Rilis
Added plots:
1) (UpVolume - DownVolume) / 10^Scale.
2) (UpVolume / DownVolume) * Multiplier.
Added some tooltips.
Catatan Rilis
Changed the chart for perhaps a better example of the plots usefulness in revealing a change in volume from buying to selling despite ongoing increasing price... a potential sign of a coming change in price movement.
Catatan Rilis
Add OBV oscillator to the list of overlay plots.
Catatan Rilis
Added a table for exchange information: % up volume, % down volume, % unchanged volume, TICK, TRIN.
Catatan Rilis
edited tooltips to help clarify settings options
Catatan Rilis
Added a list of constants for use as an optional multiplier applied to the standard deviation.
Catatan Rilis
fixed a spelling error
Catatan Rilis
Edited the OBV oscillator overlay script.
Catatan Rilis
Updated indicator table.
Catatan Rilis
added tooltips
Catatan Rilis
Added table data: Zweig Breadth Ratio, Lowry Breadth Ratio, Whaley Breadth Ratio.
Catatan Rilis
Table data: added NYSE and NSADAQ 10EMA of up points / 10EMA of (up points + down points) for comparison with 10EMA of up volume / 10EMA of (up volume + down volume) and 10EMA of advancing / 10EMA of (advancing issues + declining issues)
Catatan Rilis
Edited the plot of breath thrust indictors so that the display of column and area plots would better convey bullish and bearish regions.

Found and fixed an error in the table displayed.
Trend AnalysisupdownratioupdownvolumeupdownvolumeratiovolumeratiosVolume

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?


Juga di:

Pernyataan Penyangkalan