Ashish Kulkarni:
Hi guys,
I have following code:
I have also tried StringCompare(trend, "BUY") == 0.
Neither work.
Can you please advise how to compare strings in mql?
Cheers,
Ash.
Like you did, provided than 'trend' is a string variable that could be equal to "BUY".
if (StringCompare(trend, "BUY") == 0) { ... }works fine for me. I think there is a bug somewhere different in your code.
Use the debugger or print out your variables,
and
find out why.
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 guys,
I have following code:
I have also tried StringCompare(trend, "BUY") == 0.
Neither work.
Can you please advise how to compare strings in mql?
Cheers,
Ash.