Errors, bugs, questions - page 972

 
voix_kas:

Which is easier/faster for MT5 to process and display: 24*OBJ_LABELor 1*OBJ_BITMAP_LABEL?

It is assumed that24*TextOut will also be fed intoOBJ_BITMAP_LABEL.

That is, in terms of performance.

Maybe someone will be interested in information about performance of graphic objects...

The following goal was set. To increase performance by replacing26*OBJ_LABELwith 1*OBJ_BITMAP_LABEL.

These graphical objects show the current state of the Expert Advisor. A total of 26 labels are used, 13 of which are constantly updated with recalculated values. I.e., the first 13 are descriptions of parameters, the remaining 13 are their corresponding values.

General principles of working with labels. All 26 labels are created and aligned in OnInit(). In OnTick() only 13 of them are updated (text).

General principles of working with bitmaps. The canvas template is created inOnInit(). It should have all 13 elements of the description. OnTick() copies the canvas template (uint array) to the working canvas array + appends the remaining 13 value labels.

What can I say? One Bitmap works (!) an order of magnitude slower than 26 conventional labels. Tried to exclude from OnTick() operation copying template to working canvas (array uint 250*410), i.e. working on one canvas. The gain is felt only in real time. In the tester it's the same, with absolute productivity degradation.COLOR_FORMAT_ARGB_NORMALIZE mode was used, as the others give a less aesthetic look. Looking ahead, it should be said that working on one canvas is difficult, because you have to track the overlap of previous overlays (clear areas).

What's the conclusion for me.

If the user needs to display real-time statistics - definitelyOBJ_LABEL. It has twodisadvantages compared toOBJ_BITMAP_LABEL: 1) the lack of ability to change the font style, 2) from the programmer's point of view to control one element (bitmap) is easier than 26 labels.

 

Can you tell me how to move an object created by an expert, i.e. make it look like it was created normally?

Tried

      result&=obj.SetInteger(OBJPROP_HIDDEN,true);
      result&=obj.SetInteger(OBJPROP_SELECTED,false);
      result&=obj.SetInteger(OBJPROP_SELECTABLE,true);
      result&=obj.SetInteger(OBJPROP_ZORDER,100);

In different variations.

Who has come across help.

 
vdv2001:

Can you tell me how to move an object created by an expert, i.e. make it look like it was created normally?

Tried

In different variations.

Who has come across help.

The OBJPROP_SELECTABLE property is responsible for the ability to select the object.
 
tol64:
Property OBJPROP_SELECTABLE is responsible for possibility to select object.

Yes, the object is selected, but it cannot be moved with the mouse (like in terminal 4).

Or now moving of all objects created by Expert Advisor must be handled through events.

 
voix_kas:

Maybe someone would be interested in information about the performance of graphical objects...


Respect and respect !

 

Gentlemen, could you please tell me what is causing the indicator to flicker? (DRAW_ZIGZAG plot blinksintermittently ) And how can this be dealt with?

 
vdv2001:

Yes, the object is selected, but it cannot be moved with the mouse (like in terminal 4).

Or now moving all objects created by Expert Advisor must be handled by events.

The objects created by the Expert Advisor are selected and can be moved. Show how you do it (short example).
 
tol64:
I have the objects created by the Expert Advisor selected and can be moved. Show me how you do this (short example).

There is a property of the object

OBJPROP_SELECTABLE

Object availability

bool

By default it is set to false for programmatically created objects

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Свойства объектов - Документация по MQL5
 
joo:
How do you determine during optimisation whether the forward section is now or not?
No
 
Rosh:

There is a property of the object

OBJPROP_SELECTABLE

Object availability

bool

By default it is set to false for programmatically created objects

Thanks, I know that. vdv2001 has some problem with it:

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

vdv2001, 2013.04.25 06:10

I have never tried to move it with another object, but I have never seen such moving.

Or it is now necessary to handle the movement of all objects created by the Expert Advisor through events.

//---

Wanted to see how it does this to find its error.