OPEN-SOURCE SCRIPT

The Paytience Distribution indicator is designed to visualize the distribution of any chosen data source. By default, it visualizes the distribution of a built-in Relative Strength Index (RSI). This guide provides details on its functionality and settings.

A distribution in statistics and data analysis represents the way values or a set of data are spread out or distributed over a range. The distribution can show where values are concentrated, values are absent or infrequent, or any other patterns. Visualizing distributions helps users understand underlying patterns and tendencies in the data.

**Window Size**

-**Description:**This dictates the amount of data used to calculate the distribution.

-**Options:**A whole number (integer).

-**Tooltip:**A window size of 0 means it uses all the available data.**Scale**

-**Description:**Adjusts the height of the distribution visualization.

-**Options:**Any integer between 20 and 499.**Round Source**

-**Description:**Rounds the chosen data source to a specified number of decimal places.

-**Options:**Any whole number (integer).**Minimum Value**

-**Description:**Specifies the minimum value you wish to account for in the distribution.

-**Options:**Any integer from 0 to 100.

-**Tooltip:**0 being the lowest and 100 being the highest.**Smoothing**

-**Description:**Applies a smoothing function to the distribution visualization to simplify its appearance.

-**Options:**Any integer between 1 and 20.**Include 0**

-**Description:**Dictates whether zero should be included in the distribution visualization.

-**Options:**True (include) or False (exclude).**Standard Deviation**

-**Description:**Enables the visualization of standard deviation, which measures the amount of variation or dispersion in the chosen data set.

-**Tooltip:**This is best suited for a source that has a vaguely Gaussian (bell-curved) distribution.

-**Options:**True (enable) or False (disable).**Color Options**

-**High Color and Low Color:**Specifies colors for high and low data points.

-**Standard Deviation Color:**Designates a color for the standard deviation lines.

**Example Usage RSI**

-**Description:**Enables the use of RSI as the data source.

-**Options:**True (enable) or False (disable).**RSI Length**

-**Description:**Determines the period over which the RSI is calculated.

-**Options:**Any integer greater than 1.

To visualize the distribution of an external source:

- Select the "Move to" option in the dropdown menu for the Paytience Distribution indicator on your chart.
- Set it to the existing panel where your external data source is placed.
- Navigate to "Pin to Scale" and pin the indicator to the same scale as your external source.

**Sinc Function:**Used in signal processing, the sinc function ensures the elimination of aliasing effects.**Sinc Filter:**A filtering mechanism which uses sinc function to provide estimates on the data.**Weighted Mean & Standard Deviation:**These are statistical measures used to capture the central tendency and variability in the data, respectively.

The indicator visualizes the distribution as a series of colored boxes, with the intensity of the color indicating the frequency of the data points in that range. Additionally, lines representing the standard deviation from the mean can be displayed if the "Standard Deviation" setting is enabled.

The example RSI, if enabled, is plotted along with its common threshold lines at 70 (upper) and 30 (lower).

A distribution represents the spread of data points across different values, showing how frequently each value occurs. For instance, if you're looking at a stock's closing prices over a month, you may find that the stock closed most frequently around $100, occasionally around $105, and rarely around $110. Graphically visualizing this distribution can help you see the central tendencies, variability, and shape of your data distribution. This visualization can be essential in determining key trading points, understanding volatility, and getting an overview of the market sentiment.

Every asset and dataset is unique. Some assets, especially cryptocurrencies or forex pairs, might have values that go up to many decimal places. Rounding these values is essential to generate a more readable and manageable distribution.

**Why is Rounding Needed?**If every unique value from a high-precision dataset was treated distinctly, the resulting distribution would be sparse and less informative. By rounding off, the values are grouped, making the distribution more consolidated and understandable.**Adjusting Rounding:**The `Round Source` input allows users to determine the number of decimal places they'd like to consider. If you're working with an asset with many decimal places, adjust this setting to get a meaningful distribution. If the rounding is set too low for high precision assets, the distribution could lose its utility.

Standard deviation is a measure of the amount of variation or dispersion of a set of values. In the context of this indicator:

**Use with Oscillators:**When using oscillators like RSI, the standard deviation can provide insights into the oscillator's range. This means you can determine how much the oscillator typically deviates from its average value.**Setting Bounds:**By understanding this deviation, traders can better set reasonable upper and lower bounds, identifying overbought or oversold conditions in relation to the oscillator's historical behavior.

Resampling is the process of adjusting the time frame or value buckets of your data. In the context of this indicator, resampling ensures that the distribution is manageable and visually informative.

You might notice that the width of sample bins in the distribution is not uniform, and there can be gaps.

In conclusion, the Paytience Distribution indicator offers a robust mechanism to visualize the distribution of data from various sources. By understanding its intricacies, users can make better-informed trading decisions based on the distribution and behavior of their chosen data source.

Get Access To Our Premium Paytience Indicators: paytience.io

All scripts & content provided by Paytience are for informational & educational purposes only. Past performance does not guarantee future results. 🦉

All scripts & content provided by Paytience are for informational & educational purposes only. Past performance does not guarantee future results. 🦉

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

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.