Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 576

 
Please tell me, this may seem inappropriate question, but have you ever met an Expert Advisor that trades by candlestick patterns?
 
Profitov:
Please tell me, this may seem inappropriate question, but have you ever met an Expert Advisor that trades by candlestick patterns?

Yes, I have :) I am working in this direction only. In general, you went to the wrong place. If you want to learn, you have to ask.
 

I have the following question. It concerns, as I understand it, the layout of the code before compilation. The gist is this:

I have all the libraries, as it turns out, written separately. Each library has its own inclusion file, which is included in the Expert Advisor code or in another library, if you want to add a library. Here it's the same as usual.

I have written one library that is, as I would say, basic, but is also very commonly used. In general, some functions of this library are used by some libraries and some are used by others. The header file of this library has relatively many global variables. I am interested in this point. If I link this library to different libraries, each of which needs only some functions of this library, the linker will somehow optimize the code? Or the whole library will be added to those libraries where I imported it?

 
hoz:

I have a question ...

The question seems to have already been asked a few months ago. You can only get a normal answer from the developers, as the specifics and language of task management are known only to them. Below are my speculations.

The mechanism of dynamic loading of library functions - DLL, does not imply dynamic unloading of them.

Any function in the dynamic call library is loaded at the moment of referring to it (the function).

If loading a function implies loading some environment(global variables), then I see no other simple solution than to load the entire library.

If a library function in DLL calls a function from another library with the same features, the latter will be loaded completely.

Now comes the fun part.

Only developers will be able to answer: what happens if the above sequence of function calls is repeated.

My recommendation: never use global variables in library functions and don't read Soviet newspapers at breakfast.

 
tara:

The question seems to have been asked a few months ago. A normal answer can only be obtained from the developers, as the specifics and language of task management are known only to them. Below are my speculations.

The mechanism of dynamic loading of library functions - DLL, does not imply a dynamic unloading of them.

Any function in the dynamic call library is loaded at the moment of referring to it (the function).

If loading a function implies loading some environment(global variables), then I see no other simple solution than to load the entire library.

If a library function in a DLL calls a function from another library with the same features, the latter will be loaded completely.

Now comes the fun part.

Only developers will be able to answer: what happens if the above sequence of function calls is repeated.

My recommendation: never use global variables in library functions and don't read Soviet newspapers at breakfast.

A library is unloaded when the thread that called that library terminates, if there is no other mechanism for holding the library. For example, with a call counter.

Global variables are evil :-) It's better never to use them.

 

Good afternoon,

I am testing the robots in the tester and I get random closing of positions followed by their opening, what do these swap entries in the test results mean? I'm getting all my martingale going to hell because of it :)

107 2014.04.01 17:19 sell 54 1.23 1.38105 1.38204 1.37891 0.00 9664.86

108 2014.04.02 00:00 swap close 54 1.23 1.37934 1.38204 1.37891 210.33 9875.19

109 2014.04.02 00:00 swap open 55 1.23 1.37934 1.38204 1.37891 0.00 9875.19

110 2014.04.02 08:31 s/l 55 1.23 1.38204 1.38204 1.37891 -332.10 9543.09


 
Zhunko:

A library is unloaded when the thread that called that library terminates, if there is no other mechanism for holding the library. For example, with a call counter.

Global variables are evil :-) It's better never to use them.


Then how are such issues handled? Let's say there is a list of variables which are used in different libraries. Take, for instance, variable bi_Err which contains the last error. It turns out that without a global variable, I have to declare the same variable in each library and handle the analog of the bi_Err variable. And there are plenty of such variables. So the question was posed because it turns out that without using global variables in such cases, in each library, where such variables are used, I have to declare these variables (which are now global), and the values of these variables through the parameters of functions, which use these variables.

It turns out that instead of declaring these variables globally once, I have to declare them in each library separately. And this does not really make sense.

 
hoz:

Met... their own :) That's pretty much all I'm dripping with. In general, you've got the wrong direction. If you want to learn, ask...

Thank you, that's what I want to ask where to start digging in this direction as you are already working in the same direction.
 
Profitov:

Thank you, that's what I want to ask where to start digging in this direction as you are already working in the same direction.

I don't quite understand the reason for the question. Regarding the algorithm, it's your choice. As for the code, there is nothing complicated there. The candlesticks have their high, low, open and close price. And when you have this data, you can get any other market data, including Fibo levels, if necessary.
 

The documentation says so, and the articles on the subject say so too:

Если при создании класса путем наследования используется ключевое слово public, это означает, что открытые и закрытые члены базового класса будут наследованы как открытые и закрытые члены класса-потомка. Если используется ключевое слово protected, то открытые и закрытые члены базового класса будут наследованы как закрытые члены класса-потомка.

I don't quite understand this. If, for example, the public keyword is used, then the public and private members of the base class will be inherited as public and private members of the descendant class What does this mean? How does it affect the inherited class? Or does it influence only libraries and any other methods in general, that will address the methods of the given inherited class via the object?