As a programmer of some decades experience, believe me ... simple is best. Do *NOT* try to minimise the number of lines of code.
When you come back to code next year or month (or week or day, even), you can forget what you were doing. Having a long chain of A == B || C == D || E == F can make maintenance difficult when you find a bug, or want an enhancement.
So use separate 'if' statements, unless the criteria are extremely related ( like say EMA5 > EMA9 || EMA7 < EMA11 )
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.
if (VariableA == VariableB && VariableC == VariableD > VariableX)
{
bool CriteraMet = true;
}
wrong again
supposed to be
As a programmer of some decades experience, believe me ... simple is best. Do *NOT* try to minimise the number of lines of code.
When you come back to code next year or month (or week or day, even), you can forget what you were doing. Having a long chain of A == B || C == D || E == F can make maintenance difficult when you find a bug, or want an enhancement.
So use separate 'if' statements, unless the criteria are extremely related ( like say EMA5 > EMA9 || EMA7 < EMA11 )
As a programmer of some decades experience, believe me ... simple is best. Do *NOT* try to minimise the number of lines of code.
When you come back to code next year or month (or week or day, even), you can forget what you were doing.