Accumulation / Distribution Line (ADL)
get_adl(quotes, sma_periods=None)
Parameters
name | type | notes |
---|---|---|
quotes |
Iterable[Quote] | Iterable(such as list or an object having __iter__() ) of the Quote class or its sub-class. • Need help with pandas.DataFrame? |
sma_periods |
int, Optional | Number of periods (N ) in the moving average of ADL. Must be greater than 0, if specified. |
Historical quotes requirements
You must have at least two historical quotes to cover the warmup periods; however, since this is a trendline, more is recommended.
quotes
is an Iterable[Quote]
collection of historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.
Returns
ADLResults[ADLResult]
- This method returns a time series of all available indicator values for the
quotes
provided. -
ADLResults
is just a list ofADLResult
. - It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
ADLResult
name | type | notes |
---|---|---|
date |
datetime | Date |
money_flow_multiplier |
float, Optional | Money Flow Multiplier |
money_flow_volume |
float, Optional | Money Flow Volume |
adl |
float | Accumulation Distribution Line (ADL) |
adl_sma |
float, Optional | Moving average (SMA) of ADL based on sma_periods periods, if specified |
Warning: absolute values in ADL and MFV are somewhat meaningless. Use with caution.
Utilities
-
.to_quotes()[deprecated]
- .find(lookup_date)
- .remove_warmup_periods(qty)
See Utilities and Helpers for more information.
Example
from stock_indicators import indicators
# This method is NOT a part of the library.
quotes = get_history_from_feed("SPY")
# calculate
results = indicators.get_adl(quotes)
About Accumulation / Distribution Line (ADL)
Created by Marc Chaikin, the Accumulation/Distribution Line/Index is a rolling accumulation of Chaikin Money Flow Volume.
[Discuss]