Errors, bugs, questions - page 1177
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello. Can you tell me why when I query the properties of a trendline, the variable res is always true, although I manually set the flag to show only W1, or only MN1?
It needs to be shown only on one of the halves.
...get... - is getting properties. And if res=true, it is only an indication of successful property fetching.
To set the properties, use ...set...
As a continuation of my previous post, I managed to find the problem area causing the bug using the scientific method.
We have such a library with the function:
Here is the main file:
The resulting Expert Advisor does not work and displays in the log: "EX5 loading failed".
Hello. Can you tell me why the variable res is always true when requesting the trendline properties, although I manually set the flag to show only W1, or only MN1?
I want it to be shown only on one of the halves.
That's true, but does it mean that with each new bar all the last "indexes" of the given buffers must be "cleaned"? The question is why? In MT4 there was no such a situation, I understand, during the initialization I had cleaned it, but then it should be done by MT itself, by the same token, in the initialization it should be done by MT and not by the programmer, for what purpose the indicator buffer is simply a memory allocation I do not quite understand...
When I asked this question a few years ago, I was told that it was for optimisation purposes. You initialise exactly as much as you need. And if you fill in some calculation data right away, you don't need to pre-write zeros at all. MT5 is different from MT4 in many ways.
Incorrect number of parameters, you are calling the function as 1 option and you should be calling it as 2 or comparing the result.
Tried it this way. Although, real flags work (line is shown only on one timeframe), Expert Advisor sees that both flags are enabled.
What do you actually want? You are asking for visibility on weekly OR monthly timeframes. So the program will return true if at least one of them is on.
Request it separately in 2 calls.
Tried it this way too. Although real flags work (line only shows on one half) and EA sees that both flags are enabled.
So maybe you need to set the visibility directly?
Hello. Can you tell me why the variable res is always true when requesting the trendline properties, although I manually set the flag to show only W1, or only MN1?
I want it to be shown only on one of the halves.
So maybe you need to set the visibility directly?