Download MetaTrader 5

Color Transparency in Rectangle Object

To add comments, please log in or register
trader88888
134
trader88888  

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 

Alain Verleyen
Moderator
31605
Alain Verleyen  
trader88888:

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 

All is explained on this article.
trader88888
134
trader88888  
Thank you, very helpful and didn't find that.  Since this example is in mql5 i imagine this isn't possible on mql4?
Alain Verleyen
Moderator
31605
Alain Verleyen  
trader88888:
Thank you, very helpful and didn't find that.  Since this example is in mql5 i imagine this isn't possible on mql4?
It should be similar if not the same, I didn't check.
Fernando Carreiro
2233
Fernando Carreiro  
trader88888:
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.

Карпутов Владимир
203
Карпутов Владимир  
Hello.
I am here only on the personal request of angevoyageur.
Transparent object may be, if you use canvas. All scripts from my articles (of canvas) work in MQL4. And the General Council: it is time to work on MQL5:).
I've gone back to "5" Forum.
Doerk Hilger
1190
Doerk Hilger  
angevoyageur:
It should be similar if not the same, I didn't check.
Yes, totally the same.
Gatesby
41
Gatesby  
Doerk:
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; 
   }
}
RectangleLable Transparent Effect Failed

 

To add comments, please log in or register