Errors, bugs, questions - page 1061

 
// Наследование по умолчанию приватное. И в С++ и в mql
public наследование можно не указывать, оно по умолчанию
It's not good. If you started to copy C++, you should copy it exactly, and in this case you mislead respected programmers. After all, this is the only difference between a class and a structure - inheritance by default
 
Eufemio:

This is bad, if you started to copy C++, you should copy exactly, but in this way you mislead respected programmers.

Apparently, it was left over from times immemorial when the decision to move to C++ had not yet become "party policy".

Now inheritance is private by default like C++.

Well, that's the only difference between a class and a structure - inheritance by default.


Well, it's not exactly so. I, for instance, can name three more differences at a glance
 

Silent:

MetaDriver:

I agree.

A "command" to forcibly null all prev_calculated for the selected symbol would also be useful. With the subsequent generation of a tick would be a good combination.

Oh!

Write what the sd says?

Found such a command:

        MqlRates R[1];
        CopyRates(ChartSymbol(id),ChartPeriod(id),50000000,1,R);  // Обращение к бару 138-летней давности (на минутках)...:)

Exactly zeroizes all prev_calculated and causes generation of tick. Tweak: it does it twice in a row, which is unnecessary, but it works flawlessly. :)
 
MetaDriver, I've already patented this bug :)
 
MetaDriver:

Such a team is found:

It resets all prev_calculated and causes generation of a tick. Tweak: it does this twice in a row, which is really unnecessary, but it works flawlessly. :)
Thanks. I'm managing with a timer for now, but I think it'll come in handy :)
 
Roffild:
MetaDriver, I've already patented this bug :)
Shh! Do not say it is a bug. They will fix it, but will not give you anything in return.
 
Silent:
Shh! Don't say it's a bug. They'll fix it, but they won't give you anything in return.

There's no one there, everyone's at the airport to meet some prick from Japan.

:)

 
Using this bug leads to consequences like this...
 

Please tell me (or give me a link) how to make it so that when optimising for a certain combination of input parameters, the test is not performed.

For example, there are parameters A and B, where start=10, step=5, end=30. At that, if B<=A, then test has no sense, e.g. at B=10 and A=15 we don't need test.

P.S.: found a solution.

 

Installed MetaTrader 5 Agents Manager Build 842 on VPS, but can't connect to the cloud.