Sample Source: Select your source here, can be any numerical source.
Sample Period: Sample size for Mean and Standard Deviation Calculations.
Enable Cumulative Mode: Will attempt to calculate the bin for every sample in the entire dataset.
Window Period: Used only in Window Mode (Enable Cumulative Mode unchecked), Calculates the bin for the past Window Period sample size.
Bin Label Spacing: Adjust horizontal spacing of Bin Labels below the histogram for easier viewing.
Center Bin: Selects the center Bin, usually set to (0 - Bin Width) < Sample <= 0 standard deviations or (z_score)
Bin Width: Selects the Bin Width in standard deviations.
How you can use it:
View characteristics of dataset such as unimodal/bimodal and skewness to determine preferred statistical analysis.
Thanks goes out to https://www.tradingview.com/u/e2e4mfck/, for cleaning up some of the code and https://www.tradingview.com/u/alexgrover/ for the original idea.
When adjusting the bin parameters, center bin and bin width, verify that the total sum of the bins (Sum Frequency in the Data Window) is close to the Total Samples. If your Sum Frequency is drastically lower it means you need to adjust your center bin and/or bin width to capture more of the data available.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.