Errors, bugs, questions - page 2742

 
fxsaber:
What flags and pitfalls may there be if from one MQL-program something must be appended to the file (RAM-drive) all the time, and from the others (and another terminal) to read from the same it read all this appended data?

data safety should be ensured, but I think there are at least 2 problems:

- no guaranteed synchronisation during simultaneous access, i.e. it is possible to re-read already read data and at the same time prevent new data from being written - collisions

- there is no means to detect and control such a situation

as usual - semaphores or write your own write manager

ZS: it seems there is an opportunity to put in memory embedded SQLite, at least there to control the state of the database can

 
Alexey Kozitsyn:

In Five, the indicators work similarly, but everything is normal, without freezing.

No, in Five the indicators are in the tool flow.

 
Bug MT5 (build 2340) no access to default operator= from pointer object.

class A{
public:
   char data;
   
   // uncomment to fix the bug
   //void operator=(A &a){this.data = a.data;}
};


// bypassing the bug
template<typename P1, typename P2>
void unref_assignment_operator(P1* &p1, P2* &p2){
   struct Functor{
      static void call(P1 &p1, P2 &p2){
         p1 = p2;
      }
   };
   Functor::call(p1, p2);
}

   
void OnStart(){      
   A a1;
   A a2;
   
   a2.data = 0x1;
   a1 = a2;
   printf("%d", (a1.data));               // Ok, 0x1
   
   
   A* a_ptr_1 = &a1;
   A* a_ptr_2 = &a2;
   
   a2.data = 0x2;
   a1.operator=(a2);                      //'operator=' - undeclared identifier 
   printf("%d", (a1.data));               
   
   
   a2.data = 0x3;
   unref_assignment_operator(a_ptr_1, a_ptr_2); 
   printf("%d", (a1.data));               // Ok, 0x3
}
 

Please fix the bug- MT terminal crashes when trying to debug a static structure function.
Even in the example above, if you catch a breakpoint on the line "
p1 = p2;" it will crash the terminal.

 
Andrey Khatimlianskii:

No, in Five the indicators are in the tool flow.

I'm sorry, I'm confused. I was just thinking that this is the behaviour in Quaternary (i.e. as in Quaternary - in the tool flow).

And where is it written about the common interface thread for MT4 indicators?

Added:

Indicator

All indicators share the resources of graphic interface thread

An infinite loop in one indicator will stop the work of terminal


Thanks for the tip, found it.

Then the debugger was not originally thought out in MT4. They would have prohibited to call it for indicators at least.

 

I don't know exactly where to report the bug... I will try to report it here. The essence of the problem on MT5: when using chart scaling via "+" or "-" buttons, the chart does not return to its normal position (indented from the right edge of the screen). I have to return it manually all the time.

On MT4 there is no such problem. I checked it with several brokers...

After pressing the "+"


Very uncomfortable... Can we fix it?

 
Alexey Kozitsyn:

Then it turns out that the debugger was not originally designed in MT4. At least they would have prohibited to call it for indicators.

But it was not there from the beginning. So they didn't think it through.

 
Roman Agafonkin:

I don't know exactly where to report the bug... I will try to report it here. The essence of the problem on MT5: when using chart scaling via "+" or "-" buttons, the chart does not return to its normal position (indented from the right edge of the screen). I have to return it manually all the time.

On MT4 there is no such problem. I checked it with several brokers...


Very uncomfortable... Can we fix it?

When using scaling the indentation returns to its normal state on the next incoming tick.

 
SEM:

If scaling is used, the indent returns to normal on the next incoming tick.

That's the thing, it doesn't... on mt4 it's fine... on mt5 - alas, it's glitchy...
OK, I'll shoot a video and add it to this thread.