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;
help with an indicator [SOLVED]
It is this one that I require to be altered.
inputs:
Length( 20 ),
Displace( 0 ) ;
variables:
LowerBand( 0 ),
UpperBand( 0 ) ;
LowerBand = Lowest( Low, Length )[1] ;
UpperBand = Highest( High, Length )[1] ;
if Displace >= 0 or CurrentBar > AbsValue( Displace ) then
begin
Plot1[Displace]( UpperBand, "UpperBand" ) ;
Plot2[Displace]( LowerBand, "LowerBand" ) ;
inputs:
Length( 20 ),
Displace( 0 ) ;
variables:
LowerBand( 0 ),
UpperBand( 0 ) ;
LowerBand = Lowest( Low, Length )[1] ;
UpperBand = Highest( High, Length )[1] ;
if Displace >= 0 or CurrentBar > AbsValue( Displace ) then
begin
Plot1[Displace]( UpperBand, "UpperBand" ) ;
Plot2[Displace]( LowerBand, "LowerBand" ) ;
inputs:
Length( 20 ),
Displace( 0 ) ;
variables:
LowerBand( 0 ),
UpperBand( 0 ) ;
LowerBand = Lowest( Low, Length )[1] ;
UpperBand = Highest( High, Length )[1] ;
if Displace >= 0 or CurrentBar > AbsValue( Displace ) then
begin
if low < lowerband then
value1 = upperband
else
if high > upperband then
value1 = lowerband;
Plot1[Displace]( value1, "UpperBand" ) ;
if value1 > Low then setplotcolor(1,yellow);
if value1 < High then setplotcolor(1,green);
{ Alert criteria }
if Displace <= 0 then
begin
if Low crosses under LowerBand then
Alert( "Price making new low" ) ;
if High crosses over UpperBand then
Alert( "Price making new high" ) ;
end ;
end ;
Set the plot type to right tick.
Length( 20 ),
Displace( 0 ) ;
variables:
LowerBand( 0 ),
UpperBand( 0 ) ;
LowerBand = Lowest( Low, Length )[1] ;
UpperBand = Highest( High, Length )[1] ;
if Displace >= 0 or CurrentBar > AbsValue( Displace ) then
begin
if low < lowerband then
value1 = upperband
else
if high > upperband then
value1 = lowerband;
Plot1[Displace]( value1, "UpperBand" ) ;
if value1 > Low then setplotcolor(1,yellow);
if value1 < High then setplotcolor(1,green);
{ Alert criteria }
if Displace <= 0 then
begin
if Low crosses under LowerBand then
Alert( "Price making new low" ) ;
if High crosses over UpperBand then
Alert( "Price making new high" ) ;
end ;
end ;
Set the plot type to right tick.