Do I need mql4 code to create ea?

 
Hi, 
I have a indicator as ex4 file and I want to create a EA based on it. It's an indicator which shows me arrow to buy or sell. Do I need to have it's mql4 code to create EA related with that ? Is there any way / sample code by which I can use that indicator's ex4 itself  to create EA ?


 
No, you do not need the indicator's mq4 code to create an EA based on it. You only have to call the indicator using the iCustom function Regards.
iCustom - Technical Indicators - MQL4 Reference
iCustom - Technical Indicators - MQL4 Reference
  • docs.mql4.com
[in]  Custom indicator compiled program name, relative to the root indicators directory (MQL4/Indicators/). If the indicator is located in subdirectory, for example, in MQL4/Indicators/ The passed parameters and their order must correspond with the declaration order and the type of extern variables of the custom indicator...
 
See my example for encapsulating calls
          Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum
 
Jose Francisco Casado Fernandez:
No, you do not need the indicator's mq4 code to create an EA based on it. You only have to call the indicator using the iCustom function Regards.

you need it Only if the indicator has no buffers or you don't know its buffers.
 
Ahmed Soliman:

Yes, but generally almost all indicators have buffers, especially those that give buy and sell signals by drawing arrows (which is the type of indicator the OP has described).

So it can be assumed that it will have buffers. The answer was in general terms. On the other hand, it is usually quite easy to deduce how many buffers it have and to which each one corresponds
(just look at the Data Window)

Regards.

Reason: