is there a way to know if the code is running under script, indicator or EA

 

code is resides in library, how can know if a script/indicator or EA is running it?

Thanks

 
thecoder2000:

code is resides in library, how can know if a script/indicator or EA is running it?

Thanks

Try calling MQLInfoInteger(MQL_PROGRAM_TYPE)