Download MetaTrader 5
To add comments, please log in or register
Order a robot or an indicator for MetaTrader. The Freelance service will help you!
Carl Schreiber
6345
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?

Ovo Cz
3039
Ovo Cz 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
6345
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
3731
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