Build EA ex5 file with indicators included

 
Hi,

I would like to embed some custom indicators in an expert advisor, that means, compile the EA and indicators code altogether.

I've already seen some EAs with this functionality, by which it's possible to add custom indicators to charts depending on the settings and those are also shown at the Indicators List, allowing us to change the input parameters as well. Everything from one single ex5 file.

I couldn't figure out a way of doing that, since including code seems not to be the right way.

It would be something like linking a number of compiled objects to form a single executable file.

One workaround would be to insert the indicator file as a binary array and save a copy when needed, but I'm wondering if there's another way of doing that.

Thanks in advance.

 
Antonio Guglielmi:
Hi,

I would like to embed some custom indicators in an expert advisor, that means, compile the EA and indicators code altogether.

I've already seen some EAs with this functionality, by which it's possible to add custom indicators to charts depending on the settings and those are also shown at the Indicators List, allowing us to change the input parameters as well. Everything from one single ex5 file.

I couldn't figure out a way of doing that, since including code seems not to be the right way.

It would be something like linking a number of compiled objects to form a single executable file.

One workaround would be to insert the indicator file as a binary array and save a copy when needed, but I'm wondering if there's another way of doing that.

Thanks in advance.


You need to include it as a resource
 

Thank you very much Nicholishen!

Now it's clear to me.

Just to add a reference to the topic, I will leave this link:

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

Best regards,

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...