Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I'm not quite understand about how ternary operator works and that's why I'm asking if it's possible to achieve what I want using ternary operator.
either way thanks for all the help.
if it's possible to achieve what I want using ternary operator
"Is it possible to read a book upside down?" - It's possible, but very inconvenient.
The best way to avoid passing a lot of parameters is to pass an object (structure or class) by reference.
The best way to avoid passing a lot of parameters is to pass an object (structure or class) by reference.
One of the simplest ways:
When using a switch, it will not be difficult for you to add another timeframe (unlike using the ternary operator):
This is one of the easiest ways. Then you can complicate this as you want (use methods/constructors/initializing sequences/return a pointer/...)
Here is the appropriate use of the ternary operator:
This is better than like this:
And using multiple ternary operators in one expression only brings unnecessary difficulties and inconvenience