¿Cómo codificar? - página 209

 

Hola a todos...

puede alguien mostrarme cómo empezar a codificar indicadores y EA

 
kessing:
Hola a todos... puede alguien mostrarme cómo empezar a codificar indicadores y EA

Hola,

Mira aquí: https://www.mql5.com/en/forum/172969/page2

 
kessing:
Hola a todos... puede alguien mostrarme cómo empezar a codificar indicadores y EA

Lee este hilo (primer post): https://www.mql5.com/en/forum/178706

y este hilo: https://www.mql5.com/en/forum/173290

 
kessing:
Hola a todos... ¿alguien puede mostrarme cómo empezar a codificar indicadores y EA

Hay mucha información tanto aquí como en FF. También puedes hacer una búsqueda en Google.

Para una fácil introducción a la programación de EA echa un vistazo al enlace en mi sig. Es un buen lugar para empezar para un programador novato.

Buena suerte.

Lux

 
 

Indicador a EA

Hola a todos,

Me gustaría pedir ayuda a cualquier persona que puede hacer que la EA de la explosión de Waddah Attar adjunto.

Espero escuchar la respuesta.

Gracias.

-s-

Archivos adjuntos:
 

ea universal Ma 2 cross

¡Hola amigos!

estoy buscando modificar este ea de firedave (de este foro)

el ea se llama "universal ma cross ea"

lo que quiero crear es un ea que entre en 2 cruces confirmados (por ejemplo un par de ema 2 & 4 y otro par de ema 5 & 20)

este es el codigo principal, ¿que debo hacer?

//----------------------- ESTABLECER EL VALOR DE LA VARIABLE

if(ConfirmedOnEntry==true)

{

if(CheckTime==iTime(NULL,TimeFrame,0)) return(0); else CheckTime = iTime(NULL,TimeFrame,0);

FastMACurrent = iMA(NULL,TimeFrame,FastMAPeriod,FastMAshift,FastMAType,FastMAPrice,1);

SlowMACurrent = iMA(NULL,TimeFrame,SlowMAPeriod,SlowMAshift,SlowMAType,SlowMAPrice,1);

}

else

{

FastMACurrent = iMA(NULL,TimeFrame,FastMAPeriod,FastMAshift,FastMAType,FastMAPrice,0);

SlowMACurrent = iMA(NULL,TimeFrame,SlowMAPeriod,SlowMAshift,SlowMAType,SlowMAPrice,0);

}

CrossDirection = subCrossDirection(FastMACurrent,SlowMACurrent);

He intentado todo, pero no encuentro la solución... por favor ayúdame por la salud de esta comunidad , quiero algo similar a esto:

//----------------------- ESTABLECER EL VALOR DE LA VARIABLE

if(ConfirmedOnEntry==true)

{

if(CheckTime==iTime(NULL,TimeFrame,0)) return(0); else CheckTime = iTime(NULL,TimeFrame,0);

FastMACurrent = iMA(NULL,TimeFrame,2,FastMAshift,FastMAType,FastMAPrice,1);

SlowMACurrent = iMA(NULL,TimeFrame,4,SlowMAshift,SlowMAType,SlowMAPrice,1);

FastMACurrent2 = iMA(NULL,TimeFrame,5,FastMAshift,FastMAType,FastMAPrice,1);

SlowMACurrent2 = iMA(NULL,TimeFrame,20,SlowMAshift,SlowMAType,SlowMAPrice,1);

}

else

{

FastMACurrent = iMA(NULL,TimeFrame,2,FastMAshift,FastMAType,FastMAPrice,0);

SlowMACurrent = iMA(NULL,TimeFrame,4,SlowMAshift,SlowMAType,SlowMAPrice,0);

FastMACurrent2 = iMA(NULL,TimeFrame,5,FastMAshift,FastMAType,FastMAPrice,0);

SlowMACurrent2 = iMA(NULL,TimeFrame,20,SlowMAshift,SlowMAType,SlowMAPrice,0);

}

CrossDirection = subCrossDirection(FastMACurrent,SlowMACurrent && FastMACurrent2,SlowMACurrent2);

Archivos adjuntos:
 

¿Qué pasa con mi indicador? Mensaje de error

Hola,

aquí está el código de mi indicador:

#property indicador_separar_ventana

#property indicator_buffers 2

#property indicador_color1 Verde mar claro

#property indicador_color2 Azul

extern string Timeframe_Momentum = "PERIOD_H1";

extern int Periode_Momentum = 500;

extern int Periode_MA_Momentum = 8;

double Buffer_Mom[];

double Buffer_Ma[];

int init()

{

//---- indicadores

SetIndexStyle(0,DRAW_LINE);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(0,Buffer_Mom);

SetIndexBuffer(1,Buffer_Ma);

//----

SetIndexEmptyValue(0,0.0);

SetIndexEmptyValue(1,0.0);

SetIndexDrawBegin(0,100);

SetIndexDrawBegin(1,100);

//----

return(0);

}

int deinit()

{

//----

return(0);

}

void start()

{

int barras_contadas=IndicadorContado();

int limit=Barras_contadas;

if(counted_bars>0) limit++;

//----

for(int i=0; i<límite; i++)

{

Buffer_Mom=iMomentum(NULL,Timeframe_Momentum,Periode_Momentum,PRICE_CLOSE,i);

Buffer_Ma=iMAOnArray(Buffer_Mom,0,Periode_MA_Momentum,0,MODE_SMA,i);

}

return(0);

}

Este es el código que utilizo en el programa principal:

double GMI1 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 0,1);

double GMI2 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 1,2);

Ahora mis problemas:

Me sale este mensaje de error EURUSD,M5: número entero no válido como parámetro 2 para la función de llamada al indicador

¡Y no hay Buffer_Ma en mi gráfico! ¿Qué pasa con mi código?

 

Hola

¿Cómo se calcula la desviación estándar entre la apertura y el máximo de la barra anterior?

Cualquier ayuda sería genial.

Saludos

Beno

 

PERIOD_H1 es una macro interger, intente cambiar esa línea a

extern int TimeFrame_Momentum = PERIOD_H1;

o simplemente reemplazar PERIOD_H1 con 60 y tratar de que

sunshineh:
Hola,

aquí está el código de mi indicador:

#property indicator_separate_window

#property indicator_buffers 2

#property indicator_color1 LightSeaGreen

#property indicador_color2 Azul

extern string Timeframe_Momentum = "PERIOD_H1";

extern int Periode_Momentum = 500;

extern int Periode_MA_Momentum = 8;

double Buffer_Mom[];

double Buffer_Ma[];

int init()

{

//---- indicadores

SetIndexStyle(0,DRAW_LINE);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(0,Buffer_Mom);

SetIndexBuffer(1,Buffer_Ma);

//----

SetIndexEmptyValue(0,0.0);

SetIndexEmptyValue(1,0.0);

SetIndexDrawBegin(0,100);

SetIndexDrawBegin(1,100);

//----

return(0);

}

int deinit()

{

//----

return(0);

}

void start()

{

int barras_contadas=IndicadorContado();

int limit=Barras_contadas;

if(counted_bars>0) limit++;

//----

for(int i=0; i<límite; i++)

{

Buffer_Mom=iMomentum(NULL,Timeframe_Momentum,Periode_Momentum,PRICE_CLOSE,i);

Buffer_Ma=iMAOnArray(Buffer_Mom,0,Periode_MA_Momentum,0,MODE_SMA,i);

}

return(0);

}

Este es el código que utilizo en el programa principal:

double GMI1 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 0,1);

double GMI2 = iCustom(NULL,0, "GMI",Timeframe_Momentum,Periode_Momentum,Periode_MA_Momentum, 1,2);

Ahora mis problemas:

Me sale este mensaje de error EURUSD,M5: número entero no válido como parámetro 2 para la función de llamada al indicador

¡Y no hay Buffer_Ma en mi gráfico! ¿Qué pasa con mi código?
Razón de la queja: