clrNONE not working on chart with black background

 

After the latest update to version 5 build 5572, the clrNONE not working on chart with black background.

The following code used to work before update on black background, now it does not. 

ObjectSetInteger(0, objName, OBJPROP_COLOR, clrNONE);

This code supposes to set the object to be invisible (clrNONE) but the new update causes the code to leave behind a white color object on the chart running on black background.

Now this code only works on chart with white background. 

Please rectify and set it to be working on all charts regardless of the chart background color.  Thanks.

 
clrNONE = bypass color , it do not set bar color
 
P Dominc:

After the latest update to version 5 build 5572, the clrNONE not working on chart with black background.

The following code used to work before update on black background, now it does not. 

ObjectSetInteger(0, objName, OBJPROP_COLOR, clrNONE);

This code supposes to set the object to be invisible (clrNONE) but the new update causes the code to leave behind a white color object on the chart running on black background.

Now this code only works on chart with white background. 

Please rectify and set it to be working on all charts regardless of the chart background color.  Thanks.

Confirmed and reported to MQ. Thanks.
 

As an additional heads up to MQ, clrNONE is omitted from the color constants documentation:

Documentation on MQL5: Web Colors / Constants, Enumerations and Structures
Documentation on MQL5: Web Colors / Constants, Enumerations and Structures
  • www.mql5.com
The following color constants are defined for the color type: Color can be set to an object using the ObjectSetInteger() function. For setting...
 
P Dominc:

After the latest update to version 5 build 5572, the clrNONE not working on chart with black background.

The following code used to work before update on black background, now it does not. 

ObjectSetInteger(0, objName, OBJPROP_COLOR, clrNONE);

This code supposes to set the object to be invisible (clrNONE) but the new update causes the code to leave behind a white color object on the chart running on black background.

Now this code only works on chart with white background. 

Please rectify and set it to be working on all charts regardless of the chart background color.  Thanks.

While we wait for a official fix from MQ, a quick workaround is to manually set the object color to the chart's background color. It's not ideal, but it does the trick for now:

ObjectSetInteger(0, objName, OBJPROP_COLOR, (color)ChartGetInteger(0, CHART_COLOR_BACKGROUND));

This should keep the object "invisible" regardless of the background theme.

 
Mostafa Ghanbari #:

While we wait for a official fix from MQ, a quick workaround is to manually set the object color to the chart's background color. It's not ideal, but it does the trick for now:

This should keep the object "invisible" regardless of the background theme.

This issue has been fixed a long time ago.
 
Alain Verleyen #:
This issue has been fixed a long time ago.

Yes, it has been fixed. I'm unable to reproduce the issue with:

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   ObjectCreate(0, "Line", OBJ_VLINE, 0, iTime(_Symbol, PERIOD_CURRENT, 1), 0);
   ObjectSetInteger(0, "Line", OBJPROP_COLOR, clrNONE);
   
  }
//+------------------------------------------------------------------+
P Dominc:
After the latest update to version 5 build 5572, the clrNONE not working on chart with black background.

For the record, my broker-dealer's latest Release Build is 5800, and my latest MQ Beta Build is 5812.