Accumulation/Distribution |
Top Previous Next |
accDist( [sym() | inv()] [, barIndex] )
Accumulation/Distribution looks at both price and volume action to try and determine if more people are buying than selling or vice versa. When there are more buyers than sellers the stock is under accumulation, but when there are more sellers than buyers the stock is under distribution.
Parameters
To Create a Series
var myStudy = null; var bInit = false;
function main() { var myVar;
if ( bInit == false ) {
myStudy = accDist(); bInit = true;
}
//retrieve the current value myVar = myStudy.getValue(0);
return( myVar );
}
To Retrieve a Single Value
function main() {
... ... myVar = accDist();
//do something with the value in myVar
}
Calling Examples
//create a study that uses IBM as the symbol along with whatever bar //interval you are using in the chart where the script is loaded myStudy = accDist( sym( "IBM") );
//create a study that uses the 15-min bar interval, regardless of the bar //interval of the chart in which the script is loaded myStudy = accDist( inv(15) );
//create a study that uses the Daily bar interval, regardless of the bar //interval of the chart in which the script is loaded myStudy = accDist( inv("D") );
//create a study that will be based on MSFT 30-min bars, regardless of //the symbol/bar interval of the chart in which the script is loaded. myStudy = accDist( sym( "MSFT,30" ) );
|