Errors, bugs, questions - page 1375

 
Vladimir Pastushak:

...

Build 872

After restarting the terminal, the TOOLTIP disappears in all graphical objects ...

Checked, all of the tooltips are displayed. What am I doing wrong?
 
Artyom Trishkin:
I checked, all the tooltips are displayed. What am I doing wrong?

1. the tooltips are not saved.

2. The person assigned a tooltip to an object when it was successfully created. Since the object was already created, no tooltip was assigned according to the conditions of his program.

 
Slawa:

1. the tooltips are not saved.

2. A person assigned a tooltip to an object when it was successfully created. Since the object was already created, no tooltip was assigned according to the conditions of his program.

I see. I didn't know that tooltips are not saved. My functions are so constructed that they will reassign "missing"
 
Artyom Trishkin:
I see, I didn't realise that the tooltips aren't saved. My functions are so constructed that they will reassign "missing".
I didn't know that creating an interface in the EA and signing the buttons with a Tultip would have to be done all the time, because the Tultip is deleted after the restart...
 
Opened a signal.(Became a signal provider). Balance replenishment and part of the trades are duplicated, resulting in distorted statistics. How to fix it?
 
Sergey Zhukov:
Opened a signal.(Became a signal provider). Balance replenishment and part of the trades are duplicated, resulting in distorted statistics. How can I correct?
Please send your request to Service Desk and provide details of the problem.
 
Vladimir Pastushak:
I didn't know that by creating an interface in the EA and signing buttons with a Tultip you have to do this all the time, because after reloading the Tultip is deleted.
It's strange. Even if you just build the interface in OnInit(), at the time of its building, the toltypes are prescribed. Why are they disappearing?
 
Artyom Trishkin:
Strange. Even if you simply build the interface in OnInit(), at the time of its construction, the tooltips are prescribed. Why do they disappear?

I create some interface, with buttons, when I create a tooltip. When I restart the terminal, the tooltip is removed and I have to write it in again...

Here is a simple code that creates a button with a tooltip and after restarting the tooltip will disappear , try it ...

//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property strict
//+------------------------------------------------------------------+
//| Создает кнопку                                                   |
//+------------------------------------------------------------------+
bool ButtonCreate(const long              chart_ID=0,               // ID графика
                  const string            name="Button",            // имя кнопки
                  const int               sub_window=0,             // номер подокна
                  const int               x=100,                      // координата по оси X
                  const int               y=100,                      // координата по оси Y
                  const int               width=50,                 // ширина кнопки
                  const int               height=18,                // высота кнопки
                  const ENUM_BASE_CORNER  corner=CORNER_LEFT_UPPER, // угол графика для привязки
                  const string            text="Button",            // текст
                  const string            font="Arial",             // шрифт
                  const int               font_size=10,             // размер шрифта
                  const color             clr=clrBlack,             // цвет текста
                  const color             back_clr=C'236,233,216',  // цвет фона
                  const color             border_clr=clrNONE,       // цвет границы
                  const bool              state=false,              // нажата/отжата
                  const bool              back=false,               // на заднем плане
                  const bool              selection=false,          // выделить для перемещений
                  const bool              hidden=true,              // скрыт в списке объектов
                  const long              z_order=0)                // приоритет на нажатие мышью
  {
   ResetLastError();
   if(ObjectCreate(chart_ID,name,OBJ_BUTTON,sub_window,0,0))
     {
      ObjectSetInteger(chart_ID,name,OBJPROP_XDISTANCE,x);
      ObjectSetInteger(chart_ID,name,OBJPROP_YDISTANCE,y);
      ObjectSetInteger(chart_ID,name,OBJPROP_XSIZE,width);
      ObjectSetInteger(chart_ID,name,OBJPROP_YSIZE,height);
      ObjectSetInteger(chart_ID,name,OBJPROP_CORNER,corner);
      ObjectSetString(chart_ID,name,OBJPROP_TEXT,text);
      ObjectSetString(chart_ID,name,OBJPROP_FONT,font);
      ObjectSetInteger(chart_ID,name,OBJPROP_FONTSIZE,font_size);
      ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
      ObjectSetInteger(chart_ID,name,OBJPROP_BGCOLOR,back_clr);
      ObjectSetInteger(chart_ID,name,OBJPROP_BORDER_COLOR,border_clr);
      ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back);
      ObjectSetInteger(chart_ID,name,OBJPROP_STATE,state);
      ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,selection);
      ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selection);
      ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hidden);
      ObjectSetInteger(chart_ID,name,OBJPROP_ZORDER,z_order);
      ObjectSetString(chart_ID,name,OBJPROP_TOOLTIP,"ROP_TOOLTIP");
     }
   return(true);
  }
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnTick()
  {
   ButtonCreate();
   ChartRedraw();
  }
//+------------------------------------------------------------------+
 
Vladimir Pastushak:

I create some interface, with buttons, when I create a tooltip. When I restart the terminal, the tooltip is removed and I have to write it in again...

Here is a simple code that will create a button with a tooltip and after restarting the tooltip will disappear , try it ...

Type a check on the result of object creation:

...
      ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selection);
      ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hidden);
      ObjectSetInteger(chart_ID,name,OBJPROP_ZORDER,z_order);
      ObjectSetString(chart_ID,name,OBJPROP_TOOLTIP,"ROP_TOOLTIP");
     }
   else
     {
      Print("Error create button: ",GetLastError());
     }
   return(true);
...

And if the object already exists you just can't recreate it (error 4200). And therefore will not be able to apply change object properties (and tooltip in particular).

Added later: just need to redo the logic, otherwise every tick will print an error.

 
Karputov Vladimir:

Enter a check on the result of object creation:

And if the object already exists you simply cannot recreate it (error 4200). And consequently you won't be able to apply change to object properties (and tooltip in particular).

Added later: just need to redo the logic, otherwise every tick will print an error.

We set all parameters and all parameters are saved except for the type...

Colour size all is saved after reloading only fat type is deleted...

Reason: