Created by Richard Donchian, Donchian Channels, also called Price Channels, are price ranges derived from highest High and lowest Low values. [Discuss] 💬
// usage IEnumerable<DonchianResult> results = quotes.GetDonchian(lookbackPeriods);
int - Number of periods (
N) for lookback period. Must be greater than 0 to calculate; however we suggest a larger value for an appropriate sample size. Default is 20.
Historical quotes requirements
You must have at least
N+1 periods of
quotes to cover the warmup periods.
quotes is a collection of generic
TQuote historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.
- This method returns a time series of all available indicator values for the
- It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
- The first
Nperiods will have
nullvalues since there’s not enough data to calculate.
DateTime - Date from evaluated
decimal - Upper line is the highest High over
decimal - Simple average of Upper and Lower bands
decimal - Lower line is the lowest Low over
decimal - Width as percent of Centerline price.
See Utilities and helpers for more information.
This indicator is not chain-enabled and must be generated from
quotes. It cannot be used for further processing by other chain-enabled indicators.