Max Enrik:
Hi,
How can I combine two 'if' Operators?
My purpose 'Special sets...' will apply two 'if' Operators.
Best
// Main Operator
if( a == b && c == 0 )
ObjectCreate( str name, int type=OBJ_VLINE, int window, dtt time1, dbl price1 );
else
// Special sets which one I want to set all my Object Vertical Lines
ObjectSet( str name, int index, dbl value );
...
// This Operator which one I want to appropriation above Special Sets...
if( d && e && c == 0 )
ObjectCreate( str name, int type=OBJ_VLINE, int window, dtt time1, dbl price1 );
if( a == b && c == 0 )
ObjectCreate( str name, int type=OBJ_VLINE, int window, dtt time1, dbl price1 );
else
// Special sets which one I want to set all my Object Vertical Lines
ObjectSet( str name, int index, dbl value );
...
// This Operator which one I want to appropriation above Special Sets...
if( d && e && c == 0 )
ObjectCreate( str name, int type=OBJ_VLINE, int window, dtt time1, dbl price1 );
Please see ternary operator:

Documentation on MQL5: Language Basics / Operators / Ternary Operator ?:
- www.mql5.com
Language Basics / Operators / Ternary Operator ?: - Reference on algorithmic/automated trading language for MetaTrader 5
Big thanks, that helped me a lot.

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
Hi,
How can I combine two 'if' Operators?
My purpose 'Special sets...' will apply two 'if' Operators.
Best
if( a == b && c == 0 )
ObjectCreate( str name, int type=OBJ_VLINE, int window, dtt time1, dbl price1 );
else
// Special sets which one I want to set all my Object Vertical Lines
ObjectSet( str name, int index, dbl value );
...
// This Operator which one I want to appropriation above Special Sets...
if( d && e && c == 0 )
ObjectCreate( str name, int type=OBJ_VLINE, int window, dtt time1, dbl price1 );