Ayuda a la codificación - página 400

 
DMNIK:
¡Hola! Puedes desvincularte de la versión demo.

Lo siento, no puedo cambiar el archivo ex4

 
makototokyo:
Hola,

Necesito ayuda para hacer que la alerta funcione. funciona bien, pero alrededor del 35% del tiempo no hace el sonido cuando hay señal. podría alguien echar un vistazo y arreglarlo.

Muchas gracias.

Hola Makototokyo,

Esa es la versión compilada en tiempo de ejecución (.ex4) y no se puede cambiar.

Necesitas el código fuente para poder cambiar algo en el indicador.

Intenta encontrar y subir el código fuente .mq4... y alguien podrá ayudarte entonces.

Espero que esto te ayude,

Robert

 
dansmol:
Señores

¿Se puede hacer?

Respeta

Dan

¿Qué es M-Candle? ¿O MultiPair trend_v2.1?

 

Hola, una pregunta sobre la marcha...

Estoy escribiendo este simple indicador, pero no sé todavía cómo utilizar la instrucción "si". ¿Podría darme la respuesta sobre esto? Gracias

#property indicator_chart_window

extern string LBL1_FontType = "Tahoma"; //Font type label 1

extern color LBL1_FontColor = Black; //Font color label 1

extern int LBL1_FontSize = 18; //Font size label 1

extern string LBL2_FontType = "Arial"; //Font type label 2

extern color LBL2_FontColor = Green; //Font color label 2

extern int LBL2_FontSize = 12; //Font size label 2

extern string LBL3_FontType = "Tahoma"; //Font type label 3

extern color LBL3_FontColor = Black; //Font color label 3

extern int LBL3_FontSize = 10; //Font size label 3

extern string LBL4_FontType = "Tahoma"; //Font type label 3

extern color LBL4_FontColor = DarkViolet; //Font color label 3

extern int LBL4_FontSize = 8; //Font size label 3

extern string LBL5_FontType = "Tahoma"; //Font type label 4

extern color LBL5_FontColor = DarkViolet; //Font color label 4

extern int LBL5_FontSize = 8; //Font size label 4

extern string LBL6_FontType = "Tahoma"; //Font type label 5

extern color LBL6_FontColor = DarkViolet; //Font color label 5

extern int LBL6_FontSize = 8; //Font size label 5

extern int Corner = 1; //Position corner

extern int Xpos = 10; //X position label 1

extern int Ypos = 10; //Y position label 2

// Symbol_Name = "Symbol name"; //Text label 1

extern string Rb_Size = "rb2"; //Text label 2

extern int Contract_Size = 1; //Text label 3

extern double Tick_Value = 12.5; //Text label 4

extern double Margin = 2500; //Text label 5

extern double Commissions = 3.12; //Text label 6

extern string Currency = "€";

extern bool FullVersion = false; //enable / disable full labels list

//--------------------------------

int init()

{

return(0);

}

//--------------------------------

int deinit()

{

ObjectDelete("Label_1");

ObjectDelete("Label_2");

ObjectDelete("Label_3");

ObjectDelete("Label_4");

ObjectDelete("Label_5");

ObjectDelete("Label_6");

return(0);

}

//---------------------------------

int start()

{

ObjectCreate("Label_1", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_1", Symbol(), LBL1_FontSize, LBL1_FontType, LBL1_FontColor);

ObjectSet("Label_1", OBJPROP_CORNER, Corner);

ObjectSet("Label_1", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_1", OBJPROP_YDISTANCE, Ypos);

ObjectCreate("Label_2", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_2", Rb_Size, LBL2_FontSize, LBL2_FontType, LBL2_FontColor);

ObjectSet("Label_2", OBJPROP_CORNER, Corner);

ObjectSet("Label_2", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_2", OBJPROP_YDISTANCE, Ypos+30);

if (FullVersion = true)

{

ObjectCreate("Label_3", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_3", "CONTRACT SIZE: "+Contract_Size, LBL3_FontSize, LBL3_FontType, LBL3_FontColor);

ObjectSet("Label_3", OBJPROP_CORNER, Corner);

ObjectSet("Label_3", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_3", OBJPROP_YDISTANCE, Ypos+80);

ObjectCreate("Label_4", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_4", "tick value: "+Tick_Value*Contract_Size+" "+Currency, LBL4_FontSize, LBL4_FontType, LBL4_FontColor);

ObjectSet("Label_4", OBJPROP_CORNER, Corner);

ObjectSet("Label_4", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_4", OBJPROP_YDISTANCE, Ypos+100);

ObjectCreate("Label_5", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_5", "margin: "+Margin*Contract_Size+" "+Currency, LBL5_FontSize, LBL5_FontType, LBL5_FontColor);

ObjectSet("Label_5", OBJPROP_CORNER, Corner);

ObjectSet("Label_5", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_5", OBJPROP_YDISTANCE, Ypos+112);

ObjectCreate("Label_6", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_6", "commissions: "+Commissions*Contract_Size+" "+Currency, LBL6_FontSize, LBL6_FontType, LBL6_FontColor);

ObjectSet("Label_6", OBJPROP_CORNER, Corner);

ObjectSet("Label_6", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_6", OBJPROP_YDISTANCE, Ypos+124);

}

return(0);

}

//+------------------------------------------------------------------+
 
thefxpros:
Hola, una pregunta sobre la marcha...

Estoy escribiendo este sencillo indicador pero no sé todavía cómo utilizar la instrucción "if". ¿Podría darme la respuesta sobre esto? Gracias

#property indicator_chart_window

extern string LBL1_FontType = "Tahoma"; //Font type label 1

extern color LBL1_FontColor = Black; //Font color label 1

extern int LBL1_FontSize = 18; //Font size label 1

extern string LBL2_FontType = "Arial"; //Font type label 2

extern color LBL2_FontColor = Green; //Font color label 2

extern int LBL2_FontSize = 12; //Font size label 2

extern string LBL3_FontType = "Tahoma"; //Font type label 3

extern color LBL3_FontColor = Black; //Font color label 3

extern int LBL3_FontSize = 10; //Font size label 3

extern string LBL4_FontType = "Tahoma"; //Font type label 3

extern color LBL4_FontColor = DarkViolet; //Font color label 3

extern int LBL4_FontSize = 8; //Font size label 3

extern string LBL5_FontType = "Tahoma"; //Font type label 4

extern color LBL5_FontColor = DarkViolet; //Font color label 4

extern int LBL5_FontSize = 8; //Font size label 4

extern string LBL6_FontType = "Tahoma"; //Font type label 5

extern color LBL6_FontColor = DarkViolet; //Font color label 5

extern int LBL6_FontSize = 8; //Font size label 5

extern int Corner = 1; //Position corner

extern int Xpos = 10; //X position label 1

extern int Ypos = 10; //Y position label 2

// Symbol_Name = "Symbol name"; //Text label 1

extern string Rb_Size = "rb2"; //Text label 2

extern int Contract_Size = 1; //Text label 3

extern double Tick_Value = 12.5; //Text label 4

extern double Margin = 2500; //Text label 5

extern double Commissions = 3.12; //Text label 6

extern string Currency = "€";

extern bool FullVersion = false; //enable / disable full labels list

//--------------------------------

int init()

{

return(0);

}

//--------------------------------

int deinit()

{

ObjectDelete("Label_1");

ObjectDelete("Label_2");

ObjectDelete("Label_3");

ObjectDelete("Label_4");

ObjectDelete("Label_5");

ObjectDelete("Label_6");

return(0);

}

//---------------------------------

int start()

{

ObjectCreate("Label_1", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_1", Symbol(), LBL1_FontSize, LBL1_FontType, LBL1_FontColor);

ObjectSet("Label_1", OBJPROP_CORNER, Corner);

ObjectSet("Label_1", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_1", OBJPROP_YDISTANCE, Ypos);

ObjectCreate("Label_2", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_2", Rb_Size, LBL2_FontSize, LBL2_FontType, LBL2_FontColor);

ObjectSet("Label_2", OBJPROP_CORNER, Corner);

ObjectSet("Label_2", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_2", OBJPROP_YDISTANCE, Ypos+30);

if (FullVersion = true)

{

ObjectCreate("Label_3", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_3", "CONTRACT SIZE: "+Contract_Size, LBL3_FontSize, LBL3_FontType, LBL3_FontColor);

ObjectSet("Label_3", OBJPROP_CORNER, Corner);

ObjectSet("Label_3", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_3", OBJPROP_YDISTANCE, Ypos+80);

ObjectCreate("Label_4", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_4", "tick value: "+Tick_Value*Contract_Size+" "+Currency, LBL4_FontSize, LBL4_FontType, LBL4_FontColor);

ObjectSet("Label_4", OBJPROP_CORNER, Corner);

ObjectSet("Label_4", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_4", OBJPROP_YDISTANCE, Ypos+100);

ObjectCreate("Label_5", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_5", "margin: "+Margin*Contract_Size+" "+Currency, LBL5_FontSize, LBL5_FontType, LBL5_FontColor);

ObjectSet("Label_5", OBJPROP_CORNER, Corner);

ObjectSet("Label_5", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_5", OBJPROP_YDISTANCE, Ypos+112);

ObjectCreate("Label_6", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_6", "commissions: "+Commissions*Contract_Size+" "+Currency, LBL6_FontSize, LBL6_FontType, LBL6_FontColor);

ObjectSet("Label_6", OBJPROP_CORNER, Corner);

ObjectSet("Label_6", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_6", OBJPROP_YDISTANCE, Ypos+124);

}

return(0);

}

//+------------------------------------------------------------------+

thefxpros

Por lo que veo lo estás haciendo bien

El indicador dibujará las etiquetas 3 a 6 sólo si FullVersion está establecido en true

 
thefxpros:
Hola, una pregunta al vuelo... estoy escribiendo este sencillo indicador pero aún no sé cómo utilizar la instrucción "if". ¿Podrías darme la respuesta sobre esto? Gracias

Debes escribirlo de esta manera : if (FullVersion == true) o de esta manera : if (FullVersion)

 
airquest:
Deberás escribirlo de esta manera : si (FullVersion == true) o de esta manera : si (FullVersion)

Ooooops

No me fijé en el if (FullVersion = true).

thefxpros, airquest tiene razón : debe ser "==" no "=" en la condición if

 

¿Por qué el máximo y el mínimo no se fijan automáticamente?intraday_intensityma.mq4

Archivos adjuntos:
 
QuantF:
¿Por qué el máximo y el mínimo no se fijan automáticamente?intraday_intensityma.mq4

QuantF

Pruebe ahora : intraday_intensityma_1.mq4

Pero comprueba también la línea 55 : si la condición no es la misma que el divisor

Archivos adjuntos:
 
mladen:
QuantF

Pruebe ahora : intraday_intensityma_1.mq4

Pero comprueba también la línea 55 : si la condición no es la misma que el divisor

¡Gracias!

Razón de la queja: