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

 
kosmos0975:


The description of functions in the documentation looks cumbersome, unfamiliar, complicated.

A newcomer in many ways may not find parallels between the old textbook and the new documentation.

Maybe make a link to the old documentation or . new textbook.

I will definitely reread it.


Why don't you study the new mt4 and write a tutorial? someone has to do it!
 
kosmos0975:


The description of functions in the documentation looks cumbersome, unfamiliar, complicated.

A newcomer in many ways may not find parallels between the old textbook and the new documentation.

Maybe make a link to the old documentation or . new textbook.

I will definitely reread it.


Find an ancient build, there will be an ancient guide with it. What's the question? Find an ancient build, open the meta-editor and press F1 on any function.
 
hoz:

Find the ancient build, there will be an ancient guide with it. What's the question? Find an ancient build, open the meta-editor and press F1 on any function.


The question is still the same: How do you get to the right place at the right time?

For those on the go, an off-line version of the old documentation that some good man wrote will come in handy.

 

Is there a handy function that returns the bar number by its time, datetime-->int ? That is, Time[int l]-->l. Thanks. Trying this, but the results seem to jump by +-1 depending on the bar...

int Time2Bar(const datetime t, const int bar)
  {
    datetime actualTime[];
    ArrayCopy(actualTime,Time,0,0,WHOLE_ARRAY);

   for(int l=0; l<Bars;l++)
     {
      if(t==actualTime[l])
         return(l);
     }
   return(-1);
  }
 

The HTML file did not go through.

Attached a Zip archive.

Files:
mql4_russian.zip  288 kb
 
qomment:
Is there a handy function that returns the bar number by its time, datetime-->int ? That is, Time[int l]-->l. Thanks.

WouldiBarShift work?
 
DiPach:

WilliBarShift work?

Thank you! For some reason I thought the purpose of this function was different. I'll give it a try now.
 
qomment:

Thank you! For some reason I thought the purpose of this function was different. I'll give it a try now.

Good luck!

If you know the time of the bar, this function will find its number (ugh, ugh, it hasn't failed yet). :)

 
Vladon:

you have UAC disabled

UAC in Never Notify mode
 
Hello! When studying MQL4 a small question has arisen. The problem is posted in the tutorial on this site. Here is the condition: Task 25. Create a program, in which the following conditions are realized: if exchange rate has risen above the specified level, then give a message, in which words indicate that the rate exceeds the level (up to 100 points); in other cases, to inform that the rate does not exceed the specified level.
And here is the proposed solution:
//--------------------------------------------------------------------
extern double Level=1.3200;                     // Заданный уровень 
string Text[101];                               // Объявление массива
//--------------------------------------------------------------------
int init()                                      // Спец. ф-ия init()
  {                                             // Присвоение значений
   Text[1]="один ";            Text[15]="пятнадцать ";
   Text[2]="два ";             Text[16]="шестнадцать ";
   Text[3]="три ";             Text[17]="семнадцать ";
   Text[4]="четыре ";          Text[18]="восемнадцать ";
   Text[5]="пять ";            Text[19]="девятнадцать ";
   Text[6]="шесть ";           Text[20]="двадцать ";
   Text[7]="семь ";            Text[30]="тридцать ";
   Text[8]="восемь ";          Text[40]="сорок ";
   Text[9]="девять ";          Text[50]="пятьдесят ";
   Text[10]="десять ";         Text[60]="шестьдесят";
   Text[11]="одиннадцать ";    Text[70]="семьдесят ";
   Text[12]="двенадцать ";     Text[80]="восемьдесят ";
   Text[13]="тринадцать ";     Text[90]="девяносто";
   Text[14]="четырнадцать ";   Text[100]= "сто";
   // Вычисление значений
   for(int i=20; i<=90; i=i+10)                // Цикл по десяткам
     {
      for(int j=1; j<=9; j++)                  // Цикл по единицам
         Text[i+j]=Text[i] + Text[j];          // Вычисление значения   
     }
   return;                                     // Выход из init()
  }
//--------------------------------------------------------------------
int start()                                     // Спец. ф-ия start()
  {
   int Delta=NormalizeDouble((Bid-Level)/Point,0);// Превышение 
//--------------------------------------------------------------------
   if (Delta>=0)                                // Цена не выше уровня
     {
      Alert("Цена ниже уровня");                // Сообщение
      return;                                   // Выход из start()
     }
//--------------------------------------------------------------------
   if (Delta<100)                               // Цена более 100
     {
      Alert("Более ста пунктов");               // Сообщение
      return;                                   // Выход из start()
     }
//--------------------------------------------------------------------
   Alert("Плюс ",Text[Delta],"pt.");            // Вывод на экран
   return;                                      // Выход из start()
  }
//---------------------------------------------------------------------
По-моему в условных операторах неправильно проставлены знаки сравнения. Они должны быть с точностью до наоборот. Скажите прав ли я? И если нет, то почему так?