Hi!
I have created the code below for a Squeeze indicator:
//SQUEEZE
BolUp = BBandTop(Close,20,2);
BolDown = BBandBot(Close,20,2);
TypPrice = MA((High + Low + Close) / 3,20);
KeltUp = (ATR(20) * 1.5) + TypPrice;
KeltDown = TypPrice - (ATR(20) * 1.5);
SqueezeUp = BolUp - KeltUp;
SqueezeDown = BolDown - KeltDown;
Filter = Close > 1;
Plot( SqueezeUp,"SqueezeUp",colorBlue);
Plot( SqueezeDoeDown",colorRed);
Plot(1,"Target",colorGreen);
I would like to colour the area between the SqueezeUp line and the 1 line in
one colour, and the area between the SqueezeDown line and the 1 line in a
different colour.
How can I do this? Thanful for all help!
Leif Axelsson
fxshrat
January 25, 2023, 5:26pm
#2
You should use code tags if adding code!
style = styleCloud | styleNoLabel;
Plot(1,"Target",colorGreen);
PlotOHLC( SqueezeUp, SqueezeUp, 1, 1,"SqueezeUp", colorBlue, style );
PlotOHLC( 1, 1, SqueezeDown, SqueezeDown, "SqueezeDown", colorRed, style);
2 Likes
beppe
January 26, 2023, 4:00pm
#4
IMO, this is an example where in AmiBroker we miss the possibility of having transparent colors that overlap.
@Tomasz , is there any hope for colors with an alpha channel in a future version?
Tomasz
January 26, 2023, 5:12pm
#5
Transparency is supported now via Z ordering and hollow fill Color.
Translucency which is different from transparency is not available in windows GDI, but it is possible in QuickGFX and will arrive pretty soon
4 Likes