[¡Archivo!] Cualquier pregunta de novato, para no saturar el foro. Profesionales, no lo dejéis pasar. No podría ir a ningún sitio sin ti - 2. - página 216
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 por la respuesta, pero tengo el algoritmo escrito en ruso, pero no soy bueno en mql, al menos un consejo sobre las funciones que fijaron el número (lo escribiré en la configuración) de órdenes abiertas de venta/compra, y luego la señal para prohibir la colocación de órdenes pendientes sellstop/buystop.
¿Por qué este algoritmo, que ya has escrito, no se refleja en tu código?
¿Crees que con sólo mirar el código que no has escrito de una vez puedes señalar tu error?
Todavía tenemos que "leerlo"...
Aquí hay un extracto de código donde todo lo que escribimos en un trozo de papel se muestra también en el código:
Así que, hasta que no se arregle lo más sencillo, no deberías ir más allá...
¿Y qué tienes? Lo has amontonado todo, no has comentado ni una sola línea. Ahora tómate una semana de descanso y vuelve a tu código. Estoy seguro de que tardarás dos horas en recordarlo. 100%
Lote permanente 0,1.
En ese caso, en mi opinión, es un buen resultado para la semana. No recuerdo exactamente, creo que son unos 800 puntos. Sólo la estabilidad me parece que no está bien: el gráfico no es muy suave... De todos modos, gracias por la respuesta. Por lo menos, está surgiendo alguna figura. Estoy bastante lejos de eso: 3000-4000 puntos al año es el límite. Pero mi gráfico de equilibrio es más plano...
He pensado: 0,1 de lote fijo, pero ¿con qué apalancamiento? No queda muy claro en la tabla de saldo cuántos puntos se han ganado.
¿Cómo puedo obtener el valor del nivel de Fiba seleccionado de dicho indicador?
//+------------------------------------------------------------------+
//| Parabolic_ZZ.mq4 ||
//| Copyright © 2009, Vic2008 |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, Vic2008"
#enlace de la propiedad ""
#include <stdlib.mqh>
#propiedad ventana_del_gráfica_del_indicador
#property indicator_buffers 2
#property indicator_color1 Rojo
#property indicator_color2 Magenta
//---- parámetros de entrada
extern double SAR_step=0.02; //parámetros parabólicos.
extern double SAR_máximo=0,2;
extern int BarsCount = 500; //Distancia en barras para dibujar el indicador.
extern bool Fibo1_off = False; /Desactivar los niveles de Fibo.
extern bool Fibo2_off = False;
extern bool Fibo_Absolut_Value = False; //Incluir los valores absolutos del precio en los niveles de Fibo.
color externo Label_Color = Gris;
extern color Fibo_Color = Azul;
//---- buffers
doble ExtMapBuffer1[];
doble ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Función de inicialización de indicadores personalizada |
//+------------------------------------------------------------------+
int init()
{
//---- indicadores
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_SECTION);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(1,DRAW_SECTION,0,2,Magenta);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Función de desinicialización de indicadores personalizada |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll(0,OBJ_ARROW);
ObjectDelete("FiboZZLast");
ObjectDelete("FiboZZPrev");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Función de iteración de indicadores personalizada |
//+------------------------------------------------------------------+
int inicio()
{
//int counted_bars=IndicatorCounted();
cadena txt;
int w,PosLow,PosHigh;
double LPic=1000000,HPic=0,price;
datetime TimeTmp;
//----
ExtMapBuffer1[0]=Close[0];
ExtMapBuffer2[0]=EMPTY_VALUE;
for( w=0;w<BarsCount;w++){
if( w!=0 ){ ExtMapBuffer1[w]=EMPTY_VALUE; ExtMapBuffer2[w]=EMPTY_VALUE; }
if( iSAR(NULL,0,SAR_step,SAR_maximum,w) > Close[w] && LPic>=Low[w] ){ LPic=Low[w]; PosLow=w; }
if( iSAR(NULL,0,SAR_step,SAR_maximum,w) < Close[w] && HPic<=High[w] ){ HPic=High[w]; PosHigh=w; }
// H -> L
if( iSAR(NULL,0,SAR_paso,SAR_máximo,(w+1)) > Close[w+1] && iSAR(NULL,0,SAR_step,SAR_maximum,w) < Close[w] && HPic!=0)
{
ExtMapBuffer1[PosHigh]=HPic;
ExtMapBuffer2[PosHigh]=HPic;
HPic=0;
}
// L -> H
if( iSAR(NULL,0,SAR_paso,SAR_máximo,w) < Close[w] && iSAR(NULL,0,SAR_paso,SAR_máximo,w+1) > Close[w+1] && LPic!=1000000 )
{
ExtMapBuffer1[PosLow]=LPic;
ExtMapBuffer2[PosLow]=LPic;
LPic=1000000;
}
}
if( Fibo1_off ) ObjectDelete("FiboZZLast");
if( Fibo2_off ) ObjectDelete("FiboZZPrev");
//Saca las marcas de precio y los niveles de FIBO
int wave_cnt=0;
for( w=0;w<BarsCount;w++){
if( ExtMapBuffer2[w]!=EMPTY_VALUE ){
if( wave_cnt<=3 ){
ObjectDelete("PZZ_"+DoubleToStr( wave_cnt, 0));
ObjectCreate("PZZ_"+DoubleToStr( wave_cnt, 0), OBJ_ARROW, 0, Time[w], ExtMapBuffer2[w], Time[w], 0);
ObjectSet("PZZ_"+DoubleToStr( wave_cnt, 0), OBJPROP_ARROWCODE, SYMBOL_LEFTPRICE );
ObjectSet("PZZ_"+DoubleToStr( wave_cnt, 0), SYMBOL_LEFTPRICE, ExtMapBuffer2[w]);
ObjectSet("PZZ_"+DoubleToStr( wave_cnt, 0), OBJPROP_COLOR, Label_Color );
if(wave_cnt==1 && Fibo1_off==False ){
ObjectDelete("FiboZZLast");
ObjectCreate("FiboZZLast", OBJ_FIBO, 0, TimeTmp, ExtMapBuffer2[w], TimeTmp, price);
ObjectSet("FiboZZLast", OBJPROP_LEVELCOLOR, Fibo_Color);
ObjectSet("FiboZZLast", OBJPROP_COLOR, Fibo_Color);
ObjectSet("FiboZZLast", OBJPROP_RAY, False );// Para habilitar los rayos sustituya False por True
ObjectSet("FiboZZLast", OBJPROP_FIBOLEVELS, 14);
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+0,0.236); ObjectSetFiboDescription("FiboZZLast",0, "23.6");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+1,0.382); ObjectSetFiboDescription("FiboZZLast",1, "38.2");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+2,0.50); ObjectSetFiboDescription("FiboZZLast",2, "50.0");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+3,0.618); ObjectSetFiboDescription("FiboZZLast",3, "61.8");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+4,1.0); ObjectSetFiboDescription("FiboZZLast",4, "100.0");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+5,1.618); ObjectSetFiboDescription("FiboZZLast",5, "161.8");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+6,2.618); ObjectSetFiboDescription("FiboZZLast",6, "261.8");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+7,4.236); ObjectSetFiboDescription("FiboZZLast",7, "423.6");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+8,0.088); ObjectSetFiboDescription("FiboZZLast",8, "8.8");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+9,0.145); ObjectSetFiboDescription("FiboZZLast",9, "14.5");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+10,0.764); ObjectSetFiboDescription("FiboZZLast",10, "76.4");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+11,0.855); ObjectSetFiboDescription("FiboZZLast",11, "85.5");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+12,0.921); ObjectSetFiboDescription("FiboZZLast",12, "92.1");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+13,0.0); ObjectSetFiboDescription("FiboZZLast",13, "0.0");
if( Valor_Fibo_Absolut ){
ObjectSet("FiboZZLast", OBJPROP_FIBOLEVELS, 14);
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+0,0.236); ObjectSetFiboDescription("FiboZZLast",0, "23.6 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+1,0.382); ObjectSetFiboDescription("FiboZZLast",1, "38.2 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+2,0.50); ObjectSetFiboDescription("FiboZZLast",2, "50.0 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+3,0.618); ObjectSetFiboDescription("FiboZZLast",3, "61.8 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+4,1.0); ObjectSetFiboDescription("FiboZZLast",4, "100.0 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+5,1.618); ObjectSetFiboDescription("FiboZZLast",5, "161.8 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+6,2.618); ObjectSetFiboDescription("FiboZZLast",6, "261.8 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+7,4.236); ObjectSetFiboDescription("FiboZZLast",7, "423.6 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+8,0.088); ObjectSetFiboDescription("FiboZZLast",8, "8.8 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+9,0.145); ObjectSetFiboDescription("FiboZZLast",9, "14.5 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+10,0.764); ObjectSetFiboDescription("FiboZZLast",10, "76.4 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+11,0.855); ObjectSetFiboDescription("FiboZZLast",11, "85.5 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+12,0.921); ObjectSetFiboDescription("FiboZZLast",12, "92.1 %$");
ObjectSet("FiboZZLast",OBJPROP_FIRSTLEVEL+13,0.0); ObjectSetFiboDescription("FiboZZLast",13, "0.0");
}
}
if( wave_cnt==2 && Fibo2_off==False ){
ObjectDelete("FiboZZPrev");
ObjectCreate("FiboZZPrev", OBJ_FIBO, 0, TimeTmp, ExtMapBuffer2[w], TimeTmp, price);
ObjectSet("FiboZZPrev", OBJPROP_LEVELCOLOR, Fibo_Color);
ObjectSet("FiboZZPrev", OBJPROP_COLOR, Fibo_Color);
ObjectSet("FiboZZPrev", OBJPROP_RAY, False );// Para habilitar los rayos sustituya False por True
ObjectSet("FiboZZPrev", OBJPROP_FIBOLEVELS, 14);
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+0,0.236); ObjectSetFiboDescription("FiboZZPrev",0, "23.6");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+1,0.382); ObjectSetFiboDescription("FiboZZPrev",1, "38.2");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+2,0.50); ObjectSetFiboDescription("FiboZZPrev",2, "50.0");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+3,0.618); ObjectSetFiboDescription("FiboZZPrev",3, "61.8");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+4,1.0); ObjectSetFiboDescription("FiboZZPrev",4, "100.0");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+5,1.618); ObjectSetFiboDescription("FiboZZPrev",5, "161.8");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+6,2.618); ObjectSetFiboDescription("FiboZZPrev",6, "261.8");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+7,4.236); ObjectSetFiboDescription("FiboZZPrev",7, "423.6");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+8,0.088); ObjectSetFiboDescription("FiboZZPrev",8, "8.8");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+9,0.145); ObjectSetFiboDescription("FiboZZPrev",9, "14.5");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+10,0.764); ObjectSetFiboDescription("FiboZZPrev",10, "76.4");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+11,0.855); ObjectSetFiboDescription("FiboZZPrev",11, "85.5");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+12,0.921); ObjectSetFiboDescription("FiboZZPrev",12, "92.1");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+13,0.0); ObjectSetFiboDescription("FiboZZPrev",13, "0.0");
if( Valor_Fibo_Absolut ){
ObjectSet("FiboZZPrev", OBJPROP_FIBOLEVELS, 14);
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+0,0.236); ObjectSetFiboDescription("FiboZZPrev",0, "23.6 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+1,0.382); ObjectSetFiboDescription("FiboZZPrev",1, "38.2 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+2,0.50); ObjectSetFiboDescription("FiboZZPrev",2, "50.0 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+3,0.618); ObjectSetFiboDescription("FiboZZPrev",3, "61.8 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+4,1.0); ObjectSetFiboDescription("FiboZZPrev",4, "100.0 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+5,1.618); ObjectSetFiboDescription("FiboZZPrev",5, "161.8 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+6,2.618); ObjectSetFiboDescription("FiboZZPrev",6, "261.8 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+7,4.236); ObjectSetFiboDescription("FiboZZPrev",7, "423.6 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+8,0.088); ObjectSetFiboDescription("FiboZZPrev",8, "8.8 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+9,0.145); ObjectSetFiboDescription("FiboZZPrev",9, "14.5 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+10,0.764); ObjectSetFiboDescription("FiboZZPrev",10, "76.4 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+11,0.855); ObjectSetFiboDescription("FiboZZPrev",11, "85.5 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+12,0.921); ObjectSetFiboDescription("FiboZZPrev",12, "92.1 %$");
ObjectSet("FiboZZPrev",OBJPROP_FIRSTLEVEL+13,0.0); ObjectSetFiboDescription("FiboZZPrev",13, "0.0");
}
}
}
wave_cnt++;
precio=ExtMapBuffer2[w];
TimeTmp=Time[w];
}
}
//----
return(0);
}
//+------------------------------------------------------------------+
¿Cómo obtener el valor del nivel de fibra seleccionado de dicho indicador?
¿Qué carajo?
quizás quieras poner también "guerra y paz".
ayuda por favor... mi Asesor Experto comprueba las órdenes abiertas ...una orden puede estar abierta a la vez ...pero cuando introduzco un stop en una línea recta en el momento de abrir una orden da error 130...por ejemplo era así
if(down>0)
{ticket=OrderSend(Symbol(),OP_SELL,dLot,Bid,3,0,Bid-TakeProfit*Point,0,16384,0,Red);
Introduzco un tope de tamaño 100
ticket=OrderSend(Symbol(),OP_SELL,dLot,Bid,3,100,Bid-TakeProfit*Point,0,16384,0,Red); ...da error 130 en el probador
DTz Alpari ... tal vez debería modificar p después de abrir una orden y colocar una parada? ... dime cómo aproximadamente esto se puede hacer o me señalan a un EA que hace esto ... por favor
ayuda por favor...
ayuda por favor... el asesor tiene una función de comprobación de órdenes abiertas...una orden puede estar abierta a la vez...pero al introducir un tamaño de stop directamente en el momento de la apertura
una nueva orden puede ser modificada después de que se ha abierto y se puede establecer una parada ... ¿podría por favor aconsejar cómo hacer esto o señalar a un EA donde se hace esto ... por favor
Un tope debe ser de tipo doble. Se debe especificar el precio al que se debe fijar el stop.
100*Punto
¿Por qué este algoritmo que ya has escrito no se refleja en tu código?
¿Crees que con sólo mirar tu código sin formato puedes señalar inmediatamente tu error?
Todavía tienes que "leerlo"...
Aquí hay un extracto del código donde todo lo que has esbozado en un papel se muestra también en el código:
Así que, hasta que no consigas hacer bien lo más sencillo, no deberías ir más allá...
¿Y tú? Lo has amontonado todo, no has comentado ni una sola línea. Ahora tómate una semana de descanso y vuelve a tu código. Estoy seguro de que tardarás dos horas en recordarlo. 100%
Lo siento, el código no es mío, lo estoy estudiando yo mismo. Era una parte relativa a las órdenes pendientes, el resto era bla-bla, como solemos hacer con las configuraciones, los lotes, los fractales y el arrastre. Este EA no está funcionando, es decir, está perdiendo a causa de las órdenes apiladas, así que he decidido poner algunas restricciones y ver qué pasa. Voy a utilizar el lenguaje mql pero no tengo ni idea de qué hacer con él. Gracias, lo investigaré.
Eso es raro. ¿De qué hay que disculparse? Bueno... Te he mostrado cómo debes diseñar tus propios códigos, para que no tengas que resolverlo después.
Y como su código es de otra persona... Pero... También puede comentar las cadenas cuyo significado le haya quedado claro durante el análisis. Después será más fácil de entender, y será mejor que escribas el tuyo propio sobre la base del analizado. Así que para comprenderlo completamente, entenderlo y convertirlo a sus propias necesidades.
Eso esexactamente lo que te llevará a una comprensión lógica. También será bueno para ti. :)
Buena suerte.