Function Name: pr_acc_dist
Williams Price Accumulation Distribution is used to identify divergences between market price and indicator.
The Williams Price Accumulation Distribution indicator was developed by Larry Williams and is based on Volume Accumulation Distribution. It is similar to the classic Volume Accumulation Distribution indicator except that the Williams Accumulation Distribution does not include volume in its calculation. Accumulation occurs when the Close of the current bar is greater than the Close of the previous bar and its value is calculated based on the difference between the Close of the current bar and the True Low. Distribution occurs when the Close of the current bar is less than the Close of previous bar and its value is calculated based on the difference between the Close of the current bar and the True High.
The value of Williams Accumulation Distribution is cumulative. Accumulation (positive values) is added to the previous Williams Accumulation Distribution value, while Distribution (negative values) is subtracted from the previous value. If the current Close equals the previous bar's Close, the Accumulation-Distribution value is unchanged.
The William's Accumulation Distribution indicator is used to identify divergences between price activity and the indicator itself. As with other divergences, if the market reaches new highs while the indicator is stagnant or falling, the current trend may be weakening suggesting a possible reversal. Conversely, if the market reaches new lows while the indicator is stagnant or rising, the trend may be weakening, perhaps signaling a reversal.