If conatains Help

 

double Target;
if(StringFind(AccountName(),"Smart")  Target == 1; 

Is it possible to use the if function with the contains combination? Alternatively, I can ask for a formula correction
 
if( StringFind( AccountName(), "Smart" ) >= 0 )  {
  // found "Smart" so do something about it
} else {
  // did not find "Smart" so do something about it
};
 

StringFind

Search for a substring in a string

StringFind - String Functions - MQL4 Reference
StringFind - String Functions - MQL4 Reference
  • docs.mql4.com
StringFind - String Functions - MQL4 Reference
 
thank you very much, perfect, have a nice weekend