Errors, bugs, questions - page 2322

 
Igor Makanu:

and you have already "multiplied" the variable, hereCBandit(int number_of_features) variable int number_of_features will already be created, or rather not a variable, but a copy of this variable value, so what you write CBandit(int number_of_features_my), what you leave as you will not change anything, and the compiler specifically gives a warning, because.because by describingCBandit(int number_of_features) you have closed the scope

private:

int number_of_features;

and maybe you should get this int number_of_features; in the CBandit() method, or maybe not, the compiler keeps track of this

I mean, you don't have to give them different names. In C++ you can do it like this

just a warning is a nuisance.

 
Maxim Dmitrievsky:

I mean, so as not to have different names. In C++ you can do this

It's ok everywhere, but it depends on the compiler manufacturer and its settings - to issue or not to issue vorning, imho, the compiler does everything correctly, it's not worth your trouble to add 1 letter to method description, and it will help someone if scope is closed, for example - if someone without understanding the matter, connect .mqh, and maybe inherit and there will be a similar situation, imho, everything is correct.

SZZ: describe in a class how you want a function, and describe the body of the method itself, everything will be as you want it in terms of clarity and will be handled correctly, the compiler keeps track only of the types of variables when you call functions, but not of the names:

class tst
  {
private:
   int               number_of_features;

public:
   void              CBandit(int number_of_features);
  };
//+------------------------------------------------------------------+
//|     tst::CBandit(int number_of_features_my)                      |
//+------------------------------------------------------------------+
tst::CBandit(int number_of_features_my)
  {
   this.number_of_features=number_of_features_my;
  }
 
Igor Makanu:

everywhere it is possible, but it depends on the compiler manufacturer and settings - to issue or not to issue vorning, imho, all correctly compiler does, it does not cost you 1 letter in method description, and it helps someone if scope is closed, as an example - if someone without understanding the matter will connect .mqh, and maybe inherit and there will be similar situation, imho, all is correct

SZZ: describe in a class how you want a function, and the body of the method you describe so, everything will be as you want it will be understandable and processed correctly, the compiler keeps track only of the types of variables when you call functions, but not the names:

well, yes, that's what I do... it's not a big deal) I was just asking

 
fxsaber:

The cache works.

What cache? From where? I ran it on one TF, and then, just to check, I ran it on another one (just to prevent the cache from working) and got another result. What does this have to do with the cache?

 
Сергей Таболин:

What cache? Where from? I ran it on one TF, then, just to check, I ran it on another one (just to make sure the cache didn't work) and got a different result. What does this have to do with the cache?

Most likely you need to use FILE_SHARE flags. Because opening/writing a file can happen at the same time.

 
fxsaber:

Most likely the FILE_SHARE flags should be used. Because opening/writing a file can happen at the same time.

Changed it.

int      filehandle  = FileOpen(filename,FILE_WRITE|FILE_READ|FILE_SHARE_WRITE|FILE_SHARE_READ|FILE_BIN|FILE_COMMON);

Didn't help. 1 - M30, 2 - H4.

And in both cases fewer valid choices are found. (1956)

 
Сергей Таболин:

Changed it.

Didn't help. 1 - M30, 2 - H4

And in both cases less than the allowed options are found. (1956)

Unfortunately, without code to reproduce it is not possible to speak constructively.

 
fxsaber:

Unfortunately, you can't talk constructively without the code to reproduce it.

The code is given here and here.

 

Dear developers!

Will the problem of long activation of own remote agents be solved?

"

2018.11.11 16:40:02.769 FX_09 occupied by another terminal

"

Optimisation has not been done before for 12 hours, no public resource sale access for the agent.

 

Why are there non-zero stop levels on the MQ-Beta? It's an ancient thing.


ZZY I'm even more convinced that TC research should only be done on custom symbols. After all, those stop/freeze levels have nothing to do with market patterns. But those stops sometimes create such huge distortions that the tester just starts to lie with its result.