Features of the mql5 language, subtleties and tricks - page 214
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
I haven't come across an entry like that before.
Use it)))
Use it))))
Vladimir, where do you get schemes like this?, I was helped then, in my topic on finding bars, minimal cycle, is there a ready-made image somewhere? I am self-taught, in a different profile originally
just putting logic circuits together like that, adding up, scrolling through cycles...Well, that's a fierce bug. Example:
The memory is allocated, the destructor is called when it is released (which is a hint of the expected behaviour according to RAII), but the constructor is forgotten to be called when the object is created)))
This is the 2nd {} error.
Forum on trading, automated trading systems and strategy testing
Peculiarities of mql5, tips and tricks
A100, 2021.11.16 13:43
F5 hangs. Also, it's a contradictory workaround
Reminder: 1st with hovering, 3rd with union
Take advantage)))
Vladimir, where do you get such schemes?, I was helped then, in my topic on searching for bars, by a minimum cycle, are there ready-made images somewhere? I am self-taught, in a different profile originally
just put together logic circuits, add them up, scroll through cycles...Don't use something like this, out of the ready-made, without understanding. With such records, if you need something a little more complicated than here, bugs, not always easy to find, you can fill up in a jiffy))))
Don't use something like this, off-the-shelf, without understanding. With such records, if you need something a bit more complex than here, you can make bugs, not always easy to find, in a blink of an eye)))
your searches for bars, were with enumerations and templates))
i put the templates off for almost ever, but i got into them in about an hour.
took them out of the code, along with the enumerations, you probably had a more serious task to use them
--
add
it's all on the forum, just thank you.
Well, that's a fierce bug. Example:
The memory is allocated, the destructor is called when releasing it (which hints at the expected behaviour according to RAII), but the constructor is forgotten to be called when creating an object)))
Thanks for the post.
Corrected.
This code will cause a compilation error since the initialization sequences in MQL are still incomplete.
For structures, initialization by sequence is not replaced by constructor call with related parameters - we're planning to add this (it's postponed indefinitely for now, but some new code has "leaked" into production).
@A100
Forum on trading, automated trading systems and trading strategies testing
Peculiarities of mql5, tips and tricks
A100, 2021.11.16 13:43
It makes no sense because:
F5 hangs up. Also, this is a contradictory workaround.
Forum on trading, automated trading systems and trading strategies testing
Peculiarities of mql5, tips and tricks
fxsaber, 2021.11.17 02:07
Forum on trading, automated trading systems and trading strategies testing
Peculiarities of mql5, tips and tricks
A100, 2021.11.17 02:20
You made the 4th error yourself. Why is ZeroMemory worse than {} ? That is, we have some unsanctioned mechanism of access to private that the compiler cannot detect for some reason.
Are you reckoning that the Developers won't fix it? Once upon a time, the compilerwouldn't react toZeroMemory either.
If you recall that mql was spawned from C++, both of these examples (their counterparts) work well there, because these classes don't have constructors (i.e. an implicit constructor):
Example in C++:
So if there are no const fields in the structure /class, then the logic is correct.
I haven't seen such a record before.
I looked at my research in MQL5, it may be worse, I even pump up the history in the indicator by several TFs:
I can write a lot of things in the for statement ))))