If conatains Help
if( StringFind( AccountName(), "Smart" ) >= 0 ) { // found "Smart" so do something about it } else { // did not find "Smart" so do something about it };
| Search for a substring in a string |
StringFind - String Functions - MQL4 Reference
- docs.mql4.com
StringFind - String Functions - MQL4 Reference
thank you very much, perfect, have a nice weekend
double Target;
Is it possible to use the if function with the contains combination? Alternatively, I can ask for a formula correctionif(StringFind(AccountName(),"Smart") Target == 1;