Color Transparency in Rectangle Object
Hello,
Is it possible to add in color transparency to an object? Eg. I want to take a rectangle and instead of making it while #ffffff i wanted to make it transparent.
I was wondering if anyone can show me some example code to do this?
Thank you
Thank you, very helpful and didn't find that. Since this example is in mql5 i imagine this isn't possible on mql4?
Since "angevoyageur" is also a moderator, if he has recommended the article to you, then it is because it is also relevant to MQL4+ (even if it is geared for MQL5).
Why don't you simply try out a few examples and find-out for yourself?
Currently MetaQuotes is slowly merging the two platforms into one, so learning the MQL5 way of doing things is only going to benefit you in the long run.
It should be similar if not the same, I didn't check.
Yes, totally the same.
How did you do it?
I just refer the link and read the article. Use definition of transparent C'0,0,0'/ 0x000000 as the visual effect which I want, but no transparent effect at all?
My compiling platform MetaQuotes 4 Version : 4.00 Build 1010 18 Aug 2016
Pls give me some adivce or hints! Thanks in advance!
//+------------------------------------------------------------------+ //| Account Statistics function | //+------------------------------------------------------------------+ bool AccountInfo() { if(Set_Hide) { if(!RectLabelCreate(0,"Statistics",0,xRec,yRec,xRec_size,yRec_size,0x000000, BORDER_FLAT,CORNER_LEFT_UPPER,clrWhite,STYLE_SOLID,1,false,false,false,1)) { string Err=GetLastError(); Print("Error creating Rectangle Label. Error code ",Err,". ",ErrorDescription(Err)); } Set_Hide = false; } }
Hi Alain,
I had the same question as the original post. I've read through that article in full, and my apologies if I've not understood it well enough, but I still can't see how to draw a transparent OBJ_RECTANGLE.
The article you've linked gives a great explanation for how to apply transparency (and much more) to CCanvas objects, but I'm trying to bind transparent rectangles to the chart, so that it would rescale and shift accordingly as users adjust the chart and new candles are plotted.
Can CCanvas objects be bound to the chart and shift out of view accordingly? I can only see how to plot them to the coordinates within the visible screen, independent of chart movements.
Thanks!
- Free trading apps
- Free Forex VPS for 24 hours
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Is it possible to add in color transparency to an object? Eg. I want to take a rectangle and instead of making it while #ffffff i wanted to make it transparent.
I was wondering if anyone can show me some example code to do this?
Thank you