Any questions from a PROFI to a SUPER PROFI - 1. - page 5

 
abolk:


Every newcomer sees himself as a future pro and super-professional.

the idea of a new branch, it seems to me, has not justified itself

A beginner is a beginner in Africa.

And here: everyone who asks a question is a self-definition pro, everyone who answers is a super pro, and everyone who is a foo-foo (like me) is a flooder.

 
tara:

A beginner is a beginner, after all.

And here: everyone who asks a question is a self-definition pro, everyone who answers is a super, and everyone who is a fluffer (like me) is a fluffer.

Would it be better to answer my question? Has anyone managed a terminal from a remote process?
 
Zhunko:
Would it be better to answer my question? Has anyone managed the terminal from a remote process?
I haven't, but I think the problem is restriction/allocation of access.
 

Why do the two scripts work differently when loaded from a remote process?

#include <ServicesMT4.mqh>
void start()
 {
  Sleep(1000);
  ServiceInit(NULL);
  Comment("Библиотека \"ServicesMT4.dll\" инициализирована.");
  Sleep(7200000);
 }
#include <ServicesMT4.mqh>
void start()
 {
  ServiceInit(NULL);
  Comment("Библиотека \"ServicesMT4.dll\" инициализирована.");
  Sleep(7200000);
 }
The first works fine and the second hangs up the terminal.
 
tara:
What do you mean, hangs up?
It hangs. The MT4 interface doesn't react to anything and doesn't update. The process stops.
 
I wonder what was going on at that second.
 
abolk:

every newcomer sees himself as a future pro and super pro.
the idea of a new branch, it seems to me, did not justify itself

I do not share the pessimism. The purpose was to separate a branch for questions above a certain level, it is enough at the beginning. After that, a post mortem will show. Perhaps it will become a club open for all to read for "seasoned old timers", that's not a bad option either. Only a parade of ambition and intemperance in discussion could sink it.
 
Zhunko:
It hangs. MT4 interface doesn't react to anything and doesn't update. Process stops.

Deadlock according to symptoms. Apparently when starting from a remote process, the terminal does not have time to execute some procedure. Maybe the script is running from the wrong thread.

Alternatively instead of slip run a tick event -- i.e. do an asynchronous script emulation, should help.

 

Objective: To uniquely identify an instance of a class by its unique ID, preferably of long type. The unique ID should be formed considering uniqueness of values of variables included in the class.

Example:

class sample{
   double param1;
   int    param2;
   int    param3;
   string info;
   ...
   long GetId();
}

sample A;
sample B;

A.param1=1.2394;
A.param2=35;
A.param3=2;
A.info="A sample";

B.param1=1.234;
B.param2=2;
B.param3=35;
B.info="B sample";

// Например должен показать тип (long)1283047539
Print(A.GetID);

// Например должен показать тип (long)3948201837
Print(B.GetID);

GetID results will only match if all parameter values are absolutely equal.

GetID should transparently work with any number of parameters and their types. It would also be great (though unlikely) if its implementation were at base class level.

 
C-4:

Problem: you need to uniquely identify an instance of a class by its unique ID, preferably of long type. The unique ID should be formed considering uniqueness of values of variables included in the class.

Example:

GetID results will only match if all parameter values are absolutely equal.

Is GetID dynamic?

more precisely, who creates the class ID?