Errors, bugs, questions - page 1329

 

When I switched from Russian to English and restarted the terminal, the "cancel" button was still written in Russian. Win XP SP3

 

Can't overload

class A {};
void f( const A& ) { Print( 1 ); } //1:
void f(       A& ) { Print( 2 ); } //2:
void OnStart()
{
              A a1;
        const A a2;
        f( a1 ); // ошибка компиляции
        f( a2 ); // нормально, вызывается 1: f( const A& )
         
}

What prevents you from calling 2: f( A& ) where there is an error ?

The pointers are overloaded normally

void f( const A* ) { Print( 1 ); }
void f(       A* ) { Print( 2 ); }
void OnStart()
{
              A *a1;
        const A *a2;
        f( a1 ); //нормально
        f( a2 ); //нормально
}
 

Compilation error

void g( int&  array[] ) { Print( __FUNCTION__); }
void h( long& array[] ) { Print( __FUNCTION__); }
template<typename T>
void f( T& t[] )
{
        if (      typename( T ) == "int"  ) g( t ); //Ошибка: parameter conversion not allowed
        else if ( typename( T ) == "long" )  h( t ); //Ошибка: parameter conversion not allowed
}
void OnStart()
{
        int  i[ 1 ];
        long j[ 1 ];
        f( j );
        f( i );
}

but otherwise

void g( int  array ) { Print( __FUNCTION__); }
void h( long array ) { Print( __FUNCTION__); }
template<typename T>
void f( T t )
{
        if (      typename( T ) == "int"  ) g( t );
        else if ( typename( T ) == "long" ) h( t );
}
void OnStart()
{
        int  i;
        long j;
        f( j );
        f( i );
}
OK
 
Vladimir Zubov:

When I switched from Russian to English, with a restart of the terminal, the "undo" button remained written in Russian. Win XP SP3

This is because the wind is Russian. System buttons are signed by the system itself in its own language
 
Vladimir Zubov:
Does that mean that if the EA uses the standard indicator call, it also "hello"?

No.

This is purely an interface glitch.

 
A100:

Compilation error

otherwise

ok
Per post 1769811: that's right, you should use explicit specialization of function templates here. Unfortunately it's not currently supported by the compiler, but implementation is in the plans.
Явная специализация шаблонов функций
Явная специализация шаблонов функций
  • msdn.microsoft.com
Используя шаблон функции, можно указать особое поведение для определенного типа, предоставив явную специализацию (переопределение) шаблона функции для этого типа.
 

Good afternoon, can you please guide the nouveau. I use MT5 not for trading, but as a source of some "random" data (and don't even ask why - not my whim). Is it possible to obtain historical data measured in ticks (I need bid and ask data several times per second). What should I do? I know that when testing an indicator MT5 pumps out data - how to use this ?

I have a task to write a custom indicator that sends current ticks to a certain service (no problem). I haven't found anywhere how to get historical data in ticks and not in M1.

 
iZer0:

Good afternoon, can you please guide the nouveau. I use MT5 not for trading, but as a source of some "random" data (and don't even ask why - not my whim). Is it possible to obtain historical data measured in ticks (I need bid and ask data several times per second). What should I do? I know that when testing an indicator MT5 pumps out data - how to use this ?

I have a task to write a custom indicator that sends current ticks to a certain service (no problem). I haven't found anywhere how to get historical data in ticks and not in M1.

CopyTicks(_Symbol,tick_array,COPY_TICKS_ALL,0,ticks);
.
 
pako:
Thanks for the tip. But the description says to get the ticks for the working session of the terminal. How to get real historical data (assuming, of course, that the provider provides them with the right level of detail). Please tell me if this data is downloaded by the terminal itself? (to essentially take it from him). What determines the depth of historical data ?
 
iZer0:
You will only get bid and ask prices (at the moment) if you collect them yourself (write them into a file). CoruTiscs only returns 2000 ticks.
Reason: