[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 439

 
7777877:

Good afternoon. PEOPLE, ANSWER THE QUESTION PLEASE (5th time posting). Question about a file index... In the MQL4 book, found at MQL4.community in the "Standard Functions" section, there is an example of the script "File Operations", which is intended for reading data from a file and displaying graphical objects in a symbol window:

If no one answers, it means that people do not know what to answer. You do not need to post so many times and copy so much text.
 

Good evening, everyone.

Can you please tell me how to find out the maximum and minimum price for the last hour, the textbook only says about the last bars.

 
Very trivial question: I put a pending order, check the expiry by time, set the correct time, but when the time runs out and the order is not opened it is not deleted.
 
I found it... There's nothing written in the logbook
 
Elektronik:

Good evening, everyone.

Can you please tell me how to find out the maximum and minimum price for the last hour, the textbook only says about the last bars.


Please refer to the documentation for an explanation:

double valHigh = iHigh(Symbol(),PERIOD_H1,1);
double valLow  = iLow(Symbol(),PERIOD_H1,1);
 

Hi all!

I'm just starting to learn MQL (please don't judge too harshly).

I have a question from MQL4 tutorial.

//--------------------------------------------------------------------
// stringarray.mq4
// Предназначен для использования в качестве примера в учебнике MQL4.
//--------------------------------------------------------------------
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()
  }
//--------------------------------------------------------------------

I have started the program and it works.

I don't know how it can count from 10 to 19, if loop operator "for(int i=20; i<=90; i=i+10)" counts from 20 and "for(int j=1; j<=9; j++)" from 1 to 9.

Please explain.

 
borilunad:

This will close 1/2 of the lot. If OrderLots() = 0.03, then 0.02 will close and 0.01 will remain. And put the resulting Lot in OrderClose() in its place after OrderTicket(). Is it clear now?
understandable - thanks, except ........ how to do it :) ?
 
kostural:
understandable - thanks, but here ........ how to do it :) ?


Where is it clear if you can't put the received Lot in OrderClose() in its place after OrderTicket()? I can't explain it any other way.

See OrderClose() function in Doc or MetaEditor Help!

 
Pacman:

Hi all!

I'm just starting to learn MQL (please don't judge too harshly).

I have a question from MQL4 tutorial.

I have started the program and it works.

I don't know how it can count from 10 to 19, if loop operator "for(int i=20; i<=90; i=i+10)" counts from 20 and "for(int j=1; j<=9; j++)" from 1 to 9.

Please explain.


Text[i+j]=Text[i] + Text[j]; // Calculating the value

What is unclear? tens+units= tens+units (For example: 20+5= 20+5 on a primitive machine means 25)

Start with Arithmetic!

 
borilunad:


Text[i+j]=Text[i] + Text[j]; // Calculation

What's not to understand? Tens + ones = tens + ones (For example: 20 + 5 = 20 + 5 for a primitive machine means 25)

Start with Arithmetic!

I don't understand how exactly the number 10, 11, 12, ...,19 is obtained.

In the program, the loop statement starts with 20, and from 1 to 9?

Reason: