Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 555

 
GSB:

If the structure contains string variables and/or a dynamic array object , the compiler assigns an implicit constructor to the structure, which clears allstringmembers and initializes the dynamic array object correctly.



I read the documentation by hush, but it is not quite clear. For example, the structure contains variables of the string type and/or a dynamic array object . It turns out that the compiler assigns an implicit constructorwhere all the members of the string-typestructure are zeroed and the dynamic array object is initialized correctly. This applies to variables of type string and/or dynamic array object . If there are variables of other types besides variables of the string type and/or dynamic array object in the structure, the compiler does not initialize these variables implicitly. You need to create your own constructors and destructors for them.

So, the structure will have different constructors and destructors for different data types?
 
void SetText(datetime sh,datetime tm,double pr,string text,color clr)
  {
   ObjectCreate("x"+sh,OBJ_TEXT,0,tm,pr);
   ObjectSetText("x"+sh,text);
   ObjectSet("x"+sh,OBJPROP_COLOR,clr);
  }

how to make the values of the text label not to be overwritten, because if such a variant is found again, the values are overwritten

I declare it this way

.... the difficulty is that if repeated conditions are generated then the old text in the old place is overwritten

SetText(TimeCurrent(),Time[pos],High[pos]+30*Point,"Слабость А",Yellow);
 
Zver4991:

how to make the values of the text label not to be overwritten, because if such a variant is found again, the values are overwritten

I declare it this way

.... the difficulty is that if repeated conditions are generated then the old text in the old place is overwritten


How about including a timestamp tm in the name?
 
How do I know if the bar is bullish or bearish?
 
Zolotai:
How do I know if the bar is bullish or bearish?

Compare Open and Close and find out which is bigger.
 
splxgf:

Should the name include a timestamp tm?


so it is included Time[pos]

put the text at the signal conditioning position

 
Zver4991:


so it is enabled Time[pos]

TimeCurrent enabled

 

Greetings!

I am trying to make my EA close trades on Friday half an hour before the close of the session.

I tried the tutorial, but it did not work.

i can ask if anyone has a ready code.

I have the closing code. i need it to be able to close a session 30 minutes beforehand.

 
belck:

Greetings!

I am trying to make my EA close trades on Friday half an hour before the close of the session.

I tried the tutorial, but it did not work.

i can ask if anyone has a ready code.

I have the closing code. I need it to signal the closing of the session 30 minutes before.

Maybe like this.

extern datetime DateTime = D'2014.03.21 11:30';  // Дата и время закрытия



if (TimeCurrent()>=DateTime)
  {
  }
 

belck
:

приветствую!

помогите разобраться. пытаюсь сделать в советнике закрытие сделок в пятницу за пол часа до закрытия сессии.

пробовал по учебнику, то ничего у меня не получилось

может у кого уже готовый код есть.

код закрытия у меня есть. мне нужен сам сигнализирующий закрытие сессии за 30 минут.

How about this.

extern datetime DateTime = D'2014.03.21 11:30';  // Дата и время закрытия



if (TimeCurrent()>=DateTime)
  {
  }
The situation is that I don't need the date. I need it to signal each Friday 30 minutes before and 30 minutes before the end of the session, and then I will embed the signal in the code for closing orders.
Reason: