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

 

I had to look it up. I haven't found it in MQL5 Reference, but I have found it in OrderSelect Reference for MQL4:

"When using the SELECT_BY_POS parameter, the information is returned in the order in which it was received from the trade server. No sorting of the received list of orders is guaranteed."

Actually, I systematically check whether the lists I use have sorting by ticket number. There have been no cases of its absence. But you can't argue with the reference either, there is no argument. It's just as well it's just as well...

 
Vladimir:

I had to look it up. I haven't found it in MQL5 Reference, but I have found it in OrderSelect Reference for MQL4:

"When using the SELECT_BY_POS parameter, the information is returned in the order in which it was received from the trade server. No sorting of the received list of orders is guaranteed."

Actually, I systematically check whether the lists I use have sorting by ticket number. There have been no cases of its absence. But you can't argue with the reference either, there is no argument. It's just as well it's just as well...

What do you mean "nothing"? Sort by ticket - there will always be order and no contradictions with documentation, it says about sorting by serial number, not by ticket, these are different things.
 
guys tell me how to test with the new builds they are always changing and what worked now does not work I download quotes from the tipstory light and import quotes into the terminal for builds1010 all good and the new1045 this whole thing does not work in what problem anyone knows?
 
Vitalie Postolache:
What do you mean "no sorting"? Sort by ticket - there will always be order and there is no contradiction with documentation, it says about sorting by ticket number, not by ticket, these are different things.
And somewhere in the documentation is written about sorting by ticket number? Can you tell me, I don't know.
 
Vitaly Muzichenko:

Run this code, and read the log

bool flag=true;

void OnTick()
{
//--
if(flag)
  {
  for(int i=0; i<OrdersTotal(); i++)
   {
   if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
    {
     Print(i," = ",OrderOpenTime());
    }
   }
  flag=false;
}

//-
}
Thank you! Got it
 

Another problem I've encountered! Don't judge, I've been studying the language for 2-3 weeks, maybe I'm just dumb!

The task on the Expert Advisor is to notify the trader via email every 4 hours, if the free margin on the account has added a certain value.

In the subject of the message you have to write the name of the broker and the traded pair, and in the body of the message "Danger! The drawdown is over the limit. Take the necessary measures".

The compiler is malfunctioning, I'm not good at English and I can't figure out what the error is!

input  double MessageMail     = 50.0;
double Sag;

void OnTick()
  {
   Sag = NormalizeDouble(100-100*(AccountInfoDouble(ACCOUNT_FREEMARGIN)/AccountInfoDouble(ACCOUNT_BALANCE)), 1);  //находим процент просадки и округляем до 1 знака
    if(Sag > MessageMail && iVolume(NULL,PERIOD_H4,0)<3)                                       //если просадка больше заданного и начата новая свеча на 4ч таймфрейме
     {
     Alert(Symbol(), ": Просадка = ", Sag, " % ", " > ",  MessageMail, " % ");                 //вывести предупреждение в терминале
//Сюда нужно вставить команду SendMail для отправки сообщения, а что и как не понятно
// пробовал bool SendMail( AccountInfoString(ACCOUNT_COMPANY)|Symbol, "Опасность! Просадка привысила допустимое значение. Примите необходимые меры")
//что то не выходит                          
     }
  }


PS: Maybe in general there is an easier solution for this kind of problem, but so far I see it only this way)

 
A word of advice for a dummy. How to open a real account?
 
Anton Sokolov:

Another problem I've encountered! Don't judge, I've been studying the language for 2-3 weeks, maybe I'm just dumb!

The task on the Expert Advisor is to notify the trader via email every 4 hours, if the free margin on the account has added a certain value.

In the subject of the message you have to write the name of the broker and the traded pair, and in the body of the message "Danger! The drawdown is over the limit. Take the necessary measures".

The compiler is malfunctioning, I'm not good at English and I cannot understand what the error is!

input  double MessageMail     = 50.0;
double Sag;

void OnTick()
  {
   Sag = NormalizeDouble(100-100*(AccountInfoDouble(ACCOUNT_FREEMARGIN)/AccountInfoDouble(ACCOUNT_BALANCE)), 1);  //находим процент просадки и округляем до 1 знака
    if(Sag > MessageMail && iVolume(NULL,PERIOD_H4,0)<3)                                       //если просадка больше заданного и начата новая свеча на 4ч таймфрейме
     {
     Alert(Symbol(), ": Просадка = ", Sag, " % ", " > ",  MessageMail, " % ");                 //вывести предупреждение в терминале
//Сюда нужно вставить команду SendMail для отправки сообщения, а что и как не понятно
// пробовал bool SendMail( AccountInfoString(ACCOUNT_COMPANY)|Symbol, "Опасность! Просадка привысила допустимое значение. Примите необходимые меры")
//что то не выходит                          
     }
  }


PS: Maybe in general there is a simpler solution for such a problem, but so far I see it only this way)

I don't know what it's about.

What are the compiler errors

 

prıvet.podjalujte pojalusta pozwala why on demo schete ne mogu otkrıt zdelkı


 
trade is disablet .oshıbka
Reason: