- make EA from an Indicator
- Need help for iCustom function
- Code EA using Arrows from customer indicator
cape1354: Please recommend a place where you can view the codes using the icustom function, instead of the manual.
| Just get the value of the indicator. You should write a self documenting function instead of calling iCustom directly, see Detailed explanation of iCustom - MQL4 forum |
int IndicHandle;
IndicHandle=iCustom(NULL,PERIOD_CURRENT,"::Indicators\\indicator.ex5", inputofindicator1, inputofindicator2, inputofindicator3, inputofindicator4, inputofindicator5);
In MQL5, you do it that way :
int IndicHandle;
IndicHandle=iCustom(NULL,PERIOD_CURRENT,"::Indicators\\indicator.ex5", inputofindicator1, inputofindicator2, inputofindicator3, inputofindicator4, inputofindicator5);
Hello
how can i do this in mq4 ?
-
Perhaps you should read the manual. iCustom - Technical Indicators - MQL4 Reference
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up. -
The use of resources is identical.
Use the publicly released code - MQL5 programming forum (2017)
Resources - MQL4 ReferenceBe aware that using resources is 40x times slower than using CIs directly.
A custom indicator as a resource - MQL4 programming forum (2019)Also make use there are no spaces in the path.
Getting error 4802 when loading custom indicator that loads another custom indicator with iCustom - Technical Indicators - MQL5 programming forum. (2020.07.21)
My coder is having some difficulty, when he references the indicator inside the EA it opens on the chart.
Any indicator embedded as a resource will behave exactly the same as if they were used normally from an external source. There is no difference.
What dictates how the indicator is displayed, either on the main chart or in the sub window, is the use for one the following two indicator properties within the indicator's code.
Only one is valid at a time ...
#property indicator_chart_window // Show the indicator in the chart window#property indicator_separate_window // Show the indicator in a separate window
EDIT: However, if the inductor uses the primary format of OnCalculate for MQL5 indicators ...
int OnCalculate( const int rates_total, // price[] array size const int prev_calculated, // number of handled bars at the previous call const int begin, // index number in the price[] array meaningful data starts from const double& price[] // array of values for calculation );
... then that indicator can be applied to another indicator and it will be displayed on the same window as the source indicator, be it the main or sub window (e.g. applying a moving average to the RSI or volume indicator). This is also the same behaviour even if it were not a resource. There is no difference.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use