Errors, bugs, questions - page 2159

 
It would be good to remove the ancient restriction
2018.03.06 18:12:31.472 Symbols no more than 1000 symbols can be selected
 

  1. Custom symbol is open on the chart (history only, not updated).
  2. I switch to another trading server.
  3. The chart becomes "Waiting for update".
  4. I close the chart, wait a few minutes and try to open a custom chart - opens normally.
  5. I proceed to step 2 and everything repeats - no chart, wait a minute, there is a chart.
I ask for the next build to fix this bug. Very much limits the possibilities of custom.

 
Sergey Dzyublik:
It has been reported that MT5 - 1758 of 29.01.2018 should be available.
Does anyone have that version?
I have MetaQuotes-Demo giving out maximum MT5 -1755

MetaQuotes-BSE - similar.

 

Result: no match

template<typename T>
    string _typename( T ) { return typename( T ); }
class A {};
void OnStart()
{
    A* const a = NULL;
    Print( _typename( a )    ==    typename( a ) );
}

Result: false

Expected: true

 
A100:

Result: no match

Result: false

Expected: true

There is no error. You should have written this

string _typename( T& ) { return typename( T ); }
 
fxsaber:

There is no error. You should have written this

It is a different code with addition of &

You might as well replace A* with int and write that there is no error with int

template<typename T>
    string _typename( T ) { return typename( T ); }
class A {};
void OnStart()
{
     A* const a = NULL;
    int const b = NULL;                             //Результат:
    Print( _typename( a )    ==    typename( a ) ); // false
    Print( _typename( b )    ==    typename( b ) ); // true
}
What's the difference?
 

Compilation error

class A {};
                     void f1( A* const ) {}
template<typename T> void f2( T  const ) {}
void OnStart()
{
    int i;
    A  *a;
    f1( a ); //нормально
    f2( i ); //нормально
    f2( a ); //Error: 'f2' - cannot to apply function template
}
 

PositionSelectByTicket

Selects an open position for further handling on the specified ticket. Returns true on successful completion of the function. Returns false if the function fails. Call theGetLastError() function to get information about the error.

bool  PositionSelectByTicket(
   ulong   ticket     // тикет позиции
   );

Parameters

ticket

[The ticket of the position.

Returned value

Value of bool type.

Note

The PositionSelectByTicket() function copies the data about a position to the program environment, and subsequent calls toPositionGetDouble(),PositionGetInteger()andPositionGetString() return the previously copied data. This means that the position itself may no longer exist (or it may have changed in volume, direction, etc.), but the data of this position can still be retrieved. In order to guarantee the receipt of fresh position data, it is recommended to call the PositionSelect() function immediately before calling for it.

Error in the Documentation. It should be PositionSelectByTicket in the highlighted place. Even moderators get confused because of this typo.

Документация по MQL5: Торговые функции / PositionSelectByTicket
Документация по MQL5: Торговые функции / PositionSelectByTicket
  • www.mql5.com
Выбирает открытую позицию для дальнейшей работы с ней по указанному тикету. Возвращает true при успешном завершении функции. Возвращает false при неудачном завершении функции. Чтобы получить информацию об ошибке, необходимо вызвать функцию GetLastError(). Функция PositionSelectByTicket() копирует данные о позиции в программное окружение, и...
 
the message system has disappeared from the profiles, is this correct ?
 
Vladimir Pastushak:
the message system has disappeared from the profiles, is this correct ?

From MQ's point of view, apparently correctly. As always, they decided for us what was more convenient.