Ayuda para obtener datos de indicador para hacer un EA en MT4

To add comments, please log in or register
Angel Antonio Martinez Velasquez
260

Hola a todos


Disculpen la molestia


Quisiera saber si me pueden ayudar a obtener los datos de el indicador personalizado que adjunto, para agregar un filtro a mi EA.

Me ha servido mucho ya que identifica las tendencias de otras temporalidades basado en una MA con período común, y lo que quiero es utilizarlo como filtro de tendencia para mi EA.


Actualmente me he basado en la ayuda de MT4 para hacer esto: "Trend1 = iCustom (NULL,PERIOD_CURRENT,"TrendLines",1,1);"

No sé cómo llamar esos datos para poder hacer el filtro.


¿Me pueden ayudar por favor?

Hello everyone


Sorry to bother you


I would like to know if you can help me obtain the data from the custom indicator that I attached, to add a filter to my EA.

It has helped me a lot because it identifies the trends of other temporalities based on an MA with a common period, and what I want is to use it as a trend filter for my EA.


I have currently relied on the help of MT4 to do this: "Trend1 = iCustom (NULL, PERIOD_CURRENT," TrendLines ", 1.1);"

I do not know how to call that data to be able to do the filter.


Can you help me, please?

Files:
R87.FX
66
R87.FX  

iCustom is how you access custom indicator information from EAs. You would need to input all the parameters of the indicator so yours would have a few more arguments.  Something like this:

Trend1=iCustom(NULL,0,"Trendlines",9,1,3,3,1,0,0);   

(It looks like some of the indicator settings are line colors.  I'm not sure if you would need to include those as well... they wouldn't have any effect on the EA, but since the options are there, iCustom may be expecting them to be specified.)

But I see one BIG problems you will probably need to handle first.  EA's collect information from indicators via indicator buffers, which are basically built-in arrays that store all the indicator values for each bar.  Your indicator is only drawing information, not storing the values because it has no buffers.  Once you add the buffers you will be able to look at the indicator value for any bar (the last value specified in iCustom), and at any buffer (the value of the second-to-last specified value of iCustom) which in your case would be the values of the various time-frame plots .

Take a look at an indicator you know well and see how the values for each bar are shown in the data-window.  These are the buffers at work - then take a look at the source code to see how they are being stored.

Angel Antonio Martinez Velasquez
260
Angel Antonio Martinez Velasquez  
R87.FX:

iCustom is how you access custom indicator information from EAs. You would need to input all the parameters of the indicator so yours would have a few more arguments.  Something like this:

(It looks like some of the indicator settings are line colors.  I'm not sure if you would need to include those as well... they wouldn't have any effect on the EA, but since the options are there, iCustom may be expecting them to be specified.)

But I see one BIG problems you will probably need to handle first.  EA's collect information from indicators via indicator buffers, which are basically built-in arrays that store all the indicator values for each bar.  Your indicator is only drawing information, not storing the values because it has no buffers.  Once you add the buffers you will be able to look at the indicator value for any bar (the last value specified in iCustom), and at any buffer (the value of the second-to-last specified value of iCustom) which in your case would be the values of the various time-frame plots .

Take a look at an indicator you know well and see how the values for each bar are shown in the data-window.  These are the buffers at work - then take a look at the source code to see how they are being stored.

Thanks a lot, I review it

To add comments, please log in or register