Donchian Channel
Posted: Nov 16 2014
This is a Donchian Channel from Trader's Exchange .
Code: Select all
// Donchian Channel
//
// http://www.tradersxchange.com
Inputs:
Base(close),
Length(13),
ShowAvg(true);
Variables:
DonHigh(0),
DonLow(0),
DonAvg(0);
DonHigh = Highest( base, Length);
DonLow = Lowest( base, Length);
DonAvg = ((DonHigh + DonLow) / 2 );
Plot1(DonHigh, "DonchianHi");
Plot2(DonLow, "DonchianLo");
if ShowAvg = true
then Plot3(DonAvg, "DonchianAvg");