Donchian Channels

This is the place to discuss EdgeRater Chart Script

Moderator: Chris White

Post Reply
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Donchian Channels

Post by henry1224 »

Under the Parameters tab

N double 20 2 1000


Here is the formula


upperBand:HHV(Ref(high,1), N),width2,ColorBlack;
lowerBand:LLV(Ref(low,1), N),width2,ColorBlack;
middleBand:(upperBand + lowerBand) / 2,width2,ColorBlack;
FILLRGN(1,LOWERBand,UPPERband),Brush#200000C0;
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Re: Donchian Channels

Post by henry1224 »

Here is a modified version of Donchain Channels in Eighths
under the parameters tab

per double 21 0 300


under the script tab

hh:HHV(Ref(high,1),per),Width2,ColorBlue;
ll:LLV(Ref(low,1),per),Width2,ColorBlue;
Height := HH-LL;
A1 := LL+Height*0.125,Width2,ColorGold;
A2 := LL+Height*0.25,Width2,ColorRed;
A3 := LL+Height*0.375,Width2,ColorGreen;
A4 : LL+Height*0.5,Width2,ColorBlue;
A5 := LL+Height*0.625,Width2,ColorGreen;
A6 := LL+Height*0.75,Width2,ColorRed;
A7 := LL+Height*0.875,Width2,ColorGold;

FILLRGN(1,HH,A7),ExtendLR,Brush#40FFD700;
FILLRGN(1,A7,A6),ExtendLR,Brush#20FF0000;
FILLRGN(1,A6,A5),ExtendLR,Brush#4598FB98;
FILLRGN(1,A5,A4),ExtendLR,Brush#4000FFFF;
FILLRGN(1,A4,A3),ExtendLR,Brush#4000FFFF;
FILLRGN(1,A3,A2),ExtendLR,Brush#4598FB98;
FILLRGN(1,A2,A1),ExtendLR,Brush#20FF0000;
FILLRGN(1,A1,LL),ExtendLR,Brush#40FFD700;

@SetTextVisible(HH,false);
@SetTextVisible(LL,false);
@SetTextVisible(A1,false);
@SetTextVisible(A2,false);
@SetTextVisible(A3,false);
@SetTextVisible(A4,false);
@SetTextVisible(A5,false);
@SetTextVisible(A6,false);
@SetTextVisible(A7,false);
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Re: Donchian Channels

Post by henry1224 »

Here is an indicator Donchain Channel in Eighths Current Level

Under the parameters tab

Per Double 21 0 300
SN Double 3 0 200


Under the script tab


hh:=HHV(Ref(high,1),per),Width2,ColorBlue;
ll:=LLV(Ref(low,1),per),Width2,ColorBlue;
Height := HH-LL;
A1 := LL+Height*0.125,Width2,ColorGold;
A2 := LL+Height*0.25,Width2,ColorRed;
A3 := LL+Height*0.375,Width2,ColorGreen;
A4 := LL+Height*0.5,Width2,ColorBlue;
A5 := LL+Height*0.625,Width2,ColorGreen;
A6 := LL+Height*0.75,Width2,ColorRed;
A7 := LL+Height*0.875,Width2,ColorGold;

CurrentLevel:If(C>=LL & C<A1,1,If(C>=A1 & C<A2,2,If(C>=A2 & C<A3,3,If(C>=A3 & C<A4,4,If(C>=A4 & C<A5,5,If(C>=A5 & C<A6,6,If(C>=A6 & C<A7,7,If(C>=A7 & C<HH,8,If(C>=HH,9,0))))))))),Width2,ColorBlue;
Signal:EMA(CurrentLevel,SN),Width2,ColorRed;
Cline:4.5,width2,ColorBlack;
FILLRGN(CurrentLevel>Signal,CurrentLevel,Signal),Brush#500000FF;
FILLRGN(CurrentLevel<Signal,CurrentLevel,Signal),Brush#50FF0000;
MaxX:=Max(CurrentLevel,Signal);
MinX:=Min(CurrentLevel,Signal);
FILLRGN(MinX>CLine,MinX,CLine),Brush#4098FB98;
FILLRGN(MaxX<CLine,MaxX,CLine),Brush#20FF0000;
Post Reply