distress:
Hi,
I'm not sure I'm able to explain:
I'm trying to do some tests and I need to choose beetween && and || operator fore some conditions.
For example: which do give best result beetwen:
- if ( (condition1)&&(condition2) ) { ordersend...}
- if ( (condition 1) || (condition2) ) { ordersend... }
Is there any way tu put the operator into a boolean input, so that the user can choose beetwen && or ||, and try an optimization?
So what, just do it.
input bool make_your_choice = true; // true => && , false => || if(make_your_choice){ if ( (condition1)&&(condition2) ) { ordersend...} } else { if ( (condition 1) || (condition2) ) { ordersend... } }
Otherwise is it possibile ti "print" mql code ad in PHP, so that you could put the oeprator into a viaribale and print its value according to user input?
enum Test { EitherCondition, BothConditions }; input Test test = EitherCondition; : if( test == BothConditions ? (condition1 && condition2) : (condition1 || condition2) ) { ordersend... }

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,
I'm not sure I'm able to explain:
I'm trying to do some tests and I need to choose beetween && and || operator fore some conditions.
For example: which do give best result beetwen:
- if ( (condition1)&&(condition2) ) { ordersend...}
- if ( (condition 1) || (condition2) ) { ordersend... }
Is there any way tu put the operator into a boolean input, so that the user can choose beetwen && or ||, and try an optimization?
Otherwise is it possibile ti "print" mql code ad in PHP, so that you could put the oeprator into a viaribale and print its value according to user input?
Hope have explained in my bad english...thanks!!!
Max