The Donchian channel is an indicator used in market trading developed by Richard Donchian. It is formed by taking the highest high and the lowest low of the last n periods. The area between the high and the low is the channel for the period chosen.
It is commonly available on most trading platforms. On a charting program, a line is marked for the high and low values visually demonstrating the channel on the markets price (or other) values.
The Donchian channel is a useful indicator for seeing the volatility of a market price. If a price is stable the Donchian channel will be relatively narrow. If the price fluctuates a lot the Donchian channel will be wider. Its primary use, however, is for providing signals for long and short positions.
If a security trades above its highest n periods high, then a long is established. If it trades below its lowest n periods low, then a short is established.
Originally the n periods were based upon daily values. With today's trading platforms, the period may be of the value desired by the investor. i.e.: day, hour, minute, ticks, etc.
In Amibroker a trader would not find the Donchian Channel AFL by default. The AFL code for Donchian Channel is mentioned below. You may copy and paste the code through the Formula Editor in the Amibroker Software. To see how the Donchian Channels look you may see the image below.
====================== Copy The Code From Below=====================
// Plots a 20 period Donchian channel
DonchianLower = LLV(Ref(L,-1),pds);
DonchianMiddle = (DonchianUpper+DonchianLower)/2;