MT5 Tester doesn't support ObjectCreate without visual mode?

 
Hello,

I have this simple code:
string name = (string)iTime(Symbol(), PERIOD_H1, 0);

    ObjectCreate(NULL, name, OBJ_RECTANGLE,0,zone.ZoneTimeStart,zone.ZoneHigh,zone.ZoneTimeEnd,zone.ZoneLow);
    
    ObjectSetInteger(NULL, name, OBJPROP_CORNER, 0);

    ObjectSetInteger(NULL, name, OBJPROP_COLOR, BoxColor);

    ObjectSetInteger(NULL, name, OBJPROP_BACK, true);
    ObjectSetInteger(NULL,name,OBJPROP_FILL,true);

When I run it with visual mode it is working how it should. But when I run it without it and then open it after test finishes, there is no rectangle. Not on chart and "Object list" is gray and I can't click on it.

So MT5 tester doesn't support objects unless there is visual mode?
In MT4 it was working unless you had optimalization turned on.
 

On MT5, it is documented as such ...

Graphical Objects in Testing

During testing/optimization graphical objects are not plotted. Thus, when referring to the properties of a created object during testing/optimization, an Expert Advisor will receive zero values.

This limitation does not apply to testing in visual mode.

On MT4, it is documented as such ...

Graphical Objects in Testing

During visualization, the Expert Advisor interacts with a real chart. In case there is no visualization, the Expert Advisor works with a "virtual" chart that is not displayed. The former case has some peculiarities. During optimization, working with graphical objects is not supported.

Documentation on MQL5: MQL5 programs / Testing Trading Strategies
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
  • www.mql5.com
Testing Trading Strategies - MQL5 programs - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Fernando Carreiro #:

On MT5, it is documented as such ...

Graphical Objects in Testing

During testing/optimization graphical objects are not plotted. Thus, when referring to the properties of a created object during testing/optimization, an Expert Advisor will receive zero values.

This limitation does not apply to testing in visual mode.

On MT4, it is documented as such ...

Graphical Objects in Testing

During visualization, the Expert Advisor interacts with a real chart. In case there is no visualization, the Expert Advisor works with a "virtual" chart that is not displayed. The former case has some peculiarities. During optimization, working with graphical objects is not supported.

Thank you.

Reason: