[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 277

 
sergeev:

:) are buffers external parameters?

you don't need them!

the one you need. by serial number


Got it, thanks!

Can you please tell me, my indicator draws arrows when a condition is fulfilled, how can I mark the appearance of these arrows in a condition to open? Since I moved the indicator to an EA!

MoveDownBuffer[index_crosspoint]=Time1+5*Point  //прорисовка стрелки
 
skyjet:

Can you please tell me, my indicator draws arrows when the condition is fulfilled, how can I mark the appearance of these arrows in the condition to open? Since I moved the indicator to the EA!

You did not move it correctly. The Expert Advisor cannot work with the buffer indicators, - you should either replace them with the graphical objects or use iCustom
 

By the way,- does anyone know how to set the Fibo level descriptor when creating a graphical object with the program?

Well, or at least remove corrections from this chart:


 
int deinit()
  {
//----
   ObjectDelete("вершина");
  ObjectDelete("основание_первого_снижения  ");
   ObjectDelete("начало");
    ObjectDelete("точка4");
    ObjectDelete("пятая_точка!");
//----
   return(0);
Good afternoon! How do you properly write the cleaning of all the objects? It cleans every once in a while, and then less... So far I've been cleaning like this.
int init()
  {
//---- indicators

SetIndexStyle(0,DRAW_SECTION,STYLE_SOLID,2,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(0,ВерхняячертаBuffer1);//Alert ("SetIndexBuffer ",GetLastError( ) );
   SetIndexEmptyValue(0,0.0);
   
   SetIndexStyle(1,DRAW_SECTION,STYLE_SOLID,2,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(1,НижняячертаBuffer2);//Alert ("SetIndexBuffer ",GetLastError( ) ); 
   SetIndexEmptyValue(1,0.0);
   
   SetIndexStyle(2,DRAW_SECTION,STYLE_SOLID,T,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(2,СинняячертаBuffer3);//Alert ("SetIndexBuffer ",GetLastError( ) ); 
   SetIndexEmptyValue(2,0.0);
   
   
  ObjectDelete("вершина");
  ObjectDelete("основание_первого_снижения  ");
   ObjectDelete("начало");
    ObjectDelete("точка4");
    ObjectDelete("пятая_точка!");
//----
   return(0);
 
Dimka-novitsek:
Good afternoon! How do you properly write the cleaning of all the objects? It cleans every once in a while, and then less... So far I've been cleaning like this.
ObjectsDeleteAll
 

Thank you!!!!!!

It works!!!!

 

Good afternoon!

Please advise me on a reliable way to identify a flat, if there is one at all.

 
I hope this question is relevant here. What would the simplest program look like, where one order (for example Sell) will be opened and after some time it will be modified (change open price, SL, TP), and after some time it will be closed (regardless of the result)...? I can't figure it out myself. All I saw was a brainwashing code with order search and all sorts of nonsense output...
 
evillive:

Good afternoon!

Please advise me on a reliable way to identify a flat, if there is one at all.


The trend on one timeframe may easily turn out to be a flat on another one. You could, for example, pick up a moving average - if it is sideways, the trend is sideways.
 
AlexLaptist:
I hope this question is relevant here. What would the simplest program look like, where one order (for example Sell) will be opened and after some time it will be modified (change open price, SL, TP), and after some time it will be closed (regardless of the result)...? I can't figure it out myself. All I saw was a brainwashing code with order search and all sorts of nonsense output...


Have you looked at this? https://book.mql4.com/ru/samples/index

In general, like any other program, yours will consist of separate blocks, each block performs a certain task. We take one such block and write our own code, debug it and then move on to the next block. And so on to the end of the program.