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
- 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 "::".
int IndicHandle;
IndicHandle=iCustom(NULL,PERIOD_CURRENT,"::Indicators\\indicator.ex5", inputofindicator1, inputofindicator2, inputofindicator3, inputofindicator4, inputofindicator5);
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?