Download MetaTrader 5

Examples: Transferring an Indicator Code into an Expert Advisor Code. Indicator Structure

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
190142
MetaQuotes Software Corp.  

New article Transferring an Indicator Code into an Expert Advisor Code. Indicator Structure has been published:

This article dwells on the ways of transferring an indicator code into an Expert Advisor Code and on writing Expert Advisors with no calling to custom indicators, and with the whole program code for the calculation of necessary indicator values inside the Expert Advisor. This article gives a general scheme of an indicator structure, emulation of indicator buffers in an Expert Advisor and substitution of the function IndicatorCounted(). The article is intended for readers, already having experience of programming in MQL4 language.

Author: Nikolay Kositsin

MQL4 Comments
16316
MQL4 Comments  

Hi,

Pardon my question as I'm still new to MQL4 .

Why all this pain of conversion from indicator to EA when we can use icustom to "insert" the indicator into EA?

What are the disadvantages of doing this?

omar_askary
43
omar_askary  

Thank you Nikolay for your very good article and the information disclosed. I myself have problems with an indicator that I have written which works very well on the chart. However, it returns totally wrong values when called from an EA. I hope that I will be able to solve the problem after digesting your article.

However, I am a bit confused regarding the solutions that you suggest. There are two examples of solutions: IndicatorPlan1 and IndicatorPlan2. What is the difference? Which one is the final solutions. Also, I am not sure I understand what you suggest. Should one paste the indicator code inside the EA? This would make the EA very complex and cumbersome. I would rather be able to call the custom indicator from inside the EA using "iCustom". Can you please elaborate on that and on how to use it in combination with an EA?

Thanks again

Omar 

To add comments, please log in or register