Está perdiendo oportunidades comerciales:
- Aplicaciones de trading gratuitas
- 8 000+ señales para copiar
- Noticias económicas para analizar los mercados financieros
Registro
Entrada
Usted acepta la política del sitio web y las condiciones de uso
Si no tiene cuenta de usuario, regístrese
gracias
gracias. eres un sabor de vida
Me gustaría tener la respuesta.
Acabo de terminar de escribir mi primer EA y trató de probarlo en Strategy Tester.
Estaba recibiendo errores que se muestran en el diario ST así que traté de usar la función de impresión en mi EA para depurar los problemas. He resuelto algunos errores hasta ahora de esta manera, pero es un proceso lento.en el metaeditor bajo el menú de edición existe "toggle breakpoint" ... como usar breakpoint?
Sólo para información:
- hilo sobre la función de correo electrónico (cómo codificar) https://www.mql5.com/en/forum/174336
- buen artículo con algunas herramientas https://www.mql5.com/en/forum/176053
Código para TP y SL invisibles de los corredores
Hola a todos,
Con la paranoia de los brokers cazando SLs y ampliando los spreads para evitar los TPs, estoy buscando información sobre cómo ocultar los TP y SL a los brokers.
Sé que presentando un TP y SL al broker, en caso de que te desconectes tu orden está "a salvo". Mientras que manteniendo la información de forma remota, existe el peligro de grandes pérdidas en el caso de que se pierda la conexión.
¿Alguien tiene un EA o un ejemplo de código sobre cómo mantener el TP y el SL ocultos al broker?
¡Gracias!
Mike
Este EA lo tiene
Hola MikeP
Creo que este EA contiene lo que estás buscando. Por favor, PM mí si esto es lo que usted está buscando, tengo otra idea con esto.
Ayuda para simplificar un trozo de código
¡Hola a todos!
No soy un codificador profesional (¡ver más abajo!). Este código funciona bien pero ¿es posible simplificarlo? ¿Con un ciclo while/for por ejemplo? ¡Deseo el código más ligero! ¡¡¡Este es muy "pesado" y me sale el error "internal stack overflow-simplify the program, please"!!!
Es un indicador en una ventana aparte.
En el código de ejemplo, muestra la subida o bajada de MA para multi TF.
Gracias por su ayuda.
{
string MAfast_Trend_1, MAfast_Trend_5, MAfast_Trend_15;
double x;
color color_indic;
// period M1
double FastMA_1_1 = iMA(NULL,PERIOD_M1,FastMAPeriod,0,MAMethod,MAPrice,MAShift);
double FastMA_2_1 = iMA(NULL,PERIOD_M1,FastMAPeriod,0,MAMethod,MAPrice,MAShift+1);
if ((FastMA_1_1 > FastMA_2_1)) { MAfast_Trend_1 = "UP"; x = 256; color_indic = Lime; }
if ((FastMA_1_1 < FastMA_2_1)) { MAfast_Trend_1 = "DOWN"; x = 246; color_indic = Red; }
ObjectCreate("Trend_MAfast_1", OBJ_LABEL, WindowFind("xxxxxxx"), 0, 0);
ObjectSetText("Trend_MAfast_1",MAfast_Trend_1,7, "Verdana", color_indic);
ObjectSet("Trend_MAfast_1", OBJPROP_CORNER, 0);
ObjectSet("Trend_MAfast_1", OBJPROP_XDISTANCE, x);
ObjectSet("Trend_MAfast_1", OBJPROP_YDISTANCE, 22);
// period M5
double FastMA_1_5 = iMA(NULL,PERIOD_M5,FastMAPeriod,0,MAMethod,MAPrice,MAShift);
double FastMA_2_5 = iMA(NULL,PERIOD_M5,FastMAPeriod,0,MAMethod,MAPrice,MAShift+1);
if ((FastMA_1_5 > FastMA_2_5)) { MAfast_Trend_5 = "UP"; x = 256; color_indic = Lime; }
if ((FastMA_1_5 < FastMA_2_5)) { MAfast_Trend_5 = "DOWN"; x = 246; color_indic = Red; }
ObjectCreate("Trend_MAfast_5", OBJ_LABEL, WindowFind("xxxxxxx"), 0, 0);
ObjectSetText("Trend_MAfast_5",MAfast_Trend_5,7, "Verdana", color_indic);
ObjectSet("Trend_MAfast_5", OBJPROP_CORNER, 0);
ObjectSet("Trend_MAfast_5", OBJPROP_XDISTANCE, x);
ObjectSet("Trend_MAfast_5", OBJPROP_YDISTANCE, 37);
// period M15
double FastMA_1_15 = iMA(NULL,PERIOD_M15,FastMAPeriod,0,MAMethod,MAPrice,MAShift);
double FastMA_2_15 = iMA(NULL,PERIOD_M15,FastMAPeriod,0,MAMethod,MAPrice,MAShift+1);
if ((FastMA_1_15 > FastMA_2_15)) { MAfast_Trend_15 = "UP"; x = 256; color_indic = Lime; }
if ((FastMA_1_15 < FastMA_2_15)) { MAfast_Trend_15 = "DOWN"; x = 246; color_indic = Red; }
ObjectCreate("Trend_MAfast_15", OBJ_LABEL, WindowFind("xxxxxxx"), 0, 0);
ObjectSetText("Trend_MAfast_15",MAfast_Trend_15,7, "Verdana", color_indic);
ObjectSet("Trend_MAfast_15", OBJPROP_CORNER, 0);
ObjectSet("Trend_MAfast_15", OBJPROP_XDISTANCE, x);
ObjectSet("Trend_MAfast_15", OBJPROP_YDISTANCE, 52);
etc ...............
return(0);
}¿Ayuda con el código? Una operación sólo por vela
Estoy tratando de restringir mi ea para tomar un comercio sólo por vela. Estoy encontrando que en los picos de precios contra la tendencia estoy obteniendo múltiples operaciones perdedoras ya que los indicadores se están retrasando.
He visto el código antes pero no puedo encontrarlo. Si alguien puede indicarme un ea que tenga el código correcto o mostrarme cómo se hace.
Se hace en el ea UniversalMa pero no es tan claro para mí allí.
Cualquier ayuda se agradece.
Está aquí https://www.mql5.com/en/forum/173026
Estoy recopilando todas las funciones en este hilo https://www.mql5.com/en/forum/174329
Gracias de nuevo
Hola NewDigital, como siempre gracias por tu pronta respuesta.
Saludos
Aquí hay algunas maneras de simplificar su código:
SUSTITUIR LOS VALORES INDIVIDUALES DE LOS INDICADORES POR LA FUNCIÓN
double FastMA_1_5 = iMA(NULL,PERIOD_M5,FastMAPeriod,0,MAMethod,MAPrice,MAShift);
double FastMA_1_15 = iMA(NULL,PERIOD_M15,FastMAPeriod,0,MAMethod,MAPrice,MAShift);
.... se convierte en esto con una función añadida
maVal(5,1);
maVal(15,1);
LA FUNCIÓN QUE LLAMAN ES LA SIGUIENTE
double maVal(int tf, int shift)
{
return ( iMA(NULL,tf,FastMAPeriod,0,MAMethod,MAPrice,shift) );
}
* * * * * * * * * * * * * * * * * * * * * * * *
También reemplazar otras variables individuales que tiene como las variables de cadena con una matriz de cadena. Los arrays funcionarán muy bien en los bucles y simplificarán tu código porque tendrás que hacer menos declaraciones.
string MAfast_Trend_1, MAfast_Trend_5, MAfast_Trend_15;
.... se convierte en esto.....
cadena MAfast_Trend [3];