Download MetaTrader 5
To add comments, please log in or register
Post web links to other trader's signals and make profit
goocreations
329
goocreations 2015.05.17 14:56 

I came across a number of posts regarding chart objects in visual testing mode. Are there any objects that are not supported in visual mode? Most of my objects seem to work, just not OBJ_RECTANGLE_LABEL. If I do this:

bool ok = ObjectCreate(mChartId, mNameDescriptionBox, OBJ_RECTANGLE_LABEL, mWindow, 0, 0, 0, 0);
int x = ObjectFind(mChartId, mNameDescriptionBox);
int y = ObjectsTotal(mChartId, mWindow, OBJ_RECTANGLE_LABEL);

In live mode, my OBJ_RECTANGLE_LABEL shows perfectly. However in visual mode the object does not show and the result of the above code is: ok is true, x is -1 and y is 0. This means MQL creates the object (or that is what ObjectCreate returns), but immediately afterwards MQL can't find the object anymore.

Is this a possible bug or is there a plausible reason behind this?

Alain Verleyen
Moderator
30295
Alain Verleyen 2015.05.17 15:08  
goocreations:

I came across a number of posts regarding chart objects in visual testing mode. Are there any objects that are not supported in visual mode? Most of my objects seem to work, just not OBJ_RECTANGLE_LABEL. If I do this:

In live mode, my OBJ_RECTANGLE_LABEL shows perfectly. However in visual mode the object does not show and the result of the above code is: ok is true, x is -1 and y is 0. This means MQL creates the object (or that is what ObjectCreate returns), but immediately afterwards MQL can't find the object anymore.

Is this a possible bug or is there a plausible reason behind this?

What is the value of mChartId ?
goocreations
329
goocreations 2015.05.17 15:28  
Alain Verleyen:
What is the value of mChartId ?
I've tried with 0 and ChartID(), same problem.
Alain Verleyen
Moderator
30295
Alain Verleyen 2015.05.17 15:39  
goocreations:
I've tried with 0 and ChartID(), same problem.

It should be 0. Anyway that seems a bug, is it mql4 or mql5 ?

You can report it to ServiceDesk.

goocreations
329
goocreations 2015.05.17 15:41  
Alain Verleyen:

It should be 0. Anyway that seems a bug, is it mql4 or mql5 ?

You can report it to ServiceDesk.

Interesting, this worked in MQL4. So seems to be a MQL5 specific problem.


Will report it now.

/
To add comments, please log in or register