Questions from Beginners MQL5 MT5 MetaTrader 5 - page 613

 
mila.com:

Thank you, it's not quite clear how to implement this in this case.

What's wrong with it?

What does +Time[1] have to do with it? You can already see by the name and type of the object you're talking about. No two objects are the same
 
mila.com:

Are you kidding me? The space bar didn't help.

Because I want to get the text of the object on the first bar.

To make sure it's on the first bar, I'm guessing by other means.

the structure of the command does not provide for time in its body as I understand it

string  ObjectGetString( 
   long                            chart_id,          // идентификатор графика 
   string                          name,              // имя объекта 
   ENUM_OBJECT_PROPERTY_STRING     prop_id,           // идентификатор свойства 
   int                             prop_modifier=0    // модификатор свойства, если требуется 
   );
 
mila.com:

Are you kidding me? The space bar didn't help.

Because I want to get the text of the object located on the first bar.

You do have a space there.

Print() the name of the object and compare it with what you're asking for, i.e. whether it looks like the object name:

Print("L_V"+Time[1]);
 
mila.com:

Yes, I get the object name correct, but I get no value.

If I set the name like this :

shows the correct value.

It doesn't if it's like this:

string Znachenie=ObjectGetString(0,"L_V "+Time[1],OBJPROP_TEXT); 
 
mila.com:

Yes, the name of the object is correct, but I don't get any value.

If I set the name as :

shows the correct value.

It doesn't if I set it like this:

so Print - what does it show?
 
mila.com:

Yes, I get the object name correct, but I get no value.

If I set the name like this :

shows the correct value.

It doesn't if it's like this:

   double Znachenie=0;
   string name="L_V "+TimeToString(Time[1]);
   //--- если объект с именем name найден на основном графике
   if(ObjectFind(0,name)==0) {
      //--- присвоим переменной значение описания объекта
      Znachenie=StringToDouble(ObjectGetString(0,name,OBJPROP_TEXT)); 
      }
   Comment("Name=",name,", Znachenie=",DoubleToString(Znachenie));
try this.
 

Found it.

In the indicator, the name without seconds is L_V 2016.08.26 00:00

And this way"L_V"+Time[1] turns out with seconds L_V 2016.08.26 00:00:00


 
TimeToString(Time[1],TIME_DATE|TIME_MINUTES)
 
Artyom Trishkin:
Try it like this.

Yes! It helped.

string name="L_V "+TimeToString(Time[1]);

Thank you all for your prompt help)

 

Hello, could you please tell meif I need parameter Parameter=Ka,int,21 in the signal of the standard library?

Selected in the process of optimization from the enumeration of the type

enum intType
  {
   p0 = 15, 
   p1 = 21, 
   p2 = 29 
}

But, when the signal disappears from selection when generating EA, but it's compiling normally, it's hard to make conclusions - what's wrong ......, help with code, wasn't there already an implementation?

p.s. I have to change int to intTypeevery time in the final EA

Reason: