Errors, bugs, questions - page 2896

 
fxsaber:

Couldn't find any statistics on the Marketplace. So a question for sellers of cross-platform products.

Do MT5 versions really sell better than MT4?

You can take Freelance as a basis, lately more and more work under mt5

Time goes by fast (very fast), so really you have to take the mt5 as a reference point. It's like a pendulum - it swings a long time, but then you can't stop, which you can already see.

 
You need to be able to print out the text of the macros.
#define OnTick OnTick2


The log needs to be output

OnTick = OnTick2


Does the language allow you to do this?

 
fxsaber:
You need to be able to print the text of macros.

The log needs to be output

Does the language allow you to do this?

It depends on what language? C++ allows it because macros work properly there and you can build any expression you need (unlike MQL). Although I remember that you repeatedly tried to prove the opposite

#ifdef __cplusplus
#define  MACRO1(X)	#X "=" MACRO2(X)
#define  MACRO2(X)	#X
void OnStart()
{
        printf( "%s", MACRO1( OnTick ));
}
#endif

Result: OnTick = OnTick2

 
A100:

Does it depend on which one? C++ allows, because macros work properly there and you can build any expression you want (unlike MQL). Although I remember that you repeatedly tried to prove the opposite

Result: OnTick = OnTick2.

Thank you. This may be corrected.

 
fxsaber:

Thank you. Perhaps they will.

If they did, they would have corrected it long ago - I wrote about it many times before in one form or another - here is the latest message

Forum on trading, automated trading systems and testing of trading strategies

Bugs, bugs, questions

A100, 2020.07.30 02:25

I think it's not even the priority but fundamentally wrong macro sequence:

and it was expected to be OK - as in C++

Forum on trading, automated trading systems and testing trading strategies

Errors, bugs, questions

A100, 2020.07.30 10:53

In C++ macros are designed in such a way that any requisite result can be projected, while in MQL it turns out that not any result can be projected



 
Is this a bug or should it be?
// Находим крипт-методы, в которых не работает шифрование с ключем.

void OnStart()
{  
  const string Str = "Hello World!"; // Строка, которую будем шифровать/дешивровывать.

  uchar BytesStr[];

  StringToCharArray(Str, BytesStr); // Перевели строку в байты
  
  uchar KeyDecode[];
  uchar KeyEncode[];
    
  StringToCharArray("qwer", KeyDecode); // Задали код для шифровки
  StringToCharArray("asdf", KeyEncode); // Задали ДРУГОЙ код для расшифровки
    
  for (int i = 0; i < 8; i++) // Перебираем все штатный методы шифровки
  {
    const ENUM_CRYPT_METHOD Method = (ENUM_CRYPT_METHOD)i; // Текущий метод шифровки
    
    uchar BytesDecode[];
    uchar BytesEncode[];    
    
    CryptEncode(Method, BytesStr, KeyEncode, BytesEncode);    // Зашифровали
    CryptDecode(Method, BytesEncode, KeyDecode, BytesDecode); // Расшифровали
    
    Print("Crypt method " + EnumToString(Method) + " is bug - " + (string)(CharArrayToString(BytesDecode) == Str)); // Сообщаем о наличии/отсутствии бага.
  }
}


Result.

        Crypt method CRYPT_BASE64 is bug - true
        Crypt method CRYPT_AES128 is bug - false
        Crypt method CRYPT_AES256 is bug - false
        Crypt method CRYPT_DES is bug - false
        Crypt method CRYPT_HASH_SHA1 is bug - false
        Crypt method CRYPT_HASH_SHA256 is bug - false
        Crypt method CRYPT_HASH_MD5 is bug - false
        Crypt method CRYPT_ARCH_ZIP is bug - true


Encryption forCRYPT_BASE64 andCRYPT_ARCH_ZIP does not work.

 
fxsaber:

Couldn't find any statistics on the Marketplace. So a question for sellers of cross-platform products.

Do MT5 versions really sell better than MT4?

Not at the moment, rather than yes. But there is a trend towards 5, of course.

 

fxsaber:
Это баг или так и должно быть?

Encryption for CRYPT_BASE64 and CRYPT_ARCH_ZIP does not work.

They have combined fundamentally different methods into one function - that's why it seems like a bug

Therecannot be any key in CRYPT_BASE64

 
fxsaber:

Are the MT5 versions really selling better than MT4?

definitely not. but while there used to be an order of magnitude difference, now the numbers are more comparable

 
A100:

Different methods are combined into one function in principle - that's why it looks like a bug

Therecannot be any key in CRYPT_BASE64 in principle

Thank you. It turns out that the problem is only in ZIP.

Reason: