Download MetaTrader 5

Exists a Function to Know Whether a Class ia used by an Indicator, Expert or a Script?

To add comments, please log in or register
All MQL5.community events are grouped together. Have a look at the Wall!
Carl Schreiber
6588
Carl Schreiber 2017.01.11 18:50 

Hi,

Am I correct, that there is no function or system-variable that tells a class whether it is called by an indicator, expert or a script?

Ex Ovo Omnia
3151
Ex Ovo Omnia 2017.01.11 19:18  
Carl Schreiber:

Hi,

Am I correct, that there is no function or system-variable that tells a class whether it is called by an indicator, expert or a script?

I guess the MQLInfoInteger with MQL_PROGRAM_TYPE is what you look for.
MQLInfoInteger - Checkup - MQL4 Reference
MQLInfoInteger - Checkup - MQL4 Reference
  • docs.mql4.com
MQLInfoInteger - Checkup - MQL4 Reference
Carl Schreiber
6588
Carl Schreiber 2017.01.11 19:52  
Ovo Cz:
I guess the MQLInfoInteger with MQL_PROGRAM_TYPE is what you look for.

Thanks - didn't know that!

It's a bit confusing, some information you get by __FILE__, __FUNCTION__, .. some like WindowsExpertName() and some by the function: MQLInfoInteger().

Its obviously an indication for a developing system.. ;)

MQLInfoInteger - Checkup - MQL4 Reference
MQLInfoInteger - Checkup - MQL4 Reference
  • docs.mql4.com
MQLInfoInteger - Checkup - MQL4 Reference
Blahtech Limited
4081
James Cater 2017.01.11 20:53  
Carl Schreiber:

Thanks - didn't know that!

It's a bit confusing, some information you get by __FILE__, __FUNCTION__, .. some like WindowsExpertName() and some by the function: MQLInfoInteger().

Its obviously an indication for a developing system.. ;)

Not really, __FILE__ __FUNCTION__ are carry overs from the C pre-processor. Anything else is MT stuff that should be accessed by Info functions at runtime
To add comments, please log in or register