[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help with channel indicator code


  • Date: Mon, 1 Jun 2009 14:49:10 -0500
  • From: SC <secaseba@xxxxxxxxxx>
  • Subject: help with channel indicator code

PureBytes Links

Trading Reference Links

Hello list
This indicator only marks channels that are exactly ChaLen bars long.
Can anyone offer suggestions of how to change this indicator so that
it shows multiple length channels, or all length channels up to a set
amount.
Thanks
SC
>From ELSI9612
Narrow Sideways Channel
Plots a channel based on the highest and lowest price in a range. The
channel width is specified, using the input ChaRange.

Input:ChaLen(4),ChaMarge(10),ChaRange(200);
Vars:ChaLenV(ChaLen+1);
if Range < ChaRange then begin
for value1 = ChaLenV  downto 0 begin
     if H[value1] < H + ChaMarge then
           value2 = value2 + 1 else begin
           value2 = 0; value3 = 0; end;
     if L[value1] > L - ChaMarge then
           value3 = value3 + 1 else begin
           value2 = 0; value3 = 0; end;
end;
if value2 = ChaLenV - 1 and value3 = ChaLenV -1 then begin
     for value4 = ChaLenV - 2 downto  0 begin
           Plot1[value4](H + ChaMarge,"uline");
           Plot2[value4](L - ChaMarge,"dline");
     end;
end;
value2 = 0;
value3 = 0;
end;