DonchianChannel


Summary

The Donchian channel is a volatility indicator forming a channel between the highest high and the lowest low of the chosen period.

Remarks

The Donchian channel is mainly used for providing entry signals. A long is established when the price closes above the Donchian Channel. Conversely, if it closes below, then a short is established.

Syntax

public DonchianChannel DonchianChannel(int periods)
public DonchianChannel DonchianChannel(MarketSeries marketSeries, int periods)

Parameters

NameDescription

Example 1

//...
private DonchianChannel donchian;
//...
protected override void OnStart()
{
    donchian = Indicators.DonchianChannel(Period);            
}
protected override void OnBar()
{
    Print("Top Value = {0}", donchian.Top.LastValue);
    Print("Middle Value = {0}", donchian.Middle.LastValue);
    Print("Bottom Value = {0}", donchian.Bottom.LastValue);
    //...
}