Errors, bugs, questions - page 2445

 
fxsaber:

No, it is ex5 that gets the hash in opt. For this reason, recompilation resets the tester's cache.

Then developers will not help, write your own code analyzer.

 
fxsaber:

No, it is ex5 that gets the hash in opt. This is the reason why recompiling resets the tester cache.

Not exactly.

Not every recompilation of Expert Advisor resets the tester's cache.

If the Expert Advisor has dependent components: libraries, custom indicators, and/or dll, hashes of those components are mixed in with the hash of the Expert Advisor.

How the EA hash is calculated and where it is stored in the EA is one of the technological secrets.

That's why I told you right away: "No".

 
fxsaber:

indeed:

  1. we put the mql file into a uchar array
  2. delete comments //... и /* ... */
  3. remove all the spaces, tabs, line feeds, even all the brackets and quotes
  4. from what is left read the hash

The first approximation will work fine.

Of course, if you change the variable (function) name or add a new unused variable, change the order, etc., hash will change, although the logic is not. Controlling these things is already mega complicated. It's like writing your own linker.

 
Slava:

How the hash of the EA is considered, where it is stored in the EA, is one of the technological secrets.

That's why I told you right away: "No".

The point is that there was no request to give an MD5 hash. You need any hash of the native code. For example, the sum of every third byte.

If this sum is different, then with a huge probability, the Expert Advisor (logic - native code) has changed.


I.e., quite simply! Unfortunately, there is no such mechanism at the moment.

 
Nikolai Semko:

Controlling these things is already mega complicated. It's like writing your own linker.

That's why I'm talking about a simple solution.

 

Do the developers have anything to say on this topic?

https://smart-lab.ru/blog/535490.php

Черный вторник для одного трейдера в Открытии
Черный вторник для одного трейдера в Открытии
  • smart-lab.ru
Привет коллегам по цеху. Поднимите пожалуйста пост в топ, если не затруднит. Случилась одна неожиданная история, как говорится прилетело откуда не ждал. Сегодня ночью на NLMK-9.19 некто, пожелавший остаться неизвестным (на данный момент), слил или перелил 420000 рублей по четырем маркет сделкам 100,35,20,10 контрактов на счете в Открытии...
 
fxsaber:

That's why I'm talking about a simple solution.

Well then you need a competent argument for MQ.
What is it for? How and in what cases can it enhance mql capabilities? And not just to satisfy a personal whim.
It's not clear to me personally at the moment why the program needs to know that it's been changed. In what tasks can it be useful? If it is even needed for something, then obtaining hash from mql-code after deleting "superfluous" is good enough. And it really takes no more than 20 lines of code.

All the more, even if MQ will go along and give out such a hash for public use, he still changes such a hash will not guarantee that the logic has been changed. For example when changing the sequence of something.

 

Accidentally updated - it's not working again - compilation error:

#define  MACRO1
#define  MACRO2(x, y)    y
#define  MACRO3          MACRO2(&, MACRO1)
class A {};
void f( A* ) { Print( 1 ); }
void f( A& ) { Print( 2 ); }
void OnStart()
{
        A a;
        f( MACRO3 a ); //Error: '&' - operand expected
}

It was fine before (build 1961)

 

Here too - now (build 2025) there is an error:

#define  MACRO1( x )
#define  MACRO2          MACRO1( y ) void
#import "any.dll"
        MACRO2 f(); //Error: '(' - expressions are not allowed on a global scope
#import

And before (build 1961) it was fine

 

Help me solve this problem. How can I get normal characters to be transmitted instead of the ones I have now?


Reason: