Questions from Beginners MQL5 MT5 MetaTrader 5 - page 669

 
Leo59:
Strange, I think the developers have messed something up. How are the functions different apart from the Name?


Allows you to get the start and end time of a specified quote session for the specified symbol and day of the week.

и

Allows you to get the start time and end time of the specified trading session for the specified symbol and day of the week.

It is possible to overdo it if you don't understand it)

There are instruments that are quoted at one time, but they can only be traded at certain times, that's why there are two functions.

 

Guys, I dare ask again, as my question is lost among the messages

There is a construction like this, goes through all the open charts in the terminal:

for(long currChart = ChartFirst(); currChart != -1; currChart=ChartNext(currChart)) {
 if(currChart == график тестера) continue; // Что сюда написать?
  ObjectSetInteger(currChart,"Sync",OBJPROP_BGCOLOR,clrGreen);
}

How do I find out that the chart is not the main one, but open in tester mode and skip it?

Thank you!

 

Hello colleagues, could you please suggest a handler for an error like this?

Thank you.

 
Please post your MQL4 MT4 MetaTrader 4 questions in theMQL4 MT4 MetaTrader 4 Beginners Question thread. Especially if it concerns trading operations.
 
Gentlemen, how do you quickly find out where the signal stands in the rankings?
 
Renat Akhtyamov:
Gentlemen, how do I find out quickly which position the signal is in the rating?
This can only be found out for your signal - "Signals" -> "My Signals" and at the beginning of the signal name will be numbers - this is the number of position in the ranking of the signal showcase.
 
Vladimir Karputov:
You can only find this out for your signal - "Signals" -> "My Signals" and at the beginning of the signal name will be numbers - this is the position number in the signal showcase ranking.
Got it, senks!
 
Renat Akhtyamov:
Gentlemen, how do I quickly find out where the signal stands in the ranking?

Programmatically? Like this.

void OnStart()
  {
//--- запрашиваем общее количество сигналов в базе
   int total=SignalBaseTotal();
//--- цикл по всем сигналам
   for(int i=0;i<total;i++)
     {
      //--- выбираем сигнал для дальнейшей работы
      if(SignalBaseSelect(i))
        {
         //--- получение свойств сигнала
         long   id    =SignalBaseGetInteger(SIGNAL_BASE_ID);          // id сигнала
         long   pips  =SignalBaseGetInteger(SIGNAL_BASE_PIPS);        // результат торговли в пипсах
         long   subscr=SignalBaseGetInteger(SIGNAL_BASE_SUBSCRIBERS); // количество подписчиков
         string name  =SignalBaseGetString(SIGNAL_BASE_NAME);         // имя сигнала
         double price =SignalBaseGetDouble(SIGNAL_BASE_PRICE);        // цена подписки на сигнал
         string curr  =SignalBaseGetString(SIGNAL_BASE_CURRENCY);     // валюта сигнала
         long   rating=SignalBaseGetInteger(SIGNAL_BASE_RATING);      // рейтинг и есть
         //--- выводим все прибыльные бесплатные сигналы с ненулевым количеством подписчиков
         if(price==0.0 && pips>0 && subscr>0)
            PrintFormat("id=%d, name=\"%s\", currency=%s, pips=%d, subscribers=%d",id,name,curr,pips,subscr);
        }
      else PrintFormat("Ошибка выбора сигнала. Код ошибки=%d",GetLastError());
     }
  }
 
Alexey Volchanskiy:

Programmatically? Like this.

void OnStart()
  {
//--- запрашиваем общее количество сигналов в базе
   int total=SignalBaseTotal();
//--- цикл по всем сигналам
   for(int i=0;i<total;i++)
     {
      //--- выбираем сигнал для дальнейшей работы
      if(SignalBaseSelect(i))
        {
         //--- получение свойств сигнала
         long   id    =SignalBaseGetInteger(SIGNAL_BASE_ID);          // id сигнала
         long   pips  =SignalBaseGetInteger(SIGNAL_BASE_PIPS);        // результат торговли в пипсах
         long   subscr=SignalBaseGetInteger(SIGNAL_BASE_SUBSCRIBERS); // количество подписчиков
         string name  =SignalBaseGetString(SIGNAL_BASE_NAME);         // имя сигнала
         double price =SignalBaseGetDouble(SIGNAL_BASE_PRICE);        // цена подписки на сигнал
         string curr  =SignalBaseGetString(SIGNAL_BASE_CURRENCY);     // валюта сигнала
         long   rating=SignalBaseGetInteger(SIGNAL_BASE_RATING);      // рейтинг и есть
         //--- выводим все прибыльные бесплатные сигналы с ненулевым количеством подписчиков
         if(price==0.0 && pips>0 && subscr>0)
            PrintFormat("id=%d, name=\"%s\", currency=%s, pips=%d, subscribers=%d",id,name,curr,pips,subscr);
        }
      else PrintFormat("Ошибка выбора сигнала. Код ошибки=%d",GetLastError());
     }
  }
Great! Thank you!
 
Vitaly Muzichenko:

Guys, I dare ask again, as my question is lost among the messages

There is a construction like this, goes through all the open charts in the terminal:

for(long currChart = ChartFirst(); currChart != -1; currChart=ChartNext(currChart)) {
 if(currChart == график тестера) continue; // Что сюда написать?
  ObjectSetInteger(currChart,"Sync",OBJPROP_BGCOLOR,clrGreen);
}

How do I find out that the chart is not the main one, but open in tester mode and skip it?

Thank you!

Something is clearly not in the properties. And if in the tester mode you create something on the chart, for example a button with a tricky name and then check its presence?

Reason: