Accumulation / Distribution Line (ADL)
Created by Marc Chaikin, the Accumulation/Distribution Line/Index is a rolling accumulation of Chaikin Money Flow Volume. [Discuss] 💬
// C# usage syntax
IReadOnlyList<AdlResult> results =
bars.ToAdl();Historical price bars requirements
You must have at least two historical price bars to cover the warmup periods; however, since this is a trendline, more is recommended.
bars is a collection of generic TBar historical price bars. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.
Response
IReadOnlyList<AdlResult>- This method returns a time series of all available indicator values for the
barsprovided. - It always returns the same number of elements as there are in the historical price bars.
- It does not return a single incremental indicator value.
AdlResult
| property | type | description |
|---|---|---|
Timestamp | DateTime | Date from evaluated TBar |
MoneyFlowMultiplier | double | Money Flow Multiplier |
MoneyFlowVolume | double | Money Flow Volume |
Adl | double | Accumulation Distribution Line (ADL) |
🚩
absolute values in ADL and MFV are somewhat meaningless. Use with caution.
Utilities
See Utilities and helpers for more information.
Chaining
Results can be further processed on Adl with additional chain-enabled indicators.
// example
var results = bars
.ToAdl()
.ToRsi(..);This indicator must be generated from bars and cannot be generated from results of another chain-enabled indicator or method.
See Chaining indicators for more.
Streaming
Use the buffer-style List<T> when you need incremental calculations without a hub:
AdlList adlList = new();
foreach (IBar bar in bars) // simulating stream
{
adlList.Add(bar);
}
// based on `ICollection<AdlResult>`
IReadOnlyList<AdlResult> results = adlList;Subscribe to a BarHub for advanced streaming scenarios:
BarHub barHub = new();
AdlHub observer = barHub.ToAdlHub();
foreach (IBar bar in bars) // simulating stream
{
barHub.Add(bar);
}
IReadOnlyList<AdlResult> results = observer.Results;See Buffer lists and Stream hubs for full usage guides.