Don't try to do that. There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)
Just get the value(s) of the indicator(s) into EA/indicator (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 programming forum #33 2017.05.23
Don't try to do that. There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)
Just get the value(s) of the indicator(s) into EA/indicator (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 programming forum #33 2017.05.23
I understand the process of using the iCustom,,but i learnt that if you want to write an EA for sale on mql, iCustom function is not allowed which means you have to write a code that does the indicator calculations manually so that it is saved into a buffer and indexed whenever the data's are needed.Hiw are they able to do that?
Look up resources in the documentation.
Look up resources in the documentation.
- Ridwan Icus: iCustom function is not allowed which means you have to write a code that does the indicator calculations manually so that it is saved into a buffer and indexed whenever the data's are needed.
You've changed your original question. (and thus wasted our time).
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem - Ridwan Icus: I have tried that also,,but it would be nice if you can direct me to the one that solves the problem.
Do or do not, there is no "tried" to add a resource.
iCustom is allowed, but it won't work unless the indicator is on the target machine. The indicator isn't part of your product. Therefor product can't use it except when running on your machine. Why does this surprise you when you try to use the cloud or Market Validation?
You do not have to write "indicator calculations manually." That will not work as already stated (#1).
"One" what that solves the problem?
Just embed the other indicator(s) inside your indicator/EA. Add the CI(s) to your code as a resource.
Use the publicly released code - MQL5 programming forum 2017.02.20
Resources - MQL4 Reference
Be aware that using resources is 40x times slower than using CIs directly.
A custom indicator as a resource - MQL4 programming forum 2019.11.26
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.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
What i did initialy was use the iCustom function to return the value of the last two shift of the indie,,
Now i m gonna need to write a calculations that would do exactly that on an expert Advisor i.e it would calculate the values of each bars and stores them in an array where i can i ndex the last two indie values. working on this but it seems im walking around circles.
So,,i need your assistance on this, Thanks.