AccumDist ( IDataHolder volume);

Default values:


Returns the Accumulation/Distribution value.

General Information

Some studies, for example the AccDist, use the simplified formula to calculate the Accumulation/Distribution. The formula does not contain open prices.

Input parameters

Parameter Default value Description
high - Defines the High price to be used in calculation.
close - Defines the Close price to be used in calculation.
low - Defines the Low price to be used in calculation.
open - Defines the Open price to be used in calculation.
volume - Defines the volume to be used in calculation.


script AccumDistTS {
input high = high;
input close = close;
input low = low;
input open = open;
input volume = volume;
plot AccumDistTS = TotalSum(if high - low > 0 then (close - open) / (high - low) * volume else 0);

declare lower;
plot AccumDist1 = AccumDist(high, close, low, open, volume);
plot AccumDist2 = AccumDistTS(high, close, low, open, volume);

The example calculates the Accumulation/Distribution with the help of the AccumDist and AccumDistTS functions. The AccumDistTS function is implemented using the thinkScript® and the AccumDist is a regular built-in function. Both the functions provide equal results that are represented by a single plot.