You can use macro definition to solve the issue, for example:
#define Condition2 (Condition1==true&&Indic[2]<Indic[1]&&Indic[1]>Indic[0])The drawback is that you can not modify "Condition2" in the code because it's not a variable anymore.
Hello, this boolean always returns false (even when conditions are satisfy).
Do you think I have to use if or is there a proper way to declare such expression ? (I have plenty of boolean).
Thank you,
With if : (works)
(not sure it is the right place to post question like this one.
I really like the www.mql5.com website :)
Vivaldi
Hi,
Both methods are equivalents. My opinion is you have other problem if results differ.
You can also post your question about programming in Expert Advisors and Automated Trading but there is no problem to post here.
angevoyageur:
Both methods are equivalents. My opinion is you have other problem if results differ.
I wasn't sure both method are correct. So ok it is clear now. It must be local and global declaration that makes the difference. In the second case I declare bool as a global variable.
Thank you forex2start for the idea.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, this boolean always returns false (even when conditions are satisfy).
Do you think I have to use if or is there a proper way to declare such expression ? (I have plenty of boolean).
Thank you,
With if : (works)
(not sure it is the right place to post question like this one.
I really like the www.mql5.com website :)
Vivaldi