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'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