Accumulation/Distribution Line (ADL)
Volume based indicator designed to measure underlying supply and demand.
Last updated
Volume based indicator designed to measure underlying supply and demand.
Last updated
// Prints the current value of ADL.
adl = indicators.ADL().OnSeries(dailyBars);
Log("The current ADL value is " + adl.Value.ToString());
// Prints the previous value of ADL.
adl = indicators.ADL().Keep(2).OnSeries(dailyBars);
Log("The previous ADL value is " + adl.Values[1].ToString());using Signals.DataSeries.Bars;
using Signals.Framework;
using Signals.Indicators.ADL;
public class MyStrategy : SingleMarketStrategy
{
private Bars dailyBars;
private ADL adl;
public override void Setup(DataMarketplace data, IndicatorsMarketplace indicators)
{
dailyBars = data.Bars(BarPeriodType.Day, 1).WithOffset(25);
adl = indicators.ADL().Keep(2).OnSeries(dailyBars);
}
public override void RegisterActions()
{
OnUpdateOf(dailyBars).Do(() =>
{
// Prints the current ADL value
Log("The current ADL value is " + adl.Value.ToString());
// Prints the previous ADL value
Log("The previous ADL value is " + adl.Values[1].ToString());
});
}
}