Calling on a custom indicator?

 

So I have a custom indicator, A .mq5 file.

 How would I call on it in my EA to use it?

Do I add it as an include file and use the iCustom function? 

 
Reilly Gailey:

So I have a custom indicator, A .mq5 file.

 How would I call on it in my EA to use it?

Do I add it as an include file and use the iCustom function? 

save it as an indicator.  You should search on mql5 before posting a question.  There are numerous examples well written on this website.  Here is one for you.  

How to call indicators in MQL5
How to call indicators in MQL5
  • 2010.03.12
  • KlimMalgin
  • www.mql5.com
With new version of MQL programming language available not only the approach of dealing with indicators have changed, but there are also new ways of how to create indicators. Furthermore, you have additional flexibility working with indicator's buffers - now you can specify the desired direction of indexing and get exactly as many indicator's values as you want. This article explains the basic methods of calling indicators and retrieving data from the indicator's buffers.
 
Kaleem Haider:

save it as an indicator.  You should search on mql5 before posting a question.  There are numerous examples well written on this website.  Here is one for you.  


Ive already read this one but it seems I missed abit of it. Re-read it I think this will be all I need to figure it out, Thanks much appreciated

 
In MQL5, you do it that way :

#resource "\\Indicators\\indicator.ex5" //include the indicator in your file for convenience

int IndicHandle;
IndicHandle=iCustom(NULL,PERIOD_CURRENT,"::Indicators\\indicator.ex5", inputofindicator1, inputofindicator2, inputofindicator3, inputofindicator4, inputofindicator5);
If you don't want to include the custom indicator in your code, you simply specify the path to the indicator without "::".
Reason: