How do you programmatically distinguish between a PROFESSIONAL fetus and a DILIETAN fetus? - page 5

 
tell me who was the original author of Lucky?
 

The task was originally formulated as an evaluation of the programmer's professionalism, not the quality of the product. I think the semantics may not be touched here, it's enough to analyze the style.

And who says that Dmitry is looking for the grail, and not the best MQL4-coder of all time? :)

 

I also think it's a hopeless task,

But as it seems to me - one of the signs of professionalism is a style of code, which, figuratively speaking, "performs the entire volume of unprofessional code in one line"!

But as you understand, it is impossible to check this: it is impossible to compare the incomparable, and the volume is different.

And then at the same time there is a question for professionals. Long time ago I was looking through one code and could not understand - I have never seen such an entry in mq4. I have found it - it is a function:

bool IsEntryTime()
{
  datetime tm0 = TimeCurrent();
  datetime tm1 = StrToTime(TimeToStr(tm0, TIME_DATE) + " " + StartTime);
  datetime tm2 = StrToTime(TimeToStr(tm0, TIME_DATE) + " " + StopTime);

  bool isTm = false; 
  if (tm1 <= tm2) 
    isTm = isTm || (tm1 <= tm0 && tm0 < tm2); //булевой переменной "isTm" присваиваются сравнивающие значения в правой части выражения. Такое можно делать? Что обозначают тогда: ||, <=, &&, <?
  else
    isTm = isTm || (tm1 <= tm0 || tm0 < tm2);
  
  return (isTm);
}

Explain, if you can, please.

 
peco:

I also think it's a hopeless task,

But as it seems to me - one of the signs of professionalism is a style of code, which, figuratively speaking, "performs the entire volume of unprofessional code in one line"!

But as you understand, it is impossible to check this: it is impossible to compare the incomparable, and the volume is different.

And then at the same time there is a question for professionals. Long time ago I was looking through one code and could not understand - I have never seen such an entry in mq4. I have found it - it is a function:

Explain, if you can, please.

get the brackets right
 
peco:

I also think it's a hopeless task,

But as it seems to me - one of the signs of professionalism is a style of code, which, figuratively speaking, "performs the entire volume of unprofessional code in one line"!

But as you understand, it is impossible to check this: it is impossible to compare the incomparable, and the volume is different.

And then at the same time there is a question for professionals. Long time ago I was looking through one code and could not understand - I have never seen such an entry in mq4. I have found it - it is a function:

Explain, if you can, please.


The code is retarded. Maybe the developer is good, but he doesn't think about optimization and testing
 
ruslanchik:
bracket correctly


and I thought it was some sort of bitwise operation))))
 
Vinin:

Apparently not enough code has been written. Any code that was made more than half a year ago becomes alien (not really of course). But you have to think

It is the poorly documented code that becomes alien.


Another thing is that most of the code is not documented.

 
I studied from the sources of Renat and Rashid and Slava (Stringo) .... and a little bit of Sergei Kovalev... and realized that problems should only be detected with prints ... or (alerts)
 
peco:

and I thought it was some sort of bitwise operation))))
No, it's not the best way to determine whether the current time point belongs to the allowed time interval (trade).
 
ruslanchik:
I studied from the sources of Renat and Rashid and Slava (Stringo) .... and a little bit of Sergei Kovalev... and realized that problems should only be detected with prints ... or (alerts)
... or speculatively, after zeroing, looking at the code as if it were someone else's:)