The third method is similar to iCustom, however, I add the indicators to my ea(s) as #resource(s). In past it was shown to be method to avoid much of issues that can be caused by slow ticks and no ticks. Am not clear if modern mt4/5 have the same issues today tho. Either way, my terminals are not laggy as they once were once I started doing it. Only downside is that it might take a few seconds longer to load several charts, and extra use of memory. But that is not an issue for me.
I don't use resources to add an indicator.
https://www.mql5.com/ru/forum/357579/page6#comment_21310421
you may need to translate this page. But I do as it says: have much of my include and resource files in same directory as my ea for compilation. This eliminated the slower reading of the resource files. But I do not know if this still applies to current, modern mt4/5 anymore. It would be great to see a modern thread by someone that tests that this issue still applies today.

- 2021.03.11
- Valeriy Yastremskiy
- www.mql5.com
you may need to translate this page. But I do as it says: have much of my include and resource files in same directory as my ea for compilation. This eliminated the slower reading of the resource files. But I do not know if this still applies to current, modern mt4/5 anymore. It would be great to see a modern thread by someone that tests that this issue still applies today.
I don't know about MQL4 (because I no longer use it and also it only gets critical updates), but on MQL5, the issue no longer exists for quite some time now.
Passing parameters for example, which can be a source of error if you don't include the version with the correct parameters for the inputs.
I have not done any tests with a #resource, but I do not see how the indicator errors will appear and if they appear in the error log
Thanks for your feedback, but I think I'll stick with my icustom()
Have a nice weekend
You still use iCustom() with a resource. The only difference between the two is that the indicator is either embedded or external. There are no other differences.
Your reasoning of it having parameter problems or the wrong version is totally illogical. In fact, it is the external indicator that can have the wrong version or even, be a completely different indicator, or be a corrupted file, or even be missing.
The resource however, is embedded at compile time, so as long as you verified it a compile time, it cannot be substituted by the wrong indicator or anything else.
So, please make sure you do proper research, so that you don't post such illogical reasoning.
EDIT: Also, please learn the difference between using an indicator as a resource and doing indicator calculations within the EA logic. They are two completely different concepts. Please don't mix them up.
Gerard Willia G J B M Dinh Sy: Unless I'm mistaken, the article does not mention that the indicators are designed to handle multi-threading, much better than EA. Which will slow it down as it is optimized to react to the tick....
Indicators are never multi-threaded. In fact an Indicator shares a single thread with all other indicators for the symbol, while each EAs has a dedicated single thread.

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Good morning
Apparently there are two ways to code indicators for EAs.
The first, put all the indicator code in the EA code.
The second, put the indicator code in an indicator and call it via icustom() or CreateIndicator()
I am clearly in favor of creating the indicators in an indicator and making an icustom() for the EA.
For reference I would cite this article which talks about this subject
https://www.mql5.com/en/articles/10606
Unless I'm mistaken, the article does not mention that the indicators are designed to handle multi-threading, much better than EA.
Which will slow it down as it is optimized to react to the tick....
and other benefits.
The indicator in the EA is counterproductive