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
When writing a MT4 library is there a means programtically of determing whether the code is being called from an Expert, Script or Indicator?
For example...
void some_function() {
if (IsScript() == TRUE) {
// Do some script stuff...
}
else
if (IsExpert() == TRUE) {
// Do some expert stuff...
}
else {
// Must be an indicator then so do some expert stuff...
}
}
Obviously there aren't any MQL functions called IsScript() or IsExpert() but I would like to know if it is possible to write code that essentially does the same as the example above.
Regards,
Laurence.