Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1234

 
Александр Глазунов:
Please advise how to deposit to MT5.

Call your broker - he will tell you how to credit the money to your TRADING ACCOUNT.

If you want to pay for MQL5.community services (to buy trading applicationsat Market, subscribe toSignals, rentVPSand orderfreelancejobs. ) - You need to refill your MQL5 account ( Alexander Glazounov): go to your profile, select"Refill MQL5 account" on the left side.

You may find information on working with payment services inPayments and payment methods article.


Added: depositingthe MQL5 account is now very convenient in MetaTrader 5 terminal - first, click on the top right icon, and then go to


 
Sysmart:
New problem, we need to select the last open position in the hedge

For example: m_position.SelectByIndex(PositionsTotal()-1)

But the question is, what if it selects the wrong character or magician, how can I filter it out?

 

Hi all! This is my first comment on mql5 , i am a total zero in programming in this language so please don't kick me with arrogance... But, I know what I need and ask for advice from professionals. I don't know if it's possible and what's the best way, if any, to do it. I would like to create alerts and receive them by mail, or by telegram or wherever. The alerts may be very different and based on several events.

For example, condition 1. price below 1.25, condition 2. touch MA or Bollinger bands, condition 3. takeover candle or whichever. All the conditions should be met in succession and as a whole. Tomorrow the set of conditions may be different. Is it possible and how? Thank you

 
kaa7733:

Hi all! This is my first comment on mql5 , i am a total zero in programming in this language so please don't kick me with arrogance... But, I know what I need and ask for advice from professionals. I don't know if it's possible and what's the best way, if any, to do it. I would like to create alerts and receive them by mail, or by telegram or wherever. The alerts may be very different and based on several events.

For example, condition 1. price is below 1.25, condition 2. touch MA or Bollinger bands, condition 3. takeover candle or whichever. All the conditions should be met in succession and as a whole. Tomorrow the set of conditions may be different. Is it possible and how? Thank you

Messages can be sent:

The easiest is 'SendNotification' - sending a Push message to a mobile terminal on a smartphone.

Документация по MQL5: Сетевые функции / SendFTP
Документация по MQL5: Сетевые функции / SendFTP
  • www.mql5.com
Сетевые функции / SendFTP - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 

Tired of understanding the reason for the constant difference in the optimisation of a good EA in MT5... On the same currency pair, with the same EA, with the same optimization parameters, there is a difference in optimization results... I.e., I always use the same EA and expected the same results, but in fact they are different...

Enlighten pliz, to whom is familiar with this kind of confusion ?

THANK YOU.

 

I'm interested in how mql5 can explain the name of a member of a class or structure to work with it?


template<typename T>
void sortArray(T &_array[]) {
   T array;
//---Sort Signals by Time
   for(int i = 0; i < ArraySize(_array); i++) {
      array = _array[i];
      for(int a = 1; a <= i; a++) {
         
            if(_array[i].openTime < _array[a - 1].openTime) {
               for(int b = i; b >= a; b--) {
                  _array[b] = _array[b - 1];
               }
               _array[a - 1] = array;
               break;
            }
 

   return;
}


Using an example, we can pass any array, in particular structures and classes, through a template. The question is how to explain which member to sort by? In this example, openTime is fixed, but we would like to be able to make it a transferable variable. So we can use this function as a universal sorting on some principle for any object. Please help

Документация по MQL5: Основы языка / Типы данных / Структуры, классы и интерфейсы
Документация по MQL5: Основы языка / Типы данных / Структуры, классы и интерфейсы
  • www.mql5.com
Структура является набором элементов произвольного типа (кроме типа void). Таким образом, структура объединяет логически связанные данные разных типов. Объявление структуры Имя структуры нельзя использовать в качестве идентификатора (имени переменной или функции). Следует иметь ввиду, что в MQL5 элементы структуры следуют непосредственно друг...
 
Georgiy Liashchenko:

I'm interested in how mql5 can explain the name of a member of a class or a structure to work with it?



As a concrete example, we can pass any array through a template, in particular structures and classes. The question is how to explain which member to sort by? In this example, openTime is fixed, but we would like to be able to make it a transferable variable. So we can use this function as a universal sorting on some principle for any object. Please help

Search the forum, this topic has been discussed and there was a solution.
 
Aliaksandr Hryshyn:
Search the forum, this topic has been discussed and there was a solution.

it would be great to know where to look. I've been looking for a month now, can't find it

 
Hello, why is the MT5 tester such a ***?
It's impossible to work with objects!
After all, potential customers are primarily judging the product by the demo version in the strategy tester, and my program works with objects, objects overlap each other incorrectly, in normal mode all is normal, but in the tester does not work!
Question, is there a way to determine programmatically that the tester is running, to at least disable some objects that interfere with the tester, but do not interfere in realtime?!
 
#include <Trade\Trade.mqh>
CTrade itrade;
...
We have 2 positions:
Buy:
int ticket1 = 33; (with a price of 1.30853)
Sell:
int ticket2 = 19; (with a price of 1.31096)

Why doesn't itrade.PositionCloseBy(ticket1, ticket2) work?

Failed close position #15 sell 1 GBPUSD_i by position #19 [Invalid order].
Reason: