OOP, templates and macros in mql5, subtleties and uses - page 16
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
well there you go, you've destroyed all the poetic spirit, in prose it's not hard, it's like that:
))))
So what's the point of poems that break your tongue to read? )
Oh, Inber! Ah, Inber!
What eyes, what a forehead!
I'd keep looking, I'd keep looking,
I'd love to see her!
So why bother reading poems that break your tongue? )
Ah Inber! Ah Inber!
What eyes, what a forehead!
I'd keep looking, I'd keep looking,
I'd love to look at her!
thank you... on brandu ground, I notice myself getting carried away and can't stop ))))
You're right, I always try to write code I will be able to read in a few months (the trendy is self-documenting code), I rarely write comments, mostly at the stage of development of general code structure, when I know what I want I don't write comments anymore
In general I already wrote a generator of "string multiplication" (with your "magic knocks" ))) ), now we can go further
I'm aware of that, I've never had any practice, that's why the studying is so slow (((
I have made a video reel once with new defines in MQL4, they seem to be identical to MQL5 defines, so it may be helpful to know them. ) I have watched it and some things are outdated, or I was unaware of them five years ago. In particular, there are built-in defines of what we compile under.
I once made a video on new defines in MQL4, they seem to be identical to MQL5 defines, might be useful for acquaintance. )
I've looked, no, not that, I already knew this level of macros 20 years ago... I've got stuck at this level because I've never needed to use them.
ZS: lately, if I've got used to macros I can't understand but I still want to see how they work, I run the GCC compiler at the command line with the -E option , works like clockwork - the output is code after the preprocessor ;)
I looked it up, no, that's not it, I already knew this level of macros 20 years ago... I'm basically stuck at that level as I've never needed to use them.
ZS: lately, if I've got used to not understand a macro and I still find it interesting to look how it works, I start the GCC compiler at the command line with option -E , it works like clockwork - in the output code after the preprocessor ;)
Well, if you can stand to see it through to the end, I don't know what to say. There is nothing complicated about the examples given by colleagues.
Well, if you've made it through to the end, I don't know what to say. There is nothing complicated about the examples given by your colleagues.
they have examples from nested macros, in your video, about the same material as in MQL help or any book on C++ for beginners ;)
they have examples from nested macros, in your video, about the same material as in MQL help or any book on C++ for beginners ;)
That's how I made this video for beginners. And I also know how to do nesting, in my childhood I easily assembled matryoshka doll without taking a clue. Like kalash))
I want to write a library on mql4, the functions described in the library will apply templates, the library will also contain macros, is it possible to connect these functions and macros to the main file in which the robot is written? I also have one more question: why I don't know why bars are indexed from right to left (it's called time series in Help). I figured out that the zero bar goes first, then it is overwritten, and then it is the second, then it is overwritten again, and the third one is overwritten again and it just makes the work more complicated.
How do you write the bars by default, does it write from right to left or does it write to the end and we have to figure out how to write it from right to left or left to right.
Guys, I want to write a macro called makros(a) and it will work like this: if a equals 1, the macro will return any int value, if a equals 2, the macro will return any double value, if a equals 3, the macro will return any bool value. Is it possible to do this?
do macros return values?