Errors, bugs, questions - page 2681

 

Hello colleagues.

I may not be the first to ask this question. I wrote to another thread, but I haven't received a reply from the developers. Why is it that the real pip value at XAUUSD is 1USD?

The SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE) function persistently shows 0.1USD

And how to count drawdown, profit, and other things, while the currency pairs shows the normal value of the tick.

Z.I. MT5 terminal

 
Andrey Kaunov:

Hello colleagues.

I may not be the first to ask this question. I wrote to another thread, but I haven't received a reply from the developers. Why is it that the real pip value at XAUUSD is 1USD?

The SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE) function persistently shows 0.1USD

And how to count drawdown, profit, and other things, while the currency pairs shows the normal value of the tick.

Z.U. Terminal MT5

You should ask your broker, this data is filled in by the broker...

 
MT5 bug (build 2366), compilation error when accessing astatic method of a class that is accessed via a template function argument type.

template<typename _Tp>
struct It_g{
   class Opt{
      template<typename _It>
      static void test(_It &it){               
         _Tp p = it.p;                  
      };
   };
   
   _Tp p;
};

template<typename _Tp>
class V{
public:
   struct It : public  It_g<_Tp>{};
   It b;
};


template<typename T>
class GetStructType{
public:
   struct type : public T{};
};

template<typename _It>
void test(_It &it){
   GetStructType<_It>::type::Opt::test(it);   // Ok
   
   _It::Opt opt;
   opt.test(it);                              // Ok
   
   _It::Opt::test(it);                        // '_It' is not a class, struct or union | 'Opt' is not a class, struct or union
}

class ClassA{};


void OnStart(){ 
   V<int> v1;
   test(v1.b);
   
   V<ClassA*> v2;
   test(v2.b);
   
   V<int>::It it3;
   test(it3);
   
   V<ClassA*>::It it4;
   test(it4);
}
 
Bug MT5 (build 2366), compile bug due to incorrect use of namespace and scope in template constructor when calling the base class.
The problem occurs when the same class name is used: in global namespace, in internal class, and when inherited as a base class.

template<typename T>
struct B{
   char data;
   
   B(){}
   B(int){}
};


template<typename T>
class A{
public:
   struct __reverse_iterator : public B<T>{
      __reverse_iterator() : B<T>(1){}                 // Ok
      
      template<typename TT>
      __reverse_iterator(const TT& n) : B<T>(n){}      //'<' - template mismatch
   };
   
   struct B : public __reverse_iterator{
      B() : __reverse_iterator(){}
      B(int n) : __reverse_iterator(n){}
   };
};

   
void OnStart(){  
   A<int>::B it_1();      // Ok
   A<int>::B it_2(1);     // Compile Error
}


In C++, everything works by explicitly referring to the global namespace. C++ online:https://onlinegdb.com/BJIV6frUI
In MQL this cannot be done - Compile Error, bug in internal class definition - no possibility to explicitly reference to global namespace when specifying a base class(not fixed in MT5(build 2366)).

There is also a problem in constructor when calling the base class which is related to the bug presented earlier -https://www.mql5.com/ru/forum/1111/page2680#comment_15546487.
Please note that it "works" both with namespace and with internal classes.

 
Vladimir Pastushak:

You should ask your broker, it's the broker who fills in the data...

I see, thank you Vladimir.

 

Does the tumbler not work in the tester? - didn't find anything on this issue in the help.

MarketBookAdd (Symbol ()) subscribes to the glass and gives true, but OnBookEvent event (const string &symbol) doesn't come once during the whole test.

 
Andrey Dik:

Does the tumbler not work in the tester? - didn't find anything on this issue in the help.

MarketBookAdd (Symbol ()) subscribes to the glass and gives true, but OnBookEvent event (const string &symbol) doesn't come once in the whole test.

It doesn't work. And there is no history of the cup.

 

can anyone tell me what the 533 error is?

assumed the version where compiled is newer - asked to update. didn't help.

 
Igor Zakharov:

can anyone tell me what the 533 error is?

assumed the version where compiled is newer - asked to update. didn't help.

The integrity of ex5 is broken.

Where did you get this ex5 from?

Ilyas will be able to answer in more detail if you send him this expert

Ilyas
Ilyas
  • www.mql5.com
Профиль трейдера
 
Slava:

The integrity of ex5 has been compromised.

Where did you get this ex5 from?

Ilyas will be able to answer in more detail, if you send him this expert

I compiled it in build 2361. on the terminal where it was compiled - it works. i skype it to another person to try it (without source) - error 533.

I can't send it back to him, so I uploaded 2366 and recompiled it again (with the same name).

added: skype saved it. will send it.

added2: recompiling to 2366 causes the same error. I have sent the source and compiled to Ilyas.