Check if custom indicators exist's

 
How can I check, if the custom indicator exists??
 
Call iCustom, check GetLastError. Probably ERR_CUSTOM_INDICATOR_ERROR 4055 Custom indicator error.
 
William Roeder:
Call iCustom, check GetLastError. Probably ERR_CUSTOM_INDICATOR_ERROR 4055 Custom indicator error.

If loading failed, GetLastError() will return 4072, not ERR_CUSTOM_INDICATOR_ERROR 4055. Just in case you can use this code:

// Make call
double value = iCustom(Symbol(), Period() "IndiNameHere", buffer, shift);
     
// If failed
if(value == 0)
{
         // Err code
         int err = GetLastError();
         
         // Print error
         if(err == ERR_CUSTOM_INDICATOR_ERROR || err == 4072)
         {
            Print("[ERROR] Could not find custom indicator");
            return(0);
         } 
}
 

The Indicators folder is located outside the file sandbox, and you cannot check for a file using standard tools

in the absence of an indicator in the log will be an error as written above

to avoid this error, you can connect as a resource

https://www.mql5.com/en/docs/runtime/resources

Documentation on MQL5: MQL5 programs / Resources
Documentation on MQL5: MQL5 programs / Resources
  • www.mql5.com
//| Calls standard OrderSend() and plays a sound                     | The example shows how to play sounds from files 'Ok.wav' and 'timeout.wav', which are included into the standard terminal package. These files are located in the folder is a folder, from which the MetaTrader 5 Client Terminal is started. The location of the terminal...