Mql4 Color Transparency in Rectangle Object
Mql4 Color Transparency in Rectangle Object
Loading saved threads...
Tzvetan Jordanov · External communityPost link
External question — Stack Overflow Stack Exchange
Author: Tzvetan Jordanov
Original post: https://stackoverflow.com/questions/72668588
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Is it possible to add in color transparency to an object? Eg. I want to make 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
Quote
Report
PaulB · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: PaulB
Original post: https://stackoverflow.com/a/72716575
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
It's not immediately obvious from the
ObjectCreate
description. You have to make the object appear in the foreground and disable the filling as per the following code:
ObjectCreate(0,"Rectangle",OBJ_RECTANGLE,0,Time[10],Open[10],Time[0],Open[0]);
ObjectSetInteger(0,"Rectangle",OBJPROP_COLOR,clrBlack);
ObjectSetInteger(0,"Rectangle",OBJPROP_FILL,false);
ObjectSetInteger(0,"Rectangle",OBJPROP_BACK,false);
Quote
Report
Kefada · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: Kefada
Original post: https://stackoverflow.com/a/78192304
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
You can use
OBJ_RECTANGLE_LABEL
instead of
OBJ_RECTANGLE
to get the transparent effect.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Stack Overflow Stack Exchange Author: PaulB Source score (net votes, not local likes): 1 Original post: https://stackoverflow.com/a/72716575 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. It's not immediately obvious from the ObjectCreate description. You have to make the object appear in the foreground and disable the filling as per the following code: ObjectCreate(0,"Rectangle",OBJ_RECTANGLE,0,Time[10],Open[10],Time[0],Open[0]); ObjectSetInteger(0,"Rectangle",OBJPROP_COLOR,clrBlack); ObjectSetInteger(0,"Rectangle",OBJPROP_FILL,false); ObjectSetInteger(0,"Rectangle",OBJPROP_BACK,false);
Checking account access…