help with an indicator
Posted: Oct 17 2006
How do I plot the following indicator with the following alteration.
If the price low penetrates the lower channel - only plot the upper channel.
if the price penetrates the upper channel - only plot the lower channel.
I tried to do this with my previous post "Lowest Low" indicator.
Sure could use your help.....
INDICATOR to alter follows:
inputs: HighLowLen(5);
vars: x(0), HHigh(0), LLow(0);
if DataCompression <= 1 and Currentbar > 1 then begin
for x = 0 to HighLowLen - 1 begin
if x = 0 then begin
HHigh = HighD(0);
LLow = LowD(0);
end;
if x > 0 then begin
value1 = HighD(x);
value2 = LowD(x);
if value1 > HHigh then
HHigh = value1;
if value2 < LLow AND Value2 > 0 then
LLow = value2;
end;
end;
Plot1(HHigh, "Highest High");
Plot2(LLow, "Lowest Low");
end;
if DataCompression > 1 and Currentbar > 1 then begin
Plot1(Highest(High,HighLowLen), "Highest High");
Plot2(Lowest(Low,HighLowLen), "Lowest Low");
end;
If the price low penetrates the lower channel - only plot the upper channel.
if the price penetrates the upper channel - only plot the lower channel.
I tried to do this with my previous post "Lowest Low" indicator.
Sure could use your help.....
INDICATOR to alter follows:
inputs: HighLowLen(5);
vars: x(0), HHigh(0), LLow(0);
if DataCompression <= 1 and Currentbar > 1 then begin
for x = 0 to HighLowLen - 1 begin
if x = 0 then begin
HHigh = HighD(0);
LLow = LowD(0);
end;
if x > 0 then begin
value1 = HighD(x);
value2 = LowD(x);
if value1 > HHigh then
HHigh = value1;
if value2 < LLow AND Value2 > 0 then
LLow = value2;
end;
end;
Plot1(HHigh, "Highest High");
Plot2(LLow, "Lowest Low");
end;
if DataCompression > 1 and Currentbar > 1 then begin
Plot1(Highest(High,HighLowLen), "Highest High");
Plot2(Lowest(Low,HighLowLen), "Lowest Low");
end;